Skip to content

Real Machines

Quantum error correction

Many noisy qubits become one reliable logical qubit

Qubits rot in microseconds, yet a useful algorithm needs billions of reliable gate operations. Something has to give. The answer is one of the most surprising results in the field: you can build an almost-perfect qubit out of many terrible ones - and you can do it without ever violating the rule that says you cannot copy a qubit.

The objection everyone raises first

Classical error correction is easy: to protect a bit, copy it three times and take a majority vote. But the no-cloning theorem forbids copying an unknown qubit. So error correction is impossible for quantum computers, right? This is the single most common wrong conclusion in the subject, and the whole lesson is about why it is wrong.

Spreading is not copying

No-cloning forbids making independent copies of an unknown state - two separate qubits that each carry the full . That is not what error correction does. Instead we spread one logical state across several physical qubits in an entangled way:

.

Look closely: no single qubit here holds on its own. If you measured just one, you would get 0 or 1 at random and learn nothing about and . The information lives in the correlations between the three, not in any copy. That is perfectly legal, and you build it with two CNOTs, not a cloning machine.

from qiskit import QuantumCircuit

qc = QuantumCircuit(3)      # q0 carries the unknown state alpha|0> + beta|1>
qc.cx(0, 1)                 # spread it onto q1 ...
qc.cx(0, 2)                 # ... and q2, giving alpha|000> + beta|111>
# no qubit now holds the state alone - it lives in the correlations
Encoding one logical qubit across three, in Qiskit-style code: not a copy, an entangling spread.

Read the error, not the data

Now for the second half of the trick. Measuring the data qubits would collapse the superposition and destroy and - fatal. So we do not measure the data. We measure parities: does qubit 0 agree with qubit 1? Does qubit 1 agree with qubit 2? A parity is a single yes-or-no fact about a pair, and crucially it says nothing about whether they are both 0 or both 1.

These two answers are the . In the encoded state all three qubits agree, so both parities read "same" (0, 0). Flip one qubit and the parities it touches turn to "different", and the exact pattern points straight at the culprit - without ever revealing the logical bit.

Run the full cycle

Encode a logical bit, inject a flip on any qubit, then measure the two syndromes and correct. Watch the key move: switch the logical bit between 0 and 1 with the same qubit flipped, and the syndrome is identical. The syndrome learned where the error is and nothing about what you stored.

Repetition-code lab: encode a logical bit across three qubits, inject a flip, then let the parity syndromes find it without ever reading the data.
logical bitencodes to |000>
q0
0
q1
0
q2
0

Why this dodges no-cloning

The syndrome measurement extracts one bit about the error - which qubit disagrees - while extracting zero bits about the logical state. Because it never reads or , it never collapses them, and no copy of the unknown state is ever made. No-cloning is untouched. You corrected an error you were never allowed to look at directly.

From three qubits to a real code

The three-qubit code is a toy: it only catches bit flips, and a qubit can also suffer a phase flip (the Z error that scrambles the equator). Real codes protect against both. The workhorse today is the : a two-dimensional grid of physical qubits with the same idea scaled up - lots of local parity checks, no data ever measured, one robust logical qubit hiding in the correlations of many physical ones.[2]

But scaling only helps if the hardware is good enough to begin with. That is the content of the : if every physical operation errs less often than a fixed threshold - roughly to per gate - then piling on more physical qubits makes the logical error rate fall exponentially. Below threshold, bigger is better, without limit. Above it, every extra qubit you add introduces more errors than it fixes, and correction never catches up.

Below threshold, for real

In 2024 a Google team reported a surface code that crossed this line: as they grew the code from a distance-3 to a distance-5 to a distance-7 grid, the logical error rate dropped with each step.[1] That is the threshold theorem observed in hardware rather than assumed - the first demonstration that adding qubits can make a logical qubit better instead of worse. It is a milestone, not a finished machine: the overhead is still enormous, thousands of physical qubits per logical one, but the curve finally bends the right way.

Lock it in

  • Error correction spreads one logical qubit across many physical qubits in an entangled state; it never copies, so no-cloning is not violated.
  • Syndromes are parity checks: they reveal which qubit erred without measuring the data, so the logical superposition is never collapsed.
  • The 3-qubit code catches bit flips; the surface code scales the same idea to catch bit and phase flips with a 2D grid of local checks.
  • The threshold theorem: below a ~0.1 to 1 percent physical error rate, more qubits suppress logical error exponentially. Google demonstrated below-threshold scaling in 2024.

Check yourself

How does quantum error correction avoid breaking the no-cloning theorem?

What does a syndrome measurement reveal?

Recall: how does QEC sidestep no-cloning, and what does a parity syndrome tell you that a data measurement would not?

The spread-not-copy move plus the safe measurement. Try to state it, then check.

Match each error-correction term to its meaning.

drop here

3-qubit code that corrects a single bit flip

drop here

parity check that identifies the error without reading the data

drop here

one protected qubit built from many physical qubits

drop here

physical error rate you must beat for scaling to help

Primary source

Google Quantum AI, Quantum error correction below the surface code threshold (Nature, 2024)

The paper that turned the threshold theorem from a promise into a measurement: growing the surface code makes the logical qubit better, not worse. Read the scaling plots even if you skip the hardware details.

Ask your teacher

You now have the two hard truths of real hardware: qubits decohere, and error correction can fight back if you stay below threshold. The next lesson finally lets you drive one - build a circuit, run shots, read a histogram. Ask me how phase-flip errors get corrected too (the trick is a change of basis), why the surface code is favored over fancier codes, and how many physical qubits it takes to factor a real RSA key.

Sources

  1. 1.Google Quantum AI, Quantum error correction below the surface code threshold, Nature 638 (2024)
  2. 2.Nielsen and Chuang, Quantum Computation and Quantum Information, ch. 10