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

Quantum error correction for the toric code using deep reinforcement learning

Philip Andreasson, Joel Johansson, Simon Liljestrand, Mats Granath

Published Sep 2, 2019• 106 citations
arXivHTMLPDF

Abstract

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.

DOI
10.22331/q-2019-09-02-183

Related papers

DQN-Based Decoder for depolarizing noise on Rotated Surface Code

Ziyao Zhao

In quantum fault-tolerant computing, fast decoding of encoded bits is related to the running speed of quantum computers. In this paper, we propose a decoding agent based on reinforcement learning for correcting rotated surface codes in quantum error correction. The intelligent agent is trained using Deep Q-Network (DQN) and uses Convolutional Neural Network (CNN) to extract features of error syndrome and calculate the corresponding Q values for X, Y, and Z error correction operations. In the environment of depolarizing noise, the trained model achieves a fault-tolerant threshold that is superior to the Minimum Weight Perfect Matching (MWPM) and CNN decoder, providing a feasible framework for surface code error correction in practical applications.

International Conference on Next Generation Data-driven Networks (NGDN)•Jun 6, 2025•0 citations

Deep Q-learning decoder for depolarizing noise on the toric code

David Fitzek, Mattias Eliasson, Anton Frisk Kockum +1 more

This paper presents an artificial intelligence-based decoder for quantum error correction of the toric code. A neural network is trained, using reinforcement learning, to suggest error-correcting operations on the physical qubits to best avoid logical errors. By learning to take advantage of the correlations between bit-flip and phase-flip errors, it can outperform the standard matching decoder for depolarizing noise.

arXiv:1912.12919•Physical Review Research•May 26, 2020•38 citations

Adaptive Quantum Error Correction for Surface Codes Using Deep Reinforcement Learning

Oluwasesan Adeleke, Ajmery Sultana

Quantum error correction (QEC) is indispensable for the realization of fault-tolerant quantum computers. Surface codes are a leading QEC architecture due to their high error thresholds and planar design. The core challenge lies in the decoding process: inferring latent physical errors from syndrome measurements and applying appropriate corrections. Although there are classical decoders, their performance can degrade with complex noise or be computationally demanding. This paper investigates an advanced Deep Reinforcement Learning (DRL) approach, employing a Dueling Double Deep Q-Network (DQN), to decode X-type Pauli errors on a$\mathbf{d}=\mathbf{3}$rotated surface code. The DRL agent leverages syndrome history to discern temporal error correlations and utilizes a multi-round correction strategy, enabling iterative refinement of corrective actions within an environment that simulates both physical qubit errors and syndrome measurement noise. After 30,000 training episodes with a 5 % physical error rate and 1 % measurement noise, the agent achieved a 0.00 % logical error rate in the extended test, an average episode reward of 0.38, and successfully cleared syndromes in 63 % of the test cases, demonstrating robust learning of a safe decoding policy. The persistent challenge of high training loss, despite good policy performance, is discussed, offering insights into value function approximation in complex QEC environments.

IEEE International Conference on Quantum Photonics, Artificial Intelligence & Networking (QPAIN)•Apr 16, 2026•0 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

Determining quantum topological semion code decoder performance and error correction effectiveness with reinforcement learning

Haowen Wang, Qian Cao, Yun-Jia Xue +4 more

Quantum error correction technology is a vital method to eliminate noise during the operation of quantum computers. To solve the problem caused by noise, in this paper, reinforcement learning is used to encode defects of Semion codes, and the experience replay technique is used to realize the design of decoder. Semion codes are quantum topological error correction codes with the same symmetry group Z 2 as Kitaev toric codes, we used the topological characteristics of error correction codes to map qubits to multi-dimensional space, and error correction accuracy of the decoder is calculated to be 77.5%. Calculate the threshold of topological quantum Semion code, depending on the code distance, resulting in different thresholds, p threshold = 0.081574 when the code distance is d = 3, 5, 7 and threshold p threshold = 0.09542 when the code distance is d = 5, 7, 9. And we design the Q -network to optimize the cost of quantum circuit gates and compare the size of the cost reduction under different thresholds. Reinforcement learning is an important method for designing Semion code decoders and optimizing numerical values, providing more general error models and error correction codes for future machine engineering decoders.

Frontiers in Physics•Aug 15, 2022•6 citations

Transfer Learning in Reinforcement Learning for Quantum Error Correction: Evaluating Scale-Invariant Decoding of Quantum LDPC Codes

Zhang Shuhan, Fan Yang, Tanaka Hiroshi +2 more

The realization of fault-tolerant quantum computing relies fundamentally on the efficient and accurate decoding of quantum error-correcting codes. Recently, Deep Reinforcement Learning (DRL) has emerged as a promising approach for decoding complex codes, such as quantum Low-Density Parity-Check (qLDPC) codes, due to its ability to adapt to correlated noise and system specific irregularities. However, the computational cost of training these intelligent agents scales prohibitively with the code distance and the number of physical qubits. In this work, we present an analytical and theoretical framework for transfer learning in DRL-based quantum decoders. We explore the scale-invariant properties of qLDPC codes, specifically focusing on how the structural symmetries in hypergraph product and lifted product codes can be exploited by scalable neural architectures. By formulating the decoding process as a Markov Decision Process (MDP) mapped onto a translationally and structurally invariant graph, we demonstrate that a Deep Q-Network (DQN) trained on a small lattice (e.g., an $[[625, 25]]$ qLDPC code) can be zero-shot transferred or rapidly fine-tuned for a significantly larger lattice (e.g., an $[[900, 50]]$ qLDPC code). We provide rigorous theoretical bounds on the performance degradation under dimensionality mismatch and present comprehensive empirical results. Our experiments show that fine-tuning a pre-trained agent requires orders of magnitude fewer samples than training from scratch, while retaining near-optimal logical error suppression. These findings provide a concrete pathway toward scalable, low-latency machine learning architectures for large-scale fault-tolerant quantum processors.

•Jul 21, 2026•0 citations
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.
In quantum fault-tolerant computing, fast decoding of encoded bits is related to the running speed of quantum computers. In this paper, we propose a decoding agent based on reinforcement learning for correcting rotated surface codes in quantum error correction. The intelligent agent is trained using Deep Q-Network (DQN) and uses Convolutional Neural Network (CNN) to extract features of error syndrome and calculate the corresponding Q values for X, Y, and Z error correction operations. In the environment of depolarizing noise, the trained model achieves a fault-tolerant threshold that is superior to the Minimum Weight Perfect Matching (MWPM) and CNN decoder, providing a feasible framework for surface code error correction in practical applications.
Quantum error correction (QEC) is indispensable for the realization of fault-tolerant quantum computers. Surface codes are a leading QEC architecture due to their high error thresholds and planar design. The core challenge lies in the decoding process: inferring latent physical errors from syndrome measurements and applying appropriate corrections. Although there are classical decoders, their performance can degrade with complex noise or be computationally demanding. This paper investigates an advanced Deep Reinforcement Learning (DRL) approach, employing a Dueling Double Deep Q-Network (DQN), to decode X-type Pauli errors on ad=3\mathbf{d}=\mathbf{3}d=3rotated surface code. The DRL agent leverages syndrome history to discern temporal error correlations and utilizes a multi-round correction strategy, enabling iterative refinement of corrective actions within an environment that simulates both physical qubit errors and syndrome measurement noise. After 30,000 training episodes with a 5 % physical error rate and 1 % measurement noise, the agent achieved a 0.00 % logical error rate in the extended test, an average episode reward of 0.38, and successfully cleared syndromes in 63 % of the test cases, demonstrating robust learning of a safe decoding policy. The persistent challenge of high training loss, despite good policy performance, is discussed, offering insights into value function approximation in complex QEC environments.
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.
Quantum error correction technology is a vital method to eliminate noise during the operation of quantum computers. To solve the problem caused by noise, in this paper, reinforcement learning is used to encode defects of Semion codes, and the experience replay technique is used to realize the design of decoder. Semion codes are quantum topological error correction codes with the same symmetry group Z 2 as Kitaev toric codes, we used the topological characteristics of error correction codes to map qubits to multi-dimensional space, and error correction accuracy of the decoder is calculated to be 77.5%. Calculate the threshold of topological quantum Semion code, depending on the code distance, resulting in different thresholds, p threshold = 0.081574 when the code distance is d = 3, 5, 7 and threshold p threshold = 0.09542 when the code distance is d = 5, 7, 9. And we design the Q -network to optimize the cost of quantum circuit gates and compare the size of the cost reduction under different thresholds. Reinforcement learning is an important method for designing Semion code decoders and optimizing numerical values, providing more general error models and error correction codes for future machine engineering decoders.
The realization of fault-tolerant quantum computing relies fundamentally on the efficient and accurate decoding of quantum error-correcting codes. Recently, Deep Reinforcement Learning (DRL) has emerged as a promising approach for decoding complex codes, such as quantum Low-Density Parity-Check (qLDPC) codes, due to its ability to adapt to correlated noise and system specific irregularities. However, the computational cost of training these intelligent agents scales prohibitively with the code distance and the number of physical qubits. In this work, we present an analytical and theoretical framework for transfer learning in DRL-based quantum decoders. We explore the scale-invariant properties of qLDPC codes, specifically focusing on how the structural symmetries in hypergraph product and lifted product codes can be exploited by scalable neural architectures. By formulating the decoding process as a Markov Decision Process (MDP) mapped onto a translationally and structurally invariant graph, we demonstrate that a Deep Q-Network (DQN) trained on a small lattice (e.g., an [[625,25]][[625, 25]][[625,25]] qLDPC code) can be zero-shot transferred or rapidly fine-tuned for a significantly larger lattice (e.g., an [[900,50]][[900, 50]][[900,50]] qLDPC code). We provide rigorous theoretical bounds on the performance degradation under dimensionality mismatch and present comprehensive empirical results. Our experiments show that fine-tuning a pre-trained agent requires orders of magnitude fewer samples than training from scratch, while retaining near-optimal logical error suppression. These findings provide a concrete pathway toward scalable, low-latency machine learning architectures for large-scale fault-tolerant quantum processors.