Consider a stabilizer circuit that repeatedly measures the checks of a code.
A detector is a set of measurement outcomes whose parity is the same in every noiseless run of the circuit. Typical detectors compare the outcome of one check in two consecutive rounds. A logical observable is a set of measurement outcomes whose parity equals the outcome of a logical measurement.
A detector error model with detectors, observables and error mechanisms consists of
- probabilities ;
- a matrix , where when mechanism flips detector ;
- a matrix , where when mechanism flips observable .
The model asserts that an error is a vector whose entries are independent with , that the observed detection events are , and that the logical observables are flipped by . A decoder receives and outputs a prediction of .
The model is graph-like when every column of has weight 1 or 2. It is then drawn as a decoding graph: one vertex per detector, one extra boundary vertex, and one edge per mechanism joining the two detectors it flips, or the detector and the boundary. With columns of larger weight the model is a decoding hypergraph. Under circuit noise the graph has one layer of vertices per round of syndrome extraction; edges inside a layer are data-qubit errors, edges between consecutive layers are measurement errors, and diagonal edges come from faults in the middle of an extraction circuit. This space-time picture goes back to Dennis, Kitaev, Landahl and Preskill; the file format and the automatic derivation from a circuit are those of Stim.