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

International Conference on Information and Communication Technology Convergence (ICTC)

PyMatching-based Decoding Simulation of Rotated Surface Codes in Classical Quantum Simulator

Sangmin Lee, Ki‐Sung Jin, Gyu‐Il Cha

Published Oct 19, 2022• 0 citations
Publisher

Abstract

PyMatching provides a method for decoding quantum errors using the minimum-weight perfect matching algorithm. However, although the PyMatching supports various quantum error correction codes, no deep study has been conducted on the rotated planar surface codes that are receiving the latest attention. In this study, we define a procedure for detecting errors using PyMatching for rotated planar surface codes and analyze the correctness of error correction results. To compare error correction behavior by logical qubit size, we used logical qubit with distances of 3, 5, and 7, respectively. Furthermore, we have conducted comparative empirical studies by comparing the theoretical predictions of PyMatching with the actual execution results of classical state vector simulators.

DOI
10.1109/ictc55196.2022.9952682

Related papers

PyMatching: A fast implementation of the minimum-weight perfect matching decoder

Oscar Higgott

This paper introduces PyMatching, a fast open-source Python package for decoding quantum error-correcting codes with the minimum-weight perfect matching (MWPM) algorithm. PyMatching includes the standard MWPM decoder as well as a variant, which we call local matching, that restricts each syndrome defect to be matched to another defect within a local neighbourhood. The decoding performance of local matching is almost identical to that of the standard MWPM decoder in practice, while reducing the computational complexity approximately quadratically. We benchmark the performance of PyMatching, showing that local matching is several orders of magnitude faster than implementations of the full MWPM algorithm using NetworkX or Blossom V for problem sizes typically considered in error correction simulations. PyMatching and its dependencies are open-source, and it can be used to decode any quantum code for which syndrome defects come in pairs using a simple Python interface. PyMatching supports the use of weighted edges, hook errors, boundaries and measurement errors, enabling fast decoding and simulation of fault-tolerant quantum computing.

arXiv:2105.13082•May 27, 2021•3 citations

Compare the pair: Rotated versus unrotated surface codes at equal logical error rates

Anthony Ryan O'Rourke, Simon J. Devitt

Practical quantum computers will require resource-efficient error-correcting codes. The rotated surface code uses approximately half the number of qubits as the unrotated surface code to create a logical qubit with the same error-correcting distance. However, instead of distance, a more useful qubit-saving metric would be based on logical error rates. In this work we find the well-below-threshold scaling of logical to physical error rates under circuit-level noise for both codes at high odd and even distances and then compare the number of qubits used by each code to achieve equal logical error rates. We perform Monte Carlo sampling of memory experiment circuits with all valid CNOT orders using the stabilizer simulator Stim and the uncorrelated minimum-weight perfect matching decoder PyMatching 2. We find that the rotated code uses about 74 % the number of qubits used by the unrotated code to achieve a logical error rate of p L = 10 − 12 at the operational physical error rate of p = 10 − 3 . The ratio remains ≈ 75 % for p values within a factor of two of p = 10 − 3 for all useful p L . Our work finds the low- p L scaling of the surface code and clarifies the qubit savings provided by the rotated surface code, providing numerical justification for its use in future implementations of the surface code.

arXiv:2409.14765•Physical Review Research•Jul 18, 2025•28 citations

Cache-Based Decoding Accelerator for Real-Time Quantum Error Correction

Anisha Dutta, Nityananda Sarma

Noise-induced errors in quantum information processing corrupt computation and cause useful algorithms to fail. Quantum ErrorCorrection (QEC) counteracts this by encoding a single logical qubit across many physical qubits and correcting errors through repeatedsyndrome measurements. The Minimum-Weight Perfect Matching (MWPM) decoder is the accuracy benchmark for surface-codedecoding, but its microsecond-scale latency can consume the entire QEC cycle time of superconducting processors, leaving almost nomargin for other control operations. Pre-decoded lookup tables reduce latency to the nanosecond scale, but their memory requirementsgrow exponentially with code size, limiting them to very small code distances. In this work, we demonstrate a single-level cache,implemented as a software prototype, that accelerates decoding by exploiting the repetitive nature of surface-code syndromes. Hitrates above 80% are achieved for code distances up to 9 at below-threshold noise rates, and effective decoding speedups of up to18.1 times over PyMatching’s standalone decoding time are observed at code distance ≥ 5. Cache lookup latency remains below 400nanoseconds in the worst case, with memory well below that of full lookup tables. We further develop a mathematical frameworkdefining the theoretical limits of any cache-based decoder.

•Jul 22, 2026•0 citations

Testing the Accuracy of Surface Code Decoders

Arshpreet Singh Maan, Alexandru Paler

Large-scale, fault-tolerant quantum computations will be enabled by quantum error-correcting codes (QECC). This work presents the first systematic technique to test the accuracy and effectiveness of different QECC decoding schemes by comparing a look-up table decoder to solutions generated using algorithmic decoders. Specifically, we examine the results of minimum-weight-perfect-matching and belief-propagation decoders against exhaustive look-up tables for surface codes up to distance seven and categorise where errors are accurately corrected in both decoding schemes. While our results are preliminary, we show that significant quantitative results can be generated, comparing how actual error channels are successfully or unsuccessfully decoded. We show that different decoding schemes perform very differently under the same QECC scheme and error model, and detail how decoders can be tested and classified with respect to errors that are successfully decodable. This work paves the way to the data driven tuning of decoder ensembles and will enable tailored design of hybrid decoding schemes that allow for real-time decoding, while maintaining the high theoretical thresholds allowed by specific quantum error correction codes.

arXiv:2311.12503•IEEE International Conference on Rebooting Computing (ICRC)•Dec 5, 2023•4 citations

Towards practical classical processing for the surface code: Timing analysis

Austin G. Fowler, Adam C. Whiteside, Lloyd C. L. Hollenberg

Topological quantum error-correction codes have high thresholds and are well suited to physical implementation. The minimum-weight perfect-matching algorithm can be used to efficiently handle errors in such codes. We perform a timing analysis of our current implementation of the minimum-weight perfect-matching algorithm. Our implementation performs the classical processing associated with an $n\ifmmode\times\else\texttimes\fi{}n$ lattice of qubits realizing a square surface code storing a single logical qubit of information in a fault-tolerant manner. We empirically demonstrate that our implementation requires only $O({n}^{2})$ average time per round of error correction for code distances ranging from 4 to 512 and a range of depolarizing error rates. We also describe tests we have performed to verify that it always obtains a true minimum-weight perfect matching.

arXiv:1202.5602•Physical Review A•Oct 12, 2012•59 citations

P lanar : A software for exact decoding quantum error correction codes with planar structure

Dongyang Feng, Hanyan Cao, Pan Zhang

Abstract Quantum error correction is essential for realizing fault-tolerant quantum computing, where both the efficiency and accuracy of the decoding algorithms play critical roles. In this work, we introduce the implementation of the Planar algorithm, a software framework designed for fast and exact decoding of quantum codes with a planar structure. The algorithm first converts the optimal decoding of quantum codes into a partition function computation problem of an Ising spin glass model. Then it utilizes the exact Kac–Ward formula to solve it. In this way, Planar offers the exact maximum likelihood decoding in polynomial complexity for quantum codes with a planar structure, including the surface code with independent code-capacity noise and the quantum repetition code with circuit-level noise. Unlike traditional minimum-weight decoders such as minimum-weight perfect matching (MWPM), Planar achieves theoretically optimal performance while maintaining polynomial-time efficiency. In addition, to demonstrate its capabilities, we exemplify the implementation using the rotated surface code, a commonly used quantum error correction code with a planar structure, and show that Planar achieves a threshold of approximately p uc ≈ 0.109 under the depolarizing error model, with a time complexity scaling of O(N 0.69), where N is the number of spins in the Ising model.

Chinese Physics B•Apr 10, 2025•2 citations
PyMatching provides a method for decoding quantum errors using the minimum-weight perfect matching algorithm. However, although the PyMatching supports various quantum error correction codes, no deep study has been conducted on the rotated planar surface codes that are receiving the latest attention. In this study, we define a procedure for detecting errors using PyMatching for rotated planar surface codes and analyze the correctness of error correction results. To compare error correction behavior by logical qubit size, we used logical qubit with distances of 3, 5, and 7, respectively. Furthermore, we have conducted comparative empirical studies by comparing the theoretical predictions of PyMatching with the actual execution results of classical state vector simulators.
This paper introduces PyMatching, a fast open-source Python package for decoding quantum error-correcting codes with the minimum-weight perfect matching (MWPM) algorithm. PyMatching includes the standard MWPM decoder as well as a variant, which we call local matching, that restricts each syndrome defect to be matched to another defect within a local neighbourhood. The decoding performance of local matching is almost identical to that of the standard MWPM decoder in practice, while reducing the computational complexity approximately quadratically. We benchmark the performance of PyMatching, showing that local matching is several orders of magnitude faster than implementations of the full MWPM algorithm using NetworkX or Blossom V for problem sizes typically considered in error correction simulations. PyMatching and its dependencies are open-source, and it can be used to decode any quantum code for which syndrome defects come in pairs using a simple Python interface. PyMatching supports the use of weighted edges, hook errors, boundaries and measurement errors, enabling fast decoding and simulation of fault-tolerant quantum computing.
Practical quantum computers will require resource-efficient error-correcting codes. The rotated surface code uses approximately half the number of qubits as the unrotated surface code to create a logical qubit with the same error-correcting distance. However, instead of distance, a more useful qubit-saving metric would be based on logical error rates. In this work we find the well-below-threshold scaling of logical to physical error rates under circuit-level noise for both codes at high odd and even distances and then compare the number of qubits used by each code to achieve equal logical error rates. We perform Monte Carlo sampling of memory experiment circuits with all valid CNOT orders using the stabilizer simulator Stim and the uncorrelated minimum-weight perfect matching decoder PyMatching 2. We find that the rotated code uses about 74 % the number of qubits used by the unrotated code to achieve a logical error rate of p L = 10 − 12 at the operational physical error rate of p = 10 − 3 . The ratio remains ≈ 75 % for p values within a factor of two of p = 10 − 3 for all useful p L . Our work finds the low- p L scaling of the surface code and clarifies the qubit savings provided by the rotated surface code, providing numerical justification for its use in future implementations of the surface code.
Noise-induced errors in quantum information processing corrupt computation and cause useful algorithms to fail. Quantum ErrorCorrection (QEC) counteracts this by encoding a single logical qubit across many physical qubits and correcting errors through repeatedsyndrome measurements. The Minimum-Weight Perfect Matching (MWPM) decoder is the accuracy benchmark for surface-codedecoding, but its microsecond-scale latency can consume the entire QEC cycle time of superconducting processors, leaving almost nomargin for other control operations. Pre-decoded lookup tables reduce latency to the nanosecond scale, but their memory requirementsgrow exponentially with code size, limiting them to very small code distances. In this work, we demonstrate a single-level cache,implemented as a software prototype, that accelerates decoding by exploiting the repetitive nature of surface-code syndromes. Hitrates above 80% are achieved for code distances up to 9 at below-threshold noise rates, and effective decoding speedups of up to18.1 times over PyMatching’s standalone decoding time are observed at code distance ≥ 5. Cache lookup latency remains below 400nanoseconds in the worst case, with memory well below that of full lookup tables. We further develop a mathematical frameworkdefining the theoretical limits of any cache-based decoder.
Large-scale, fault-tolerant quantum computations will be enabled by quantum error-correcting codes (QECC). This work presents the first systematic technique to test the accuracy and effectiveness of different QECC decoding schemes by comparing a look-up table decoder to solutions generated using algorithmic decoders. Specifically, we examine the results of minimum-weight-perfect-matching and belief-propagation decoders against exhaustive look-up tables for surface codes up to distance seven and categorise where errors are accurately corrected in both decoding schemes. While our results are preliminary, we show that significant quantitative results can be generated, comparing how actual error channels are successfully or unsuccessfully decoded. We show that different decoding schemes perform very differently under the same QECC scheme and error model, and detail how decoders can be tested and classified with respect to errors that are successfully decodable. This work paves the way to the data driven tuning of decoder ensembles and will enable tailored design of hybrid decoding schemes that allow for real-time decoding, while maintaining the high theoretical thresholds allowed by specific quantum error correction codes.
Topological quantum error-correction codes have high thresholds and are well suited to physical implementation. The minimum-weight perfect-matching algorithm can be used to efficiently handle errors in such codes. We perform a timing analysis of our current implementation of the minimum-weight perfect-matching algorithm. Our implementation performs the classical processing associated with an $n\ifmmode\times\else\texttimes\fi{}n$ lattice of qubits realizing a square surface code storing a single logical qubit of information in a fault-tolerant manner. We empirically demonstrate that our implementation requires only O(n2)O({n}^{2})O(n2) average time per round of error correction for code distances ranging from 4 to 512 and a range of depolarizing error rates. We also describe tests we have performed to verify that it always obtains a true minimum-weight perfect matching.
Abstract Quantum error correction is essential for realizing fault-tolerant quantum computing, where both the efficiency and accuracy of the decoding algorithms play critical roles. In this work, we introduce the implementation of the Planar algorithm, a software framework designed for fast and exact decoding of quantum codes with a planar structure. The algorithm first converts the optimal decoding of quantum codes into a partition function computation problem of an Ising spin glass model. Then it utilizes the exact Kac–Ward formula to solve it. In this way, Planar offers the exact maximum likelihood decoding in polynomial complexity for quantum codes with a planar structure, including the surface code with independent code-capacity noise and the quantum repetition code with circuit-level noise. Unlike traditional minimum-weight decoders such as minimum-weight perfect matching (MWPM), Planar achieves theoretically optimal performance while maintaining polynomial-time efficiency. In addition, to demonstrate its capabilities, we exemplify the implementation using the rotated surface code, a commonly used quantum error correction code with a planar structure, and show that Planar achieves a threshold of approximately p uc ≈ 0.109 under the depolarizing error model, with a time complexity scaling of O(N 0.69), where N is the number of spins in the Ising model.