Surface codes are a promising method of quantum error correction and the basis of many proposed quantum computation implementations. However, their efficient decoding is still not fully explored. Recently, approaches based on machine learning techniques have been proposed by Torlai and Melko [Phys. Rev. Lett. 119, 030501 (2017)] as well as Varsamopoulos et al. [Quantum Sci. Technol. 3, 015004 (2017)]. In these approaches, a so-called high-level decoder is used to post-correct an underlying decoder by correcting logical errors. A significant problem is that these methods require large amounts of training data even for relatively small code distances. The above-mentioned methods were tested on the rotated surface code which encodes one logical qubit. Here, we show that they are viable even for the toric surface code which encodes two logical qubits. Furthermore, we explain how symmetries of the toric code can be exploited to reduce the amount of training data that is required to obtain good decoding results. Finally, we compare different underlying decoders and show that the accuracy of high-level decoding noticeably depends on the quality of the underlying decoder in the realistic case of imperfect training.
Surface codes are a promising method of quantum error correction and the basis of many proposed quantum computation implementations. However, their efficient decoding is still not fully explored. Recently, approaches based on machine learning techniques have been proposed by Torlai and Melko [Phys. Rev. Lett. 119, 030501 (2017)] as well as Varsamopoulos et al. [Quantum Sci. Technol. 3, 015004 (2017)]. In these approaches, a so-called high-level decoder is used to post-correct an underlying decoder by correcting logical errors. A significant problem is that these methods require large amounts of training data even for relatively small code distances. The above-mentioned methods were tested on the rotated surface code which encodes one logical qubit. Here, we show that they are viable even for the toric surface code which encodes two logical qubits. Furthermore, we explain how symmetries of the toric code can be exploited to reduce the amount of training data that is required to obtain good decoding results. Finally, we compare different underlying decoders and show that the accuracy of high-level decoding noticeably depends on the quality of the underlying decoder in the realistic case of imperfect training.
Abstract Building a large-scale quantum computer requires effective strategies to correct errors that inevitably arise in physical quantum systems 1 . Quantum error-correction codes 2 present a way to reach this goal by encoding logical information redundantly into many physical qubits. A key challenge in implementing such codes is accurately decoding noisy syndrome information extracted from redundancy checks to obtain the correct encoded logical information. Here we develop a recurrent, transformer-based neural network that learns to decode the surface code, the leading quantum error-correction code 3 . Our decoder outperforms other state-of-the-art decoders on real-world data from Google’s Sycamore quantum processor for distance-3 and distance-5 surface codes 4 . On distances up to 11, the decoder maintains its advantage on simulated data with realistic noise including cross-talk and leakage, utilizing soft readouts and leakage information. After training on approximate synthetic data, the decoder adapts to the more complex, but unknown, underlying error distribution by training on a limited budget of experimental samples. Our work illustrates the ability of machine learning to go beyond human-designed algorithms by learning from data directly, highlighting machine learning as a strong contender for decoding in quantum computers.
Quantum error correction, which utilizes logical qubits that are encoded as redundant multiple physical qubits to find and correct errors in physical qubits, is indispensable for practical quantum computing. Surface code is considered to be a promising encoding method with a high error threshold that is defined by stabilizer generators. However, previous methods have suffered from the problem that the decoder acquires solely the error probability distribution because of the non-uniqueness of correct prediction obtained from the input. To circumvent this problem, we propose a technique to reoptimize the decoder model by approximating syndrome measurements with a continuous function that is mathematically interpolated by neural network. We evaluated the improvement in accuracy of a multilayer perceptron based decoder for code distances of 5 and 7 as well as for decoders based on convolutional and recurrent neural networks and transformers for a code distance of 5. In all cases, the reoptimized decoder gave better accuracy than the original models, demonstrating the universal effectiveness of the proposed method that is independent of code distance or network architecture. These results suggest that re-framing the problem of surface code decoding into a regression problem that can be tackled by deep learning is a useful strategy.
Errors in surface code have typically been decoded by Minimum Weight Perfect Matching (MWPM) based method. Recently, neural-network-based Machine Learning (ML) techniques have been employed for this purpose. Here we propose a two-level (low and high) ML-based decoding scheme, where the first level corrects errors on physical qubits and the second one corrects any existing logical errors, for different noise models. Our results show that our proposed decoding method achieves ∼10× and ∼2× higher values of pseudo-threshold and threshold respectively, than for MWPM. We show that usage of more sophisticated ML models with higher training/testing time, do not provide significant improvement in the decoder performance. Finally, data generation for training the ML decoder requires significant overhead hence lower volume of training data is desirable. We have shown that our decoder maintains a good performance with the train-test-ratio as low as 40:60.
Quantum error correction (QEC) is key to have reliable quantum computation and storage, due to the fragility of qubits in current quantum technology and the imperfect application of quantum operations. In order to have efficient quantum computation and storage, active QEC is required. QEC consists of an encoding and a decoding process. The way that encoding protects quantum information is through grouping many unreliable physical qubits into one more reliable logical qubit. Then, computation occurs based on the logical qubits, however, errors still occur on the physical qubits. Decoding is the process of identifying the location and type of errors occurring on the physical qubits. The decoder proposes corrections against the errors that have been identified. In this thesis, we are exploring novel ways to design decoders for QEC codes, focusing on the surface code. We began our investigation by implementing a rule-based decoder for the smallest surface code, which consists of 17 qubits. We incorporated this decoder to a platform that we created, called Quantum Platform Development Framework (QPDO), in order to study the working principles of a Pauli frame and to quantify its potential effect on the decoding performance. The Pauli frame unit keeps track of errors on physical qubits without the need to apply corrections constantly. We quantified through simulation the benefits in terms of the decoding performance and the execution schedule of QEC, minimizing the idle time. Minimizing the execution time is critical, due to the limited time budget of quantum error correction, thus requiring a high speed decoder capable of still reaching high decoding performance. We show that when the decoding time is equal to the time required to run a surface code cycle, the decoder reaches its maximum performance. However, such a rule-based decoder cannot easily scale to larger quantum systems, therefore other decoding approaches should be considered. Most of the classical decoders that have been developed so far, do not have a good balance between short execution time and high decoding performance. Therefore, we proposed decoders that incorporate neural networks to keep the execution time small, while keeping the decoding performance high. We designed a two-module decoder, which included a classical module and a neural network. We named this configuration neural network based decoder (NNbD). We compare different designs of NNbDs with classical decoders and prove that NNbDs can reach similar or better decoding performance compared to classical decoders while having constant execution time. Furthermore, we quantified the execution time of a NNbD and argued about the speed that can be achieved in a hardware chip like a Field Programmable Gate Array (FPGA) or an Application-Specific Integrated Circuit (ASIC). Both the classical module and the neural network are highly parallelizable and fast modules by construction, leading to constant execution time for a given code distance. We proved that neural network based decoders can adapt to any noise model, since the neural network functionality is based on creating a map between the input and output data, requiring no knowledge about the underlying error model. Following that, a comparison between different NNbD design approaches was performed. We show that it is advantageous to start with a classical decoding module and improve on its decoding performance with a neural network rather than having a neural network perform the decoding on its own. Also, in the latter case, the execution time of such a decoder is non-constant and on average larger than the decoder containing a classical module and a neural network. Moreover, we show that for the design containing a classical module and a neural network, the execution time is increasing linearly as the code distance increased, which was mainly attributed to the increase of the size of the neural network. However, there is a fundamental difference between NNbDs and classical decoders in that NNbDs require sampling and training based on data obtained from the problem, unlike classical decoders. As the code distance increases, the amount of data required to be gathered and trained are exponentially increasing, imposing a limit to the size of the quantum system that can be efficiently decoded. We proposed as a solution to have a distributed decoding approach that divides the code into small regions and then decodes each region locally. We show that using such a distributed decoding approach for small code distances does not lead to significant loss in decoding performance, while simultaneously providing a way to decode large code distances. Thus, we were able to create a decoder that can achieve high decoding performance with constant execution time. However, there are still some issues to keep in mind with such kind of decoders. The main challenge of NNbDs is that they are a dedicated decoder for a given problem. Every time that some aspect of the problem changes (quantum error correcting code, code distance, error model), sampling, training and evaluating the decoder needs to be repeated. Moreover, there is a large number of neural network parameters that need to be specifically tuned when the problem changes. A careful study of the design choices is required to maximize the performance of the decoder. We envision that when sampling and training are performed in hardware, the time required for these processes will be decreased compared to the time required in software. Finally, if the hardware resources allow us to include multiple neural networks, then this can potentially increase the decoding performance. As we presented, dividing the task of decoding to smaller tasks that are distributed to many neural networks can be beneficial.
Fault-tolerant quantum computation critically depends on the ability to detect and correct physical qubit errors faster than they accumulate. The surface code (SC) has emerged as the most experimentally promising quantum error correction (QEC) framework due to its high threshold and local stabilizer structure, yet its practical performance is bottlenecked by decoder efficiency. Traditional decoding approaches such as minimum-weight perfect matching (MWPM) achieve near-optimal accuracy under independent noise but struggle with correlated errors, circuit-level noise, and real-time latency constraints. This paper investigates how neural network (NN)-based decoders reduce logical error rates in SC quantum systems by learning complex syndrome-to-correction mappings from data. We propose a hybrid convolutional-recurrent neural architecture that processes stabilizer measurement syndromes across both spatial and temporal dimensions, enabling the decoder to capture correlated error patterns inherent in realistic hardware. Systematic simulations under depolarizing, biased, and circuit-level noise models demonstrate that the proposed neural decoder achieves a logical error rate reduction of up to 41.3% compared to MWPM at a physical error rate of p = 0.008, while maintaining sub-millisecond decoding latency compatible with superconducting qubit cycle times. These results establish that data-driven neural decoders represent a scalable and hardware-compatible pathway toward achieving the logical error rates required for practical fault-tolerant quantum computing.
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=5, andd=7. Under depolarizing noise, both FFNN and GNN achieve lower logical error rates than MWPM, with GNN yielding up to 28% improvement atd=7. GNN achieves pseudothresholds of 0.1084, 0.1311, and 0.1441 ford=3,d=5, andd=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.