Skip to main content
KetQat

Appearance

Theorem · advanced

Minimum-weight matching finds a most likely error in a graph-like model

In a graph-like detector error model with log-likelihood weights, the most likely error with a given syndrome has the weight of a minimum-weight perfect matching of the detection events, and is obtained by joining matched events along shortest paths.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Let (H,p)(H, p) be a graph-like detector error model with decoding graph GG: vertices are the detectors and one boundary vertex bb, and mechanism jj is an edge of weight wj=ln⁡((1−pj)/pj)>0w_j = \ln\big((1 - p_j)/p_j\big) > 0. For vertices u,vu, v let d(u,v)d(u, v) be the weight of a lightest path from uu to vv in GG. Let ss be a syndrome and D={i:si=1}D = \{ i : s_i = 1 \} its set of detection events.

Define the complete graph KDK_D on the vertex set D∪{bu:u∈D}D \cup \{ b_u : u \in D \}, with one private copy bub_u of the boundary for every event, and edge weights

ω(u,v)=d(u,v),ω(u,bu)=d(u,b),ω(bu,bv)=0(u≠v∈D),\omega(u, v) = d(u, v), \qquad \omega(u, b_u) = d(u, b), \qquad \omega(b_u, b_v) = 0 \qquad (u \ne v \in D),

and no edge between uu and bvb_v for u≠vu \ne v. Then

max⁡e : He=sPr⁡[e]  =  (∏j(1−pj)) exp⁡(−min⁡Mω(M)),\max_{e \,:\, He = s} \Pr[e] \;=\; \Big( \prod_j (1 - p_j) \Big)\, \exp\Big( - \min_{M} \omega(M) \Big),

where MM ranges over the perfect matchings of KDK_D. Moreover, if MM is a minimum-weight perfect matching, the sum modulo 2 of lightest paths in GG joining the matched pairs, where a pair {u,bu}\{u, b_u\} is joined by a lightest path from uu to bb and pairs {bu,bv}\{b_u, b_v\} contribute nothing, is a most likely error with syndrome ss.

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.

Holds when

  • A graph-like detector error model, meaning every error mechanism flips one or two detectors, with independent mechanisms of probability 0<pj<1/20 < p_j < 1/2.
  • 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 errorMachine-checked

Step 1: probability and weight. By the edge-weight identity, Pr⁡[e]=(∏j(1−pj))e−w(e)\Pr[e] = \big(\prod_j (1 - p_j)\big) e^{-w(e)} with w(e)=∑jwjejw(e) = \sum_j w_j e_j. It therefore suffices to show that min⁡{w(e):He=s}=min⁡Mω(M)\min\{ w(e) : He = s \} = \min_M \omega(M) and that the stated construction attains it.

Step 2: explanations are edge sets with prescribed odd vertices. Regard e∈F2Ne \in \F_2^N as a set of edges of GG. Because an edge flips exactly the detectors at its ends, (He)i(He)_i is the parity of the number of edges of ee at detector ii. So He=sHe = s holds exactly when the detectors of odd degree in ee are the elements of DD. The degree of bb is unconstrained.

Step 3: a lemma on trails. Let FF be a finite set of edges and TT the set of vertices of odd degree in FF. Then FF is the disjoint union of ∣T∣/2\abs{T}/2 trails whose end points pair up the vertices of TT, together with closed trails. Indeed, if T≠∅T \ne \emptyset pick u∈Tu \in T and follow unused edges of FF from uu 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 uu, that is, at some v∈T∖{u}v \in T \setminus \{u\}. Removing the trail leaves an edge set whose odd vertices are T∖{u,v}T \setminus \{u, v\}, 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 ee be an explanation of ss of minimum weight. Replace bb by deg⁡e(b)\deg_e(b) copies, each incident to one edge of ee; the odd vertices are now DD and these copies. By Step 3, ee splits into trails pairing them, plus closed trails. A closed trail, or a trail joining two copies of bb, 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 ee is a disjoint union of trails, each joining two events u,v∈Du, v \in D or an event uu to bb. Match uu with vv in the first case and uu with bub_u in the second, and match the unused copies bub_u 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 MM with ω(M)≤w(e)\omega(M) \le w(e), because a trail from uu to vv weighs at least d(u,v)d(u, v). So min⁡Mω(M)≤min⁡ew(e)\min_M \omega(M) \le \min_e w(e).

Step 5: from a matching to an explanation. Let MM be a perfect matching of KDK_D. For each pair {u,v}⊆D\{u, v\} \subseteq D take a lightest path in GG from uu to vv, and for each pair {u,bu}\{u, b_u\} a lightest path from uu to bb. Let ee 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 ee are exactly the elements of DD, each of which is the end of exactly one path. By Step 2, He=sHe = s. Edges cancelled in the sum only lower the weight, so w(e)≤ω(M)w(e) \le \omega(M), and min⁡ew(e)≤min⁡Mω(M)\min_e w(e) \le \min_M \omega(M).

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. ■\qquad\blacksquare

Builds on
Part of
Mentioned in
Stated in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Eric Dennis, Alexei Kitaev, Andrew Landahl, John Preskill (2002). Topological quantum memory. Journal of Mathematical Physics 43, 4452-4505. doi:10.1063/1.1499754arXiv:quant-ph/0110143
  2. Jack Edmonds (1965). Paths, Trees, and Flowers. Canadian Journal of Mathematics 17, 449-467. doi:10.4153/CJM-1965-045-4
  3. Oscar Higgott, Craig Gidney (2025). Sparse Blossom: correcting a million errors per core second with minimum-weight matching. Quantum 9, 1600. doi:10.22331/q-2025-01-20-1600arXiv:2303.15933

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Proof re-derived: a most likely error is a minimum-weight T-join for T = detection events with the boundary vertex free (positive log-likelihood weights, Pr factorisation from equation/matching-edge-weight); the private boundary copies with zero-weight copy-copy edges always admit perfect matchings (the number of unmatched copies is even) and encode exactly the pairings of events with each other or with the boundary; a minimum T-join decomposes into paths between paired terminals, so its weight equals the minimum matching weight, and the mod-2 sum of lightest paths of a minimum matching is a T-join of no larger weight. Edmonds (1965) blossom algorithm and the DKLP reduction (quant-ph/0110143) consistent with their references.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision a8854f81b59cb456. Source file knowledge/records/theorem/minimum-weight-matching-finds-a-most-likely-error.md in the content repository (readable there once it is public).