Clean qubit Bit-flip (X) error Phase-flip (Z) error
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Shor's 9-Qubit Code

Shor's code was the first proof that quantum information can be protected from noise at all: it encodes one logical qubit into nine physical qubits arranged as three blocks of three, concatenating a 3-qubit repetition code against bit-flip (X) errors with a second 3-qubit repetition code — measured in the complementary basis — against phase-flip (Z) errors. This simulator strikes each of the 9 physical qubits with independent bit-flip and phase-flip noise, runs the inner majority-vote decoder within each block and the outer majority-vote decoder across blocks, and reports whether the logical qubit survived — plus a running logical-versus-physical error rate over many trials so you can see the code's threshold behavior directly.