Manuscript Offprint
arXiv:2610.28008Certified Non-Degenerate Maximum-Likelihood Benchmarking of Quantum LDPC Decoders
Michele Banfi*†, Marco Ferrari†, Antonino Favano*, Alberto Tarable†, and Luca Barletta*†
†Consiglio Nazionale delle Ricerche, Italy. E-mail: {alberto.tarable, marcopietro.ferrari}@cnr.it
*Politecnico di Milano, Milan, 20133, Italy. E-mail: {michele.banfi, antonino.favano, luca.barletta}@polimi.it
Abstract—The measured logical error rate of a quantum low-density parity-check (QLDPC) code depends on the decoding algorithm. We develop a framework that certifies non-degenerate maximum-likelihood (ML) decoding outcomes on individual sampled shots under circuit-level noise, providing a common reference for comparing decoders and codes. Upper and lower bounds on the minimum correction cost in the true and competing logical classes establish success, failure, or an undecided outcome. Branch-and-bound search refines these intervals while retaining valid bounds under resource limits. Counting the outcomes bounds the empirical ML logical error rate, with interval width equal to the undecided fraction. Results for two bivariate bicycle codes show that best-first ordered statistics decoding (BF-OSD) tracks the non-degenerate ML benchmark closely while leaving some ML-correctable shots.
I. INTRODUCTION
The error rate performance of a QLDPC code under practical decoding schemes is typically assessed by Monte Carlo simulation. On the other hand, Monte Carlo simulation typically cannot establish the performance of the same code under a specified maximum-likelihood (ML) rule, whose evaluation is generally computationally demanding [1]. Belief propagation (BP) with ordered statistics decoding (OSD) is the current state-of-the-art for QLDPC decoding [2], [3], and refinements continue to improve measured logical error rates and efficiency [4]. However, a search that finds no better correction does not establish optimality unless it also bounds the unexplored candidates.
A certificate is a set of verified bounds that proves a decoding outcome for a sampled shot, even if some candidate corrections remain unexplored. The term cost refers to the likelihood of an error: a more likely error has a lower cost. We use such certificates to establish the outcome of non-degenerate ML decoding: selecting the most probable error pattern under the specified detector error model and returning its logical effect, that is, the effect onto the logical qubits, referred to here as class. Two different physical errors can perform the same logical operation, i.e. they are part of the same class. Non-degenerate ML differs from degenerate ML, which maximizes the total probability of a class. For each sampled shot, bounds establish whether the most probable correction belongs to the true class, or leave the outcome undecided. Shot aggregation yields lower and upper bounds on the empirical non-degenerate ML error rate. The bounds provide a reference for comparing decoders and identify decoder failures on which this ML rule would succeed.
The framework applies to any linear code specified by the detector and logical parity-check matrices and to any decoder that supplies candidate corrections. The main text develops the certification principle and the search used to establish its bounds. Computational accelerations are described in Sec. A of the Appendix. We apply the benchmark to bivariate bicycle (BB) codes under circuit-level noise [5].
The following list summarizes the procedure:
-
Sample a shot. Record the syndrome and true logical class in each sector X and Z (Sec. III).
-
Initialize cost intervals. Use verified corrections and valid lower bounds (Sec. IV).
-
Refine unresolved intervals. Search by branch and bound, retaining valid bounds at resource limits (Sec. V).
-
Compare the intervals. Record certified success, certified failure, or an undecided outcome (Sec. IV-C).
-
Count the outcomes. Combine X and Z decoding outcomes and bound the empirical ML error rate (Sec. VI).
The comparison in Step 4 follows every bound improvement, so a shot can be classified without branch-and-bound when its initial bounds already separate the classes. The complete workflow, including computational accelerations, appears in Sec. A of the Appendix. Section VII illustrates this procedure through an example.
III. NOISE MODEL AND DECODING OBJECTIVE
A. Faults, Syndromes, and Costs
A shot is one simulated execution of the memory circuit, including rounds of syndrome extraction. We use the full circuit-level noise model of [4], [5], which includes faults in gates, idling, preparation, and measurement. A fault can propagate through subsequent gates, and its observable effect is recorded by detectors that compare measurement outcomes. The X and Z sectors are decoded separately; a shot fails if either sector fails. The following notation describes one sector.
As in [4], decoding uses a matrix whose rows index detectors and whose columns index fault mechanisms.
Let be the sampled error pattern, with when mechanism occurs. The observed syndrome is . The decoder seeks a candidate that explains the observations, so must satisfy
Equation (1) may have many solutions, ranked by the decoder according to their probability under the noise model.
For certification, we use the column-level model in which mechanisms occur independently with probabilities . The prior log-likelihood ratio of mechanism is
and it measures the cost of including that mechanism in a candidate. The total candidate cost is the sum over its selected mechanisms:
Independence gives
where is the probability of the fault pattern x. The first term in the right-hand side (RHS) is the same for every candidate, so minimizing (3) selects one of the most probable patterns satisfying (1). We use natural logarithms and express costs in nats. These costs come from the specified noise model and remain fixed during certification.
B. Logical Classes and Recovery Conditions
The logical matrix , where is the number of logical operators, records the logical effect of each mechanism. For an observed syndrome , define
Each contains the syndrome-consistent corrections with logical class . These sets partition , although some may be empty. The sampled error defines the true class . A correction succeeds when , equivalently when . Thus, the syndrome-consistent patterns fall into at most nonempty logical classes. Distinct physical errors can have the same action on the encoded state when they differ by a stabilizer. This property is called degeneracy [6]. In the detector model, patterns with the same syndrome and logical class therefore have the same recovery outcome, even when their mechanisms differ.
C. The Non-Degenerate ML Reference
For each logical class, define the cost of its cheapest representative:
where the minimum of an empty class is . The true class is nonempty because it contains the sampled error e.
The non-degenerate ML decoder returns the class of a globally minimum-cost pattern:
An exhaustive search of the syndrome-consistent candidates under the prior cost metric implements this rule. Degenerate ML instead selects the class with the greatest total probability, summed over its representatives. The two outputs can differ; minimum representative cost does not in general minimize logical error probability, i.e., the total class probability.
For the rest of the analysis and to ease the notation, the syndrome is fixed and is omitted from . The comparison uses the true-class minimum and the minimum over competing classes, . When these minima differ, non-degenerate ML fails iff . If the minima are equal, the outcome depends on tie-breaking. We leave such shots undecided, so the error-rate bounds apply to any fixed tie-breaking rule.
IV. CERTIFICATION FROM COST INTERVALS
Exact minima can be expensive to compute. Instead, we maintain one interval containing the true-class minimum and another containing the cheapest competing-class minimum:
The subscript identifies the true class (0) or a competitor (w).
A. Upper Bounds from Feasible Corrections
A feasible correction is a witness: its cost bounds from above the minimum over any set containing it. The sampled error e supplies ; a cheaper true-class witness improves this bound. A wrong-class witness supplies , with if none is available. Witness construction is developed in Sec. A of the Appendix.
B. Lower Bounds from Parity Constraints
To bound a minimum from below, we identify costs that every feasible correction must incur. Since all weights are positive, zero is always a valid lower bound. The observed detector syndrome often gives a better one.
Let be the set of mechanisms that flip detector . When , a correction must select an odd number of mechanisms from . In particular, it must select at least one and pay at least . This argument applies regardless of the logical class of the correction.
One mechanism may flip two detectors, so their individual minimum costs cannot generally be added: the same mechanism might satisfy both at once. We obtain a detector bound by choosing a subset of triggered detector rows () whose mechanism sets are pairwise disjoint. Every syndrome-consistent correction must then select at least one distinct mechanism from each set, giving for every
For example, two triggered detectors with disjoint mechanism sets whose cheapest weights are 1 and 2 require total cost at least 3. If their sets overlap, adding may be invalid. Any pairwise-disjoint choice of R gives a sound bound; finding the strongest such choice is unnecessary for certification.
Because this bound uses the syndrome alone, it can initialize both and in (7). Logical-class constraints may raise either bound further. The search below applies the same reasoning after some mechanisms have been fixed: it charges for selected mechanisms and bounds the cost still required by the remaining parity equations.
C. Certification Conditions
Proposition 1 (Verdict soundness). For a fixed margin , certifies success and certifies failure. Otherwise, the sector remains undecided.
Proof. Success follows from ; failure follows from .
For success, we exhibit a true-class correction costing at most and prove that every competitor costs at least . For failure, we exhibit a competitor costing at most and prove that every true-class correction costs at least . These comparisons need bounds on the minima, not the exact minima themselves. If the intervals are not separated by the required margin, we keep the result undecided and may refine the bounds further.
V. BRANCH-AND-BOUND REFINEMENT
The detector bound (8) alone may leave the two intervals overlapping. An interval can be narrowed by improving the lower bound. The lower bound search can be made more efficient by branch-and-bound: a logical class can be divided into smaller sets of corrections. If the lower bound of a set is at least the current upper bound, searching that set cannot yield a cheaper correction, so the set can be discarded.
The baseline runs this search for each logical class in (5). Write for the lower bound of class and for the cost of its cheapest candidate verified so far. If no candidate has been found, . At every stage . The two intervals compared in Proposition 1 are
(9)
In particular, proving success requires a lower bound for every competing class. The smallest of those bounds is the guarantee for the union of all competitors.
A. Search Nodes and Their Bounds
Each class can be represented as a separate search tree. At its root, no mechanism has been assigned. A node v fixes some mechanisms to zero (absent) or one (present) and represents the subset of class- corrections consistent with such choices. Its children fix more mechanisms, dividing that subset into smaller pieces.
The mechanisms fixed to one have already incurred a cost, say, . Their contributions to the target detector syndrome and logical class are removed by XOR. The remaining, or residual, parity equations specify what the unassigned mechanisms must still do. For example, if the residual syndrome value of a detector is 1 (i.e., the detector is still unsatisfied), an odd number of the unassigned mechanisms affecting that detector must be selected. Applying the disjoint-support bound (8) to these residual detector rows gives a lower bound on the additional cost. Thus,
is no greater than the cost of any feasible completion of v. If an unsatisfied detector or logical row has no unassigned mechanism, the node is infeasible and can be discarded.
B. Branching and Pruning
The frontier contains nodes awaiting exploration. We expand a node with the smallest first, as in best-first or search [7]. At an unfinished node, choose a parity row (detector or logical) whose residual right-hand side, after substituting the assigned variables, is 1, with unassigned columns . Every feasible completion must select at least one of them. Make child a by fixing and ; later columns remain unassigned. Each feasible completion goes to exactly one child, determined by its first selected column. No feasible correction is lost or counted in two children.
There are two ways to finish exploration on a node:
• If every residual parity is zero, setting all unassigned mechanisms to zero gives the cheapest completion of this node because all weights are positive. We verify the detector and logical parities of the completed correction before using its cost to reduce .
• If , no completion can cost less than the verified candidate. We prune the node without enumerating its children.
The search can stop as soon as the intervals certify a verdict; it need not finish every class search.
C. Resource Limits and Unresolved Outcomes
A time or memory budget may stop a search before all nodes are finished. Bounds remain valid if we account for every unfinished part of the class. Let be the smallest among nodes still on the frontier. If a cap removes unfinished nodes from that frontier, retain their bounds and let be the smallest of those retained values. An empty collection has value . Then
is a valid class lower bound. To see why, every class- correction lies in one of three places: a completed or safely pruned region accounted for by the verified incumbent , an active node bounded by , or an unfinished removed node bounded by . The smallest of these bounds therefore applies to the class minimum. A valid lower bound already proved for the class can be kept by taking its maximum with this expression.
Algorithm 1 gives the class search in procedural form [8].
The retained bound of a removed node still matters even if the active frontier becomes empty. Discarding that bound would wrongly treat an unexplored region as resolved. If a resource limit leaves the comparison open, we record BUDGET. If the two minima are resolved but differ by at most , we record TIE. Both outcomes remain undecided for the empirical error-rate bounds. The guarantees assume valid numerical bounds; solver arithmetic is discussed in Sec. C of the Appendix.
VI. EMPIRICAL ERROR-RATE BOUNDS
Once each sector has a verdict, a shot is a certified failure if either sector fails, a certified success if both sectors succeed, and undecided otherwise. Counting those outcomes gives the empirical benchmark.
Proposition 2. Over N sampled shots, the empirical non-degenerate ML logical error rate satisfies
The lower bound counts only proved failures. The upper bound treats every undecided shot as a possible failure. Consequently, the width is exactly the undecided fraction:
The quantities LB and UB bound an empirical error rate; the lowercase bounds concern per-sector costs. More computation may narrow the rate interval by deciding more shots, without changing the sampled data.
The interval (12) accounts only for unfinished computation on the sampled shots. To bound the population probability that a random shot is an ML failure, let the N shots be independent, with a number N fixed in advance, and let F and S be the numbers of certified failures and certified successes. Every certified failure is a true ML failure, so F is at most a Binom( ) count; likewise S is at most a Binom( ) count. Because the Clopper–Pearson lower limit [9]
Algorithm 1 Bounded branch-and-bound search for one logical class.
Input: , budget, verified while and budget remains do Pop of minimum from if is infeasible or , continue if all residual parities are zero then Complete with zeros to obtain ; verify its parities if valid, else Choose a residual-one row with columns for do Fix , earlier ; bound child if feasible and , keep in , or retain in if is full end for end if end while Return:
increases with x, applying it to these certified counts gives valid, conservative bounds:
each side holding with probability at least , hence jointly with probability at least by a union bound.
The upper endpoint in (13) combines the uncertainties of undecided shots and sampling. It may therefore exceed the measured error rate of another decoder without establishing its superiority. Further certification may reduce the undecided fraction, whereas sampling uncertainty remains even when all outcomes are certified. One could take the performance of a practical decoder as an upper bound. For example, BF-OSD [4] could be used as an upper bound for the [[72, 12, 6]] code.
VII. WORKED EXAMPLE
A small algebraic detector model illustrates how the preceding procedure establishes success, failure, and empirical error-rate bounds.
Sampled error and cost: The example consists of two detectors and five mechanisms:
Set , so contains exactly the prior log-odds of the independent mechanisms.
Consider the sampled error . Mechanisms 2, 3, and 5 fire. Their total cost is , and the observed syndrome is . Any correction must satisfy and . These constraints admit eight patterns.
Logical-class assignment: Choose two logical bits with matrix
The class of a candidate is . The sampled error has class . Column 5 changes the first logical bit despite having no detector signature, so it must be retained.
True-class upper bound: The sampled error gives . The correction has the same syndrome and class 00, but costs , reducing to 3. No wrong-class witness is retained, so . A competing witness of cost 5 would still cost more than , despite being cheaper than the sampled error.
Detector lower bound: Detector 1 requires a mechanism from , costing at least 1; detector 2 requires one from , costing at least 2. These disjoint sets imply cost at least 3 for every correction, hence , and . The true-class minimum is now known, but the competing-class minimum is not yet separated from it.
Success certificate: For classes 01 and 11, costs 5 and detector 1 still requires cost at least 1, so both class minima are at least 6. Only class 10 requires refinement. Its constraints include and . In order to match both the syndrome and class it expands its root on detector 1:
-
forces and . Together with detector 2, the bound is .
-
forces and . Detector 2 adds at least 2, giving .
Thus and . For , certifies success without a wrong-class witness.
Failure certificate: With the same model, sample , of cost 5 and true class 10. The correction is now a wrong-class witness of cost 3. The detector bounds give intervals [3, 5] and [3, 3]. Expanding the true-class root yields the same bounds 5 and 6 above, raising to 5. Since , the sector is a certified failure.
Budget limits and ties: Stopping shot S before expansion leaves and , so it remains undecided. After expansion, even if a cap removes both class-10 branches, retaining their bounds 5 and 6 preserves the success certificate. An exact tie is different: changing to 1 gives classes 00 and 10 the same minimum cost 3. No amount of refinement separates them; the outcome remains undecided.
Empirical bounds for three shots: Return to the original weights and consider the sampled errors . In the other sector, take the same toy model with zero sampled error on each shot. There, the zero correction has true-class cost 0, while every wrong-class correction needs at least one mechanism and costs at least 1. That sector is therefore certified successful on all three shots. Now, run the root expansions described above on the first two shots, but stop at the detector bounds on the third. The outcomes are success, failure, and undecided. Hence , . Refining the third shot certifies success and collapses the interval to .
VIII. RESULTS
We apply the same benchmark to two BB codes under the full circuit-level noise model of [5]: [[72, 12, 6]] with

Fig. 1. Non-degenerate ML logical error rates for [[72, 12, 6]], (orange), and [[144, 12, 12]], (blue). Shaded bands show joint 95% confidence intervals (13); solid lines show BF-OSD and dotted lines show BP+OSD-CS.
syndrome-extraction rounds and [[144, 12, 12]] with . Rates refer to complete shots. In both experiments, BF-OSD [4] is evaluated against the certified benchmark; its corrections are not used in the certification search. BP+OSD-CS [3] and the beam-search decoder Tesseract [10] may supply candidate corrections that, after verification, initialize the upper cost bounds.
Figure 1 shows that the BF-OSD error rate stays close to the non-degenerate ML benchmark on both codes, but lies above it at most sampled rates. The upper ML limit can exceed the decoder point estimates because unresolved near-ties count as possible failures and sampling uncertainty widens the interval; non-degenerate ML itself is not guaranteed to minimize logical error. From upward, the gap exceeds the statistical uncertainty of both rates. Thus BF-OSD misses corrections that this ML rule would make, although its error rate remains of the same order as the benchmark. At the lowest rates, the ML interval is widened mainly by near-ties: shots whose true-class and competing minima differ by at most remain undecided, no matter how much computation is spent.
Only at BF-OSD sample contain too few failures to resolve the gap. Together, the experiments indicate that BF-OSD operates near the non-degenerate ML reference on the smaller code, while the certificates identify a margin for improvement on the larger one.
IX. CONCLUSION
We have presented a procedure to certify non-degenerate maximum likelihood decoding for any linear quantum low density parity check code. The framework certifies whether this decoding rule succeeds or fails on individual simulated shots and bounds its empirical logical error rate when some outcomes remain undecided. Aggregating those certificates gives an empirical reference for comparing practical decoders under a fixed noise model. On both bivariate bicycle codes, best-first ordered statistics decoding performs close to that reference, although the certificates identify room for improvement on some shots. Stronger bounds at difficult noise rates would make this comparison more precise.
AI STATEMENT
Generative AI tools were used to polish the writing.
REFERENCES
[1] P. Iyer and D. Poulin, “Hardness of decoding quantum stabilizer codes,” IEEE Trans. Inf. Theory, vol. 61, no. 9, pp. 5209–5223, 2015.
[2] P. Panteleev and G. Kalachev, “Degenerate quantum LDPC codes with good finite length performance,” Quantum, vol. 5, p. 585, 2021.
[3] J. Roffe, D. R. White, S. Burton, and E. Campbell, “Decoding across the quantum low-density parity-check code landscape,” Physical Review Research, vol. 2, no. 4, p. 043423, 2020.
[4] M. Banfi, M. Ferrari, A. Favano, A. Tarable, and L. Barletta, "Best-first ordered statistics decoding of quantum LDPC codes," 2026, arXiv:2605.25777. [Online]. Available: https://arxiv.org/abs/2605.25777
[5] S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall, and T. J. Yoder, “High-threshold and low-overhead fault-tolerant quantum memory,” Nature, vol. 627, no. 8005, pp. 778–782, 2024.
[6] D. Poulin and Y. Chung, “On the iterative decoding of sparse quantum codes,” Quantum Information and Computation, vol. 8, no. 10, pp. 987–1000, 2008.
[7] P. E. Hart, N. J. Nilsson, and B. Raphael, “A formal basis for the heuristic determination of minimum cost paths,” IEEE Trans. Syst. Sci. Cybern., vol. 4, no. 2, pp. 100–107, 1968.
[8] M. Banfi, M. Ferrari, A. Favano, A. Tarable, and L. Barletta, “QLDPC-certificate-benchmark,” 2026. [Online]. Available: https://github.com/michelebanfi/qldpc-certificate-benchmark
[9] C. J. Clopper and E. S. Pearson, “The use of confidence or fiducial limits illustrated in the case of the binomial,” Biometrika, vol. 26, no. 4, pp. 404–413, 1934.
[10] L. Aghababaie Beni, O. Higgott, and N. Shutty, “Tesseract: A search-based decoder for quantum error correction,” arXiv preprint arXiv:2503.10988, 2025.
[11] Q. Huangfu and J. A. J. Hall, “Parallelizing the dual revised simplex method,” Math. Program. Comput., vol. 10, no. 1, pp. 119–142, 2018.
[12] E. W. Dijkstra, A Note on Two Problems in Connexion with Graphs, 1st ed. New York, NY, USA: Association for Computing Machinery, 2022, p. 287–290. [Online]. Available: https://doi.org/10.1145/3544585.3544600
[13] J. Feldman, M. J. Wainwright, and D. R. Karger, “Using linear programming to decode binary linear codes,” IEEE Trans. Inf. Theory, vol. 51, no. 3, pp. 954–972, 2005.
[14] M. H. Taghavi and P. H. Siegel, “Adaptive methods for linear programming decoding,” IEEE Trans. Inf. Theory, vol. 54, no. 12, pp. 5396–5410, 2008.
APPENDIX COMPUTATIONAL METHODS
This appendix develops the computational refinements used to make the certification procedure practical. The aim is to tighten cost intervals with less work while preserving the verdict conditions of Proposition 1 and the empirical bracket in (12). We first describe witness initialization and search reductions, then establish the conditions for cluster decomposition and explain the optimization models. Each reduction must retain every correction relevant to a verdict or bound the cost of those it excludes; the final subsection discusses the numerical qualifications for solver-based bounds.
A. Computational Accelerations
The main text describes a separate search for each logical class. This section explains how we obtain valid cost bounds with less work. We first improve the verified corrections used as upper bounds, then replace the many competing-class searches by k simpler problems. Cluster decomposition and optimization bounds provide further ways to resolve difficult sectors. Figure 2 places all the steps in the full workflow.
- Witness Initialization: A low-cost verified correction provides a tight upper bound from the start of the search. For the true class, the sampled error always supplies an initial witness. In our experiments, we also construct an anchor correction by running a short BP pass followed by zero-order ordered statistics decoding (OSD-0) [3] on the augmented parity-check matrix with target . Briefly, OSD-0 uses the BP reliability ranking to select a full-rank set of columns, solves for the corresponding correction bits, and sets all remaining bits to zero without searching higher-order patterns. We initialize as the smaller of cost() and the verified anchor cost.
Candidate corrections from other decoders can similarly serve as witnesses: after verifying their detector and logical parities, their costs can lower (if in class ) or (if in a competing class). Because a tighter initial witness allows more shots to be certified within a fixed computational budget, the decoder being benchmarked (here, BF-OSD) is never used to seed the certification search. Instead, only auxiliary decoders (such as BP+OSD-CS and Tesseract in Sec. VIII) supply candidate witnesses.
- Reduction to Constrained Problems: The baseline procedure in Sec. V searches each of the up to logical classes separately. To bound the competing-class minimum , however, this is unnecessary: every competing correction differs from the true class in at least one of the logical bits. We can therefore replace the competing-class searches with searches, one per logical bit. For each bit , let be the minimum cost of a syndrome-consistent correction whose -th logical bit is flipped relative to :
increasing computational cost

Fig. 2. Certification workflow for one sector. Shaded, indented steps are optional accelerations; the dotted arrow is the baseline procedure of Sections III–V. Each step may lower an upper bound with a verified witness or raise a lower bound . The intervals are compared after every update (Proposition 1), so a sector stops as soon as it is certified. A near-tie, or a sector still open after the last step, is recorded as undecided.
Because the remaining logical bits are left unconstrained, the feasible set of (16) is the union of all competing classes that disagree with on bit .
The cheapest competing-class cost is therefore the minimum over the k wrong-bit minima .
Lemma 1 (Union reduction). .
Proof. Every wrong-class candidate differs from the true class in some coordinate i, so it is feasible for at least one wrong-bit problem. Conversely, every candidate feasible for a wrong-bit problem belongs to a wrong class. The union of these feasible sets is therefore exactly the set of competing-class candidates, and minimizing over the union gives the stated identity.
Certification now needs constrained searches. The true-class search fixes all logical bits to ; wrong-bit search fixes only bit to its opposite value. They use the same detector rows but different active rows of . For example, with , this is 13 searches per sector rather than as many as 4096 class searches.
Let and be lower and upper bounds on the wrong-bit minimum , so . The bounds needed by the certificate are
The minimum across the wrong-bit lower bounds applies to all competitors, even when the wrong-bit feasible sets overlap. Therefore, success requires a sufficiently high lower bound for every bit; failure needs only one sufficiently cheap competing witness.
- A Single Syndrome-Only Search: The searches in Sec. A2 still solve the same detector equations repeatedly. We can instead run a single best-first search that enforces only and leaves all logical rows unconstrained, reading off the class of each completed correction.
Because best-first search expands a frontier node minimizing , and any node with zero residual syndrome is completed by setting all remaining unassigned mechanisms to zero (incurring zero additional cost), completed corrections are enumerated in nondecreasing order of cost. Consequently, the first completed correction attains the global minimum cost across all classes, , and identifies a globally cheapest class .
To certify that is strictly cheaper than every competing class by at least , we continue expanding nodes until every remaining frontier node (and any node removed under a memory cap, as in (11)) satisfies . Note that when a node reaches zero residual syndrome and yields a correction , Algorithm 1 terminates that branch rather than assigning further mechanisms. Any omitted completion along that branch has the form with and ; since all weights are positive, adding increases the cost by at least , so any such extension costs at least .
The stopping condition must also exclude near-optimal corrections in other logical classes. The following lemma establishes that separation.
Lemma 2 (Single-search verdict). Suppose and the search stops as above with no completed correction outside costing at most . Then every class other than has minimum greater than .
Proof. Consider a correction outside . There are three cases. If it was completed, its cost exceeds by assumption. If it lies below a frontier or retained node, the bound at that node exceeds . Otherwise, it extends a completed correction and costs at least .
The class of the first minimum-cost correction determines the verdict once the lemma separates it from every other class. If , the lemma gives and , which certifies success by Proposition 1. If , it gives and , which certifies failure.
A completed correction of another class within of leaves the sector undecided, as does a resource limit reached before the frontier clears .
- Additional Bound Improvements: The remaining methods aim to tighten the bounds or reduce search work. Cluster decomposition divides fired detectors into groups once we have proved that no correction below a chosen cost can connect them. We then solve smaller syndrome problems and combine their witnesses, under the conditions proved in Sec. B of the Appendix.
For sectors that remain unresolved, linear and integer programming relaxations solved with HiGHS [11] can tighten the lower bounds or identify cheaper witnesses. Furthermore, integer feasibility tests can certify a decoding sector directly without computing exact class minima, while parity cuts and cost-based column filtering reduce the size of the optimization models (Appendix C). Whenever multiple methods are applied to the same constrained search instance (namely, the true-class search or a single wrong-bit search ), we retain the largest valid lower bound and the smallest verified upper bound for that instance; across different wrong-bit instances , we combine bounds via the minimum in (17).
B. Certified Cluster Decomposition
A single shot often triggers several groups of detectors that are separated by many hops in the detector–mechanism Tanner graph. Solving each group independently is much faster than a joint search over all triggered detectors, provided that no candidate correction relevant to the certification verdict bridges two different groups. Topological separation in the graph alone is insufficient to guarantee this; we must prove that any correction connecting two groups exceeds a target cost threshold.
To do so, we first compute a universal lower bound on the cost of any syndrome-consistent correction. Any candidate with total cost at most a chosen separation cap then has a residual cost budget of at most available to connect different detector groups. In our implementation, we set with a margin above the current true-class upper bound . Once the groups are proved separate under the cap , we solve each group independently and combine their bounds.
- A Universal Cost Lower Bound: Let be the fired detectors in the observed syndrome . Every syndrome-consistent correction selects at least one mechanism that flips each detector in . To turn this observation into a lower bound, assign a non-negative charge to each fired detector. The detector matrix entry means that mechanism flips detector , and is the cost (2) of selecting that mechanism. Require that its total assigned charge does not exceed this cost:
Lemma 3 (Charging bound). For any satisfying (18) and any with , .
Proof. For each fired detector, choose one selected column that flips it; at least one exists because its parity is odd. Charge that detector to the chosen column. The charges assigned to any column sum to at most its weight by (18). Summing over selected columns counts every detector charge once and gives .
We seek large charges because a larger leaves less cost available to connect groups. Maximizing under (18) is a linear program (LP), the dual of a fractional set-cover relaxation. Optimality is not required: any charges satisfying the constraints give a valid bound. We solve the LP with HiGHS, recheck its constraints, and scale the charges down when necessary.
- Cluster Separation under a Cost Cap: The charges account for part of the weight of each mechanism. The part left over is its reduced weight,
The charging argument also keeps track of these leftover weights. Write for the mechanisms selected by correction . For every syndrome-consistent candidate, the total detector charge and its reduced weights then give
Each fired detector is flipped by at least one selected column, so expanding the weights in (20) counts its charge at least once. A candidate of cost at most C can therefore spend at most in reduced weight. If , no candidate is within the cap.
To test whether groups can be connected within that budget, form a graph whose vertices are mechanism columns. Join two columns when they share any detector row, fired or not. The selected columns of a candidate form one or more connected support components. For two proposed groups a and b of fired detectors, let be the smallest sum of reduced weights along a path from a column incident to a to one incident to b. The sum includes both endpoints; it is infinite when no path exists.
Proposition 3 (Separation). If , no candidate of cost at most C has a connected support component touching both groups.
Proof. Such a component would contain a connecting path. Since all reduced weights are non-negative, (20) would give
contradicting the cap.
Figure 3 illustrates the test. A connecting support component contains such a path, so its reduced weight is at least the path distance. The path itself need not satisfy the syndrome. A short path therefore leaves separation unproved; it does not show that a connecting correction exists.
A labeled multi-source Dijkstra search builds the detector groups [12]. Each fired detector initially labels its incident columns. Whenever two labels can be connected within the reduced-weight budget , they merge. Repeating these merges gives the clusters used below.
(a) Cheapest path from group a to group b

(b) Cost of any candidate connecting a and b
Fig. 3. Separation by reduced cost, with illustrative values. (a) Columns , , form the cheapest path between groups and of fired detectors; consecutive columns share a detector. Each weight splits into the charges of the fired detectors that column flips and its reduced weight (19). (b) Every syndrome-consistent candidate pays the total charge . A candidate whose support connects and also pays at least in reduced weight (20). Since , it costs more than the cap (Proposition 3).
- Combining the Cluster Minima: For each cluster c, make a smaller syndrome that is one on the fired detectors in c and zero on every other detector. We find its cheapest correction without fixing a logical class:
All detector rows remain in this problem. In particular, a cluster witness must leave every detector outside its group unflipped. If columns are filtered as in Sec. C of the Appendix, we solve over the retained columns; the filter preserves every global candidate within C.
The cluster search obtains the exact minimum , a witness , and its class . It also checks whether another logical class can attain a cost within of . When it rules this out, it provides a lower bound for every cluster solution outside class . The bound includes unfinished frontier nodes and any candidates omitted by safe pruning.
Additivity of cluster costs: Consider a global candidate of cost at most C. Separation ensures that no connected component of its selected columns touches fired detectors in two different clusters. The components touching cluster c together have syndrome , so their cost is at least . Any components touching no fired detector have zero syndrome and non-negative cost. Thus every candidate within the cap costs at least .
Conversely, XORing the cluster witnesses produces a correction with syndrome s and cost at most G: overlapping selected mechanisms cancel. If , the lower bound just proved forces this correction to cost exactly G, so it is a global minimum. Positive weights then imply that the witnesses have disjoint supports. Its logical class is . We verify the syndrome, cost, and class of the composed witness before using it.
Lower bounds on alternative logical classes: Knowing a cheapest correction is not enough for a verdict; we also need to bound every competing logical class. Within the cap, a candidate outside must use a different class for at least one cluster or include a nonempty zero-syndrome component. Changing cluster c costs at least more than its minimum. A nonempty zero-syndrome component costs at least , the smallest mechanism weight in the model. Hence
(22)
Candidates outside the cap cost more than C. Combining them with the within-cap bound gives a lower bound on every class other than :
If , the composed witness beats every other class by the required margin. The sector succeeds when and fails otherwise. The cap must therefore exceed for this test to reach a verdict. Figure 4 summarizes these bounds for two clusters.
If the cluster search finds a near-tie, reaches a resource limit, or cannot prove a sufficient gap, the sector proceeds to the searches of Section V and Sec. C of the Appendix.
C. Optimization Bounds and Integer Programming
Optimization models help when the search bounds still overlap. In this section, over denotes one active problem. The matrix contains all detector rows and whichever logical rows the true-class or wrong-bit search requires; contains their target parity bits. The correction vector has one entry for each of the mechanism columns, and is the positive cost of mechanism . Every model minimizes the total cost .
We use models in two ways. A relaxation contains every binary correction and possibly fractional points, so its optimum bounds the binary minimum from below. A verified binary correction bounds it from above. Matching bounds establish the minimum. The final subsection states what numerical verification these claims rely on.
-
Linear Programming Relaxations: The simplest relaxation allows and keeps only inequalities satisfied by every binary solution. We strengthen it with an adaptive parity-cut linear program (LP) [13], [14]. Its added inequalities rule out some fractional points while retaining all binary corrections. Every completed LP solve therefore gives a lower bound, even if the cut-generation budget ends early. An LP solution gives an upper bound only when it is binary and passes the detector and logical checks.
-
Encoding Parity with Integer Variables: Before adding stronger parity constraints, we express each parity row as an integer equation. For row of the active matrix , let be the mechanism columns participating in that row, and let be its target parity. The binary variable

Fig. 4. Bounding the other classes after composing two separated clusters, (22)–(23). The composed witness costs and has class . Within the cap, a correction in another class must change the class of some cluster , adding at least , or contain a nonempty zero-syndrome component, adding at least ; any other correction costs more than . Every other class therefore costs at least , and decides the sector.
selects mechanism ; introduce an auxiliary variable to write
Here counts pairs of selected columns beyond the required parity bit. For example, selecting three columns in an odd row gives , hence . Each binary solution fixes exactly one , so the equation encodes parity exactly.
If both and are made continuous, the same equation requires only . An even row adds no restriction beyond ; an odd row requires only total mass at least one. Thus the continuous model loses much of the parity information.
- Adaptive Parity-Cut Linear Program: The parity-cut LP keeps and adds inequalities satisfied by every valid binary assignment. For a row, choose with the wrong parity, . The assignment that is one exactly on violates that row. Every valid binary assignment must differ in at least one position, so
Rearranging gives the Feldman forbidden-set inequality [13]
There can be exponentially many cuts per row, so we add them only as needed [14]. After solving the current LP, form T from entries with . If T has the required parity, reverse membership of the entry closest to 1/2. This chooses a most violated forbidden-set inequality for that row. We add it when its violation exceeds the tolerance and solve again. Before insertion, we check that T has the wrong parity; otherwise the cut could exclude a valid correction and make the lower bound unsound.
If the LP optimum is binary and satisfies the active rows, it is a witness attaining the binary minimum. Otherwise, its objective remains only a lower bound.
- Integer Programming and Cut Reuse: An intermediate model makes integral in (24) but leaves . Each row sum then has the required integer parity. Fractional can still remain, so the optimum is a lower bound, not necessarily a correction. This small model can show that no candidate lies within the cost cap without solving the full binary problem.
If the sector remains undecided, we enforce binary constraints and solve the resulting mixed-integer program (MIP) with HiGHS [11] subject to a time limit. We set the solver's relative optimality gap tolerance to zero so that the search does not terminate early before the dual lower bound matches the best integer objective. Throughout the solve, valid lower bounds are taken exclusively from the solver's dual bound, whereas upper bounds are taken from the incumbent i.e., the cheapest feasible binary solution found so far, after independently verifying its parities. We treat a class minimum as exact only if the dual bound and the verified incumbent cost agree to within (well below ); if the solver hits the time limit first, both bounds remain valid and are retained.
- Integer Feasibility Tests: A sector can be decided without finding an exact minimum. Let be a verified correction with cost and class , and choose a margin , where is the verdict tolerance.
When , test whether any competing correction costs at most . If none exists, then the true-class upper bound satisfies and the competing-class lower bound satisfies . Proposition 1 therefore certifies success.
When , apply the same cost cap to the true class. If no true-class correction lies within the cap, then the competing-class upper bound satisfies and the true-class lower bound satisfies , which certifies failure.
Both conditions are integer feasibility problems with a zero objective. For the true class, we encode the detector constraints and the logical constraints using (24). We add the cost constraint .
For the competitors, we leave the logical class free and record its bits in the binary vector . The equality encodes these logical parities, with each nonnegative integer counting pairs of selected mechanisms in logical row . A single linear inequality then requires to differ from the true class in at least one bit:
One problem thus covers all competing classes, as the union in Lemma 1 does. An infeasibility proof establishes the required bound. A feasible point is a correction within , which we verify before using it as a witness.
We obtain from the syndrome-only integer program, solved as above, and try margins from 0.1 down to nats. A larger margin establishes a wider cost gap when the test proves infeasibility; smaller margins allow verdicts for closer minima. The verdict does not depend on being optimal: its class only selects which test to run, and its cost only sets the cap. Consequently, this route relies on the infeasibility claims of the solver but on no optimality claim.
- Reusing Charges to Prune the Search: The detector charges of Sec. B of the Appendix are computed once per shot and can also help individual searches. At a search node, some originally fired detectors still require a flip from the unassigned columns. Their charges bound the additional cost needed to complete the node. We update this charge bound as rows change parity and take the stronger of it and the disjoint-row bound.
The same charges identify columns that cannot occur in a cheap candidate. By (20), any candidate containing column j costs at least . If this exceeds the working cap, we can remove j from the search and optimization models when considering candidates within that cap. Numerical slack is allowed before removal. The test applies to every logical target because it uses only the detector syndrome.
The restricted models still contain every candidate within the cap. To use one of their bounds for the unrestricted problem, we also account for excluded candidates, all of which cost more than the cap, as in (23). At low physical error rates, is close to the cap, so few columns have small enough reduced weight to remain. On identical shots at , this filter reduced median search expansions by roughly two orders of magnitude and wall time by a factor of six, without contradictory verdicts. No integer solves were needed at the lowest sampled rates.
- Numerical Verification: Every binary witness is checked independently against the detector and logical equations using integer arithmetic modulo two. Its computed cost is then an upper bound. This check establishes feasibility, not optimality or the validity of the lower bound reported by a solver.
Costs, charges, and solver bounds use floating-point arithmetic. The current results therefore rely on the solver and its tolerances for numerical lower bounds and for the infeasibility claims of Sec. C of the Appendix. The margin avoids verdicts near a tie, but does not bound every rounding error.
We also guard two presolve operations, which simplify the optimization model before the main solve. Bounds on auxiliary integer variables are rounded down to preserve their allowed integer values. Each parity-cut row receives a finite lower bound equal to the sum of its negative coefficients, which is valid for . Neither change removes a feasible binary correction.
Exhaustive tests on small instances and independent solver comparisons provide additional validation. In particular, for the [[144, 12, 12]] code across all sampled physical error rates, we re-evaluated every certified failure using the exact integer-programming decoder bundled with Tesseract [10] (whose outputs were never used to seed the certification search). On every tested shot, the independent solver confirmed a competing logical class.