Minimum-weight perfect matching (MWPM) is the dominant surface-code decoder but is suboptimal under depolarizing noise, because it discards the X – Z correlation that Y errors induce and is not degeneracy-aware. We present an exactly anchored diagnostic benchmark for the code-capacity depolarizing channel, not a case for neural decoding. Five decoders (MWPM, correlated matching, belief-matching, belief propagation with ordered-statistics decoding (BP+OSD) and a lightweight multilayer perceptron (MLP)) are compared with an exact analytic maximum-likelihood (ML) reference at distance d = 3 , with exact per-syndrome ML decisions on sampled syndromes at d = 5 , and with a matched-marginal independent-noise control. Measuring MWPM’s suboptimality by the relative logical-error-rate (LER) reduction that ML achieves over it, the difference between the depolarizing and control channels is 19–32 percentage points (pp) above an 11%–14% floor at d = 3 , and 33–60 pp above an 8%–10% floor at d = 5 . At d = 3 the MLP recovers 90%–95% of the MWPM-to-ML gap, more than belief-matching (82%–89%), BP+OSD (74%–80%) or correlated matching (46%–58%). At d = 5 belief-matching and BP+OSD agree closely yet stay measurably above ML, recovering 79%–91% of the gap, while the MLP’s advantage over MWPM depends on the training budget (crossover near 3.5 × 10 5 samples at p = 0.08 ) and, when adequately trained, recovers at most 17%. In simulated circuit-level memory experiments at d = 3 and 5, the classical decoders keep their advantage over MWPM, the matched-marginal split becomes decomposition-dependent, and the MLP recovers 25% of the gap at d = 3 , T = 2 and, over five training seeds and budgets up to 9 × 10 5
Minimum-weight perfect matching (MWPM) is the dominant surface-code decoder but is suboptimal under depolarizing noise, because it discards the X – Z correlation that Y errors induce and is not degeneracy-aware. We present an exactly anchored diagnostic benchmark for the code-capacity depolarizing channel, not a case for neural decoding. Five decoders (MWPM, correlated matching, belief-matching, belief propagation with ordered-statistics decoding (BP+OSD) and a lightweight multilayer perceptron (MLP)) are compared with an exact analytic maximum-likelihood (ML) reference at distance d = 3 , with exact per-syndrome ML decisions on sampled syndromes at d = 5 , and with a matched-marginal independent-noise control. Measuring MWPM’s suboptimality by the relative logical-error-rate (LER) reduction that ML achieves over it, the difference between the depolarizing and control channels is 19–32 percentage points (pp) above an 11%–14% floor at d = 3 , and 33–60 pp above an 8%–10% floor at d = 5 . At d = 3 the MLP recovers 90%–95% of the MWPM-to-ML gap, more than belief-matching (82%–89%), BP+OSD (74%–80%) or correlated matching (46%–58%). At d = 5 belief-matching and BP+OSD agree closely yet stay measurably above ML, recovering 79%–91% of the gap, while the MLP’s advantage over MWPM depends on the training budget (crossover near 3.5 × 10 5 samples at p = 0.08 ) and, when adequately trained, recovers at most 17%. In simulated circuit-level memory experiments at d = 3 and 5, the classical decoders keep their advantage over MWPM, the matched-marginal split becomes decomposition-dependent, and the MLP recovers 25% of the gap at d = 3 , T = 2 and, over five training seeds and budgets up to 9 × 10 5
Learned decoders are often proposed as a faster, more adaptable replacement for minimum-weight perfect matching (MWPM) in quantum error correction, yet published comparisons mix datasets, noise levels and metrics, and many omit a matching baseline altogether. This paper contributes a controlled benchmark in which a multilayer perceptron (MLP), a two-layer LSTM and a Transformer encoder are trained and tested on identical Stim-generated repetition-code data (distances 3 to 11, circuit-level depolarizing noise, five measurement rounds) under one training protocol, and are scored against MWPM and a trivial majority-class predictor over five independent seeds. We report logical error rate, balanced accuracy, F1 for the logical-error class and ROC-AUC rather than raw accuracy, because roughly 12% of shots at a physical error rate of 0.05 (and under 1% at 0.003) carry a logical flip, so a decoder that never predicts an error already scores 88% (99.2% at the lower rate). With 3,200 training shots, none of the neural decoders matches MWPM at any distance. MWPM drives the logical error rate from 4.3% at distance 3 to nearly zero at distance 11, whereas the neural decoders stay between 5% and 12% and the MLP falls back to the majority prediction once the syndrome has 60 bits. Presenting the temporal structure of the syndrome to the network, one token per measurement round, gives the largest and most consistent gain, and a Transformer fed scalar detector tokens without positional information collapses. We also examine the effect of training-set size, a shift in test-time noise, and decoding latency, and we discuss which conclusions the data do and do not support.
Realizing the full potential of quantum computation requires Quantum Error Correction (QEC). QEC reduces error rates by encoding logical information across redundant physical qubits, enabling errors to be detected and corrected. A common decoder used for this task is Minimum Weight Perfect Matching (MWPM) a graph-based algorithm that relies on edge weights to identify the most likely error chains. In this work, we propose a data-driven decoder named Neural Minimum Weight Perfect Matching (NMWPM). Our decoder utilizes a hybrid architecture that integrates Graph Neural Networks (GNNs) to extract local syndrome features and Transformers to capture long-range global dependencies, which are then used to predict dynamic edge weights for the MWPM decoder. To facilitate training through the non-differentiable MWPM algorithm, we formulate a novel proxy loss function that enables end-to-end optimization. Our findings on the toric code under depolarizing noise demonstrate thresholds of 17.9% and 10.95%, nearing the 18.9% and 11.0% maximum likelihood bounds, highlighting the advantage of hybrid decoders that combine the predictive capabilities of neural networks with the algorithmic structure of classical matching.
Accurate and efficient decoding is a crucial component for achieving fault-tolerant quantum computing. Realistic circuit-level noise introduces temporal correlations and degeneracy, making optimal (maximum-likelihood) decoding computationally intractable in general. As a result, practical decoders rely on heuristic approximations, and it is generally difficult to quantify how suboptimal they are, as this strongly depends on the code and noise model considered. In this work, we study the accuracy of practical decoding algorithms under circuit-level noise by comparing them against a maximum likelihood decoding benchmark. Our approach propagates the density matrix through the full memory experiment and computes the optimal decoding decision for each syndrome history. We introduce pruning techniques with rigorous bounds, allowing us to access larger numbers of syndrome-extraction rounds. We apply this framework to small instances of the repetition code and a cellular automaton code, and benchmark minimum-weight perfect matching (MWPM), belief propagation with ordered statistics decoding (BP+OSD), Tesseract, and Planar decoders against optimal decoding. While standard decoders remain close to optimal for the repetition code, we find significant deviations for the cellular automaton code, with BP+OSD deteriorating already in experimentally relevant noise regimes. Moreover, the pruning method developed here highlights that, at low physical error rates, only a narrow fraction of syndrome histories contributes significantly to the logical error rate.
Fault-tolerant quantum computers must continually decode noisy parity-check data, known as the syndrome, to determine whether an encoded logical qubit has been corrupted. The standard decoder, minimum-weight perfect matching (MWPM), assumes independent, graph-like errors and is sub-optimal under realistic circuit-level noise. We present a compact residual 3D convolutional neural network (0.5–0.6 million parameters) that reads the space-time syndrome of a rotated surface code as a volumetric image. Trained on Stim simulations at code distances d = 3 and d = 5 and evaluated on 3.6 million held-out shots, a three-seed ensemble outperforms correlated MWPM, the strongest baseline we test, at all 18 noise settings, with 6–46% fewer logical errors (paired McNemar p-value below 0.03 in every setting). On real Google Sycamore data (d = 3, five rounds), the network is pre-trained on the device's fitted error model and fine-tuned on half of the shots. It achieves a logical error rate of 13.03%, compared with 13.57% for correlated MWPM on the same held-out shots, and outperforms it on all eight cross-validation folds, although it does not match belief-matching or tensor-network decoders. Its outputs are well calibrated (ROC AUC = 0.998): discarding the 10% least-confident shots reduces errors tenfold. An ablation study identifies space-time locality as the essential inductive bias. All models train in 49 minutes on two freely available GPUs, and the data and code are publicly available.
To utilize quantum error-correcting codes, a decoder must infer the logical sector from the measured syndrome. Beyond a hard logical decision, some decoders provide soft information estimating its reliability. For minimum-weight perfect matching (MWPM), a common confidence measure is the complementary, or logical, gap. Neural-network decoders trained with binary cross entropy naturally output a different score, the logit, whose relation to the matching gap remains unclear. Here, we test whether the logit of a graph neural network (GNN) decoder behaves as a learned proxy for the logical gap. Using a pretrained GNN for the rotated surface code under uniform circuit-level noise [PRR, 7(2):023181, 2025], we compare its logit with the MWPM gap shot by shot on identical syndromes. The native GNN decoder-logit pair yields a lower post-selected logical error rate than the native MWPM decoder-gap pair over the operationally relevant range of acceptance rates. Exchanging the scores between decoders isolates score discrimination from hard-decision accuracy and shows that both contribute to the advantage. At larger distances each score best ranks failures of its own decoder, whereas at small distance, where the bounded matching gap saturates, the learned confidence better discriminates MWPM failures than the gap itself. Finally, GNN confidence is substantially better described by the posterior logistic form implied by an ideal log-likelihood ratio, while the MWPM gap shows systematic departures. Thus, a neural-network decoder trained only on syndromes and logical labels learns a gap-like confidence proxy whose native scale more closely follows the expected posterior calibration form, supporting learned soft output when MWPM gap estimates are unavailable, costly, or insufficiently expressive.
The standard approach to Belief Propagation (BP) decoding passes messages on the Tanner graph of the quantum error-correcting (QEC) code, and is known to lack a threshold for the surface code. We propose novel BP decoders that exchange messages on the decoding graph and obtain thresholds (both for code capacity and circuit-level noise) via standalone BP for the surface code under depolarizing noise. Our approach, similarly to the minimum weight perfect matching (MWPM) decoder, is applicable to any graphlike QEC code. The thresholds observed with our decoders are close to those obtained by MWPM. This result opens the path towards scalable hardware-accelerated implementations of MWPM-compatible decoders.