Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Skip Learn navigation
Encyclopedia
Topic

Minimum-weight perfect-matching decoding

Minimum-weight perfect-matching decoding pairs syndrome detection events, or connects them to suitable boundaries, through a weighted graph representing likely fault paths.

Edition released Coverage: Overview · Technical · Research
On this page

Explanation and significance

The graph turns a physical inference problem into a combinatorial optimization problem. Vertices represent observed changes in checks, while edges represent candidate faults or aggregated paths. The lowest total weight is a proxy for high likelihood under the chosen model. The method does not recover the actual historical error uniquely; it seeks a recovery with the right logical effect.

Mechanism and mathematical structure

For independent edge faults with probability p_e, a common weight is w_e=log[(1-p_e)/p_e]. A path weight sums edge weights. Matching chooses disjoint event pairings of minimum total weight, with boundary constructions handling odd event counts. Correlated faults that generate more than two events may require approximations or richer decoding models.

Fully worked reference example

Suppose four events A,B,C,D have path weights AB=1, CD=1, AC=3, BD=3, AD=4 and BC=4. The three complete pairings have total weights 2,6 and 8, so matching chooses AB with CD. If those weights are negative log likelihood ratios, the choice is supported by the assumed noise statistics. A changed correlated-fault model could favor another logical class even when this pairwise graph is unchanged.

Limits and misconceptions

Minimum-weight does not equal maximum-likelihood logical-class decoding in general because many equivalent paths can contribute probability. Graph construction, boundary treatment and time windows affect correctness. Worst-case decoder latency and throughput matter for a running system.

Scientific relationships

Is a decoding method used for surface and related codes. Depends on syndrome detection events and a fault graph. Is an alternative to union-find and belief-propagation methods.

From an error probability to an additive cost

For independent binary edge faults e_j with probabilities p_j, the probability of a particular pattern is Π_j p_j^(e_j)(1−p_j)^(1−e_j). Dividing by the probability of the no-fault pattern gives Π_(j:e_j=1) p_j/(1−p_j). Taking a negative logarithm produces the additive cost Σ_j e_j ln[(1−p_j)/p_j]. The constant removed in this calculation is common to all complete patterns, so minimizing cost maximizes the probability of an individual pattern under this model.

This derivation also states the assumption that can fail: edge events must have the declared joint distribution. A single physical gate fault producing several detector events cannot generally be replaced by independent graph edges without changing that distribution. Correlated matching methods or other decoders may incorporate additional information, but their behavior must be specified separately from basic graph matching.

A longer path can be more likely

Consider a triangle with defects at vertices A and B. A direct edge A-B fails with probability 0.01, while the two edges through C each fail with probability 0.1. The direct-only pattern has probability 0.01×0.9²=0.0081. The two-edge pattern has probability 0.99×0.1²=0.0099. Thus the two-edge route is more likely despite having greater Hamming weight.

Its likelihood cost is 2ln(9)≈4.394449, below the direct cost ln(99)≈4.595120. Unweighted shortest-path decoding would make the opposite choice. This toy graph illustrates probability weighting; whether the two routes differ by a stabilizer or a logical operator depends on the embedding and boundary structure of the actual code.

Matching is a global pairing decision

Shortest paths between candidate event pairs supply edges in a matching graph. A perfect matching then chooses a set of pairs so every event is covered once. Choosing each event's nearest neighbor independently can create incompatible pairings or leave unpaired events. The global optimization resolves these conflicts while retaining the additive path-cost model.

Boundaries require special treatment because a physically valid error chain can terminate there without producing a second interior event. Virtual boundary nodes or equivalent constructions represent those permitted endpoints. They must respect boundary type: a boundary that absorbs one syndrome species may not absorb the complementary species. Time boundaries likewise depend on initialization, final readout, and which previous syndrome values are known.

Path multiplicity and logical classes

Matching commonly uses the most likely or shortest representative path between endpoints. Suppose one logical class has one path of probability 0.006, while another has four disjoint candidate patterns of probability 0.002 each. The individual-path optimum favors the first class, while summed class probability favors the second. These numbers are illustrative complete-pattern probabilities, not independent probabilities to be multiplied together.

At low error rates, shortest representatives can dominate and the approximation can be effective. At higher entropy or near a transition, many longer paths can contribute substantially. Entropic corrections or exact class summation target this discrepancy, but add computational work and require a precise model. A matching decoder can be excellent without being the exact maximum-likelihood logical-class decoder.

Negative weights and changed references

If an edge has p_j greater than one-half, its likelihood weight is negative. One conceptual remedy is to include that edge in a reference error pattern and decode the deviation from it, whose probability is 1−p_j. The observed syndrome must then be shifted by the boundary of the reference pattern. Merely taking the absolute value of the weight without shifting the syndrome changes the inference problem.

For typical rare-fault models all elementary probabilities are below one-half, but inferred effective edges or unconventional models can violate that condition. Numerical implementations must also handle zero-probability edges, exact degeneracies, and finite precision. Tie-breaking among equal-cost recoveries can change logical outcomes even though every chosen recovery satisfies the syndrome.

Time windows and evidence boundaries

In repeated extraction, detector vertices live in space and time. A readout mistake can produce a pair separated temporally, while a data fault can connect spatially separated events. A finite streaming window truncates possible histories and requires boundary assumptions at its moving edge. Increasing the window may improve decisions but adds delay and storage; a retrospective decoder with future data solves a different deadline-constrained problem from a real-time controller.

Matching compares the pairing costs implied by its fault model. The weighted triangle illustrates local costs, the many-path example distinguishes pairing from logical-class probability, and the space-time boundary affects which histories are available. Likelihood weighting, correlations, topology, and time window all affect inference.

Summing path weights requires unique events

If two mutually exclusive complete fault patterns have costs a and b after the same normalization, their combined effective cost is −ln(exp(−a)+exp(−b)). For a=b=3, it is 3−ln(2)≈2.306853, lower than either individual cost. This is the elementary entropic correction behind summing alternatives. However, simply summing all drawn paths can double-count physical patterns when path representations overlap or include removable cycles. An entropy-aware decoder must define its underlying event set or partition function consistently. A more elaborate graph picture is not automatically a more accurate probability model.

Sources