Skip to main content
Workbench
measure

Stabilizer Code Explorer

Write down stabilizer generators — one Pauli string per line — and get back what code they define: whether they are a valid stabilizer group at all, how many logical qubits they leave (k), the code distance (d), a set of logical operators, and the syndrome every single-qubit error produces. Start from a named code, then change a generator and watch the parameters move.

The smallest code that corrects any single-qubit error. Not CSS: every generator mixes X and Z. Error Correction Zoo entry ↗

I, X, Y, Z per qubit (_ also means identity); an optional leading + or −. Up to 30 qubits.

Code parameters

[[5, 1, 3]]

5 physical qubits, 4 independent checks, so 1 logical qubit. Distance 3: detects any error on up to 2 qubits, corrects any on up to 1.

not CSS as writtennon-degeneratematches the published [[5, 1, 3]]

Logical operators

One valid choice: the two operators of a pair anticommute with each other and commute with every other pair and every stabilizer. Multiplying any of them by a stabilizer gives an equally good representative.

X̄1 = IYYIX
Z̄1 = ZIXXI

A minimum-weight logical operator: IYYIX (weight 3). 105 Paulis searched.

Syndrome of every single-qubit error

QubitX errorY errorZ error
0000110111010
1100011010101
2110011100010
3011011111001
4001101110100

One bit per generator, in the order you wrote them; 1 means the error anticommutes with it. Rose: the all-zero syndrome — an undetected error. Amber: a syndrome shared with another single-qubit error.

How it is computed

Each Pauli string becomes a 2n-bit vector, and commuting becomes a symplectic inner product over GF(2). The number of logical qubits is n minus the rank of the generators; the logical operators are a symplectic basis for the Paulis that commute with every generator, modulo the generators themselves. Those steps are exact.

The distance is the hard part — computing it is NP-hard in general — so it is found by exhaustive search over Paulis of weight 1, 2, 3, … until one commutes with every generator without being a product of them. The search is capped at twenty million candidates; past that the page reports the range it has established instead of a number.

Signs are checked (a generator set whose product is −I is rejected) but do not change n, k or d. To see the surface code decoded rather than analysed, open the Decoder Lab; to run a syndrome-extraction circuit at scale, the Stabilizer Simulator.