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:1809.06640 · Quantum

Neural Network Decoders for Large-Distance 2D Toric Codes

Xiaotong Ni

Published Aug 24, 2020• 44 citations
arXivHTMLPDF

Abstract

We still do not have perfect decoders for topological codes that can satisfy all needs of different experimental setups. Recently, a few neural network based decoders have been studied, with the motivation that they can adapt to a wide range of noise models, and can easily run on dedicated chips without a full-fledged computer. The later feature might lead to fast speed and the ability to operate at low temperatures. However, a question which has not been addressed in previous works is whether neural network decoders can handle 2D topological codes with large distances. In this work, we provide a positive answer for the toric code \cite{Kitaev2003Faulttolerantanyon}. The structure of our neural network decoder is inspired by the renormalization group decoder \cite{duclos2010fast, duclos2013fault}. With a fairly strict policy on training time, when the bit-flip error rate is lower than 9% and syndrome extraction is perfect, the neural network decoder performs better when code distance increases. With a less strict policy, we find it is not hard for the neural decoder to achieve a performance close to the minimum-weight perfect matching algorithm. The numerical simulation is done up to code distance d=64 . Last but not least, we describe and analyze a few failed approaches. They guide us to the final design of our neural decoder, but also serve as a caution when we gauge the versatility of stock deep neural networks. The source code of our neural decoder can be found at \cite{sourcecodegithub}.

DOI
10.22331/q-2020-08-24-310

Related papers

Advantages of versatile neural-network decoding for topological codes

Nishad Maskara, Aleksander Kubica, Tomas Jochym-O’Connor

Finding optimal correction of errors in generic stabilizer codes is a computationally hard problem, even for simple noise models. While this task can be simplified for codes with some structure, such as topological stabilizer codes, developing good and efficient decoders still remains a challenge. In our paper, we systematically study a very versatile class of decoders based on feedforward neural networks. To demonstrate adaptability, we apply neural decoders to the triangular color and toric codes under various noise models with realistic features, such as spatially correlated errors. We report that neural decoders provide a significant improvement over leading efficient decoders in terms of the error-correction threshold. In particular, the neural decoder threshold for the two-dimensional color code is very close to the toric code threshold. Using neural networks simplifies the design of decoders and does not require prior knowledge of the underlying noise.

arXiv:1802.08680•Physical Review A•May 30, 2019•79 citations

Scalable Neural Network Decoders for Higher Dimensional Quantum Codes

Nikolas P. Breuckmann, Xiaotong Ni

Machine learning has the potential to become an important tool in quantum error correction as it allows the decoder to adapt to the error distribution of a quantum chip. An additional motivation for using neural networks is the fact that they can be evaluated by dedicated hardware which is very fast and consumes little power. Machine learning has been previously applied to decode the surface code. However, these approaches are not scalable as the training has to be redone for every system size which becomes increasingly difficult. In this work the existence of local decoders for higher dimensional codes leads us to use a low-depth convolutional neural network to locally assign a likelihood of error on each qubit. For noiseless syndrome measurements, numerical simulations show that the decoder has a threshold of around 7.1% when applied to the 4D toric code. When the syndrome measurements are noisy, the decoder performs better for larger code sizes when the error probability is low. We also give theoretical and numerical analysis to show how a convolutional neural network is different from the 1-nearest neighbor algorithm, which is a baseline machine learning method.

arXiv:1710.09489•Quantum•May 24, 2018•52 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

Neural Network Decoder for topological PlanarSurface Codes with Depolarizing noise model

Qi-Di GAN, Ao-Qing Li, Fan Li +2 more

Abstract Decoding is the most important part of the error correction process. During thedecoding process, the main idea of this paper is to transfer the error measuredinside ancilla qubit to the boundary, and decompose the error into the productof stabilizer, logical error and pure error, stabilizer error do not affect logicalerror. Therefore, the result of error syndrome is only affected by pure error,while the error of stabilizer can be ignored. Decoding by neural network can takeadvantage of its high threshold and adaptability to training different codes. Thefocus of this work is to propose a suitable algorithm for neural network decodingof planar codes, so as to reduce the size of the neural network as much as possiblewithout compromising the decoding performance. Comparative experiments wereconducted using the minimum weight perfect matching(MWPM) decoder andthe neural network decoder to compare the decoding performance of planar codeswith code distances of 5, 7, and 9, respectively, demonstrating high threshold ofneural network decoder and its adaptability to training different codes. Takingthe planar code with code distance of 5 as an example, the pseudo-thresholdsobtained using the MWPM decoder and the neural network decoder are 0.005and 0.0068 respectively,increased by 36%. It shows that for planar code, theneural network decoder significantly outperforms the MWPM decoder.

•Jul 4, 2024•0 citations

Neural network decoder for near-term surface-code experiments

Boris Varbanov, Marc Serra-Peralta, David Byfield +1 more

Neural network decoders can achieve a lower logical error rate compared to conventional decoders, like minimum-weight perfect matching, when decoding the surface code. Furthermore, these decoders require no prior information about the physical error rates, making them highly adaptable. In this study, we investigate the performance of such a decoder using both simulated and experimental data obtained from a transmon-qubit processor, focusing on small-distance surface codes. We first show that the neural network typically outperforms the matching decoder due to better handling of errors leading to multiple correlated syndrome defects, such as Y errors. When applied to the experimental data of Google Quantum AI [R. Acharya , ], the neural network decoder achieves logical error rates approximately 25 % lower than minimum-weight perfect matching, approaching the performance of a maximum-likelihood decoder. To demonstrate the flexibility of this decoder, we incorporate the soft information available in the analog readout of transmon qubits and evaluate the performance of this decoder in simulation using a symmetric Gaussian-noise model. Considering the soft information leads to an approximately 10 % lower logical error rate, depending on the probability of a measurement error. The good logical performance, flexibility, and computational efficiency make neural network decoders well-suited for near-term demonstrations of quantum memories.

arXiv:2307.03280•Physical Review Research•Jan 8, 2025•20 citations

Quantum error correction for the toric code using deep reinforcement learning

Philip Andreasson, Joel Johansson, Simon Liljestrand +1 more

We implement a quantum error correction algorithm for bit-flip errors on the topological toric code using deep reinforcement learning. An action-value Q-function encodes the discounted value of moving a defect to a neighboring site on the square grid (the action) depending on the full set of defects on the torus (the syndrome or state). The Q-function is represented by a deep convolutional neural network. Using the translational invariance on the torus allows for viewing each defect from a central perspective which significantly simplifies the state space representation independently of the number of defect pairs. The training is done using experience replay, where data from the algorithm being played out is stored and used for mini-batch upgrade of the Q-network. We find performance which is close to, and for small error rates asymptotically equivalent to, that achieved by the Minimum Weight Perfect Matching algorithm for code distances up to d=7 . Our results show that it is possible for a self-trained agent without supervision or support algorithms to find a decoding scheme that performs on par with hand-made algorithms, opening up for future machine engineered decoders for more general error models and error correcting codes.

arXiv:1811.12338•Quantum•Sep 2, 2019•106 citations
We still do not have perfect decoders for topological codes that can satisfy all needs of different experimental setups. Recently, a few neural network based decoders have been studied, with the motivation that they can adapt to a wide range of noise models, and can easily run on dedicated chips without a full-fledged computer. The later feature might lead to fast speed and the ability to operate at low temperatures. However, a question which has not been addressed in previous works is whether neural network decoders can handle 2D topological codes with large distances. In this work, we provide a positive answer for the toric code \cite{Kitaev2003Faulttolerantanyon}. The structure of our neural network decoder is inspired by the renormalization group decoder \cite{duclos2010fast, duclos2013fault}. With a fairly strict policy on training time, when the bit-flip error rate is lower than 9% and syndrome extraction is perfect, the neural network decoder performs better when code distance increases. With a less strict policy, we find it is not hard for the neural decoder to achieve a performance close to the minimum-weight perfect matching algorithm. The numerical simulation is done up to code distance d=64 . Last but not least, we describe and analyze a few failed approaches. They guide us to the final design of our neural decoder, but also serve as a caution when we gauge the versatility of stock deep neural networks. The source code of our neural decoder can be found at \cite{sourcecodegithub}.
Finding optimal correction of errors in generic stabilizer codes is a computationally hard problem, even for simple noise models. While this task can be simplified for codes with some structure, such as topological stabilizer codes, developing good and efficient decoders still remains a challenge. In our paper, we systematically study a very versatile class of decoders based on feedforward neural networks. To demonstrate adaptability, we apply neural decoders to the triangular color and toric codes under various noise models with realistic features, such as spatially correlated errors. We report that neural decoders provide a significant improvement over leading efficient decoders in terms of the error-correction threshold. In particular, the neural decoder threshold for the two-dimensional color code is very close to the toric code threshold. Using neural networks simplifies the design of decoders and does not require prior knowledge of the underlying noise.
Machine learning has the potential to become an important tool in quantum error correction as it allows the decoder to adapt to the error distribution of a quantum chip. An additional motivation for using neural networks is the fact that they can be evaluated by dedicated hardware which is very fast and consumes little power. Machine learning has been previously applied to decode the surface code. However, these approaches are not scalable as the training has to be redone for every system size which becomes increasingly difficult. In this work the existence of local decoders for higher dimensional codes leads us to use a low-depth convolutional neural network to locally assign a likelihood of error on each qubit. For noiseless syndrome measurements, numerical simulations show that the decoder has a threshold of around 7.1% when applied to the 4D toric code. When the syndrome measurements are noisy, the decoder performs better for larger code sizes when the error probability is low. We also give theoretical and numerical analysis to show how a convolutional neural network is different from the 1-nearest neighbor algorithm, which is a baseline machine learning method.
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.
Abstract Decoding is the most important part of the error correction process. During thedecoding process, the main idea of this paper is to transfer the error measuredinside ancilla qubit to the boundary, and decompose the error into the productof stabilizer, logical error and pure error, stabilizer error do not affect logicalerror. Therefore, the result of error syndrome is only affected by pure error,while the error of stabilizer can be ignored. Decoding by neural network can takeadvantage of its high threshold and adaptability to training different codes. Thefocus of this work is to propose a suitable algorithm for neural network decodingof planar codes, so as to reduce the size of the neural network as much as possiblewithout compromising the decoding performance. Comparative experiments wereconducted using the minimum weight perfect matching(MWPM) decoder andthe neural network decoder to compare the decoding performance of planar codeswith code distances of 5, 7, and 9, respectively, demonstrating high threshold ofneural network decoder and its adaptability to training different codes. Takingthe planar code with code distance of 5 as an example, the pseudo-thresholdsobtained using the MWPM decoder and the neural network decoder are 0.005and 0.0068 respectively,increased by 36%. It shows that for planar code, theneural network decoder significantly outperforms the MWPM decoder.
Neural network decoders can achieve a lower logical error rate compared to conventional decoders, like minimum-weight perfect matching, when decoding the surface code. Furthermore, these decoders require no prior information about the physical error rates, making them highly adaptable. In this study, we investigate the performance of such a decoder using both simulated and experimental data obtained from a transmon-qubit processor, focusing on small-distance surface codes. We first show that the neural network typically outperforms the matching decoder due to better handling of errors leading to multiple correlated syndrome defects, such as Y errors. When applied to the experimental data of Google Quantum AI [R. Acharya , ], the neural network decoder achieves logical error rates approximately 25 % lower than minimum-weight perfect matching, approaching the performance of a maximum-likelihood decoder. To demonstrate the flexibility of this decoder, we incorporate the soft information available in the analog readout of transmon qubits and evaluate the performance of this decoder in simulation using a symmetric Gaussian-noise model. Considering the soft information leads to an approximately 10 % lower logical error rate, depending on the probability of a measurement error. The good logical performance, flexibility, and computational efficiency make neural network decoders well-suited for near-term demonstrations of quantum memories.
We implement a quantum error correction algorithm for bit-flip errors on the topological toric code using deep reinforcement learning. An action-value Q-function encodes the discounted value of moving a defect to a neighboring site on the square grid (the action) depending on the full set of defects on the torus (the syndrome or state). The Q-function is represented by a deep convolutional neural network. Using the translational invariance on the torus allows for viewing each defect from a central perspective which significantly simplifies the state space representation independently of the number of defect pairs. The training is done using experience replay, where data from the algorithm being played out is stored and used for mini-batch upgrade of the Q-network. We find performance which is close to, and for small error rates asymptotically equivalent to, that achieved by the Minimum Weight Perfect Matching algorithm for code distances up to d=7 . Our results show that it is possible for a self-trained agent without supervision or support algorithms to find a decoding scheme that performs on par with hand-made algorithms, opening up for future machine engineered decoders for more general error models and error correcting codes.