The Decoder: How a Quantum Computer Works Out What Went Wrong
Error correction never sees an error directly. It sees a pattern of alarms, and an ordinary classical computer has to guess, quickly and well, what caused them.
Those flags are symptoms. The decoder is the classical algorithm that turns symptoms into a diagnosis: given this pattern of alarms, which errors most likely happened, and what correction follows?
The simplest decoder: majority vote
Start with the smallest case. Store one bit as three copies, 000 or 111, and ask two questions: do copies 1 and 2 agree, and do copies 2 and 3 agree? If only the first check fails, copy 1 is the odd one out. Flip it back. The checks never reveal whether the stored bit is 0 or 1, only which copy disagrees.1
Now the catch. Suppose copies 2 and 3 both flipped. The checks report exactly what they would report if copy 1 alone had flipped. The decoder, betting on the likelier story, “repairs” copy 1 and completes the damage. All three copies now agree on the wrong answer, and nothing inside notices. That silent wrong guess is a logical errorA failure of the protected information itself, which the code cannot detect from the inside..1
Different error patterns can raise the same alarms, so a decoder can only bet on the most probable explanation. When errors are rare, the bet usually wins.1
Figure 1: The majority vote’s blind spot. One flip on copy 1 and two flips on copies 2 and 3 trip the same check. The decoder bets on the single flip and repairs copy 1: right in A, but in B all three copies end up agreeing on the wrong bit, a logical error.
Matching dots on a grid
Real codes like the surface codeA leading error-correcting code that spreads one protected qubit over a square grid of physical qubits checked by their neighbors. apply the same logic on a larger canvas. In the simplest picture, a chain of errors lights up alarms only at its two ends.2 The decoder must pair up the dots. A standard method, minimum-weight perfect matching, connects them with the shortest total set of links, because short error chains are the most probable.3 The checks themselves can misfire and create false alarms, so the matching runs across time as well as space, over many rounds.2
Pair the dots wrongly, and the correction plus the real errors can form a chain spanning the whole grid: the same silent logical error, now in two dimensions.3
Figure 2: Same alarms, two stories. The decoder sees only the stars, never the errors that caused them. Linking each nearby pair is the likely explanation; linking the two lower stars to the grid’s edges instead completes a chain across the whole grid, a silent logical error.
The other is speed, because the alarms keep coming. In one below-threshold experiment, a 72-qubit chip completed a round of checks every 1.1 microseconds, and a real-time decoder kept pace over up to a million rounds, with an average latency of 63 microseconds, slightly less accurately than slower offline decoding. The more accurate neural-network decoder needed about 24 microseconds per round, too slow to run live there. Those live answers were not yet fed back into a running computation.6
Why not decode later? For storage alone, you can. But certain operations needed for general-purpose computation require the decoder’s verdict before the next step can be chosen. If the decoder processes data more slowly than the hardware produces it, the backlog grows, and the computation slows down exponentially.4,6
Why it matters
The decoder is easy to overlook because it is not quantum; it runs on ordinary processors or dedicated classical chips. Yet a logical qubit’s reliability belongs to the hardware and its decoder together: the same raw measurements, decoded differently, give different logical error rates. And the burden grows with the machine: check measurements per round grow with the square of the code’s width.6
The quantum chip raises the alarms. The decoder has to read them, correctly and on time.
Sources
Nielsen, M. A. & Chuang, I. L. Quantum Computation and Quantum Information, 10th Anniversary Edition, Section 10.1 (Cambridge University Press, 2010). DOI: 10.1017/CBO9780511976667. ↩
Dennis, E., Kitaev, A., Landahl, A. & Preskill, J. “Topological Quantum Memory.” Journal of Mathematical Physics43, 4452–4505 (2002). DOI: 10.1063/1.1499754. Preprint: arXiv:quant-ph/0110143. ↩
Fowler, A. G., Mariantoni, M., Martinis, J. M. & Cleland, A. N. “Surface Codes: Towards Practical Large-Scale Quantum Computation.” Physical Review A86, 032324 (2012). DOI: 10.1103/PhysRevA.86.032324. Preprint: arXiv:1208.0928. ↩
Terhal, B. M. “Quantum Error Correction for Quantum Memories.” Reviews of Modern Physics87, 307–346 (2015). DOI: 10.1103/RevModPhys.87.307. Preprint: arXiv:1302.3428. ↩
Bausch, J. et al. (Google DeepMind and Google Quantum AI). “Learning High-Accuracy Error Decoding for Quantum Processors.” Nature635, 834–840 (2024). DOI: 10.1038/s41586-024-08148-8. ↩
Google Quantum AI and Collaborators. “Quantum Error Correction Below the Surface Code Threshold.” Nature638, 920–926 (2025), including Supplementary Information. DOI: 10.1038/s41586-024-08449-y. Preprint: arXiv:2408.13687. ↩