+ Part V · Error correction
How many fragile qubits make one reliable one.
Willow's protected memory was tested at three sizes: 17, 49 and 97 qubits. In December 2024, each step up in size cut its error per cycle by a factor of about 2.14. Part V explains how such a gain is possible when no qubit can be copied or read without damage. Chapter 14 shows how checks that compare qubits find errors without learning what the qubits hold. Chapter 15 shows why most designs for superconducting quantum computers use a grid of such checks, and what Willow's result means. Chapter 16 sets out what it costs to turn physical qubits into protected ones good enough for the computations of Part III.
Checking without looking.
+ The questionLooking destroys the state. How, then, can an error be found?
Parity in ordinary memory
A server's memory module with error correction carries extra chips that store check bits alongside the data, adding 12.5 % to its raw capacity. The idea goes back to Richard Hamming at Bell Labs, who complained in 1950 that in large computing machines "a single failure usually means the complete failure" of a calculation. The simplest check is a parity bit: one extra bit chosen so that the count of 1s in a word is even. If any single bit flips, the count becomes odd and the error is detected. Hamming's own code went further. It stores four data bits with three check bits, arranged so that the pattern of failed checks points to the bit that flipped, and that bit can then be flipped back.
Ordinary error correction works because bits can be read and copied freely, so the checks can look at the data. A qubit permits neither, as Chapter 13 showed. The solution found in 1995 keeps the essential feature of a parity check, which reports whether bits agree rather than what they are, and makes that agreement the only thing ever read.
Checking qubits without reading them
The simplest quantum code protects against flips only. One qubit's arrows are spread over three qubits by two CNOT gates, so that its arrow for 0 becomes an arrow for 000 and its arrow for 1 an arrow for 111. This spreading is not copying, which the no-cloning theorem forbids. The three qubits hold one shared set of arrows, not three independent ones. If one of the three qubits flips, their arrows move to strings such as 010 or 101, which the code never uses.
The checks ask two questions: do qubits 1 and 2 agree, and do qubits 2 and 3 agree? Each question is answered by a helper qubit called an ancilla, the kind of qubit Chapter 12 called a measurement qubit. A pair of CNOTs entangles the ancilla with the two qubits it checks, and then the ancilla is read. A reading of the ancilla reveals agreement or disagreement and nothing else, because both 000 and 111 agree everywhere. The arrows of the protected qubit are untouched. The pattern of answers is called the syndrome, and it names the qubit that flipped.
Errors keep arriving, so the checks are not run once but over and over, in rounds, and each round is one cycle of error correction. An error shows up as a change in the syndrome from one round to the next. Watching for changes also guards against faulty checks, because an ancilla misread once produces a syndrome that changes and then changes back, while a real flip produces a change that persists. A classical program called a decoder tells the two apart from the history of syndromes, and Chapter 15 shows one running in real time.
If no qubit flipped, both checks report agreement. If qubit 1 flipped, the first check reports disagreement and the second agreement. If qubit 2 flipped, both report disagreement, and if qubit 3 flipped, the first agrees and the second does not. The flipped qubit is then flipped back. The code fails only if two or three qubits flip before the check, which for independent flips of chance p happens with a chance of 3p² − 2p³. At p = 1 % the chance of failure is about 0.03 %, thirty-three times better than an unprotected qubit, and at p = 0.1 % it is about 3 in a million. At p = 10 % it is 2.8 %, still better than an unprotected qubit, because majority voting helps whenever flips are rarer than one in two.
Phase errors, and Shor's nine qubits
Flips are only half the problem. A qubit's arrows can also suffer a phase error, a turn of the arrow for 1 that no reading of 0 or 1 sees, and the three-qubit code cannot detect it. A Hadamard gate turns phase errors into flips and flips into phase errors, so the same code built between Hadamards protects against phase errors instead. In October 1995 Shor published a code that combined the two by nesting them: the qubit is first spread over three qubits against phase errors, and each of those is spread over three more against flips, nine qubits in all. A single error of either kind, on any one of the nine, can be found and undone.
The nine-qubit code also catches errors that are neither a clean flip nor a clean phase error. A small, continuous error, such as an arrow turned a little too far, appears to the checks as a mixture of no error and a definite error. Reading the checks settles which of the two happened, and the correction undoes it. That is the conversion of continuous errors into discrete ones described in Chapter 13, and it is why a finite set of checks can deal with a continuum of possible faults. Shor's patent on the scheme was filed in October 1995. It gives the chance that a block of nine qubits fails as about 36p², which is smaller than p whenever p is below about 1 in 36, so encoding would help below that rate if the checks themselves were perfect.
Within a year others found better codes. At Oxford, Andrew Steane built a seven-qubit code directly from Hamming's 1950 design, and Robert Calderbank and Shor proved that good quantum codes exist in general, protecting against many errors at a modest cost in qubits.
Correcting the correctors
The checks are made of gates, and gates err. A check that introduces more errors than it removes is worse than no check at all. A scheme that is safe against its own faults is called fault tolerant. In 1996 Shor showed how to build checks that do not spread a single fault into many. As he wrote in 2022, though, his 1996 paper "did not give the result for fault-tolerance that I wanted to prove, which was a threshold theorem." Two groups soon proved such a theorem by nesting codes inside codes many times: Dorit Aharonov and Michael Ben-Or, and Emanuel Knill, Raymond Laflamme and Wojciech Zurek. Alexei Kitaev found a different route, through codes laid out on a surface.
The threshold theorem says that if every physical operation errs less often than a fixed threshold, computations of any length can be made as reliable as desired, at a cost in qubits and time that grows only slowly with the length of the computation. The early estimates put the threshold near 1 error in a million operations, a far lower error rate than the hardware of the time could reach, but the principle settled the argument with Landauer.
The price of nesting was steep. In his 1998 review, Preskill worked through three levels of Steane's seven-qubit code: 7 × 7 × 7 = 343 physical qubits for each protected one, before counting helpers. He estimated thresholds of about 1 in 10,000 for gate errors, if stored qubits were nearly perfect. Each check also had to reach qubits that sit far apart on a chip. Most hardware cannot provide such links, because qubits on a flat chip are wired only to their neighbors. Kitaev's alternative removed that obstacle, because its checks involve only neighboring qubits on a surface, and Chapter 15 follows it to Willow. Landauer himself came round: in their 1999 obituary of him, his colleagues wrote that by the late 1990s the proponents had answered his criticisms well enough "to win his grudging respect."
In the estimate of Knill, Laflamme and Zurek, each level of nesting turns an error rate p into at most about a million times p². Suppose physical operations err at 1 in 10⁷, ten times below the threshold of 1 in 10⁶. One level gives a million times the square of 1 in 10⁷, or 1 in 10⁸. Two levels give 1 in 10¹⁰, and three give 1 in 10¹⁴. Each level multiplies the qubit count, but the error falls faster and faster. Above the threshold the same squaring makes the error larger at every level.
A code built from qubits that err too often makes the stored information less reliable than a single bare qubit, because its checks add more errors than they remove. Two milestones show that a code is helping at all. The first, called break-even, is a protected qubit that outlasts the best of its physical qubits. This break-even is not the break-even time of Chapter 6, which compared a quantum computer with an ordinary one. The second, called operating below threshold, is a code whose errors fall as it grows.
For any error-correction scheme, ask whether it corrects both flips and phase errors or only one kind, how many physical qubits and gates each check takes, and how often the checks run. Ask whether runs with detected errors are corrected or simply discarded, a distinction Chapter 16 returns to. A code that only detects errors is useful in experiments but cannot carry a long computation.
- Ordinary memories use parity bits that report whether bits agree, and Hamming's 1950 code located and corrected a single flipped bit.
- The three-qubit code spreads one qubit's arrows over 000 and 111 and reads only whether qubits agree, so a flip is found without reading the protected arrows, and the code fails with a chance of about 3p².
- Shor's nine-qubit code of 1995 nests two such codes to correct any single error, including small continuous ones, which the checks turn into definite flips or phase errors.
- The threshold theorem of 1996 and 1997 shows that below a fixed physical error rate, nested codes make computations as reliable as needed, which answered Landauer's objection in principle.
Let's Talk