To utilize quantum error-correcting codes, a decoder must infer the logical sector from the measured syndrome. Beyond producing a hard logical decision, some decoders provide soft information that estimates the reliability of that decision. For minimum-weight perfect matching (MWPM), a common confidence measure is the complementary, or logical, gap. Here we test whether the logit of a graph neural network (GNN) decoder can act as a learned proxy for the logical gap. Using a pretrained GNN for the rotated surface code under uniform circuit-level noise [Physical Review Research, 7(2):023181, 2025], we compare its soft output with the MWPM complementary gap on the same sampled syndromes. We find that post-selection based on the GNN logit yields a lower logical error rate than one based on the MWPM gap. Shot-by-shot, the signed GNN confidence distribution resembles the signed MWPM gap at low and intermediate values, but assigns higher confidence to many correctly decoded shots. While both scores approximate the posterior log-likelihood ratio, the GNN confidence magnitude is closer to its ideal value. These results show that a neural-network decoder trained only on syndromes and logical labels learns both gap-like discrimination and a quantitative confidence scale, enabling confidence-based post-selection when MWPM gap estimates are unavailable, costly, or poorly matched to the noise model.
To utilize quantum error-correcting codes, a decoder must infer the logical sector from the measured syndrome. Beyond producing a hard logical decision, some decoders provide soft information that estimates the reliability of that decision. For minimum-weight perfect matching (MWPM), a common confidence measure is the complementary, or logical, gap. Here we test whether the logit of a graph neural network (GNN) decoder can act as a learned proxy for the logical gap. Using a pretrained GNN for the rotated surface code under uniform circuit-level noise [Physical Review Research, 7(2):023181, 2025], we compare its soft output with the MWPM complementary gap on the same sampled syndromes. We find that post-selection based on the GNN logit yields a lower logical error rate than one based on the MWPM gap. Shot-by-shot, the signed GNN confidence distribution resembles the signed MWPM gap at low and intermediate values, but assigns higher confidence to many correctly decoded shots. While both scores approximate the posterior log-likelihood ratio, the GNN confidence magnitude is closer to its ideal value. These results show that a neural-network decoder trained only on syndromes and logical labels learns both gap-like discrimination and a quantitative confidence scale, enabling confidence-based post-selection when MWPM gap estimates are unavailable, costly, or poorly matched to the noise model.
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.
Post-selection improves the logical reliability of quantum computation by rejecting shots which are likely to result in logical failure. We introduce graph neural networks that predict decoder failure without additional decoder executions, using only syndromes, and for high-rate quantum low-density parity-check (qLDPC) codes, existing belief-propagation posteriors. We evaluate rotated surface and bivariate bicycle (BB) code memories under uniform depolarising circuit-level noise. Retaining 90% of shots gives approximately 3700x and 740x reductions in logical error rates for [[72,12,6]] and [[144,12,12]] BB codes at realistic physical error rates. For the distance 5 surface code at physical noise p=0.003, our neural post-selector achieves logical error suppression comparable to the leading complementary gap method without running the decoder.
Quantum error correction can be enhanced by post-selecting out runs that are likely to produce a logical failure, but the most accurate measures for that require costly decoder-level information. We introduce a practical, decoder-agnostic post-selection method that learns directly from syndrome data. The method trains a supervised classifier to distinguish between syndromes from low- and high-noise regimes, and then uses the classifier's output as an abort score for new runs, without requiring logical-error labels, correction operators, or code-specific likelihood calculations. We validate the approach in three complementary settings: circuit-level simulations of the Gross bivariate-bicycle code, code-capacity simulations of the surface code, and experimental logical magic-state distillation data from the QuEra neutral-atom processor. In the Gross and surface codes, learned syndrome post-selection reduces the conditional logical error rate at a fixed acceptance rate, with performance comparable to syndrome-weight filtering. For the surface code, the learned classifier reveals a post-selection transition distinct from the conventional decoding threshold. In the experimental data, the machine-learning score outperforms syndrome-weight post-selection and, when combined with logical-gap filtering, improves the output fidelity beyond using the logical gap alone. These results show that syndrome-only learning provides a scalable and hardware-compatible route to improving the reliability of quantum error correction.
Quantum error-correcting decoders provide both corrections and confidence estimates for the logical-error risk of individual measurement records. Such confidence can guide postselection, but it depends on the accuracy of the decoder noise model. When the physical device drifts away from that model, confidence measures such as the logical gap can become miscalibrated. We show that this mismatch can itself provide useful information. On IBM quantum hardware, syndrome statistics drift across consecutive acquisition windows, and the resulting detector histories differ substantially from those predicted by the stationary detector error model used for decoding. We observe a similar hardware-model mismatch in independent Google surface-code memory data. We exploit this effect by assigning additional rejection weight to detector histories that are unlikely under the assumed model. For minimum-weight perfect matching (MWPM), the minimum weight W provides an inexpensive proxy for syndrome surprisal. On held-out IBM repetition-code memories, likelihood-aware postselection reduces the retained logical-error probability (LEP) by 10.6% at d=7 and 28.8% at d=9, both at 15% rejection. On Google ten-round d=5 XZZX surface-code memory data, it reduces retained LEP by 75.4% at 90% rejection. Applied to Google's magic-state cultivation experiment with the Tesseract decoder, it reduces tomography infidelity by 34.7% with 30% additional grafting-stage rejection, or increases accepted yield by 30.4% at a target fidelity of 97.0%. Burst-noise simulations show that the advantage persists as code distance and syndrome-extraction volume increase. The method reuses quantities already produced during logical-gap decoding and requires only an additional fitting step.
As quantum computers remain susceptible to noise, QEC is essential for preserving logical information during computations. However, the performance of QEC codes breaks down beyond certain noise thresholds, revealing fundamental limits on their ability to protect quantum information. These limits can be characterized using information-theoretic measures such as the coherent information, which quantifies the maximum rate at which logical information can be reliably transmitted through a noisy quantum channel. In this work, we establish a direct connection between the CI and the binary cross-entropy loss used when training neural network decoders. Specifically, we show that the CI constitutes a sharp lower bound on the achievable loss for decoders that track logical operators across noisy channels. To this end, we develop a transformer-based neural network model based on maximum likelihood decoding. We train this network to estimate the CI and evaluate its performance on the surface code under three noise models: code capacity, phenomenological, and circuit-level noise. Our results demonstrate that the network accurately predicts CI and yields threshold estimates that closely match known theoretical limits. When used as a decoder, the network significantly outperforms the minimum weight perfect matching decoder in terms of logical error rate. We also introduce a novel soft post-selection scheme that independently treats uncertainty in both logical operators and relies on confidence-based filtering of the network's output. We prove that such post-selection strategies, based on the MLD cosets, are optimal, and demonstrate their scalability in terms of both logical error rate and abort probability. These findings establish transformer-based architectures as powerful tools for QEC and provide the first numerical evidence supporting the optimality and scalability of MLD-based post-selection.
Abstract One of the critical requirements for fault-tolerant quantum computation is fast and reliable decoding,Minimum-weight perfect matching (MWPM) is a reliable surface-code decoder,but it will face long decoding time when decoding instances grow. Neural-network decoders was used to solve this problem, but large models often require costly retraining when the code distance or noise model changes.In this work, we propose a two-stage decoder that combines pretrained graph neural network (GNN) residual pre-decoding with global MWPM cleanup.The GNN receives a detector graph generated by the established decoding backend and assigns confidence scores to local correction candidates.Two staggered layers of parallel local windows process confidence corrections.The residual syndrome is passed to the NVIDIA-accelerated MWPM backend.On matched batches of 32,768 samples, the complete method reduced the logical failure rate by 6.25% to 18.01% relative to Pure MWPM for code distances d=3,5,7 and 9 at physical error rates p = 0.007 to 0.013. At d=3,it decoded 3.48x – 4.38x faster over p=0.003 to 0.021. We also trained separate GNN residual pre-decoders for four circuit-level noise models over 160 code-distance/error-rate configurations and obtained 2.25x to 5.41x speedups in every case.The logical-failure benefit depended on the noise model,but the pace is all improving. Our work can accelerate surface-code decoding pace and extend to others noise models.