A command‑line tool for computing the minimum distance of quantum codes, with support for CSS codes and parallelized algorithms.
Disclaimer: Qubitserf is in early development. While main functionality is implemented, expect edge cases and performance tuning to evolve.
-
Distance computation using a meet‑in‑the‑middle algorithm (default) with
$\mathcal{O}(n^{\lfloor d/2 \rfloor})$ memory, where:-
$n$ = number of qubits -
$d$ = code distance
-
-
Brouwer‑Zimmerman algorithm (
--bz): constant memory, parallelizable, ideal for large codes. -
CSS‑specific multi‑distance output (
--zx): returns both$Z$ -distance and$X$ -distance. -
Threaded computation (
--threads <count>): specify number of worker threads for parallel runs. -
Verbose logging (
--verboseor-v): enable detailed progress output. -
Flexible input: read stabilizer generators line by line; terminate input on an empty line or EOF.
-
Clone the repository:
git clone https://github.com/yourusername/qubitserf.git cd qubitserf -
Build:
make make interface
-
Artifacts: The
build/directory will contain:interface: the main executable- Supporting libraries and object files
./interface [OPTIONS]-
Prepare input: enter stabilizer generators (one per line) in Pauli notation (
I,X,Y,Z), for example:ZZIIXZ... XIIZZ... ... <empty line or Ctrl‑D> -
Run with flags (all flags are optional):
--bz: Use the Brouwer‑Zimmerman algorithm instead of the default.--zx: For CSS codes only, outputZ‑ andX‑distance as two integers.--threads <N>: Parallelize using up toNthreads. Must be a positive integer.--verbose,-v: Print detailed progress and diagnostics to stderr.
--bzand--zxrequire CSS codes. The program will error if used on non‑CSS input.- Input terminates on an empty line or EOF (
Ctrl‑Don UNIX,Ctrl‑Zon Windows).
$ ./interface --zx
ZZIIIZZIIIII
IXXIIIXXIIII
... (more lines)
<empty line>
5 4Outputs 5 4, the
$./interface -v --threads 16
ZIIIIIIIZXYYIIYYXIIIII
XIIIIIIIXYZZIIZZYIIIII
IZIIIIIIXXYXYIZXIIIIII
IXIIIIIIYYZYZIXYIIIIII
IIZIIIIIIXXYXYIZXIIIII
IIXIIIIIIYYZYZIXYIIIII
IIIZIIIIXYYYYXXZXIIIII
IIIXIIIIYZZZZYYXYIIIII
IIIIZIIIXZXXYYYYXIIIII
IIIIXIIIYXYYZZZZYIIIII
IIIIIZIIXZIYXYXXIIIIII
IIIIIXIIYXIZYZYYIIIIII
IIIIIIZIIXZIYXYXXIIIII
IIIIIIXIIYXIZYZYYIIIII
IIIIIIIZXYYIIYYXZIIIII
IIIIIIIXYZZIIZZYXIIIII
IIIIIIIIIIIIIIIIIZIIII
IIIIIIIIIIIIIIIIIIZIII
IIIIIIIIIIIIIIIIIIIZII
IIIIIIIIIIIIIIIIIIIIZI
IIIIIIIIIIIIIIIIIIIIIZ
Distance bound: >1
Elapsed:[15ms]
Distance bound: >2
Elapsed:[0ms]
Distance bound: >3
Elapsed:[15ms]
Distance bound: >4
Elapsed:[9ms]
Distance bound: >5
Elapsed:[119ms]
Distance bound: >6
Elapsed:[101ms]
Distance: =7
Elapsed:[1.087s] $ ./interface
ZZIIIZIIIZ
IZIZIZIZIZ
... (more lines)
<empty line>
4Prints the single distance 4 for a non-CSS code.