- Error Correction
Repetition Code
The simplest quantum error correction code, encoding one logical qubit into multiple physical qubits to protect against either bit-flip or phase-flip errors (but not both simultaneously).
The repetition code is the simplest quantum error correcting code and the natural starting point for understanding quantum error correction. A distance- repetition code encodes one logical qubit into physical qubits. It can correct up to errors of a single type (bit-flip or phase-flip), but not both simultaneously. Despite this limitation, the repetition code is the most important pedagogical and experimental testbed for error correction.
Bit-flip repetition code
The distance-3 bit-flip repetition code encodes:
A general logical state is protected against any single bit-flip () error.
Error detection uses ancilla qubits to measure parity checks between adjacent data qubits. For three data qubits, the two stabilizer generators are:
Each stabilizer measures whether two adjacent qubits agree (eigenvalue ) or disagree (eigenvalue ). The pair of measurement outcomes forms the syndrome:
| Error | Syndrome (, ) |
|---|---|
| No error | (+1, +1) |
| (-1, +1) | |
| (-1, -1) | |
| (+1, -1) |
The syndrome uniquely identifies which qubit had an error, allowing correction without learning the logical state.
Phase-flip repetition code
By encoding in the Hadamard-rotated basis:
the code protects against single phase-flip () errors instead. The stabilizers become and .
The fundamental limitation is that no repetition code can correct both and errors. Protecting against both requires codes with more structure, such as the Shor code or the surface code.
Experimental significance
The repetition code is the first error correction code that every major quantum hardware platform demonstrates. Google’s landmark 2023 experiment showed that a distance-5 repetition code outperformed a distance-3 code, confirming below-threshold error correction behavior. IBM has similarly demonstrated repetition codes on their processors as a stepping stone toward surface code demonstrations.
These experiments are important because they validate the full error correction cycle: state preparation, repeated syndrome measurement, classical decoding, and correction, all operating faster than errors accumulate.
Why it matters for learners
The repetition code introduces all the key concepts of quantum error correction (stabilizers, syndromes, code distance, logical operators, thresholds) in the simplest possible setting. Once you understand how the repetition code works, the surface code is a natural generalization that handles both error types simultaneously using the same local measurement structure extended to two dimensions.