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

arXiv:2506.02734 · Physical Review Applied

Self-attention U-Net decoder for toric codes

Weiwei Zhang, Zhuo Xia, Wei Zhao, Wei Pan, Haobin Shi

Published Jun 2, 2025• 1 citation
arXivHTMLPDF

Abstract

In the NISQ era, one of the most important bottlenecks for the realization of universal quantum computation is error correction. Stabiliser code is the most recognizable type of quantum error correction code. A scalable efficient decoder is most desired for the application of the quantum error correction codes. In this work, we propose a self-attention U-Net quantum decoder (SU-NetQD) for toric code, which outperforms the minimum weight perfect matching decoder, especially in the circuit level noise environments. Specifically, with our SU-NetQD, we achieve lower logical error rates compared with MWPM and discover an increased trend of code threshold as the increase of noise bias. We obtain a high threshold of 0.231 for the extremely biased noise environment. The combination of low-level decoder and high-level decoder is the key innovation for the high accuracy of our decoder. With transfer learning mechanics, our decoder is scalable for cases with different code distances. Our decoder provides a practical tool for quantum noise analysis and promotes the practicality of quantum error correction codes and quantum computing.

DOI
10.1103/xmp9-bh84

Related papers

SAQ: Stabilizer-Aware Quantum Error Correction Decoder

David Zenati, Eliya Nachmani

Quantum Error Correction (QEC) decoding faces a fundamental accuracy-efficiency tradeoff. Classical methods like Minimum Weight Perfect Matching (MWPM) exhibit variable performance across noise models and suffer from polynomial complexity, while tensor network decoders achieve high accuracy but at prohibitively high computational cost. Recent neural decoders reduce complexity but lack the accuracy needed to compete with computationally expensive classical methods. We introduce SAQ-Decoder, a unified framework combining transformer-based learning with constraint aware post-processing that achieves both near Maximum Likelihood (ML) accuracy and linear computational scalability with respect to the syndrome size. Our approach combines a dual-stream transformer architecture that processes syndromes and logical information with asymmetric attention patterns, and a novel differentiable logical loss that directly optimizes Logical Error Rates (LER) through smooth approximations over finite fields. SAQ-Decoder achieves near-optimal performance, with error thresholds of 10.99% (independent noise) and 18.6% (depolarizing noise) on toric codes that approach the ML bounds of 11.0% and 18.9% while outperforming existing neural and classical baselines in accuracy, complexity, and parameter efficiency. Our findings establish that learned decoders can simultaneously achieve competitive decoding accuracy and computational efficiency, addressing key requirements for practical fault-tolerant quantum computing systems.

quant-pharXiv:2512.08914•Dec 10, 2025•0 citations

Quantum Error Correction: Decoders for the Toric Code

Nando Leijenhorst

Quantum error correction is needed for future quantum computers. Classical error correcting codes are not suitable for this due to the nature of quantum mechanics. Therefore, new codes need to be developed. A promising candidate is the toric code, a surface code, because of its locality and its high error correcting capability and thresholds (the error probability below which increasing the size of the code decreases the failure rate). This thesis provides an introduction to quantum error correction and the stabilizer formalism, which is used to introduce the toric code. Several decoders are looked at, including the Minimum Weight Perfect Matching (MWPM) decoder and a recently developed decoder, the Union-Find (UF) decoder. The UF decoder is useful because of its almost-linear time complexity, while only reducing the threshold by a marginal amount compared to the MWPM decoder. In this thesis, the time complexity of the weighted growth version of the UF decoder is analysed. The toric code and the decoders have been implemented and simulated, and the thresholds have been determined. For the MWPM decoder, the threshold was determined to be 11.5±0.2%, which is not in agreement with the threshold in literature of 10.3%, and should not be possible according to the optimal threshold of about 11%. This probably is a result of the low grid sizes (up to a gridsize of 11) of the code used due to the time needed to simulate the MWPM decoder. For the UF decoder, the threshold found was 9.7 ± 0.9%, which is in agreement with the threshold of 9.9% found by N. Delfosse and N. Nickerson. The time complexity of the UF decoder has also been determined, and is indeed almost-linear as expected by the analysis.

•Jan 1, 2019•1 citation

Quantum toric code decoding method based on syndrome-preliminary error fusion module and ResNet architecture

Naihua Ji, Ping-Li 平俐 Song 宋, Wei Wang +2 more

Abstract Quantum error correction technology is based on the principle of redundant encoding, encoding logical quantum information into multiple physical qubits to provide important support for the stable operation of quantum computers. To address the issues of low decoding accuracy and limited feature extraction in quantum error correction, this paper proposes a toric code decoder based on a syndrome-preliminary error fusion module (SPEFM) and a ResNet architecture. This decoder takes full advantage of the correlations between X and Z errors. In the SPEFM, the syndrome and preliminary error predictions are deeply fused, while a unidirectional Swin transformer architecture is incorporated to extract global error features from the syndrome data, significantly improving both decoding accuracy and computational efficiency. In addition, this paper further extracts local error features from the fused features using the deep residual structure of ResNet, enhancing the decoder’s ability to capture quantum error patterns. Experimental results show that the decoder is applicable to different code distances ( d = 4, 6, 8, 10) under the depolarizing noise model. Its bit error rate is lower than that of the minimum weight perfect matching (MWPM) algorithm, and its logical error rate is lower than both the MWPM algorithm and the ResNet18 decoder. Furthermore, the decoding threshold is increased to 0.163, representing a 3.82% improvement over the MWPM algorithm threshold of 0.157.

Chinese Physics B•Oct 28, 2025•0 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 decoder design for subsystem surface code based on multi-head graph attention and edge weighting

Naihua Ji, Huijuan Sun, Bo 博 Xiao 肖 +2 more

Abstract Quantum error-correcting codes are essential for fault-tolerant quantum computing, as they effectively detect and correct noise-induced errors by distributing information across multiple physical qubits. The subsystem surface code with three-qubit check operators demonstrates significant application potential due to its simplified measurement operations and low logical error rates. However, the existing minimum-weight perfect matching (MWPM) algorithm exhibits high computational complexity and lacks flexibility in large-scale systems. Therefore, this paper proposes a decoder based on a graph attention network (GAT), representing error syndromes as undirected graphs with edge weights, and employing a multi-head attention mechanism to efficiently aggregate node features and enable parallel computation. Compared to MWPM, the GAT decoder exhibits linear growth in computational complexity, adapts to different quantum code structures, and demonstrates stronger robustness under high physical error rates. The experimental results demonstrate that the proposed decoder achieves an overall accuracy of 89.95% under various small code lattice sizes (L = 2,3,4,5), with the logical error rate threshold increasing to 0.0078, representing an improvement of approximately 13.04% compared to the MWPM decoder. This result significantly outperforms traditional methods, showcasing superior performance under small code lattice sizes and providing a more efficient decoding solution for large-scale quantum error correction.

Chinese Physics B•Dec 20, 2024•4 citations

Neural Belief-Matching Decoding for Topological Quantum Error Correction Codes

Luca Menti, Francisco Lázaro

Quantum error correction (QEC) is critical for scalable fault-tolerant quantum computing. Topological codes, such as the toric code, offer hardware-efficient architectures but their Tanner graphs contain many girth-4 cycles that degrade the performance of belief-propagation (BP) decoding. For this reason, BP decoding is typically followed by a more complex second stage decoder such as minimum-weight perfect matching. These combined decoders achieve a remarkable performance, albeit at the cost of increased complexity. In this paper we propose two key improvements for the decoding of toric code. The first one is replacing the BP decoder by a neural BP decoder, giving rise to the neural belief-matching decoder which substantially decreases the average decoding complexity. The main drawback of this approach is the high cost associated with the training of the neural BP decoder. To address this issue, we impose a convolutional architecture on the neural BP decoder, enabling weight sharing across the spatially homogeneous structure of the code's factor graph. This design allows a model trained on a modest-size topological code to be directly transferred to much larger instances, preserving decoding quality while dramatically lowering the training burden. Our numerical experiments on toric-code lattices of various sizes demonstrate that this technique does not result in a noticeable loss in performance.

quant-pharXiv:2603.21730•Mar 24, 2026•0 citations
In the NISQ era, one of the most important bottlenecks for the realization of universal quantum computation is error correction. Stabiliser code is the most recognizable type of quantum error correction code. A scalable efficient decoder is most desired for the application of the quantum error correction codes. In this work, we propose a self-attention U-Net quantum decoder (SU-NetQD) for toric code, which outperforms the minimum weight perfect matching decoder, especially in the circuit level noise environments. Specifically, with our SU-NetQD, we achieve lower logical error rates compared with MWPM and discover an increased trend of code threshold as the increase of noise bias. We obtain a high threshold of 0.231 for the extremely biased noise environment. The combination of low-level decoder and high-level decoder is the key innovation for the high accuracy of our decoder. With transfer learning mechanics, our decoder is scalable for cases with different code distances. Our decoder provides a practical tool for quantum noise analysis and promotes the practicality of quantum error correction codes and quantum computing.
Quantum Error Correction (QEC) decoding faces a fundamental accuracy-efficiency tradeoff. Classical methods like Minimum Weight Perfect Matching (MWPM) exhibit variable performance across noise models and suffer from polynomial complexity, while tensor network decoders achieve high accuracy but at prohibitively high computational cost. Recent neural decoders reduce complexity but lack the accuracy needed to compete with computationally expensive classical methods. We introduce SAQ-Decoder, a unified framework combining transformer-based learning with constraint aware post-processing that achieves both near Maximum Likelihood (ML) accuracy and linear computational scalability with respect to the syndrome size. Our approach combines a dual-stream transformer architecture that processes syndromes and logical information with asymmetric attention patterns, and a novel differentiable logical loss that directly optimizes Logical Error Rates (LER) through smooth approximations over finite fields. SAQ-Decoder achieves near-optimal performance, with error thresholds of 10.99% (independent noise) and 18.6% (depolarizing noise) on toric codes that approach the ML bounds of 11.0% and 18.9% while outperforming existing neural and classical baselines in accuracy, complexity, and parameter efficiency. Our findings establish that learned decoders can simultaneously achieve competitive decoding accuracy and computational efficiency, addressing key requirements for practical fault-tolerant quantum computing systems.
Quantum error correction is needed for future quantum computers. Classical error correcting codes are not suitable for this due to the nature of quantum mechanics. Therefore, new codes need to be developed. A promising candidate is the toric code, a surface code, because of its locality and its high error correcting capability and thresholds (the error probability below which increasing the size of the code decreases the failure rate). This thesis provides an introduction to quantum error correction and the stabilizer formalism, which is used to introduce the toric code. Several decoders are looked at, including the Minimum Weight Perfect Matching (MWPM) decoder and a recently developed decoder, the Union-Find (UF) decoder. The UF decoder is useful because of its almost-linear time complexity, while only reducing the threshold by a marginal amount compared to the MWPM decoder. In this thesis, the time complexity of the weighted growth version of the UF decoder is analysed. The toric code and the decoders have been implemented and simulated, and the thresholds have been determined. For the MWPM decoder, the threshold was determined to be 11.5±0.2%, which is not in agreement with the threshold in literature of 10.3%, and should not be possible according to the optimal threshold of about 11%. This probably is a result of the low grid sizes (up to a gridsize of 11) of the code used due to the time needed to simulate the MWPM decoder. For the UF decoder, the threshold found was 9.7 ± 0.9%, which is in agreement with the threshold of 9.9% found by N. Delfosse and N. Nickerson. The time complexity of the UF decoder has also been determined, and is indeed almost-linear as expected by the analysis.
Abstract Quantum error correction technology is based on the principle of redundant encoding, encoding logical quantum information into multiple physical qubits to provide important support for the stable operation of quantum computers. To address the issues of low decoding accuracy and limited feature extraction in quantum error correction, this paper proposes a toric code decoder based on a syndrome-preliminary error fusion module (SPEFM) and a ResNet architecture. This decoder takes full advantage of the correlations between X and Z errors. In the SPEFM, the syndrome and preliminary error predictions are deeply fused, while a unidirectional Swin transformer architecture is incorporated to extract global error features from the syndrome data, significantly improving both decoding accuracy and computational efficiency. In addition, this paper further extracts local error features from the fused features using the deep residual structure of ResNet, enhancing the decoder’s ability to capture quantum error patterns. Experimental results show that the decoder is applicable to different code distances ( d = 4, 6, 8, 10) under the depolarizing noise model. Its bit error rate is lower than that of the minimum weight perfect matching (MWPM) algorithm, and its logical error rate is lower than both the MWPM algorithm and the ResNet18 decoder. Furthermore, the decoding threshold is increased to 0.163, representing a 3.82% improvement over the MWPM algorithm threshold of 0.157.
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.
Abstract Quantum error-correcting codes are essential for fault-tolerant quantum computing, as they effectively detect and correct noise-induced errors by distributing information across multiple physical qubits. The subsystem surface code with three-qubit check operators demonstrates significant application potential due to its simplified measurement operations and low logical error rates. However, the existing minimum-weight perfect matching (MWPM) algorithm exhibits high computational complexity and lacks flexibility in large-scale systems. Therefore, this paper proposes a decoder based on a graph attention network (GAT), representing error syndromes as undirected graphs with edge weights, and employing a multi-head attention mechanism to efficiently aggregate node features and enable parallel computation. Compared to MWPM, the GAT decoder exhibits linear growth in computational complexity, adapts to different quantum code structures, and demonstrates stronger robustness under high physical error rates. The experimental results demonstrate that the proposed decoder achieves an overall accuracy of 89.95% under various small code lattice sizes (L = 2,3,4,5), with the logical error rate threshold increasing to 0.0078, representing an improvement of approximately 13.04% compared to the MWPM decoder. This result significantly outperforms traditional methods, showcasing superior performance under small code lattice sizes and providing a more efficient decoding solution for large-scale quantum error correction.
Quantum error correction (QEC) is critical for scalable fault-tolerant quantum computing. Topological codes, such as the toric code, offer hardware-efficient architectures but their Tanner graphs contain many girth-4 cycles that degrade the performance of belief-propagation (BP) decoding. For this reason, BP decoding is typically followed by a more complex second stage decoder such as minimum-weight perfect matching. These combined decoders achieve a remarkable performance, albeit at the cost of increased complexity. In this paper we propose two key improvements for the decoding of toric code. The first one is replacing the BP decoder by a neural BP decoder, giving rise to the neural belief-matching decoder which substantially decreases the average decoding complexity. The main drawback of this approach is the high cost associated with the training of the neural BP decoder. To address this issue, we impose a convolutional architecture on the neural BP decoder, enabling weight sharing across the spatially homogeneous structure of the code's factor graph. This design allows a model trained on a modest-size topological code to be directly transferred to much larger instances, preserving decoding quality while dramatically lowering the training burden. Our numerical experiments on toric-code lattices of various sizes demonstrate that this technique does not result in a noticeable loss in performance.