Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Decoding the surface code using graph neural networks

Moritz Lange

Published Oct 17, 2023• 0 citations
OpenAlex

Abstract

Quantum error correction is essential to achieve fault-tolerant quantum computation in the presence of noisy qubits. Among the most promising approaches to quantum error correction is the surface code, thanks to a scalable two-dimensional architecture, only nearest-neighbor interactions, and a high error threshold. Decoding the surface code, i.e. finding the most likely error chain given a syndrome measurement outcome is a computationally complex task. Traditional decoders rely on classical algorithms, which, especially for larger systems, can be slow and may not always converge to the optimal solution. This thesis presents a novel approach to decoding the surface code using graph neural networks. By mapping the syndrome measurements to a graph and performing graph classification, we find that the graph neural networks can predict the most likely error configuration with high accuracy. Our results show that the GNN-based decoder outperforms the classic minimum weight perfect matching (MWPM) decoder in terms of accuracy. With a phenomenological noise model with depolarizing noise and perfect syndrome measurements, our networks beat MWPM up to code-size 15 across all relevant error rates. Furthermore, the GNN is capable of surpassing MWPM under circuit-level noise up to code size 7. We also show that training the network on repetition code data from a recent experiment [Google Quantum AI, Nature 614, 676 (2023)] produces per-step error rates comparable to those achieved with a matching decoder specifically adapted to the error rates of the physical qubits. This indicates that graph neural network decoders are capable of learning the underlying error distribution on the qubits. Our findings advance the field of quantum error correction and provide a promising new direction for the development of efficient decoding algorithms.

Related papers

Machine Learning Based Decoders for Near-Term Quantum Surface Codes: Performance and Pseudothreshold Analysis

Veeresh Kuruba, E. S. Shivaleela, Srinivas T

Quantum error correction (QEC) is crucial for achieving fault-tolerant quantum computing by addressing errors in noisy qubits. The surface code, a leading QEC framework, traditionally employs the Minimum Weight Perfect Matching (MWPM) decoder. We present a step-by-step methodology that formulates surface code decoding as a supervised machine learning classification problem within a two-level framework, where low-level modules address physical qubit errors and highlevel modules correct logical errors. We implement Feedforward Neural Networks (FFNN) and Graph Neural Networks (GNN), which are individually employed to perform low-level physical qubit error correction and high-level logical error correction for rotated surface codes of distances$d=3, d=5$, and$d=7$. Under depolarizing noise, both FFNN and GNN achieve lower logical error rates than MWPM, with GNN yielding up to 28% improvement at$d=7$. GNN achieves pseudothresholds of 0.1084, 0.1311, and 0.1441 for$d=3, d=5$, and$d=7$, surpassing MWPM's 0.0914, 0.1024, and 0.1126. Crossover points further indicate GNN's robustness at higher noise levels (e.g., 0.1632 vs. 0.1291 for MWPM). By learning error distributions in a two-level setting, both FFNN and GNN outperform MWPM, demonstrating their potential as scalable, high-performance decoders for near-term quantum devices.

IEEE Pune Section International Conference (PuneCon)•Dec 12, 2025•0 citations

Graph Neural Network Decoding of Surface Codes with Diagonally Correlated Two-Qubit Z Errors

Yinghui Ge, Shu Wang, Mengxin Li

Fault-tolerant quantum computing critically relies on quantum error correction. We study surface-code decoding with diagonally correlated two-qubit $\mathbf{Z}$ errors, a structured noise model that breaks assumptions leveraged by MinimumWeight Perfect Matching (MWPM). We develop a graph neural network (GNN) decoder based on learned message passing and benchmark it against a tuned MWPM baseline informed by the same noise statistics. In code-capacity simulations at code distances 3, 5, and 7, the GNN achieves consistently lower logical error rates than MWPM across the tested range of pair-error probabilities. The GNN correction threshold is about 2.5%, surpassing the 2.4% achieved by the MWPM baseline. These results indicate that data-driven message passing can adapt to complex, geometry-dependent noise without hand-crafted correlation models, thereby reducing reliance on manual model specification for quantum error correction.

International Symposium on Computer and Information Processing Technology (ISCIPT)•Sep 12, 2025•0 citations

Neural Minimum Weight Perfect Matching for Quantum Error Codes

Yotam Peled, David Zenati, Eliya Nachmani

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.

quant-pharXiv:2601.00242•Jan 2, 2026•0 citations

Low Latency GNN Accelerator for Quantum Error Correction

Alessio Cicero, Luigi Altamura, Moritz Lange +2 more

Quantum computers can solve selected problems more efficiently than classical computers, but current devices are limited by high physical error rates. Quantum Error Correction (QEC) mitigates this by encoding many physical qubits into a logical qubit, with the surface code among the most widely studied approaches. Since syndrome measurements are produced continuously, the decoder must process them fast enough to avoid becoming a system bottleneck, making real-time decoding essential for fault-tolerant quantum computing. While most state-of-the-art real-time decoders rely on Minimum-Weight Perfect Matching (MWPM), we instead use a high-accuracy Graph Neural Network (GNN) that trades higher computational cost for lower logical error rates. To make this GNN practical for real-time decoding, we apply algorithm-hardware co-design. We reduce complexity through hardware-guided pruning and retraining, producing two hardware-friendly models that reduce parameter count by $3.1\times$ and $6.5\times$. These target, respectively, an average decoding latency of one syndrome cycle and a worst-case latency within one syndrome cycle. We further reduce hardware cost using input-graph filtering and post-training quantization. Based on these optimized models, we propose an FPGA-based architecture for low-latency inference and real-time decoding. Evaluated on surface codes up to distance 7 under circuit-level noise at physical error rate $p=10^{-3}$, our decoder outperforms MWPM in decoding accuracy for both average-latency and max-latency settings. It reduces logical error rate by 40% at $1μs$ average latency, and by 13% under a strict $1μs$ deadline.

quant-pharXiv:2603.22149•Mar 24, 2026•0 citations

Data-driven decoding of quantum error correcting codes using graph neural networks

Moritz Lange, Pontus Havström, Basudha Srivastava +6 more

To leverage the full potential of quantum error-correcting stabilizer codes it is crucial to have an efficient and accurate decoder. Accurate, maximum likelihood, decoders are computationally very expensive whereas decoders based on more efficient algorithms give sub-optimal performance. In addition, the accuracy will depend on the quality of models and estimates of error rates for idling qubits, gates, measurements, and resets, and will typically assume symmetric error channels. In this work, we explore a model-free, data-driven, approach to decoding, using a graph neural network (GNN). The decoding problem is formulated as a graph classification task in which a set of stabilizer measurements is mapped to an annotated detector graph for which the neural network predicts the most likely logical error class. We show that the GNN-based decoder can outperform a matching decoder for circuit level noise on the surface code given only the simulated data, while the matching decoder is given full information of the underlying error model. Although training is computationally demanding, inference is fast and scales approximately linearly with the space-time volume of the code. We also find that we can use large, but more limited, datasets of real experimental data for the repetition code, giving decoding accuracies that are on par with minimum weight perfect matching. The results show that a purely data-driven approach to decoding may be a viable future option for practical quantum error correction, which is competitive in terms of speed, accuracy, and versatility.

arXiv:2307.01241•Physical Review Research•May 23, 2025•24 citations

Developing a Practical Neural-Network Surface Code Decoder under Circuit-Level Noise

Aarush Pancholi

Abstract. Suppressing qubit errors is one of the main challenges in building fault-tolerant quantum computers, requiring quantum error correction to protect fragile quantum information during computation cycles. The surface code is a leading approach because of its high error tolerance and compatibility with realistic hardware, but it requires a decoder that can accurately and quickly use the syndrome measurements to discern whether a logical error has occurred. This study investigates whether a feedforward neural-network can serve as a practical decoder for the surface code under circuit-level noise. Using the Stim software package, this study generates surface code circuits at multiple code distances and physical error rates and compiles them into detector samplers, then trains a PyTorch neural-network to predict whether a logical observable flip occurred from the syndrome data. The neural-network decoder is compared against Minimum-Weight Perfect Matching (MWPM), focusing on metrics including logical error rate and inference speed. The results show that the neural-network decoder performs competitively with MWPM for code distances 3 and 5 and provides inference time advantages at higher physical error rates as its inference time remains relatively constant over increasing physical error rates. However, MWPM outperforms the neural-network at distance 7, suggesting that scalability remains a major limitation for neural-network decoders. These results show that neural-networks are a promising approach for tackling quantum error correction, although future work is still needed to improve these models for real systems at larger code distances.

•Aug 2, 2026•0 citations
Quantum error correction is essential to achieve fault-tolerant quantum computation in the presence of noisy qubits. Among the most promising approaches to quantum error correction is the surface code, thanks to a scalable two-dimensional architecture, only nearest-neighbor interactions, and a high error threshold. Decoding the surface code, i.e. finding the most likely error chain given a syndrome measurement outcome is a computationally complex task. Traditional decoders rely on classical algorithms, which, especially for larger systems, can be slow and may not always converge to the optimal solution. This thesis presents a novel approach to decoding the surface code using graph neural networks. By mapping the syndrome measurements to a graph and performing graph classification, we find that the graph neural networks can predict the most likely error configuration with high accuracy. Our results show that the GNN-based decoder outperforms the classic minimum weight perfect matching (MWPM) decoder in terms of accuracy. With a phenomenological noise model with depolarizing noise and perfect syndrome measurements, our networks beat MWPM up to code-size 15 across all relevant error rates. Furthermore, the GNN is capable of surpassing MWPM under circuit-level noise up to code size 7. We also show that training the network on repetition code data from a recent experiment [Google Quantum AI, Nature 614, 676 (2023)] produces per-step error rates comparable to those achieved with a matching decoder specifically adapted to the error rates of the physical qubits. This indicates that graph neural network decoders are capable of learning the underlying error distribution on the qubits. Our findings advance the field of quantum error correction and provide a promising new direction for the development of efficient decoding algorithms.
Quantum error correction (QEC) is crucial for achieving fault-tolerant quantum computing by addressing errors in noisy qubits. The surface code, a leading QEC framework, traditionally employs the Minimum Weight Perfect Matching (MWPM) decoder. We present a step-by-step methodology that formulates surface code decoding as a supervised machine learning classification problem within a two-level framework, where low-level modules address physical qubit errors and highlevel modules correct logical errors. We implement Feedforward Neural Networks (FFNN) and Graph Neural Networks (GNN), which are individually employed to perform low-level physical qubit error correction and high-level logical error correction for rotated surface codes of distancesd=3,d=5d=3, d=5d=3,d=5, andd=7d=7d=7. Under depolarizing noise, both FFNN and GNN achieve lower logical error rates than MWPM, with GNN yielding up to 28% improvement atd=7d=7d=7. GNN achieves pseudothresholds of 0.1084, 0.1311, and 0.1441 ford=3,d=5d=3, d=5d=3,d=5, andd=7d=7d=7, surpassing MWPM's 0.0914, 0.1024, and 0.1126. Crossover points further indicate GNN's robustness at higher noise levels (e.g., 0.1632 vs. 0.1291 for MWPM). By learning error distributions in a two-level setting, both FFNN and GNN outperform MWPM, demonstrating their potential as scalable, high-performance decoders for near-term quantum devices.
Fault-tolerant quantum computing critically relies on quantum error correction. We study surface-code decoding with diagonally correlated two-qubit Z\mathbf{Z}Z errors, a structured noise model that breaks assumptions leveraged by MinimumWeight Perfect Matching (MWPM). We develop a graph neural network (GNN) decoder based on learned message passing and benchmark it against a tuned MWPM baseline informed by the same noise statistics. In code-capacity simulations at code distances 3, 5, and 7, the GNN achieves consistently lower logical error rates than MWPM across the tested range of pair-error probabilities. The GNN correction threshold is about 2.5%, surpassing the 2.4% achieved by the MWPM baseline. These results indicate that data-driven message passing can adapt to complex, geometry-dependent noise without hand-crafted correlation models, thereby reducing reliance on manual model specification for quantum error correction.
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.
Quantum computers can solve selected problems more efficiently than classical computers, but current devices are limited by high physical error rates. Quantum Error Correction (QEC) mitigates this by encoding many physical qubits into a logical qubit, with the surface code among the most widely studied approaches. Since syndrome measurements are produced continuously, the decoder must process them fast enough to avoid becoming a system bottleneck, making real-time decoding essential for fault-tolerant quantum computing. While most state-of-the-art real-time decoders rely on Minimum-Weight Perfect Matching (MWPM), we instead use a high-accuracy Graph Neural Network (GNN) that trades higher computational cost for lower logical error rates. To make this GNN practical for real-time decoding, we apply algorithm-hardware co-design. We reduce complexity through hardware-guided pruning and retraining, producing two hardware-friendly models that reduce parameter count by 3.1×3.1\times3.1× and 6.5×6.5\times6.5×. These target, respectively, an average decoding latency of one syndrome cycle and a worst-case latency within one syndrome cycle. We further reduce hardware cost using input-graph filtering and post-training quantization. Based on these optimized models, we propose an FPGA-based architecture for low-latency inference and real-time decoding. Evaluated on surface codes up to distance 7 under circuit-level noise at physical error rate p=10−3p=10^{-3}p=10−3, our decoder outperforms MWPM in decoding accuracy for both average-latency and max-latency settings. It reduces logical error rate by 40% at 1μs1μs1μs average latency, and by 13% under a strict 1μs1μs1μs deadline.
To leverage the full potential of quantum error-correcting stabilizer codes it is crucial to have an efficient and accurate decoder. Accurate, maximum likelihood, decoders are computationally very expensive whereas decoders based on more efficient algorithms give sub-optimal performance. In addition, the accuracy will depend on the quality of models and estimates of error rates for idling qubits, gates, measurements, and resets, and will typically assume symmetric error channels. In this work, we explore a model-free, data-driven, approach to decoding, using a graph neural network (GNN). The decoding problem is formulated as a graph classification task in which a set of stabilizer measurements is mapped to an annotated detector graph for which the neural network predicts the most likely logical error class. We show that the GNN-based decoder can outperform a matching decoder for circuit level noise on the surface code given only the simulated data, while the matching decoder is given full information of the underlying error model. Although training is computationally demanding, inference is fast and scales approximately linearly with the space-time volume of the code. We also find that we can use large, but more limited, datasets of real experimental data for the repetition code, giving decoding accuracies that are on par with minimum weight perfect matching. The results show that a purely data-driven approach to decoding may be a viable future option for practical quantum error correction, which is competitive in terms of speed, accuracy, and versatility.
Abstract. Suppressing qubit errors is one of the main challenges in building fault-tolerant quantum computers, requiring quantum error correction to protect fragile quantum information during computation cycles. The surface code is a leading approach because of its high error tolerance and compatibility with realistic hardware, but it requires a decoder that can accurately and quickly use the syndrome measurements to discern whether a logical error has occurred. This study investigates whether a feedforward neural-network can serve as a practical decoder for the surface code under circuit-level noise. Using the Stim software package, this study generates surface code circuits at multiple code distances and physical error rates and compiles them into detector samplers, then trains a PyTorch neural-network to predict whether a logical observable flip occurred from the syndrome data. The neural-network decoder is compared against Minimum-Weight Perfect Matching (MWPM), focusing on metrics including logical error rate and inference speed. The results show that the neural-network decoder performs competitively with MWPM for code distances 3 and 5 and provides inference time advantages at higher physical error rates as its inference time remains relatively constant over increasing physical error rates. However, MWPM outperforms the neural-network at distance 7, suggesting that scalability remains a major limitation for neural-network decoders. These results show that neural-networks are a promising approach for tackling quantum error correction, although future work is still needed to improve these models for real systems at larger code distances.