Planar: A software for exact decoding quantum error correction codes with planar structure
- Received Date: 14/03/2025
- Accepted Date: 09/04/2025
-
Key words:
- quantum computing /
- quantum error correction /
- planar Ising model
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_{\rm uc} \approx 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.