Preserve the message
Encoding distributes a superposition over the code space; it does not clone the input into independent copies.
Q045 · Detect / decode / repair
Encode one qubit, introduce an error, and read an auxiliary qubit. Use its syndrome to choose a repair. Compare a three-qubit repetition code with the complete five-qubit code, then check the recovered state.
Only the auxiliary qubit is read here
Ideal circuit protocol. The lines are registers, not atom trajectories. One auxiliary qubit is reset and reused for each check.
Ready. No recorded evidence yet.
02 / WHAT THE RECORDS SAY
Ideal target-state verification, with pointwise 95% Wilson intervals. The unencoded comparator is an independent qubit exposed to the same memory channel and forced error.
03 / THE DECODER ONLY SEES THE CHECKS
Multiple errors can imitate one correctable error. A flipped syndrome can trigger the wrong repair. The final target projection consumes the encoded state and is kept separate from the syndrome measurement.
04 / KEEP THE EVIDENCE
Most recent twelve trials shown. Export keeps every zero and every failed outcome. Save up to six samples, then restore their settings and records.
Generators are measured through a fresh auxiliary qubit: Hadamard, controlled Pauli factors, Hadamard, readout. After each controlled gate the touched data qubit may receive a uniform Pauli fault. Ancilla propagation faults, leakage, correlated noise, encoding faults and verification faults are omitted. Memory noise acts independently on each data qubit before extraction. Correction gates are ideal.
The repetition code protects bit flips only. The five-qubit code corrects arbitrary single-qubit errors with perfect extraction. Stochastic rates describe one declared noise model, not a hardware error budget or fault-tolerance threshold. Resource counts cover extraction only, not encoding or verification synthesis.
IBM · Stabilizer codes · Laflamme et al. · Perfect quantum code
Physics tutorial
BackgroundEncode one qubit, introduce an error, and read an auxiliary qubit. Use its syndrome to choose a repair. Compare a three-qubit repetition code with the complete five-qubit code, then check the recovered state.
Why it mattersMake a prediction from the information you can actually observe, then perform a separate check.
Start with the essentials
Encoding distributes a superposition over the code space; it does not clone the input into independent copies.
An auxiliary Hadamard, controlled stabilizer and final Hadamard implement these projectors. The displayed syndrome is the classical readout, including selected readout flips.
For an encoded zero state, independent bit-flip memory errors and perfect extraction, failure requires two or three flips. This does not protect phase errors or establish a fault-tolerant threshold.
This ideal target projection is sampled into pass/fail records. It is not a syndrome measurement or a universal logical error metric.
Typical misconceptionThe syndrome is the logical message.
Better mental modelOnly auxiliary check bits feed the decoder. The final known-target projection is a separate destructive test.
Typical misconceptionA successful simulated run certifies a device.
Better mental modelExact small-register simulation; one reused auxiliary qubit. Memory Pauli faults, data-only faults after controlled gates, and classical syndrome flips are separate. Encoding and final verification are ideal. One extraction round is not fault tolerant and does not establish a threshold.
Repair a bit flip with the repetition code, then keep the code and switch to a phase-sensitive input with a phase error.
What to observe: The phase error may leave every check quiet while failing final verification.Repeat the phase-error experiment with the five-qubit code. Follow extraction, decoding, correction and final verification separately.
What to observe: The auxiliary syndrome determines a repair without reading the logical amplitudes.Remove the forced error and raise gate or readout errors. Compare encoded and unencoded survival with the extraction resource counts.
What to observe: Noisy correction can hurt. One round of these unprotected checks is not fault tolerant.