Steven GellerQuantum Computing, End to End

Book contents

Current section

Part VI. Reliability and Fault Tolerance

  1. Decoherence and Error Channels
  2. Error Mitigation vs Error Correction
  3. Stabilizers and Syndrome Measurement
  4. Repetition, Bit-Flip, Phase-Flip, and Shor Codes
  5. Surface Codes and Threshold Intuition
  6. LDPC, Bosonic, Cat, GKP, and Topological Approaches
  7. Decoders and Real-Time Classical Control
  8. Logical Qubits and Reliable Operations
  9. Why Useful Quantum Computers Are Systems Engineering Projects

Part VI. Reliability and Fault Tolerance · Chapter 47

Stabilizers and Syndrome Measurement

You cannot copy an unknown quantum state, and you cannot inspect it without disturbing it — yet error correction has to find errors anyway. This chapter shows the escape route: measure checks that report which error occurred while revealing nothing about the data.

Lab
In this chapter 17 sections

Encode information in a simultaneous eigenspace of commuting Pauli checks, couple ancillas to measure each check eigenvalue, and decode the resulting plus/minus pattern; the checks commute with logical information but anticommute with specific errors, so the syndrome changes without disclosing alpha or beta.

The three-qubit repetition example detects X errors only and does not protect an arbitrary qubit from the full single-qubit Pauli set. An ideal syndrome table omits faulty ancillas, measurement errors, repeated rounds, decoder ambiguity, and propagation faults.

Three-qubit stabilizer syndrome extractionThree data qubits feed two adjacent parity checks whose two bits identify a single bit-flip location.q0q1q2Z0 Z1Z1 Z2s0s1decode
Figure 47.1. Operator-derived repetition syndrome table: The sign pattern connects a physical error to ancilla outcomes without exposing the encoded amplitudes.

The code space is a shared eigenspace

Define stabilizers, commuting checks, and logical states using the repetition code's Z0Z1 and Z1Z2 operators.

Classical error correction has it easy: copy the value, compare the copies, vote. Quantum mechanics bans both moves. The no-cloning theorem forbids copying an unknown state, and measurement collapses what it touches. So quantum error correction encodes the logical information into a larger system and measures checks — stabilizers — that reveal error information while leaving the logical data alone.

Stabilizer codes define code spaces through commuting Pauli operators and diagnose errors through changed eigenvalues. [gottesman-stabilizer][nielsen-chuang]

Define the code space before the decoder

Let S0=Z0Z1S_0=Z_0Z_1 and S1=Z1Z2S_1=Z_1Z_2. They commute because they are products of Z operators, and both 000\lvert 000 \rangle and 111\lvert 111 \rangle have eigenvalue +1 under each check. Every encoded state ψL=α000+β111|\psi_L\rangle=\alpha|000\rangle+\beta|111\rangle is therefore in their shared +1 eigenspace. The checks constrain parity but do not select α or β.

The two independent checks cut an eight-dimensional three-qubit Hilbert space down by a factor of two each, leaving a two-dimensional code space—exactly one logical qubit. Multiplying the checks gives S0S1=Z0Z2S_0S_1=Z_0Z_2, another stabilizer but not an independent constraint. Counting independent generators prevents a redundant check from being mistaken for extra encoded protection.

Anticommutation predicts every sign

If error E commutes with a stabilizer S, the eigenvalue is unchanged. If it anticommutes, then SEψL=ESψL=EψLSE|\psi_L\rangle=-ES|\psi_L\rangle=-E|\psi_L\rangle, so the measured sign flips. X anticommutes with Z on the same qubit and commutes on different qubits. This local rule derives the whole table without choosing α or β.

For no error I, both signs are (+1,+1). X0 overlaps S0 once and S1 zero times, giving (−1,+1). X1 overlaps both checks, giving (−1,−1). X2 overlaps only S1, giving (+1,−1). Mapping +1 to bit 0 and −1 to bit 1 yields 00, 10, 11, and 01. The four signatures are distinct, so the ideal decoder can identify the declared error set {I,X0,X1,X2}.

The argument remains symbolic. For X1, the damaged state is α010+β101\alpha|010\rangle+\beta|101\rangle. Both components have odd parity across qubits 0–1 and 1–2, so the syndrome is 11 for every normalized α and β. No step evaluates either amplitude.

An error changes signs, not amplitudes

Use commutation and anticommutation to derive every single-X syndrome while leaving alpha and beta symbolic.

Syndrome measurement is the bridge. The syndrome is a pattern of bits that says which error likely occurred and where. Properly designed, it says nothing about the logical value itself.

Syndrome extraction can reveal error information without directly measuring the encoded logical amplitudes. [gottesman-stabilizer][preskill-notes]

Projectors explain why the logical amplitudes survive

Measuring one stabilizer with desired sign s{+1,1}s\in\{+1,-1\} applies projector Ps=(I+sS)/2P_s=(I+sS)/2, followed by normalization. Because every component of the errored logical state lies in the same syndrome eigenspace, the projector preserves their relative coefficients. The measurement learns the eigenspace label, not which logical basis component was present.

Direct Z measurement of a data qubit is different. It distinguishes 000\lvert 000 \rangle from 111\lvert 111 \rangle and therefore collapses α000+β111\alpha|000\rangle+\beta|111\rangle in general. Stabilizer measurement is safe only because the check operator acts as the same scalar on both logical codewords in the code space.

Ancillas ask parity questions

Trace the extraction circuit and identify where measuring a data qubit would destroy the logical superposition.

Abstractly, an error pattern maps to diagnostic bits: s=Hee(mod2)s=H_e e\pmod 2. The check matrix HeH_e turns the error pattern ee into the syndrome ss, the same parity-check idea as classical coding theory.

Quantum correction must respect no-cloning and cannot rely on destructive inspection of arbitrary logical data. [no-cloning][nielsen-chuang]

Ancillas implement a parity question

To measure Z0Z1, prepare an ancilla in 0\lvert 0 \rangle, use the data qubits as controls of two CNOTs targeting the ancilla, then measure the ancilla in Z. Its bit is b0b1b_0\oplus b_1. Repeating with qubits 1 and 2 measures the second parity. The data qubits are controls, so this ideal circuit writes parity onto the ancilla without writing either data value separately.

CNOT direction matters. Reversing control and target does not measure the same operator and can propagate an ancilla fault into data. A circuit audit records ancilla preparation, interaction order, basis, and measurement map. An abstract label “measure S0” is a specification; the extraction circuit is an implementation with its own faults.

Generate the complete syndrome table

Connect the operator derivation to the companion truth-table model for both logical codewords.

The danger is measurement itself: a projector with outcome ii sends ψPiψ/ψPiψ\lvert\psi\rangle\mapsto P_i\lvert\psi\rangle/\sqrt{\langle\psi\rvert P_i\lvert\psi\rangle} when the outcome has nonzero probability. Measure the wrong thing and you have rewritten the state you meant to protect. Error-correction design is the art of choosing projectors whose outcomes teach you the error and leave the encoded amplitudes untouched.

Fault-tolerant syndrome extraction requires repeated noisy measurements and control beyond an ideal static table. [fault-tolerant-roads][surface-codes-2012]

The parity matrix independently reproduces the table

Represent an X-error pattern as e=(e0,e1,e2)Te=(e_0,e_1,e_2)^T over binary arithmetic and use H=[110011]H=\begin{bmatrix}1&1&0\\0&1&1\end{bmatrix}. Then s=He(mod2)s=He\pmod2. The zero vector maps to 00; the three unit vectors map to 10, 11, and 01. This executable parity calculation and the Pauli anticommutation derivation arrive at the same mapping by independent routes.

That agreement is a strong fixture. A swapped syndrome-bit order can still produce four distinct outputs, so the test compares exact labels, not only uniqueness. It runs for both 0L\lvert 0_L \rangle and 1L\lvert 1_L \rangle and for a symbolic or sampled superposition path where available.

Recovery may be a frame update

The ideal lookup maps 10 to X0, 11 to X1, and 01 to X2. Applying the chosen X restores the code space for the declared single-error set. A controller need not always apply a physical pulse immediately; it can update a Pauli frame and reinterpret later operations and measurements. Either implementation must record the frame so a later result is not decoded under stale assumptions.

A syndrome does not uniquely identify arbitrary errors. For example, a weight-two X pattern can share a syndrome with a different weight-one pattern and induce a logical failure after minimum-weight recovery. The decoder chooses an error class using the noise model and code distance; the syndrome supplies constraints, not ground truth.

Noisy syndrome history becomes a decoding problem

Introduce repeated measurement errors and defer real-time inference detail to Chapter 51.

Take the three-qubit bit-flip code with bits b0,b1,b2b_0,b_1,b_2 and two checks: s0=b0b1s_0=b_0\oplus b_1 and s1=b1b2s_1=b_1\oplus b_2. The syndrome table:

The three-qubit parity-check model is a restricted teaching instance rather than a full quantum code. [nielsen-chuang][shor-code-1995]

Noisy extraction adds a time dimension

A single surprising syndrome may come from a data error or a faulty ancilla measurement. Repeating checks turns the record into syndrome history. Decoders often work with detection events—changes between successive rounds—because a persistent data error and a one-round measurement error trace different patterns in space-time. The first and final boundary conditions are part of that inference.

Repeated measurement is not automatically fault tolerant. Ancilla preparation error can propagate, CNOT faults can correlate data, measurement latency can miss the correction deadline, and extra gates create new failure locations. A fault-tolerant extraction design limits propagation and supplies enough repeated evidence for the decoder. This chapter’s static table establishes none of those engineering conditions.

The checks do not define the logical gate set

Separate code-space detection from protected preparation, measurement, and operations.

Every single-bit error has a distinct signature, and the signatures depend only on parities between qubits — never on the values themselves. The quantum version learns the error location without ever reading the encoded amplitudes α and β . That is the whole trick, and Chapter 48 puts it to work.

Stabilizer codes define code spaces through commuting Pauli operators and diagnose errors through changed eigenvalues. [gottesman-stabilizer][nielsen-chuang]

Checks and logical operations are separate contracts

Knowing the stabilizers identifies the code space and detectable Pauli patterns. It does not by itself provide a fault-tolerant encoder, logical X or Z implementation, logical measurement, or universal gate set. A candidate logical operator must preserve the code space while acting nontrivially within it; a protected implementation must also control how one physical fault spreads.

For the repetition code, XL=X0X1X2X_L=X_0X_1X_2 exchanges 000\lvert 000 \rangle and 111\lvert 111 \rangle, while a single physical Z can act as logical phase and is not detected by the Z-parity checks. That asymmetry is the exact boundary: the code diagnoses one X fault, not an arbitrary unknown-qubit error.

The acceptance test should fail on a plausible permutation. Swap the two syndrome bits in only the parity implementation: all four outputs remain unique, and a superficial test passes, but X0 and X2 receive one another’s recovery. Exact agreement with the operator signs catches it. Then inject one measurement-bit flip across two rounds to show why a static lookup cannot distinguish data and measurement faults.

This paired derivation is the chapter’s evidence contract. Algebra predicts signs from commutation; code predicts bits from parity; the ancilla circuit explains how those bits could be measured; and the limitations state why none of those ideal objects establishes fault-tolerant repeated extraction.

Claim-to-source ledger

Stabilizer codes define code spaces through commuting Pauli operators and diagnose errors through changed eigenvalues. [gottesman-stabilizer][nielsen-chuang]

Syndrome extraction can reveal error information without directly measuring the encoded logical amplitudes. [gottesman-stabilizer][preskill-notes]

Quantum correction must respect no-cloning and cannot rely on destructive inspection of arbitrary logical data. [no-cloning][nielsen-chuang]

Fault-tolerant syndrome extraction requires repeated noisy measurements and control beyond an ideal static table. [fault-tolerant-roads][surface-codes-2012]

The three-qubit parity-check model is a restricted teaching instance rather than a full quantum code. [nielsen-chuang][shor-code-1995]

Operator-derived repetition syndrome table

Format: Reuse `labs/src/quantum_end_to_end/error_correction.py`; add a Pauli-commutation fixture that derives the same syndrome mapping as the truth table.

Artifact acceptance contract
inputoutputreject when
assumptions, units, source/date, workloadraw and derived values, uncertainty, commandunits or comparison scope are missing
synthetic fixture labeled syntheticdeterministic record and PASS lineattributed to real hardware
named baselinesame task and denominatormetric or evidence class differs
def flip(bits, qubit):
    return tuple(bit ^ int(i == qubit) for i, bit in enumerate(bits))
def parity_syndrome(bits):
    return bits[0] ^ bits[1], bits[1] ^ bits[2]
def operator_syndrome(bits):
    return tuple((-1) ** parity for parity in parity_syndrome(bits))
codes = ((0, 0, 0), (1, 1, 1))
baseline = {q: parity_syndrome(flip(codes[0], q)) for q in range(3)}
counterfactual = {q: operator_syndrome(flip(codes[1], q)) for q in range(3)}
correction = {(1, 0): 0, (1, 1): 1, (0, 1): 2}
assert baseline == {0: (1, 0), 1: (1, 1), 2: (0, 1)}
assert all(operator_syndrome(flip(word, q)) == tuple((-1) ** x for x in baseline[q]) for word in codes for q in range(3))
assert all(flip(flip(word, q), correction[parity_syndrome(flip(word, q))]) == word for word in codes for q in range(3))
print(f"PASS: 47 syndrome evidence parity={baseline} operator={counterfactual}")

Verification: For I, X0, X1, X2 and both codewords, operator and parity implementations agree; alpha/beta never enter the syndrome and all declared corrections restore the codeword.

Commissioned exercise

Prompt: Derive the two stabilizer eigenvalues for I, X0, X1, and X2 acting on alpha|000>+beta|111>, then verify them with the companion code.

Deliverable: Four-row operator table, ancilla extraction trace, generated truth table, and explanation of why alpha/beta remain unknown.

Pass condition: Signs match the parity implementation for both logical basis states and the explanation does not invoke copying or direct data measurement.

Verifiable solution

Format: Pauli commutation derivation plus reference generated syndrome table.

Verification: Automated test compares operator-derived syndrome bits with `syndrome_table()` for every declared case.

The stabilizer-sign result is I:(+1,+1), X0:(-1,+1), X1:(-1,-1), and X2:(+1,-1), mapping to syndrome bits 00, 10, 11, and 01. The mapping is independent of alpha and beta, so the ancillas reveal the error class without learning the logical amplitudes.

Companion work

Artifacts for this chapter

These entries resolve to checked-in local source. Commands are reproduced exactly from the chapter manifest, and source-embedded fixtures are exported as direct downloads.

  1. Reproduce or test

    python3 tools/validate_briefs.py --briefs data/editorial_briefs_36_63.json --from 36 --through 63 --check-rewritten-sources --execute-artifacts

Provenance

Sources and review

  1. Daniel Gottesman. Stabilizer codes and quantum error correction. California Institute of Technology / arXiv. 1997doctoral thesis
  2. Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press. 2010textbook
  3. John Preskill. Lecture Notes for Physics 219: Quantum Computation. California Institute of Technology. 2018graduate lecture notes
  4. William K. Wootters and Wojciech H. Zurek. A single quantum cannot be cloned. Nature. 1982primary paper
  5. Earl T. Campbell, Barbara M. Terhal, and Christophe Vuillot. Roads towards fault-tolerant universal quantum computation. Nature. 2017peer-reviewed review
  6. Austin G. Fowler et al.. Surface codes: Towards practical large-scale quantum computation. Physical Review A. 2012peer-reviewed review
  7. Peter W. Shor. Scheme for reducing decoherence in quantum computer memory. Physical Review A. 1995primary paper

The load-bearing claims in the chapter are mapped inline to this registered source set. A citation supports only the bounded claim beside it.

Cite this chapter