Distance-Finding Algorithms for Quantum Codes and Circuits

Mark Webster, Abraham Jacob, Oscar Higgott · 2026

Read Distance-Finding Algorithms for Quantum Codes and Circuits by Mark Webster, Abraham Jacob, Oscar Higgott (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-22532.txt.

Introduction

Webster and co-authors benchmark methods for finding the distance of quantum and classical codes. A code's distance measures how well it detects errors, so it sets the code's strength. For quantum low-density codes the value is hard to compute, and circuit-level distance is harder still. The team compares exact methods, like SAT and integer programming, with faster heuristics that only bound the answer. Their own evolved search method, QDistEvol, performs well on the quantum codes tested. All tools ship in a public Python package.

Catalog record

CREATORMark Webster, Abraham Jacob, Oscar Higgott
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE145104
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.22532

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Distance-Finding Algorithms for Quantum Codes and Circuits Mark Webster, Abraham Jacob, Oscar Higgott Abstract The distance of a classical or quantum code is a key figure of merit which reflects its capacity to detect errors. Quantum LDPC code families have considerable promise in reducing the overhead required for fault-tolerant quantum computation, but calculating their distance is challenging with existing methods. We generally assess the performance of a quantum code under circuit level error models, and for such scenarios the circuit distance is an important consideration. Calculating circuit distance is in general more difficult than finding the distance of the corresponding code as the detector error matrix of the circuit is usually much larger than the code’s check matrix. In this work, we benchmark a wide range of distance-finding methods for various classical and quantum code families, as well as syndrome-extraction circuits. We consider both exact methods (such as Brouwer-Zimmermann, connected cluster, SAT and mixed integer programming) and heuristic methods which have lower run-time but can only give a bound on distance (examples include random information set, syndrome decoder algorithms, and Stim undetectable error methods). We further develop the QDistEvol algorithm and show that it performs well for the quantum LDPC codes in our benchmark. The algorithms and test data have been made available to the community in the codeDistance Python package. 1 Introduction A fundamental figure of merit for any quantum error-correcting (QEC) protocol is its minimum distance, d . The distance of a QEC code or circuit is the minimum number of physical errors required to cause an undetectable logical failure. While the performance of a QEC protocol is ultimately determined by its behaviour under a hardware-realistic noise model and efficient decoding, the distance still provides a rigorous guarantee of its ability to suppress errors. There is significant interest in the development of quantum LDPC codes [ 9 ] , which hold the promise of substantially reducing the resource overhead of fault-tolerant quantum computation. Ultimately, the distance of any circuit implementation of these codes is upper-bounded by the distance of the codes themselves. Therefore, fast algorithms that establish an upper bound on the code distance simultaneously cap the potential performance of the circuit, making them very efficient for rapidly filtering out unpromising candidates. Conversely, algorithms capable of finding a tight lower bound on the code distance can provide a high degree of confidence that a particular code is worth pursuing, before substantial effort is invested into constructing fault-tolerant circuits or optimizing decoders. Finding the distance of a QEC circuit can be even more challenging due to the substantially increased scale of the problem. As an example, verifying the X or Z distance of a distance 11 colour code involves considering only 91 unique error mechanisms, where each stabilizer detects at most 6 errors. In contrast, finding the distance of a 11-round memory experiment for the same code using the superdense circuit [ 22 ] requires considering 43,298 unique physical error mechanisms, with individual detectors that can be triggered by up to 270 distinct errors each. Given that the circuit-level distance problem can be over two orders of magnitude larger in scale, finding efficient algorithmic solutions (or approximations) becomes critical. Calculating the distance of a circuit is invaluable for designing better fault-tolerant primitives; it provides a decoder-agnostic figure of merit that can often be approximated much more efficiently than logical error rates, which otherwise require large-scale Monte Carlo simulations to resolve. We emphasize that while distance-finding is a critical tool for informing the design of both codes and circuits, it is not a replacement for rigorous benchmarking. The ultimate evaluation of a QEC protocol requires full circuit-level simulations and, eventually, experimental demonstration to account for factors including hardware-specific constraints, practical decoding, and fault-tolerant logic. Nevertheless, robust distance-finding algorithms remain an indispensable component of the design pipeline, enabling the systematic discovery and evaluation of the next generation of quantum error correction schemes. 2 Contribution of this Work In this work, we review the leading distance-finding algorithms for classical codes, quantum codes and quantum circuits. For analysis purposes, we divide these methods into exact algorithms and heuristic algorithms. Exact algorithms tend to have a longer run-time, but on termination are guaranteed to give the exact distance. Heuristic algorithms have shorter run-time, but may only give a lower or upper bound on the distance. We conducted benchmarking on a series of data sets which comprise various families of classical codes, quantum codes and syndrome extraction circuits. The algorithms used for benchmarking are summarised in Table 1 . The benchmarking methodology and detailed information on the accuracy and run-time of the algorithms are set out in Section 5 . The best performing exact and heuristic algorithms on each data set are listed in Tables 2 and 3 respectively. Description Implementation Open Source Classical CSS Non-CSS Error Models Prob Par Exact Methods Gurobi Mixed integer programming Python library N C Y 2,3B Q N N MIP-SCIP Mixed integer programming Python library Y C Y 3B Q N N CLISAT MaxSAT Solver Unix binary Y C Y 3B Q N N m4riCC Connected Cluster C library Y Y Y 3,4B D N N Magma Brouwer Zimmermann Mac/Unix binary N Y XZ 2B D N N Heuristic Methods m4riRW Random Window (QDistRnd) C library Y Y Y 3,4B D Y Y QDistRndMW QDistRnd with more options Python library Y Y Y 2,3,4B E Y Y QDistEvol QDistRnd with evolutionary selection of permutations Python library Y Y Y 2,3,4B E Y N BP-OSD Syndrome decoder using LDPC package [ 52 ] Python library Y C Y 3B Any Y Y GEStim Stim Graphlike Error (max syndrome weight 2) Python library Y C Y 3B D N N CCStim Stim Colour Code Error (max syndrome weight 3) Python library Y C Y 3B D N N UEStim Stim Undetectable Error (increasing syndrome weight) Python library Y C Y 3B D N N Table 1 : Summary of Benchmarked Algorithms: in the Classical Codes column an entry of Y indicates the method natively handles classical codes, and C indicates that the algorithm is called with a basis of the complementary subspace (see Section 3.4 ). In the CSS Codes column, Y indicates the method supports finding of X and Z distance separately and XZ for Magma indicates that the lowest of X and Z distances is returned. Distance-finding for non-CSS stabiliser codes is generally done by mapping the quantum code to a binary linear code using a two, three or four block representation. As accuracy and run time are sensitive to the representation chosen the Non-CSS column indicates which block representations are supported by the method. In the Error Models column, D indicates that the method can only be used to find the minimum distance, Q indicates that a biased error model can be handled using the ‘quantization’ technique (see Stim likeliest_error_sat_problem function), A indicates that the method supports arbitrary probabilities for each error mechanism and E indicates the method can easily be extended to handle arbitrary probabilities. The Prob column indicates whether the algorithm is probabilistic or deterministic. The Par column indicates whether the algorithm is natively parallelisable. Recommendation Also Effective Classical Codes CodeTables GF(2) Magma Gurobi, MIP-SCIP Lifted

Read the complete text