Quantum Error Correction — Repetition Code

3-qubit bit-flip code: encoding, error injection, syndrome measurement, correction

The 3-qubit repetition code encodes |0⟩→|000⟩ and |1⟩→|111⟩. Bit-flip errors are detected by measuring parity checks (syndrome qubits). A majority vote corrects single errors. The logical error rate p_L ≈ 3p² (for p<0.5) is quadratically suppressed. For distance-d codes, errors are suppressed as p^⌈d/2⌉.