Why quantum computers need error correction Image: FMN Laboratory, Wikimedia Commons, CC BY 4.0

Why quantum computers need error correction

A good superconducting qubit in 2025 holds its state for a few hundred microseconds before the environment scrambles it. A two-qubit gate on it takes a few tens of nanoseconds and fails about once in every few hundred to a thousand attempts. Shor's algorithm on a number of practical size needs billions of gates. Multiply the numbers and the conclusion is plain: without some way of correcting errors as they happen, a quantum computer of any size produces noise long before it produces an answer. The same is true, with different numbers, of every other kind of qubit.

Why the classical trick does not transfer

Classical computers deal with errors by redundancy. Store each bit three times, check the copies against each other, and correct the odd one out; the chance that two of three fail together is far smaller than the chance that one does. Quantum mechanics blocks this route twice over. An unknown quantum state cannot be copied, by a theorem proved in 1982 that follows from the linearity of the theory, so a qubit cannot be stored three times. And checking a qubit means measuring it, which destroys the very superposition one is trying to protect.

There is a third difficulty. A classical bit can only flip. A qubit can flip, or its phase can change, or anything in between, and the errors form a continuum.

The three-qubit code

The way around all three problems was found by Peter Shor in a paper of 1995, and its simplest version uses three qubits to protect against flips. Instead of copying the state \(\alpha|0\rangle + \beta|1\rangle\), one entangles it with two fresh qubits to make \(\alpha|000\rangle + \beta|111\rangle\). This is not three copies; it is one state spread across three qubits, and no single qubit contains it. If one of the three flips, the state becomes, say, \(\alpha|010\rangle + \beta|101\rangle\).

Now the trick. Instead of measuring the qubits, one measures whether the first two agree and whether the last two agree. These two questions can be asked without learning anything about \(\alpha\) and \(\beta\), because the answer is the same for both branches of the superposition. The answers, called the syndrome, tell which qubit flipped, if any, and the flip is undone. The superposition is never touched. The continuum of possible errors is dealt with by the measurement itself, which forces each qubit into either flipped or not flipped, so that only those two cases ever need correcting.

If each qubit flips with probability \(p\), the encoded state fails only when two or more flip, with probability about \(3p^2\). For \(p\) of one in a thousand that is three in a million. Shor's full code uses nine qubits and handles phase errors as well; the smallest code that corrects any single-qubit error, found the next year, uses five.

The threshold

Correction only helps if the circuits that do the checking are themselves reliable enough not to introduce more errors than they remove. The threshold theorem, proved in 1997 and 1998 by several groups, states that if the error rate of every physical operation is below a certain threshold, codes can be nested or enlarged to make the logical error rate as small as desired, at a cost in qubits that grows only slowly. Above the threshold, correction makes things worse. The value of the threshold depends on the code; for the surface code, invented by Alexei Kitaev in 1997 and the leading candidate for superconducting hardware, it is about one percent per operation.

The surface code arranges qubits on a square grid, with data qubits and checking qubits alternating like the squares of a chessboard, and each check involves only a qubit's four neighbours. Its distance, the size of the grid, sets how many errors it tolerates. Going from distance 3 to distance 5 to distance 7 uses 17, 49, and 97 qubits for one logical qubit, and below threshold each step should reduce the logical error rate by a fixed factor.

Below threshold, 2024

That prediction was tested on Google's Willow processor and reported in a paper published in Nature in December 2024. The team ran surface codes of distance 3, 5, and 7 on a 105-qubit chip and measured the logical error per cycle of correction. Each increase in distance cut the error by a factor of about 2.1. The distance-7 logical qubit kept its information more than twice as long as the best physical qubit on the chip, the first time a corrected qubit had outperformed the components it was made from. The error rate was still about one in a thousand per cycle, far above what algorithms need, and the team estimated that reaching one in a million would require distances near 27 and a few thousand physical qubits per logical one.

Other platforms have reported their own milestones. A Harvard and MIT collaboration led by Mikhail Lukin ran circuits on 48 logical qubits encoded in neutral atoms in 2023, with logical operations performing better than physical ones, and groups using trapped ions have demonstrated logical gates with error rates below those of the physical gates. Correcting errors in a running computation, rather than in a stored memory, remains the next step for all of them.

What it costs

The arithmetic of overheads is what sets the timelines quoted for useful quantum computers. If one logical qubit needs a thousand physical ones, and an algorithm needs a few thousand logical qubits, the machine has a few million physical qubits. The largest processors today have about a thousand. Reducing the overhead is where much current research goes: codes with better rates than the surface code, qubits with lower physical error rates, and hardware in which qubits can be moved so that checks are not confined to nearest neighbours. Each factor of ten in overhead shortens the road by years.

Decoherence and error correction are the subject of Unit 16 of the Quantum Mechanics Masterclass, which derives the three-qubit code in full, including the syndrome measurement, explains why the no-cloning theorem follows from linearity, states the threshold theorem, and presents the Willow result and the neutral-atom processor. The unit closes the Advanced + Quantum Information masterclass, after the gates of Unit 13 and the algorithms of Unit 15. The full list of units is in the curriculum.

Learn quantum mechanics properly

The QM Masterclass: weekly units, quizzes, a final exam, and a certificate.
About the program