- Open Access
Simulated-annealing decoder for the XZZX code with greedy-matching initialization
APS Open Sci. 1, 000090 – Published 12 August, 2026
DOI: https://doi.org/10.1103/5z6j-y33z
Abstract
The XZZX code is a variant of the surface code tailored to address biased noise in realistic quantum devices. We propose a simulated annealing (SA) decoder for the XZZX code. Our SA decoder is amenable to parallelization because its Markov chain Monte Carlo updates are simple and local. To initialize SA, we use a recovery configuration produced by our greedy-matching decoder. Although -biased noise is commonly assumed in realistic quantum devices, we instead focus on -biased noise. Under -biased noise, the minimum-weight perfect matching (MWPM) decoder becomes suboptimal because it cannot take into account the fact that a error contains both and components on the same qubit. Our numerical simulations for the code capacity noise model, where only data qubits suffer errors, show that our SA decoder achieves higher accuracy than the MWPM decoder. They also show that, under moderately -biased noise, our SA decoder achieves accuracy comparable to that of a decoder based on IBM ILOG CPLEX Optimizer (CPLEX), which uses integer programming to find a minimum-energy error configuration consistent with the measured syndrome. In our greedy-matching decoder, we randomize the tie breaking among equal-weight pairs. This randomness generates a variety of initial configurations for SA, which improves the convergence of our SA decoder. These results suggest that combining SA with our greedy-matching initializer is a promising approach to decoding the XZZX code under -biased noise in the code capacity noise model.
Physics Subject Headings (PhySH)
Article Text
References (56)
- E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Topological quantum memory, J. Math. Phys. 43, 4452 (2002).
- A. G. Fowler, M. Mariantoni, J. M. Martinis, and A. N. Cleland, Surface codes: Towards practical large-scale quantum computation, Phys. Rev. A 86, 032324 (2012).
- Y. Zhao et al., Realization of an error-correcting surface code with superconducting qubits, Phys. Rev. Lett. 129, 030501 (2022).
- Google Quantum AI, Suppressing quantum errors by scaling a surface code logical qubit, Nature (London) 614, 676 (2023).
- A. D. iOlius, J. E. Martinez, P. Fuentes, P. M. Crespo, and J. Garcia-Frias, Performance of surface codes in realistic quantum hardware, Phys. Rev. A 106, 062428 (2022).
- Google Quantum AI and Collaborators, Quantum error correction below the surface code threshold, Nature (London) 638, 920 (2025).
- S. Krinner, N. Lacroix, A. Remm, A. Di Paolo, E. Genois, C. Leroux, C. Hellings, S. Lazar, F. Swiadek, J. Herrmann, G. J. Norris, C. K. Andersen, M. Müller, A. Blais, C. Eichler, and A. Wallraff, Realizing repeated quantum error correction in a distance-three surface code, Nature (London) 605, 669 (2022).
- D. K. Tuckett, A. S. Darmawan, C. T. Chubb, S. Bravyi, S. D. Bartlett, and S. T. Flammia, Tailoring surface codes for highly biased noise, Phys. Rev. X 9, 041031 (2019).
- J. P. Bonilla Ataides, D. K. Tuckett, S. D. Bartlett, S. T. Flammia, and B. J. Brown, The XZZX surface code, Nat. Commun. 12, 2172 (2021).
- A. R. Calderbank and P. W. Shor, Good quantum error-correcting codes exist, Phys. Rev. A 54, 1098 (1996).
- A. Steane, Multiple-particle interference and quantum error correction, Proc. R. Soc. London, Ser. A 452, 2551 (1996).
- K. Hammar, A. Orekhov, P. W. Hybelius, A. K. Wisakanto, B. Srivastava, A. F. Kockum, and M. Granath, Error-rate-agnostic decoding of topological stabilizer codes, Phys. Rev. A 105, 042616 (2022).
- D. Forlivesi, L. Valentini, and M. Chiani, Logical error rates of XZZX and rotated quantum surface codes, IEEE J. Sel. Areas Commun. 42, 1808 (2024).
- J. Claes, J. E. Bourassa, and S. Puri, Tailored cluster states with high threshold under biased noise, npj Quantum Inf. 9, 9 (2023).
- A. S. Darmawan, B. J. Brown, A. L. Grimsmo, D. K. Tuckett, and S. Puri, Practical quantum error correction with the XZZX code and Kerr-Cat qubits, PRX Quantum 2, 030345 (2021).
- K. Sahay, J. Jin, J. Claes, J. D. Thompson, and S. Puri, High-threshold codes for neutral-atom qubits with biased erasure errors, Phys. Rev. X 13, 041013 (2023).
- S. Bravyi, M. Suchara, and A. Vargo, Efficient algorithms for maximum likelihood decoding in the surface code, Phys. Rev. A 90, 032326 (2014).
- D. K. Tuckett, S. D. Bartlett, and S. T. Flammia, Ultrahigh error threshold for surface codes with biased noise, Phys. Rev. Lett. 120, 050505 (2018).
- J. R. Wootton and D. Loss, High threshold error correction for the surface code, Phys. Rev. Lett. 109, 160503 (2012).
- A. Hutter, J. R. Wootton, and D. Loss, Efficient Markov chain Monte Carlo algorithm for the surface code, Phys. Rev. A 89, 022326 (2014).
- S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi, Optimization by simulated annealing, Science 220, 671 (1983).
- Y. Takeuchi, Y. Takada, T. Sakashita, J. Fujisaki, H. Oshima, S. Sato, and K. Fujii, Comparative study of decoding the surface code using simulated annealing under depolarizing noise, arXiv:2311.07973.
- Y. Takada, Y. Takeuchi, and K. Fujii, Ising model formulation for highly accurate topological color codes decoding, Phys. Rev. Res. 6, 013092 (2024).
- K. Fujii, M. Negoro, N. Imoto, and M. Kitagawa, Measurement-free topological protection using dissipative feedback, Phys. Rev. X 4, 041039 (2014).
- J. Fujisaki, H. Oshima, S. Sato, and K. Fujii, Practical and scalable decoder for topological quantum error correction with an Ising machine, Phys. Rev. Res. 4, 043086 (2022).
- J. Fujisaki, K. Maruyama, H. Oshima, S. Sato, T. Sakashita, Y. Takeuchi, and K. Fujii, Quantum error correction with an Ising machine under circuit-level noise, Phys. Rev. Res. 5, 043261 (2023).
- S. B. Bravyi and A. Y. Kitaev, Quantum codes on a lattice with boundary, arXiv:quant-ph/9811052.
- The numbers , and are calculated as follows. We formulate and implement the Metropolis method with bit representation taking values in the set , instead of Ising spins taking values in the set . In an error configuration, the error on each data qubit is represented by two bits. The upper and lower bits represent an and a error, respectively. Thus, , and errors are represented as 00, 01, 10, and 11, respectively. As such, counting the numbers of qubits that have bit representations 01, 10, and 11 yields , and , respectively.
- Such a fixed is often called a pure error in the literature [31].
- D. Poulin, Optimal and efficient decoding of concatenated quantum block codes, Phys. Rev. A 74, 052333 (2006).
- K. Fujii, Quantum Computation with Topological Codes (Springer, Singapore, 2015).
- K. Hukushima, Domain-wall free energy of spin-glass models: Numerical method and boundary conditions, Phys. Rev. E 60, 3606 (1999).
- S. T. Flammia and C. T. Chubb, Statistical mechanical models for quantum codes with correlated noise, Ann. Inst. Henri Poincaré Comb. Phys. Interact. 8, 269 (2021).
- S. Geman and D. Geman, Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-6, 721 (1984).
- We use SA only to estimate ; the output recovery configuration is chosen as , since any configuration of the inferred logical coset is equivalent up to stabilizers.
- We formulate error configurations by bits, instead of Ising spins. Hence, multiplying configurations is implemented as bitwise xor (addition modulo two) on the two-bit representation per qubit.
- H. Nishimori, Internal energy, specific heat and correlation function of the bond-random Ising model, Prog. Theor. Phys. 66, 1169 (1981).
- H. Nishimori, Statistical Physics of Spin Glasses and Information Processing: An Introduction (Oxford University Press, Oxford, 2001).
- A. G. Fowler, A. C. Whiteside, and L. C. L. Hollenberg, Towards practical classical processing for the surface code, Phys. Rev. Lett. 108, 180501 (2012).
- J. Edmonds, Paths, trees, and flowers, Can. J. Math. 17, 449 (1965).
- V. Kolmogorov, Blossom V: A new implementation of a minimum cost perfect matching algorithm, Math. Program. Comput. 1, 43 (2009).
- Note that is not unique in general, due to degeneracies in the minimum-weight paths.
- T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to Algorithms, 4th ed. (The MIT Press, Cambridge, MA, 2022).
- D. K. Tuckett, Tailoring surface codes: Improvements in quantum error correction with biased noise, Ph.D. thesis, University of Sydney, 2020, qecsim: https://github.com/qecsim/qecsim.
- Note that, in circuit-level noise model, the MWPM decoder is used with the Dijkstra algorithm to find a path with a minimum weight between any possible pair of syndrome defects, whereas in the code capacity noise model, the Dijkstra algorithm is not needed, because the weights are explicitly given by Eqs. (26) and (28)– (30).
- K. Hukushima and K. Nemoto, Exchange Monte Carlo method and application to spin glass simulations, J. Phys. Soc. Jpn. 65, 1604 (1996).
- U. Wolff, Collective Monte Carlo updating for spin systems, Phys. Rev. Lett. 62, 361 (1989).
- M. Haldar, A. Nayak, A. Choudhary, and P. Banerjee, Parallel algorithms for FPGA placement, in Proceedings of the 10th Great Lakes Symposium on VLSI, GLSVLSI ’00 (Association for Computing Machinery, New York, NY, 2000), pp. 86–94.
- N. P. Breuckmann and J. N. Eberhardt, Quantum low-density parity-check codes, PRX Quantum 2, 040101 (2021).
- N. Delfosse and N. H. Nickerson, Almost-linear time decoding algorithm for topological codes, Quantum 5, 595 (2021).
- Y. Wu and L. Zhong, Fusion Blossom: Fast MWPM Decoders for QEC, in 2023 IEEE International Conference on Quantum Computing and Engineering (QCE) (IEEE, Piscataway, NJ, 2023), Vol. 01, pp. 928–938.
- A. G. Fowler, Optimal complexity correction of correlated errors in the surface code, arXiv:1310.0863.
- A. Paler and A. G. Fowler, Pipelined correlated minimum weight perfect matching of the surface code, Quantum 7, 1205 (2023).
- To solve Eq. (A1) with CPLEX, we convert the parity (xor) constraints in Eq. (A2) into an equivalent integer linear programming using auxiliary integer variables and linear constraints.
- IBM, CPLEX: Linear programming solver, 2022, https://www.ibm.com/products/ilog-cplex-optimization-studio.
- A. J. Landahl, J. T. Anderson, and P. R. Rice, Fault-tolerant quantum computing with color codes, arXiv:1108.5738.