Overview
A quantum error-correcting code produces a syndrome: the outcomes of its check measurements. The syndrome says that something went wrong and constrains what, but it does not name the error. A decoder is the classical algorithm that reads the syndrome and decides which correction to apply, or, in a computation, how to reinterpret later logical measurement outcomes.
Three facts shape the subject.
- Many errors share each syndrome, and errors that differ by a stabilizer have the same effect on the encoded state. The right question is which class of errors most probably occurred, not which error.
- Answering that question exactly is computationally intractable for general codes, so practical decoders exploit the structure of a code family or accept an approximation.
- A decoder for a running computer must process syndrome data at least as fast as the hardware produces them.
This page states the decoding problem and its complexity, describes the main algorithms and what each one computes exactly, and explains the real-time constraint. Surface codes and quantum LDPC codes are treated on their own pages. For a survey restricted to surface codes see deMarti iOlius et al..
Intuition
Think of a repetition code protecting one bit against flips. Checks compare neighbouring bits, and a check "fires" when its two bits disagree. A single flip in the middle of the chain fires the two checks on either side of it; a run of adjacent flips fires only the two checks at the ends of the run. The syndrome therefore shows the end points of chains of errors, and the decoder has to guess how the end points were joined. If each flip is unlikely, short chains are more likely than long ones, so the natural guess joins the end points in the cheapest way. That guess is minimum-weight matching.
Surface codes work the same way in two dimensions, with one twist that has no classical counterpart. Two different chains with the same end points that together enclose a region differ by a product of checks, and such a product does nothing to the encoded state. The decoder does not need to choose between them, and should add their probabilities. A decoder that looks for the single likeliest chain throws that information away.
Measurements are themselves faulty, so one syndrome cannot be trusted. Checks are measured repeatedly and the decoder looks at changes between rounds. Time becomes a third dimension of the problem: a measurement error looks like a chain running in the time direction. The lesson Decoding with minimum-weight perfect matching builds this picture step by step.
Prerequisites
Stabilizer codes, syndromes and logical operators (stabilizer codes); the surface code (surface codes); graphs and shortest paths; probability at the level of Bayes' rule. Belief propagation is introduced under classical error-correcting codes.
Mathematical Definitions
Let be the stabilizer group of an stabilizer code, generated by independent commuting Pauli operators , and let be its normalizer in the Pauli group. Phases are ignored throughout, so a Pauli error is an element of . The syndrome of an error is , whose -th bit is 1 exactly when anticommutes with . Let be a probability distribution on errors.
Fix, for every syndrome , one Pauli with . The errors with syndrome are exactly the elements of , and this set splits into cosets , one for each logical class . Two errors in the same coset differ by a stabilizer and act identically on every code state.
- Most-likely-error decoding returns .
- Degenerate maximum-likelihood decoding returns any element of the coset , where
The sum has terms. A decoder is a map from syndromes to corrections; it succeeds when the correction lies in the same coset as the error. If it picks the coset for syndrome , its success probability is , which is maximised term by term by the rule above. Degenerate maximum-likelihood decoding therefore has the smallest logical failure probability of any decoder for the given code and noise. The two rules coincide when every coset contains at most one error of non-negligible probability, as for a non-degenerate code at low noise, and differ in general; the formulation follows Hsieh and Le Gall and Iyer and Poulin.
- A stabilizer code on qubits with stabilizer group and logical qubits, and a probability distribution on -qubit Pauli errors taken up to phase.
- The syndrome is measured without error. With faulty measurements the same definition applies to the detectors of a space-time circuit.
The difference between the two rules is the difference between an energy and a free energy. For independent noise of strength an error of weight has probability proportional to , so a coset containing many errors of moderate weight can outweigh a coset containing the single lightest error. Dennis, Kitaev, Landahl and Preskill made this precise for the toric code: the coset probabilities are partition functions of a random-bond Ising model on the Nishimori line, and the threshold of optimal decoding is its phase transition.
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.
- Stabilizer circuits with Pauli noise, so that each fault flips a fixed set of measurement outcomes.
- Error mechanisms are treated as independent; correlated mechanisms have to be listed as single mechanisms with their joint effect.
With a detector error model the decoding problem keeps its form. The cosets are now classes of error vectors with the same detection events and the same logical effect , and the optimal decoder returns the value of with the largest total probability given .
Theorems
Consider the two problems of degenerate maximum-likelihood decoding: given the generators of a stabilizer code on qubits and a syndrome, output (i) a most likely error with that syndrome, or (ii) an element of a most likely coset of the stabilizer group.
- Hsieh and Le Gall (2011). For the Pauli channel in which every qubit independently suffers an error with probability and a error with probability , where , problems (i) and (ii) are both NP-hard. In particular, taking degeneracy into account does not make decoding easier in the worst case.
- Kuo and Lu (2020). For the depolarizing channel, where the and parts of an error are correlated, finding a most likely error and finding a correction that minimises the probability of a decoding error are NP-hard. Bounded-distance decoding of stabilizer codes is NP-hard for every channel model.
Both proofs are polynomial-time reductions from decoding problems for classical binary linear codes, whose NP-completeness is due to Berlekamp, McEliece and van Tilborg. In the reduction of Hsieh and Le Gall a classical parity-check matrix is embedded in a stabilizer code so that, for the constructed instances, the probability of a coset factorises and a most likely coset reveals a minimum-weight solution of the classical problem. Problem (ii) is in fact harder than NP-hard: see the #P-completeness theorem.
- Worst case over all stabilizer codes, specified by their generators, and over all syndromes. Nothing is implied for a particular family such as surface codes.
- Memoryless Pauli noise with a fixed error rate below , and perfect syndrome measurement.
Let DQMLD be the following problem. The input is a stabilizer code on qubits given by independent generators, a memoryless Pauli channel, a syndrome and a promise gap . It is promised that some logical class satisfies for all , where is the total conditional probability of the coset labelled by as in the definition of degenerate maximum-likelihood decoding. The output is .
Theorem (Iyer and Poulin, 2015, Theorem 5.1). On the independent – channel, already for codes with and for a promise gap with , DQMLD is #P-complete up to polynomial-time Turing reductions.
Membership follows because, for a channel in which the probability of an error depends only on its weight (for the independent – channel, on its -weight and its -weight), the probability of a coset is determined by its weight enumerator, the number of its elements of each weight, and counting those elements is a #P problem. Hardness is shown by reducing from the computation of the weight enumerator of a classical binary linear code, which is #P-complete. By Toda's theorem a polynomial-time machine with a #P oracle decides every language in the polynomial hierarchy, so the result places optimal degenerate decoding well above the NP-hard problem of finding a most likely error. The same paper shows that when the promise gap is so large that one error dominates its coset, degenerate and non-degenerate decoding coincide.
- Worst case over stabilizer codes given by independent generators and over syndromes; proved for the independent – channel.
- The problem carries a promise that the best coset beats every other coset by a stated relative gap; completeness is with respect to polynomial-time Turing reductions, because decoding is not itself a counting problem.
These are worst-case statements about arbitrary stabilizer codes. Specific families escape them when extra structure is present, and the next result is the most important example.
For independent mechanisms, , so maximising over a set of candidate errors is the same as minimising . The weight is the natural logarithm of the odds against the mechanism: gives and gives . When all probabilities are equal the weights can be replaced by 1 and the decoder minimises the number of errors. Weights computed from a noise model that differs from the device's actual noise make the decoder optimise the wrong quantity; see Dennis et al. for the uniform case and Higgott and Gidney for weighted decoding graphs.
- Independent error mechanisms with probabilities , so that every weight is positive.
Let be a graph-like detector error model with decoding graph : vertices are the detectors and one boundary vertex , and mechanism is an edge of weight . For vertices let be the weight of a lightest path from to in . Let be a syndrome and its set of detection events.
Define the complete graph on the vertex set , with one private copy of the boundary for every event, and edge weights
and no edge between and for . Then
where ranges over the perfect matchings of . Moreover, if is a minimum-weight perfect matching, the sum modulo 2 of lightest paths in joining the matched pairs, where a pair is joined by a lightest path from to and pairs contribute nothing, is a most likely error with syndrome .
A minimum-weight perfect matching is found in polynomial time by the blossom algorithm of Edmonds, so the most likely error of a graph-like model is computable efficiently. The reduction is the one used by Dennis, Kitaev, Landahl and Preskill for the surface code.
- A graph-like detector error model, meaning every error mechanism flips one or two detectors, with independent mechanisms of probability .
- Every detector is connected to the boundary vertex in the decoding graph, so that every syndrome has at least one explanation.
- The statement is about the most likely error, not the most likely coset of errors.
Proof · Proof that minimum-weight matching finds a most likely error
Step 1: probability and weight. By the edge-weight identity, with . It therefore suffices to show that and that the stated construction attains it.
Step 2: explanations are edge sets with prescribed odd vertices. Regard as a set of edges of . Because an edge flips exactly the detectors at its ends, is the parity of the number of edges of at detector . So holds exactly when the detectors of odd degree in are the elements of . The degree of is unconstrained.
Step 3: a lemma on trails. Let be a finite set of edges and the set of vertices of odd degree in . Then is the disjoint union of trails whose end points pair up the vertices of , together with closed trails. Indeed, if pick and follow unused edges of from for as long as possible. Each visit to an intermediate vertex uses two of its edges, so the walk can only stop at a vertex with an odd number of unused edges other than , that is, at some . Removing the trail leaves an edge set whose odd vertices are , and one repeats. When no odd vertex is left every degree is even and the remaining edges split into closed trails.
Step 4: from an explanation to a matching. Let be an explanation of of minimum weight. Replace by copies, each incident to one edge of ; the odd vertices are now and these copies. By Step 3, splits into trails pairing them, plus closed trails. A closed trail, or a trail joining two copies of , has even degree at every detector, so deleting it gives another explanation of strictly smaller weight, since all weights are positive. Minimality excludes this. Hence is a disjoint union of trails, each joining two events or an event to . Match with in the first case and with in the second, and match the unused copies among themselves at weight 0; their number is even because the number of events paired with each other is even. This is a perfect matching with , because a trail from to weighs at least . So .
Step 5: from a matching to an explanation. Let be a perfect matching of . For each pair take a lightest path in from to , and for each pair a lightest path from to . Let be the sum modulo 2 of these paths. A path has odd degree exactly at its two ends, so the detectors of odd degree in are exactly the elements of , each of which is the end of exactly one path. By Step 2, . Edges cancelled in the sum only lower the weight, so , and .
Steps 4 and 5 give equality, and Step 5 applied to a minimum-weight matching produces an explanation of minimum weight, which by Step 1 is a most likely error.
Worked Examples
Two candidate explanations in a repetition code
Take the distance-5 repetition code with bit-flip probability and checks . Suppose the first and last checks fire. Exactly two errors have this syndrome: flips on qubits , which join each event to its nearer end of the chain, and flips on qubits , which join the events to each other. Their probabilities are
so the first explanation has posterior probability . In matching language the unit edge weight is ; pairing both events with the boundary costs and pairing them with each other costs . Here every coset contains one error and the most likely error is also the optimal answer.
Coset probabilities in the distance-3 surface code
Number the qubits of the rotated surface code row by row on a grid. Take the -type checks , , , , the -type checks , , , , and the logical operator . Let errors occur independently with probability , and suppose only fires.
Of the possible errors, 32 have this syndrome. They form two cosets of the group generated by the four -type checks, 16 errors each. Enumerating them by weight:
| Coset | weight: number of errors | total probability at |
|---|---|---|
| , containing | 1: 2, 3: 3, 5: 8, 7: 3 | 0.08774 |
| , containing | 2: 3, 4: 8, 6: 3, 8: 2 | 0.01482 |
For example the two lightest elements of contribute . The optimal decoder returns any element of and is right with probability .
The two weight-1 errors in are and . They differ by the check , so they are the same error as far as the code is concerned. A minimum-weight decoder picks either and succeeds. A decoder based on single-qubit marginals does not: given this syndrome, the exact posterior probability that qubit 0 carries an error is 0.428, and the same for qubit 1, while every other qubit has probability at most 0.1. No qubit is more likely flipped than not, so thresholding the exact marginals yields the empty correction, which does not even reproduce the syndrome. This is the smallest instance of the failure of belief propagation described below.
Algorithms and Implementations
Matching and union-find
Input and output. A graph-like detector error model with edge weights and a set of detection events. The output is a set of edges whose end points, counted modulo 2, are the detection events, together with the logical observables that set flips.
Procedure. Compute lightest-path distances between detection events and from each event to the boundary, find a minimum-weight perfect matching of the events with the blossom algorithm, and return the union modulo 2 of the lightest paths between matched pairs. Implementations such as PyMatching explore the graph outward from the events instead of computing all pairwise distances first.
What it is exact for. By the matching theorem the output is a most likely error of the graph-like model. It is not the most likely coset: the decoder ignores how many errors of similar weight lie in each coset. It is also not exact for the true noise when one physical fault flips more than two detectors. A error on a surface-code qubit flips two -type and two -type detectors; decoding the two graphs separately discards that correlation.
Complexity. Polynomial in the number of detection events; this is Edmonds' theorem. In the regime of interest the cost is dominated by local exploration of the graph. The sparse blossom implementation decodes both bases of distance-17 surface-code circuits at 0.1% circuit-level depolarising noise in under one microsecond per round on one core. Fusion Blossom is a second fast implementation designed for parallel execution.
Accuracy. For the toric code with independent bit-flip noise and perfect syndrome measurement the matching threshold is the zero-temperature critical point of the random-bond Ising model, , below the optimal value near obtained on the Nishimori line; with measurement errors of the same probability (phenomenological noise) it is (Wang, Harrington and Preskill, following Dennis et al.). Under circuit-level depolarising noise reported thresholds lie between about 0.7% and 0.8%, depending on the circuit and noise details: 0.70% in Tan et al. and 0.82% in Higgott et al..
Variants. Correlated matching reweights one graph using the matching found in the other, to recover part of the – correlation (Fowler). Belief-matching sets the edge weights from a belief-propagation pass over the full hypergraph and raises the circuit-level threshold from 0.82% to 0.94% in the same study (Higgott et al.).
- Applies to graph-like detector error models, in which every error mechanism flips at most two detectors. Surface, toric and repetition codes under independent X and Z noise have this property; colour codes and general quantum LDPC codes do not.
Input and output. A decoding graph, a set of detection events and optionally a set of erased edges. The output is a set of edges whose end points, modulo 2, are the detection events.
Procedure (Delfosse and Nickerson).
- Syndrome validation. Start with one cluster per detection event; erased edges belong to clusters from the beginning. A cluster is odd when it contains an odd number of events and does not touch the boundary. Repeatedly grow every odd cluster by half an edge in all directions and merge clusters that meet, keeping track of membership with a union-find data structure. Stop when no odd cluster is left.
- Peeling. Treat the grown clusters as an erasure and run the peeling decoder of Delfosse and Zémor: build a spanning forest of each cluster and remove leaves one at a time, adding the leaf edge to the correction whenever the leaf vertex is a detection event.
Complexity. in the worst case, with the number of physical qubits and the inverse Ackermann function, which is at most 3 for any realistic input.
What it is exact for. The original paper proves that the decoder corrects every error of weight up to and every erasure of up to qubits, where is the distance. For erasures alone no growth is needed and the peeling step is a maximum-likelihood decoder for surface codes. For Pauli noise the result is an approximation to matching: growth is by graph distance and does not minimise total weight.
Accuracy. For the toric code the reported thresholds are 9.9% with perfect syndrome measurement and 2.6% with faulty measurements, compared with 10.3% and 2.9% for matching. Growing clusters at rates set by the edge weights raises the circuit-level threshold of the toric code from 0.38% to 0.62% in the study of Huang, Newman and Brown; Tan et al. report 0.55% for the surface code in their circuit model, against 0.70% for matching.
- Stated for topological codes with graph-like error models (surface and toric codes); Pauli errors, erasures, or both.
Belief propagation and why it struggles
Belief propagation passes messages along the Tanner graph of the check matrix and outputs an estimate of each error mechanism's marginal probability. On classical LDPC codes it is close to optimal. On quantum codes two structural facts work against it (Poulin and Chung; MacKay, Mitchison and McFadden).
- Short cycles are unavoidable. Every -type check must overlap every -type check on an even number of qubits, so a Tanner graph that treats , and errors together contains cycles of length four. The algorithm's assumption that incoming messages are independent fails from the first iterations.
- Degeneracy splits the belief. A quantum LDPC code has stabilizer generators of constant weight , far below its distance. An error covering part of a generator is equivalent to the complementary part, so the posterior distribution has several equally good modes. The marginals average over the modes, as in the worked example, and the hard decision is not a valid explanation of the syndrome. A sharply peaked coset distribution does not imply sharply peaked bit marginals.
Remedies keep belief propagation as a source of soft information and add a step that restores consistency.
Input and output. A check matrix , prior probabilities and a syndrome in the column space of . The output is a vector with .
Stage 1: belief propagation. Messages are exchanged along the edges of the Tanner graph of for a fixed number of iterations. With log-likelihood ratios , the check-to-variable message of the sum-product rule is
and the posterior estimate for mechanism is . If the hard decision satisfies , it is returned.
Stage 2: ordered-statistics decoding. Otherwise order the columns of from most to least likely to be in error (increasing ) and, going through them in that order, select a maximal linearly independent set of columns. Order-0 OSD returns the unique solution of with outside . Higher orders also try low-weight patterns on some columns outside , solve for each time, and keep the candidate of largest prior probability. The method adapts the classical algorithm of Fossorier and Lin and was introduced for quantum codes by Panteleev and Kalachev.
Complexity. Each belief-propagation iteration costs time proportional to the number of non-zero entries of . Stage 2 is Gaussian elimination, bit operations in the worst case, and dominates when it is invoked.
What it is exact for. Sum-product marginals are exact when the Tanner graph is a tree; the Tanner graphs of quantum codes are generally loopy (Poulin and Chung). OSD guarantees that the output reproduces the syndrome, not that it is the most likely error or lies in the most likely coset. The decoder is a heuristic whose accuracy is established numerically.
Accuracy. Post-processing improves the logical error rate of plain belief propagation on quantum LDPC codes by several orders of magnitude in the examples of Panteleev and Kalachev. Roffe et al. find thresholds for several families of hypergraph product codes and for the toric code. BP+OSD on the circuit-level hypergraph is the decoder used to establish the threshold of the bivariate bicycle codes.
- A check matrix of an error model with independent mechanisms and prior probabilities ; no restriction on column weight.
Belief propagation can also feed a matching decoder: its posteriors replace the prior edge weights (Criger and Ashraf; Higgott et al.).
Approximating the optimal decoder
Input and output. A planar stabilizer code, single-qubit Pauli error probabilities and a syndrome. The output is the logical class with the largest estimated coset probability, as required by degenerate maximum-likelihood decoding.
Idea. Fix an error with the observed syndrome. The probability of its coset is . Writing as a product of generators turns the sum into a sum over one binary variable per generator, and because each qubit is touched by a bounded number of generators and the noise is a product over qubits, the summand is a product of local factors. The sum is therefore the contraction of a tensor network laid out like the code, with one tensor per qubit and per check. The decoder evaluates this contraction for , , and and returns the largest.
Procedure (Bravyi, Suchara and Vargo). Contract the network column by column. The boundary of the contracted region is stored as a matrix product state, and after absorbing each column it is truncated back to bond dimension .
Complexity. for qubits. The method of Chubb for arbitrary two-dimensional stabilizer and subsystem codes costs .
What it is exact for. The contraction is exact when is not truncated, which in general needs a bond dimension exponential in the linear size. For the surface code with independent bit-flip and phase-flip noise, Bravyi, Suchara and Vargo give a different, exact maximum-likelihood algorithm with running time , by reduction to the simulation of matchgate circuits. For other noise, such as depolarising noise, the matrix-product-state contraction is an approximation controlled by ; in their benchmarks the logical error probability is already significantly below that of matching for .
Use. Because it estimates coset probabilities, the decoder serves as an accuracy reference for faster decoders and for threshold estimates of tailored codes, for example the 43.7(1)% threshold of a tailored surface code under pure dephasing (Tuckett, Bartlett and Flammia). A tensor-network decoder was also the most accurate decoder in the surface-code scaling experiment of Google Quantum AI. The cost grows quickly with the third (time) dimension required by faulty measurements, which confines the method to offline analysis.
- Two-dimensional codes with geometrically local checks, Pauli noise that is independent between qubits, and perfect syndrome measurement.
Renormalisation-group decoders estimate coset probabilities by coarse-graining the lattice and reach a running time logarithmic in the linear size when parallelised (Duclos-Cianci and Poulin).
Neural decoders
A neural decoder is a function from syndromes to logical classes whose parameters are fitted to examples. Torlai and Melko trained a Boltzmann machine on the toric code with phase-flip errors. Baireuther et al. showed that a recurrent network trained only on experimentally accessible data outperforms matching on the surface code because it learns the correlation between and errors, and keeps its accuracy over many rounds. The recurrent transformer decoder of Bausch et al. outperformed the algorithmic decoders it was compared with on experimental data from distance-3 and distance-5 surface codes, and on simulated data up to distance 11 with cross-talk, leakage and analogue readout signals. The cost is training data that grows with the code size, inference speed, and the absence of a guarantee on any individual output.
Correlated decoding
Matching the and graphs of a surface code separately treats a error as two unrelated events. Using one matching to reweight the other recovers part of the lost information (Delfosse and Tillich; Fowler). With belief-propagation weights, Criger and Ashraf obtain a depolarising code-capacity threshold of for the rotated surface code, against for earlier matching decoders and an upper bound near 18.9%.
Windowed and real-time decoding
A computation does not end before decoding starts. The syndrome stream is cut into overlapping windows. In a sliding-window decoder (Dennis et al.) each window is decoded as a whole, the corrections in its older part are committed, and the newer part, the buffer, is decoded again in the next window, so that no committed decision depends on a chain cut by the window's edge.
Let be the wall-clock time for which syndrome data have accumulated, undecoded, when the -th decoder-dependent operation is reached. Decoding that backlog takes . The quantum computer cannot idle without protection, so it keeps producing syndrome data during the wait, and at the next such operation the undecoded data cover at least . Hence and . For the running time grows exponentially in the number of decoder-dependent operations; for the backlog shrinks geometrically and the decoder keeps up. The argument is given by Terhal, and Skoric et al. show that decoding overlapping windows in parallel removes the constraint on a single decoder's speed.
- Syndrome data are generated at a constant rate and decoded sequentially at a constant rate .
- The computation contains operations, such as the Clifford correction that follows a magic-state injection, that cannot start until all earlier syndrome data have been decoded; error correction continues while the computation waits.
The backlog argument makes throughput a hard requirement. Sequential windows cannot meet it at large distance if the time per window grows faster than the window. Skoric et al. and Tan et al. decode non-adjacent windows simultaneously and reconcile them in a second pass; the latter report circuit-level thresholds of 0.68% and 0.55% with matching and union-find as inner decoders, almost identical to decoding the whole history at once. Bombín et al. split the decoding of a lattice-surgery circuit along its logical blocks and prove that the fault distance is preserved when a buffer condition holds.
Computational Complexity
| Problem or algorithm | Cost | Exact for |
|---|---|---|
| Most likely error, general stabilizer code | NP-hard | — |
| Most likely coset, general stabilizer code | #P-complete (Turing reductions) | — |
| Minimum-weight perfect matching | polynomial | most likely error, graph-like models |
| Union-find | erasures up to , errors up to | |
| BP+OSD | worst case | nothing in general; output always matches the syndrome |
| Matchgate maximum likelihood | most likely coset, surface code, independent / noise, perfect measurement | |
| Matrix-product-state contraction | most likely coset as |
Here is the number of qubits and the number of error mechanisms. Sources are given in the embedded records.
Limitations and Common Pitfalls
- A threshold belongs to a decoder and a noise model. The same code has a code-capacity threshold of 10.3% under matching and about 10.9% under optimal decoding, 2.9% with phenomenological measurement noise, and below 1% under circuit noise. Quote all three ingredients together; see Logical error rates and thresholds.
- Leaving out time-like edges. A decoding graph without edges between rounds interprets every measurement error as a data error. The symptom is a logical error rate that does not improve with distance. Derive the detector error model from the circuit, as Stim does, instead of writing the graph by hand.
- Weights from the wrong noise model. A decoder minimises the weight it is given. If the assumed probabilities differ from the device's, the "most likely" error is most likely only in the model.
- Polynomial time is not fast enough. What matters is the ratio of processing rate to syndrome rate, in the worst case over a long run and not on average (Battistel et al.).
- Most likely error versus most likely coset. The two agree at low error rates on codes with little degeneracy and diverge for highly degenerate codes; the gap is the reason for post-processing in BP+OSD and for tensor-network decoders.
- Hardness theorems are worst-case. They do not say that decoding a surface code or a particular LDPC family is hard.
The capstone lesson Benchmarking a decoder puts these checks into practice.
State of the Art
As of 2026-11, decoding in real time has been demonstrated alongside a below-threshold memory: Google Quantum AI report a distance-5 surface code operated with a real-time decoder at an average latency of 63 μs over up to a million cycles of 1.1 μs. In software, sparse blossom reaches one microsecond per round on a single core at distance 17 and 0.1% circuit noise, and Fusion Blossom reports a million measurement rounds per second up to distance 33 at the same noise strength. On accuracy, the neural decoder of Bausch et al. is the most accurate published decoder for the experimental surface-code data it was tested on, but not a real-time one. These statements summarise the cited papers and are not a complete survey.