The Steane code is a [[7,1,3]] CSS code: 1 logical qubit protected across 7 physical qubits, built from the classical Hamming(7,4) parity-check code used twice — once for bit-flip (X) errors, once for phase-flip (Z) errors.
Label the 7 qubits 1–7 in binary. Three Z-type stabilizers group qubits by each bit of their index:
S1 = Z1 Z3 Z5 Z7 (bit0 = 1)
S2 = Z2 Z3 Z6 Z7 (bit1 = 1)
S3 = Z4 Z5 Z6 Z7 (bit2 = 1)
and three matching X-type stabilizers X1X3X5X7, X2X3X6X7, X4X5X6X7 use the same grouping. Measuring the Z-stabilizers detects an X (bit-flip) error: the three ±1 outcomes form a 3-bit syndrome that is exactly the binary index of the flipped qubit — XOR of the indices of every X-error present. Measuring the X-stabilizers finds a Z (phase-flip) error the same way. A single X error and a single Z error (possibly the same physical qubit, i.e. a Y error) are corrected in the same round.
If two qubits suffer the same error type in one round, the syndrome XORs to a third, wrong index — the code "corrects" the wrong qubit, which flips the logical state: a logical error. This is the code's distance-3 limit: it guarantees correction only for ≤1 error of each type per round, exactly what the "2 errors per round" slider setting is built to demonstrate.
- X + Z / X only / Z only — restrict which Pauli error types the noise channel injects.
- Errors per round — inject 1 (always correctable) or 2 (may overwhelm the code) errors of each active type per round.
- Inject error + correct round — apply one noise event, measure stabilizers, apply the syndrome-indicated correction, and score the result.
- Auto-run — repeats rounds automatically so the logical fidelity trend becomes visible.
Real-world relevance: Steane-code logic is the ancestor of the stabilizer formalism used in every modern fault-tolerant architecture (surface codes, color codes) — superconducting and trapped-ion processors from IBM, Google and Quantinuum all run syndrome-extraction cycles built on exactly this XOR-of-parity-checks principle.