Same syndrome. Different corrections.

Toggle X errors and corrections on the nine-qubit surface patch. Blue faces and bars are Z checks; orange ones are X checks. A red ring marks an X operator.

Actual error

Correction

Residual

Question: which corrections restore the checks, and which restore every code state?

What is being computed?

The syndrome is HZx. Success means the residual lies in row(HX); a zero-syndrome residual outside that space is a logical X. The decoder enumerates all 512 X supports, choosing the smallest weight with this syndrome (ties by integer order). This is a minimum-weight error decoder under uniform independent X noise with probability below 1/2.

The residual display uses the actual error as teaching ground truth. A decoder observes only the syndrome, so it cannot perform that success test in an experiment. Checks are perfect; this demo models X errors only.

Companion to Eduardo Dueñez’s QEC lecture, November 13, 2026. Slides and seminar notes. Keyboard: Tab to a qubit, then Enter or Space. Runs offline without dependencies.