Toric Code on a Flat Torus Chart (2D)
Interactive 2D toric-code simulator: the torus unrolled into a flat periodic lattice with explicit wraparound edges. Click edges to create anyon pairs from Pauli-Z errors, hop them across the lattice (including through the periodic seams), and close non-contractible loops to see an undetectable logical error silently flip the topologically-encoded qubit.
This 2D companion to the 3D toric-code simulator drops the curved-surface embedding in favor of the flat, periodic-boundary chart the toric code is actually defined on: qubits sit on every edge of an L×L grid whose top and bottom rows are identified, and whose left and right columns are identified, exactly like the classic "screen wraps around" arcade convention — drawn here as dashed stub pairs at the border instead of a hidden camera trick. Clicking an edge applies a Pauli-Z error and creates a pair of anyon defects wherever the local vertex stabilizer flips parity; extend the error string edge by edge, including straight through a periodic seam, and watch the anyon hop while the string's interior stays invisible to every stabilizer check. The key demonstration carries over unchanged: a loop that winds all the way around a periodic direction annihilates its anyons and passes every local syndrome check exactly like vacuum, yet silently flips one of the code's two logical qubits — a live winding-number readout, computed from the same boolean error arrays as the 3D version, tracks this invisible logical error the instant it happens.
Interactive 2D toric-code simulator: the torus unrolled into a flat periodic lattice with explicit dashed wraparound seams. Click edges to create anyon pairs from Pauli-Z errors, hop them across the lattice — including straight through a periodic seam — and close non-contractible loops to see an undetectable logical error silently flip the topologically-encoded qubit.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install