Decode a syndrome or a circuit's detectors
qec_decodeDecode with the engine's decoders. At code capacity, give code and a syndrome (the violated checks) or an error (the flipped qubits: its syndrome is taken and its residual judged, logical or not): matching (exact) and union_find for codes whose qubits sit in at most two checks; color for colour codes (restriction to matching on the three restricted lattices, lifted at each colour, completed below half the distance by an exact search); relay_bp for any code (it can stall on a degenerate error of a topological code, and then says it did not converge); search for the lightest error with the syndrome up to max_weight. At circuit level, give memory ({distance, rounds, p}: the rotated surface-code memory experiment), circuit (the circuit text: tags, Pauli-target observables and coordinates read) or model (detector error model text, decompositions with ^ read), with the fired detectors (the prediction: which observables flipped) or shots (sampled and decoded: the failure rate and its standard error): matching (exact), correlated (exact matching twice through the model's decomposed faults, the second answer kept only when the model's mechanisms explain it more cheaply), union_find, bp_osd, or window (a sliding window: window {commit, buffer} rounds; every edge set below half the distance is corrected once the buffer is at least (d + 1)/2). Sealed with the service's key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | A code by name: surface:D (the rotated surface code, odd D from 3 to 15), toric:L (2 to 12), steane, color:D (the triangular 6.6.6 colour code, odd D from 3 to 15), bb:72, bb:90, bb:108, bb:144 (or gross) or bb:288 (bivariate-bicycle codes); or {"family", "distance" | "size" | "n"}. | |
| seed | No | The sampling seed (default 1). | |
| error | No | The flipped qubits, by index. | |
| model | No | A detector error model in its text. | |
| shots | No | Sample this many shots of the circuit and decode each. | |
| memory | No | The rotated surface-code memory experiment at circuit level. | |
| window | No | window: rounds each window commits and the rounds after them it sees. | |
| circuit | No | A noisy Clifford circuit in the circuit text. | |
| decoder | No | The decoder (default: matching, or color for a colour code, relay_bp for a bivariate-bicycle code). | |
| syndrome | No | The violated checks, by index. | |
| detectors | No | The detectors that fired. | |
| max_weight | No | search: the heaviest error to try. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||