Remembering a qubit that forgets
Every physical qubit forgets within microseconds and can smudge in two directions at once, yet you can weld many forgetful qubits into one logical qubit that remembers, and spending more of them lowers the error rate, but only once each qubit is good enough. The trick is to measure the neighbours' parity and never the data. We build the surface code by hand, watch errors become chains whose endpoints light up, and see why Google's Willow result mattered.
Here is a promise that sounds like it breaks a conservation law: take a pile of components that each fail constantly, and build from them a single component that almost never fails. Worse, the more of the unreliable parts you spend, the more reliable the whole becomes. That's not how a chain works, where one weak link sinks everything. It's how error correction works, and the quantum version of it is one of the loveliest pieces of engineering I know.
A qubit is a desperately fragile thing. In the Bloch sphere post we drew its state as an arrow on a sphere, and every stray interaction with the outside world nudges that arrow until the information is gone, usually within microseconds. So before quantum computers can do anything useful, they have to solve a memory problem: how do you remember a qubit that forgets?
A bit that forgets two ways at once
A classical bit fails one way: it flips, 0 to 1. A qubit is worse, because its arrow can topple in two independent directions.
Why you can't just photocopy it
Classical error correction is almost insultingly simple: store every bit three times, and if one copy disagrees, take the majority vote. The obvious move is to do the same here. It's illegal, twice over.
That one line is the no-cloning theorem: you cannot build a machine that copies an unknown quantum state. And even if you could, reading a copy to check it would measure it, collapsing the very superposition you're trying to protect. So we're cornered into a strange task: correct something you may neither copy nor look at.
Measure the agreement, not the message
The way out is to stop asking "what is this qubit?" and start asking "do these qubits still agree?". A parity check, the answer to "is the number of flips here even or odd?", is a yes/no question that, set up correctly, commutes with the encoded information. It can tell you an error happened without telling you a thing about the state you're hiding.
The warm-up is the three-qubit repetition code. Encode your logical bit across three qubits and measure two parities, "do qubits 1 and 2 match?" and "do qubits 2 and 3 match?". Those two answers, the syndrome, point straight at which qubit flipped, and you flip it back. You never learned the data, only the disagreements.
Measurement turns an analog problem digital
Quantum errors look hopeless because they're continuous: a rotation by 3.7° is a different error from one by 3.8°, an uncountable infinity of ways to go wrong. The quiet miracle of the parity check is that it discretises them. Projecting onto the ±1 eigenspaces of the checks collapses any tiny continuous rotation into either "no error" or "a full Pauli flip here", with the right probabilities. You end up correcting a clean digital error you never quite committed, because the measurement chose it for you. An analog problem becomes a digital one, and that's the only reason error correction can ever terminate.
Two codes woven into one lattice
The repetition code has a fatal gap: it catches bit-flips and is completely blind to phase-flips. The surface code's answer is to run two repetition codes at once, woven through the same 2D lattice at right angles, one watching for errors and one for . Data qubits sit on the edges; parity checks (the stabilisers) sit on the faces, each one a four-qubit "do my neighbours agree?". Click around and inject some errors.
The even-overlap trick is the whole reason it works
For the two codes to coexist, every -type check and every -type check has to commute, otherwise measuring one would scramble the other. They commute precisely because each -plaquette overlaps each -plaquette on an even number of qubits, zero or two. That single geometric constraint, even overlap everywhere, is what lets a 2D surface code exist at all rather than collapsing into a tangle of incompatible measurements. The whole architecture hangs off it.
Errors are chains, syndromes are their endpoints
Inject not one error but a line of them, and something elegant happens: only the two stabilisers at the ends of the line light up. Every check in the interior sees two flips, an even number, so it stays silent. The syndrome isn't the error; it's the boundary of the error.
This should feel familiar if you read the random walk post.
Decoding is pairing up the lights
So you're handed a scatter of lit syndromes and asked: what error most likely caused these? The endpoints have to be paired up, and since a shorter error chain is more probable than a longer one, you want the pairing with the smallest total length. That's minimum-weight perfect matching, Edmonds' blossom algorithm from 1965, and it's exactly a routing problem.
When the decoder is wrong
Decoding fails when an error chain stretches clear across the lattice and the matcher pairs its endpoints the wrong way round, applying a "correction" that, combined with the real error, wraps the whole patch and flips the logical qubit. The longer the chain has to be to span the patch, the rarer that is. So the distance of the code, the length of the shortest error that can cause a logical failure, is the dial that sets how safe you are. Bigger patch, longer required chain, exponentially rarer failure.
Below threshold: more qubits, fewer errors
Now the payoff, and the counter-intuitive heart of the whole field. Write for the code distance and for the physical error rate of one qubit per cycle. The logical error rate goes as a power of :
Everything turns on whether the ratio is below 1 or above it. Drag the operating point across the threshold here and watch the curves for different code sizes fan apart.
Below threshold, every extra ring of qubits multiplies the logical error rate by a fixed factor smaller than 1, so errors fall off a cliff as you scale. Above threshold, the same spending makes things worse. We can name how much each step buys you:
Above threshold, redundancy is a trap
For two decades this was the embarrassing asterisk on every error-correction talk. The theory promised exponential suppression, but if each physical qubit fails more often than , adding qubits just adds more places to fail faster than the code can mop up, so the logical error goes up with distance. No hardware had ever shown a larger code beating a smaller one. "More qubits is better" is simply false until your qubits are good enough, and only then is it violently true.
Willow crossed the line
In 2024 Google's Willow processor became the first to show it, running surface codes at distance 3, then 5, then 7 and watching the logical error rate drop at each step, with a suppression factor of about 2.14. That's the experimental moment the curves above stopped being a hopeful extrapolation and became a measurement. It's one device, one kind of qubit, one demonstration, but the line has been crossed.
The bill: thousands of qubits for one
None of this is cheap. A logical qubit good enough to run a real algorithm needs a distance somewhere around 20 to 30, and a few non-obvious extras.
- Physical per logical
- ~1,000+
- data + measure qubits, at useful distance
- Willow suppression Λ
- 2.14×
- logical error drop per +2 distance
- Decode budget
- ~1 µs
- before the next error cycle arrives
That's the honest cost of fault tolerance, and here's the analogy that finally made it sit still in my head. A logical qubit is the quantum world's RAID array. RAID builds a reliable volume out of unreliable disks by storing parity, never a second copy of the data, and reconstructing a lost block from the parity of its siblings, which is exactly the move here: measure the neighbours' parity, never read the data. RAID even has a threshold of its own, below some per-disk failure rate adding spindles raises reliability and above it you've just added more things to break. Fault tolerance isn't a quantum exotic. It's parity and redundancy wearing a lab coat.
Recap
A qubit forgets in two directions and can't be copied or read, so we protect it by measuring parities instead, which discretise continuous errors and reveal where they happened without revealing the state. The surface code weaves two such codes through one lattice; errors become chains whose endpoints are the syndrome, and decoding is the geometry of pairing those endpoints by shortest path. Make the patch bigger and the logical error falls exponentially, but only once each physical qubit is below threshold, the line Willow finally crossed.
Reading further
- Fowler, Mariantoni, Martinis & Cleland (2012), Surface codes: Towards practical large-scale quantum computation: the canonical engineering reference for layout, syndromes, decoding and budgets. PhysRevA 86, 032324
- Kitaev (2003), Fault-tolerant quantum computation by anyons: the original toric/surface code, errors as worldlines and logicals that wrap the torus. Ann. Phys. 303, 2
- Google Quantum AI (2024), Quantum error correction below the surface code threshold: the Willow result, suppression with . Nature
- Devitt, Munro & Nemoto (2013), Quantum error correction for beginners: a gentle walk from the repetition code through stabilisers to surface codes. Rep. Prog. Phys. 76, 076001
The threshold has now been crossed exactly once, in one lab, for one kind of qubit. So the open problem has quietly changed from "is fault tolerance even possible?" to "how cheaply can we manufacture it?", which is a far better problem to be stuck on. Watch this space.
Try it in the lab
All effects →More from the blog
Every Qubit Gate Is a Rotation
Quantum computing is taught as alien linear algebra. On the Bloch sphere it collapses to one homely fact: a qubit is an arrow on a ball, and every operation you can do to it is a rotation of that arrow.
Quantum Tunnelling You Can See
Quantum tunnelling isn't an energy loophole: a wave decays through a wall instead of stopping. Watch a packet split, and see the exponential that keeps the Sun lit.
Band Gaps Are Just Bragg Reflection
The forbidden energy gap that makes a semiconductor a semiconductor is not a quantum mystery. It is the exact same wave interference that makes an X-ray diffract off a crystal or a soap film show colour.