A stabilizer code is a quantum error-correcting code whose protected subspace is defined as the set of states left unchanged by a group of commuting Pauli operators, called the stabilizers. Measuring these operators reveals an error syndrome without revealing, and therefore without destroying, the encoded quantum information.
In quantum error correction, the stabilizer formalism introduced by Daniel Gottesman is the common language for almost every practical code, including the Shor code, the Steane code, the surface code and modern quantum LDPC codes. It turns the design of quantum codes into a problem of linear algebra over binary vectors, which is why it dominates the field of quantum computing.
How stabilizers define a protected subspace
A stabilizer code on n physical qubits is specified by an abelian subgroup S of the n-qubit Pauli group that does not contain -I. The code space is the set of states |ψ⟩ with g|ψ⟩ = |ψ⟩ for every g in S. If S has n − k independent generators, the code space has dimension 2^k and therefore stores k logical qubits.
Because every stabilizer has eigenvalues +1 or −1, measuring a generator yields one syndrome bit. A code state always gives +1. An error E that anticommutes with a generator flips that outcome to −1, while an error that commutes with all generators leaves the syndrome unchanged. The pattern of flipped bits points to the likely error, and a syndrome decoder chooses a correction.
The table lists the key parameters used to describe any stabilizer code.
| Parameter | Symbol | Meaning |
|---|---|---|
| Physical qubits | n | Qubits that carry the encoded state |
| Logical qubits | k | Protected qubits, equal to n minus the generator count |
| Code distance | d | Minimum weight of a nontrivial logical operator |
| Correctable errors | t | Up to (d − 1)/2 arbitrary single-qubit errors |
| Stabilizer weight | w | Qubits touched by each generator measurement |
Codes are written with the notation [[n, k, d]]. The double brackets distinguish quantum codes from classical [n, k, d] codes.
Logical operators and code distance
Logical operators are Pauli operators that commute with every stabilizer but are not themselves stabilizers. They act on the encoded information while keeping the state inside the code space, so they implement logical X and Z for each of the k logical qubits.
The code distance d is the smallest weight among these logical operators. An error of weight below d either is detected or acts trivially, while an error matching a logical operator silently corrupts the data. Undetected logical errors are therefore the failure mode that error correction must make rare, and increasing d is the main way to suppress the logical error rate.
A subtle feature is degeneracy: two different physical errors may differ only by a stabilizer and therefore have the same effect on the encoded state. Degenerate codes can correct more error patterns than their syndrome count suggests, which has no direct analog in classical coding.
Important families of stabilizer codes
Many well-known codes are stabilizer codes that differ in size, geometry and the operations they support. The table compares representative examples.
| Code | Parameters | Notable property |
|---|---|---|
| Five-qubit code | [[5, 1, 3]] | Smallest code that corrects any single-qubit error |
| Steane code | [[7, 1, 3]] | CSS code with transversal Clifford gates |
| Shor code | [[9, 1, 3]] | First quantum code, built from repetition codes |
| Rotated surface code | [[d², 1, d]] | Weight-4 local checks on a 2D grid |
| Bivariate bicycle codes | For example [[144, 12, 12]] | Quantum LDPC codes with high encoding rate |
CSS codes, named after Calderbank, Shor and Steane, form a large subclass whose generators consist only of X-type or only of Z-type operators. They are built from two classical linear codes satisfying an orthogonality condition, which lets bit-flip and phase-flip errors be decoded separately.
Stabilizer codes in fault-tolerant computing
Stabilizer codes connect naturally to the Clifford group. Clifford operations map stabilizers to stabilizers, so encoding circuits, syndrome extraction and many logical gates stay within the formalism, and the Gottesman–Knill theorem allows such circuits to be simulated efficiently on classical computers. This makes large-scale simulation of codes and decoders practical.
The same property sets a limit. The Eastin–Knill theorem shows that no code has a universal set of transversal gates, so at least one gate, often the T gate, must be added by other means such as magic state distillation, code switching or lattice surgery combined with injected states.
The following table matches common engineering situations with suitable code choices.
| Situation | Typical choice | Reason |
|---|---|---|
| Planar nearest-neighbor qubits | Surface code | Local checks and a high threshold near 1% |
| Long-range connectivity available | Quantum LDPC code | Far fewer physical qubits per logical qubit |
| Small demonstration experiment | Steane or five-qubit code | Few qubits, simple decoding |
| Biased noise dominated by dephasing | Tailored or XZZX surface code | Exploits the asymmetry of errors |
Limitations and common misconceptions
Stabilizer codes are powerful but not universal remedies. Their performance depends on measurement quality, decoder speed and noise structure as much as on the code parameters.
- Syndrome measurements are noisy themselves, so practical schemes repeat them about d times and decode in space and time.
- High-weight stabilizers need more gates per check and spread errors, which lowers the effective threshold.
- Correlated or leakage errors fall outside the Pauli model and can defeat a decoder tuned for independent errors.
- Not every quantum code is a stabilizer code: bosonic codes such as GKP and some subsystem codes extend or modify the formalism.
- Measuring a stabilizer does not collapse the logical state, a frequent misunderstanding, because stabilizers commute with logical operators.
A plain-language summary
Quantum information is fragile, and simply looking at a qubit to check for damage destroys it. A stabilizer code avoids this by spreading one piece of information across many qubits and then asking only group questions, such as whether two qubits still agree with each other.
Those answers reveal where an error happened without revealing the stored data, much like a team of guards checking that seals on a box are intact without opening the box. A computer reads the pattern of broken seals and repairs the damage.
An example from practice
A hardware team operating a superconducting processor with a square grid of qubits wants to show that error correction pays off. It encodes one logical qubit in a distance-3 rotated surface code using 9 data qubits and 8 measurement qubits, then repeats with distance 5 using 25 data qubits and 24 measurement qubits.
In each cycle, the measurement qubits extract the weight-4 stabilizers, and a matching decoder processes the syndromes over many rounds. When the physical error rates sit below the threshold, the logical error per cycle at distance 5 comes out clearly lower than at distance 3. That scaling, rather than any single number, is the evidence that larger stabilizer codes protect information better and justifies building bigger arrays.