3-qubit bit-flip code: Encodes one logical qubit into three physical qubits. Logical |0⟩_L = |000⟩, |1⟩_L = |111⟩. A single bit-flip error (X gate) on qubit i flips two syndrome bits — the syndrome pattern uniquely identifies the error location.
Syndrome measurement: Measure Z₁Z₂ and Z₂Z₃ (stabilizer generators). Results (0,0)=no error; (1,0)=qubit 1; (1,1)=qubit 2; (0,1)=qubit 3. Crucially, syndrome measurement does NOT collapse the logical qubit state — it projects onto the error subspace.
Threshold theorem: If physical error rate p < p_threshold, logical error rate P_L = 3p² − 2p³ < p. For the surface code, p_threshold ≈ 1%. Shor (1995) showed fault-tolerant QC is possible.