Error Correction and Hardware in 3D

Four pictures of ideas that are hard to hold flat: errors that spread through time, a recipe that turns bad states into good ones, ions stuck in a line, and atoms that block each other. Every number on this page is computed in your browser and checked against a second method.

What this is

The error-correction lesson draws the surface code as a flat grid. A real decoder works on something with one more direction, because the checks are measured again and again and a measurement can be wrong too. The other three scenes show the thing that limits a hardware family: how many bad states a distillation recipe lets through, why trapped ions have to be carried around, and why neutral atoms can run a two-atom gate at all.

Everything here is a schematic built from small exact models. It claims no chip layout, no footprint, no speed and no device figure. The tables are computed, and the pictures only show what the tables say.

The 3D view loads only when you press Start 3D. On a weak phone it draws with a lighter setting, and the tables under each scene say the same thing in numbers if you would rather not load it.

Drag to turn. Scroll or pinch to zoom. Arrow keys turn it when the picture has focus.

The decoder works in space and in time

Take the smallest rotated surface code, distance 3: nine data qubits and four checks that watch for phase flips. Measure the checks four times (three noisy rounds and then one perfect one, the way a memory experiment ends). Each round is a layer. A detection event is a check whose reading changed since the round before.

A flip on a data qubit changes the checks beside it, so it makes events in one layer: either two checks side by side, or one check next to the edge. A wrong measurement is different: the check is read wrongly once and correctly the round after, so it makes two events one layer apart. The grey lines are every place a single fault can happen, and the violet ones are the wrong-measurement lines. The red lines are the faults in the picture, the amber dots are the events they cause, and the teal lines are the decoder’s answer: the pairing of the events that explains them with the fewest faults.

The decoder here is the textbook one: minimum-weight matching with every fault counted equally, found by trying every way to pair the events up. It is the idea behind the space-time matching of Dennis, Kitaev, Landahl and Preskill (2002), not any lab’s production decoder. The check script confirms that a corrected run leaves no events behind, that every single fault and every pair of faults is corrected in the distance-5 code, and that a triple that defeats it exists.

How it was checked

Every figure above comes from qec3d.js, and tools/verify_qec3d.mjs recomputes each scene a second way: the surface code’s checks against the commutation rules (every Z-type stabiliser has no event and no logical effect, a row of Z flips has no event and is logical), the decoder against exhaustive fault sets, the factory from its codewords, the shuttling plan by replaying it move by move, and the Rydberg evolution against the closed forms for no interaction and for a very large one.

Low-end phones: the page draws no shadows, caps the pixel ratio, drops antialiasing on weak devices, pauses when scrolled out of view or the tab is hidden, and does not animate on its own if your device asks for reduced motion.

Back to error correction