Toric Code: Anyon Braiding & Topological Memory
Interactive 3D toric code on a torus: click edges to create anyon pairs from Pauli-Z errors, hop them around the lattice, and close them into non-contractible loops to see an undetectable logical error flip the topologically-encoded qubit.
The toric code is the periodic-boundary ancestor of the surface code used in real superconducting and neutral-atom quantum error correction hardware. This simulator renders one on an actual 3D torus: qubits sit on every edge of the lattice, and clicking an edge applies a Pauli-Z error, creating a pair of "anyon" defects wherever the local vertex stabilizer A_v flips parity. Extend the error string edge by edge and watch the anyon hop while the interior stays invisible to every stabilizer check; close the string back on itself and the anyons annihilate. The key demonstration is topological: a loop that winds all the way around the torus annihilates its anyons and passes every local syndrome check exactly like vacuum, yet it silently flips one of the code's two logical qubits — a live winding-number readout tracks this invisible logical error the moment it happens, showing concretely why the code's protected distance is set by the torus's circumference rather than by any single stabilizer.
Interactive 3D toric code on a torus: click edges to create anyon pairs from Pauli-Z errors, hop them along the lattice, and close them into non-contractible loops to see an undetectable logical error silently flip the topologically-encoded qubit.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install