Why Quantum Errors Are Different — and the 3-Qubit Repetition Code
You'll be able to:
You can explain why classical redundancy does not transfer directly to qubits (no-cloning, continuous errors, measurement collapse), and work the 3-qubit bit-flip code by hand: encoding, syndrome table, correction, and the one error class it cannot catch.
Why you cannot just copy a qubit three times
Classical error correction is almost embarrassingly simple: store a bit as three copies, and when one flips, take a majority vote. The whole discipline of quantum error correction exists because none of the three ingredients of that recipe — copying, looking, voting — survives the move to qubits unchanged.
Obstacle 1: no-cloning
A qubit holds an unknown state α|0⟩ + β|1⟩. The no-cloning theorem (Wootters and Zurek, 1982) says no physical process can produce two independent copies of an unknown state. So "store three copies" is off the table from the first line.
What you can do is entangle. Two CNOT gates from the data qubit onto two fresh qubits in |0⟩ turn α|0⟩ + β|1⟩ into α|000⟩ + β|111⟩. Read that carefully: it is not three copies of the qubit. It is one qubit's worth of information spread across three physical carriers. Measuring any single one of them in the computational basis would collapse the whole thing, which is exactly why the next two obstacles matter.
Obstacle 2: errors are continuous
A classical bit either flips or it does not. A qubit can be rotated by any angle; a tiny over-rotation of 0.01 radians is a perfectly good error. If you had to correct a continuum of errors you would never finish.
The escape hatch is a piece of linear algebra every QEC engineer should be able to recite. Any single-qubit error operator can be written as a combination aI + bX + cY + dZ of the four Paulis. When you measure the code's check operators (next section), the measurement projects the error onto one of those four discrete possibilities. A small rotation becomes "with high probability no error, with small probability a full X flip". This is called the digitisation of errors, and it is why you only ever see tables of X, Y and Z errors in QEC papers even though real noise is analogue.
Obstacle 3: you cannot look at the data
Measuring the three qubits directly to vote would destroy the superposition. The trick is to measure parities instead. The operator Z1Z2 has eigenvalue +1 when qubits 1 and 2 agree (|00⟩ or |11⟩) and −1 when they disagree. It tells you whether the two qubits match without telling you what either of them is. Both |000⟩ and |111⟩ give +1, so the superposition α|000⟩ + β|111⟩ is untouched by the measurement.
In practice a parity check is implemented with an ancilla qubit: reset it to |0⟩, CNOT from each data qubit onto it, measure it. The ancilla's result is the parity.
Worked example: the 3-qubit bit-flip code
Encoding. α|0⟩ + β|1⟩ → α|000⟩ + β|111⟩ via two CNOTs.
Checks. Measure Z1Z2 and Z2Z3. Call a −1 result a "1" in the syndrome.
| Error | Z1Z2 | Z2Z3 | Correction |
|---|---|---|---|
| none | 0 | 0 | do nothing |
| X on qubit 1 | 1 | 0 | X on qubit 1 |
| X on qubit 2 | 1 | 1 | X on qubit 2 |
| X on qubit 3 | 0 | 1 | X on qubit 3 |
Swipe sideways to see every column →
Four syndromes, four cases, every single bit-flip located and undone. This is the quantum majority vote — performed without ever reading the data.
When it helps. Suppose each qubit flips independently with probability p. The code fails when two or more qubits flip (the vote then goes the wrong way): P_fail = 3p²(1−p) + p³ = 3p² − 2p³. The unencoded qubit fails with probability p. The code is only worth using when 3p² − 2p³ < p, i.e. when p < 1/2. At p = 0.01, P_fail ≈ 3 × 10⁻⁴: about thirty times better. At p = 0.4 it is barely better at all. This "it only helps when the parts are already good enough" pattern is the seed of the threshold idea you will meet in module 5.
Where it fails. Apply a phase flip Z to qubit 2. The state becomes α|000⟩ − β|111⟩. Both parity checks still read 0, because Z does not change which basis state you are in — it only changes the sign between them. The logical state is corrupted and the code has no idea. In the Hadamard basis a phase flip is a bit flip, so you can build a 3-qubit phase-flip code with checks X1X2 and X2X3 — and that one is blind to bit flips. Catching both at once is the problem the next module solves.
The fault in the checker
One more thing to notice before moving on. The ancilla that measures Z1Z2 is itself a noisy qubit, and the CNOTs that touch it are noisy gates. A fault on the ancilla can report a wrong syndrome, and a fault in the middle of the CNOT sequence can spread an error from the ancilla back onto two data qubits. Handling this — designing the measurement so that one fault produces at most one data error, and repeating measurements so a lying ancilla is outvoted — is what "fault-tolerant" adds on top of "error-correcting". The repetition code on paper is the easy half.
What to remember
- No-cloning forbids copying; encoding spreads one qubit across several by entanglement instead.
- Continuous errors are digitised into I, X, Y, Z by the act of measuring the checks.
- Checks measure parities (Z1Z2), which reveal errors without revealing the data.
- The 3-qubit bit-flip code corrects any single X error, fails with probability ≈ 3p², and is useless above p = 1/2.
- It is completely blind to phase flips; a full quantum code must catch X and Z at once.
- The measuring apparatus is noisy too — that is where fault tolerance begins.
Curated Materials
2.4hThe deep work happens here — the lesson is your briefing.
Live on aiqbench
This lesson's subject on the rest of the site, today.
In the news, last 30 days
- Classiq and Diraq Collaborate to Advance Fault-Tolerant Quantum Computing on SiliconHPCwire ·
- NVIDIA Strengthens US Quantum Leadership With Groq 3 LPX Breakthrough in Quantum Error CorrectionNVIDIA ·
- Q-CTRL Expands Fire Opal into Fault-Tolerant Quantum ComputingQ-CTRL ·
Test your knowledge
5 questions in 100 seconds, on a page of its own. Read everything above first.
Test your knowledge →Module Mission
30–40 minOn paper, encode α|0⟩+β|1⟩ into the 3-qubit repetition code. Write the four syndrome outcomes of Z1Z2 and Z2Z3 and the correction each one implies. Then apply a phase flip (Z) to qubit 2 and show that every syndrome reads 00 while the logical state is corrupted. Finish with one paragraph: for a per-qubit flip probability p, show that the code only helps when p < 1/2, and compute the encoded failure probability at p = 0.01.
Loading your work…