CHAPTER 17
Stabilizers and quantum error correction
Learning goals. Encode an unknown state without cloning it, extract parity syndromes, understand code distance, and derive stabilizer commutation and recovery conditions.
17.1 Protect amplitudes without learning them
An encoding maps one logical qubit into a larger physical space:
It does not produce three copies . The logical amplitudes are distributed through a code subspace. Error checks must reveal information about errors while preserving the encoded information.
The three-qubit bit-flip code uses , . CNOTs from the input to two zero ancillas encode it. A flip on the middle qubit produces . Measuring every physical bit would reveal the logical value and destroy a general superposition. Instead measure parity.
17.2 Syndrome extraction
The checks are and . Every valid code state has eigenvalue +1 for both. A bit flip changes the signs of checks touching its location:
| Error | Syndrome bits | ||
|---|---|---|---|
| I | +1 | +1 | 00 |
| −1 | +1 | 10 | |
| −1 | −1 | 11 | |
| +1 | −1 | 01 |
The bit convention is 0 for eigenvalue +1 and 1 for −1. A fresh ancilla initialized to zero receives CNOTs from the two data qubits; measuring it in Z reveals their parity. The two components of the encoded superposition share the same syndrome, so the syndrome does not reveal α or β.
After syndrome 11, apply : . The same correction acts on both amplitudes.
Two flips can mimic one. has the same syndrome as . Correcting as though occurred leaves , a logical X. Thus under independent flips and perfect checks the failure probability is . This code does not correct arbitrary phase errors.
Laboratory L23 — Repetition-code memory. Inject a specific bit-flip pattern, inspect neighboring parity checks and the chosen recovery, and compare exact odd-distance failure probabilities. Measurements and recovery are ideal in this model.
17.3 Why correcting Pauli errors is enough in principle
Any one-qubit operator can be expanded as . If a code corrects an appropriate error set, it also corrects coherent combinations in the span under the quantum error-correction conditions. Syndrome extraction separates error sectors without reading the logical amplitudes.
This does not mean hardware errors literally select a Pauli every time. It is a statement about a linear operator basis and recoverability. Coherent noise, correlated multi-qubit errors, leakage, and faulty syndrome circuits still require careful modeling.
A phase-flip repetition code uses and X-type checks. Combining protection against bit and phase errors leads to codes such as Shor’s nine-qubit code [34]. Its logical states can be written
The construction protects against any single physical-qubit error, not just a classical bit flip.
17.4 Stabilizer groups and logical operators
A Pauli string is a tensor product of I,X,Y,Z with a phase. Two strings commute if the number of positions where they have different nonidentity Paulis is even. For example, XX and ZZ commute: each position contributes one minus sign, so the total sign is positive.
An abelian stabilizer group S not containing −I defines the common +1 eigenspace of its generators. With r independent generators on n qubits, the code-space dimension is , encoding k=n−r logical qubits. Independence matters: a product of existing generators imposes no new constraint [33].
A logical Pauli commutes with all stabilizers but is not itself a stabilizer. For the repetition code, and are logical operators. Multiplying a logical operator by a stabilizer changes its physical representative but not its action within the code space.
An quantum code has distance d equal to the smallest weight of a nontrivial logical Pauli, for a stabilizer code. It can correct arbitrary errors on up to unknown locations. Known erasures can be corrected on up to d−1 locations under the code’s assumptions. The bit-flip repetition code has distance one as a full quantum code because a single Z is an undetectable logical phase operation.
17.5 The Knill–Laflamme condition
Let P project onto the code space and be a set of errors. A recovery correcting their span exists exactly when
The constants may depend on the error labels but not on the encoded logical state. Intuitively, the environment must not learn which logical state was present while distinguishing correctable error processes [36].
For distinct logical basis states, the condition implies when i≠j and equal diagonal values for all i. Error images must preserve logical distinguishability while revealing no logical information through their error-label overlaps.
17.6 CSS codes and a next example
A CSS code uses X-only and Z-only checks specified by binary matrices . Commutation requires
Z-type checks detect X components of errors, and X-type checks detect Z components. A Y has both components. The seven-qubit Steane code is an CSS code built from the classical Hamming structure [35]. Unlike the three-qubit bit-flip code, it corrects arbitrary single-qubit Pauli errors.
17.7 Exercises
17.1. Give the syndrome of in the repetition code and the result of single-error recovery.
Show solution / guidance
Both checks flip, giving 11. Recovery applies , leaving , a logical X failure.
17.2. Do XZI and ZXI commute? What about XII and ZII?
Show solution / guidance
The first pair has two local anticommutations and commutes. The second has one and anticommutes.
17.3. Ten physical qubits have seven independent stabilizer generators. How many logical qubits are encoded?
Show solution / guidance
k=10−7=3, so the code space has dimension eight.
17.4. What arbitrary unknown-location errors can a distance-five code correct?
Show solution / guidance
Up to two physical-qubit errors. Under an erasure model with known locations, it can correct up to four erasures.
17.5. Why is measuring a parity safer than separately measuring both bits for an encoded superposition?
Show solution / guidance
Parity can be identical in both logical components, preserving their coherence within the parity subspace. Separate measurements can distinguish the logical components and reveal encoded information.