Skip to content

Menu

WorksPhysics and Astronomy

Decoder- and Noise-Aware Optimization Framework for Clifford-Deformed Quantum Error-Correcting Codes

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_secbyc77. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Practical fault-tolerant quantum computing requires qubit-efficient quantum error correction (QEC). Clifford deformations (CDs) modify the stabilizers of a QEC code to lower its logical error rate at no additional resource cost. However, the number of possible CDs grows exponentially with the number of qubits, making exhaustive search infeasible beyond small codes. In this work, we further show that under circuit level noise the optimal CD depends strongly on both the noise model and decoder. To make systematic CD optimization possible, we introduce Evolution-Based Best-arm Identification (EBBI), a shot-efficient search algorithm that treats the circuit, noise model and decoder as a black box. We benchmark EBBI's performance on the rotated surface code, under two strongly ZZ-biased circuit-level noise models with the PyMatching decoder. At distance 3, EBBI finds the optimal CD using up to ∼1100×\sim 1100\times fewer shots than random search. At distance 5, when run at the target error rate, the median EBBI run converges to the CDs we believe to be optimal, while random search never converges. Under a ZZ-biased SI1000-like noise model, EBBI discovers a new CD, the B-XZZX code, which we generalized to larger distances. It differs from XZZX on only a fraction O(d−1)\mathcal{O}(d^{-1}) of the qubits at code distance dd, yet its relative advantage grows from ≈5%\approx 5\% at d=3d = 3 to ≈12%\approx 12\% at d=11d = 11. We thus show that the B-XZZX pattern found by EBBI can be systematically scaled to larger code distances. Our work represents a first step towards scalable CD optimization for general QEC codes.

Introduction

Quantum error correction (QEC) is widely regarded as the leading route toward fault-tolerant quantum computation [1, 2, 3], and finding efficient QEC schemes is at the forefront of current research [4, 5, 6]. There exist QEC codes with a range of performances and demands on hardware. Among them, the most well-known and widely used is the surface code [7, 8, 9, 10, 11, 12]. The surface code encodes a single logical qubit into a two-dimensional code patch with code distance dd consisting of O(d2)O(d^2) physical qubits, representing a considerable overhead in physical hardware. More recently, efficient high-rate quantum low-density parity-check (qLDPC) codes [13, 14, 15] have attracted attention for their ability to encode many logical qubits (possibly with constant encoding rate) within a code, although with the additional requirement of long-range connections, realized either in hardware or by algorithmic routing [16, 17, 18]. The above-mentioned codes rely on implementing stabilizer circuits [19] from which errors on qubits may be detected and corrected.

Beyond the development of new QEC codes, the performance of a QEC implementation can be improved systematically at a fixed code layout by exploiting the structure of the noise and errors affecting the individual physical qubits [20]. Modifications of the surface code stabilizer circuits were proposed as a strategy to exploit biased error channels and optimize code performance without increasing qubit overhead [21, 22]. This was later generalized to the concept of Clifford deformations (CDs) in the context of the surface code [23], and then applied to a family of high-rate qLDPC codes [24]. Structure in the errors affecting qubits is relevant to a range of experimental platforms, including qubits realized by superconducting circuits [25, 26], spin qubits in semiconductor quantum dots [27], spins of defects in silicon [28], neutral atoms [29], and trapped ions [30].

Previous approaches to CD optimization fall into four categories: analytical constructions for a specific code family [21, 22]; local rules that set the deformation of each qubit from its dominant error axis [31]; exhaustive search on the distance-3 rotated surface code (referred to as the surface code for the rest of this paper) combined with a study of a subset of random CD families, from which a translation-invariant CD for larger codes is constructed [23]; and fast optimization of a decoder-independent surrogate for CD performance under spatially non-uniform noise [32]. Specific CDs such as XZZX and XY have been studied under circuit-level noise [26, 33, 34], but searches for optimal CDs have so far been carried out under code-capacity noise with near-optimal decoding [23] or under phenomenological noise with an objective that ignores the decoder [32], with only a limited circuit-level test in the latter. Exhaustive search with the decoder in the loop accounts for the decoder by construction, but its cost grows exponentially with the number of qubits, while the scalable alternatives (local rules, random-family analysis and surrogates) are decoder-independent. This lack of a method that is both scalable and decoder-aware has so far prevented a systematic assessment of the gains CDs can achieve under circuit-level noise with practical decoders.

Here, we introduce Evolution-Based Best-arm Identification (EBBI), a scalable optimization framework for identifying high-performing CD QEC codes under general circuit-level noise models and decoders. The key observation underlying EBBI is that small changes to the CD patterns produce similar logical error rates PLP_L. This allows information gathered from one configuration to guide the search toward promising regions of the exponentially large configuration space. We evaluate EBBI using realistic circuit-level noise models suitable for a range of ZZ-biased qubits [34] and practical decoding based on PyMatching [35]. Across a range of surface-code instances under circuit-level noise, EBBI consistently identifies CDs that either match or outperform previously proposed constructions under the considered noise models and decoding strategies while requiring several orders of magnitude fewer QEC evaluations than random search. In particular, the search strategy allowed us to identify code boundary effects for our ZZ-biased SI1000-like noise-model [Sec. IV A] not reported so far [Sec. IV C]. These boundary effects turn out to be relevant at large code distances, as scaling up the code while maintaining the structure found at low distance consistently outperforms previously identified codes at larger distances. Our results establish a scalable CD optimization as a practical tool for tailoring quantum error-correcting codes to hardware-specific noise characteristics.

The structure of this paper is as follows. In Section II we recall the method of CD of a QEC codes. In Section III we describe the EBBI algorithm as applied to the CD of QEC codes. Then, we present in Section IV the optimal CD found with the EBBI framework, benchmark the algorithm’s performance, and show how the method can be extended to large codes based on codes discovered at low distance. We discuss and give an outlook in Section V.

Clifford deformations

CDs are a technique for modifying the stabilizers of a QEC code without changing the code distance or the local connectivity map [23]. The main advantage of CDs is that under biased noise, they can significantly reduce PLP_L without any added hardware cost. This is exemplified by the XZZX deformation on the surface code [22], which applies the Hadamard HH deformation on alternating qubits and, under biased noise, leads to an increased threshold of the code. Ref. [23] showed that under symmetric pX=pYp_X=p_Y ZZ-biased code-capacity noise, the PLP_L of the optimal distance-3 surface code CD was two orders of magnitude lower than that of the undeformed surface code. Due to the exponential size of the search space, finding the optimal CD is a non-trivial problem and depends on both the noise model and the decoder.

From a code-capacity or phenomenological noise model perspective, CDs can be viewed in two ways:

  1. The Heisenberg picture: A deformation UU on a given data qubit of the code will change the part of the Pauli stabilizer SS that acts on that data qubit into S′=USU†S^{\prime}=USU^{\dagger}.

  1. The Schrödinger picture: The stabilizers stay the same, but the noise on the qubit (pX,pY,pZ)(p_X,p_Y,p_Z) is permuted. The Hadamard HH deformation would give (pZ,pY,pX)(p_Z,p_Y,p_X) swapping the Pauli-X and Z probabilities.

We note in passing that when circuit-level noise is considered, the Schrödinger-picture analog formally breaks down. There exist 6 possible deformations per qubit, including no deformation I/(pX,pY,pZ)I/(p_X,p_Y,p_Z), H/(pZ,pY,pX)H/(p_Z,p_Y,p_X), Z/(pY,pX,pZ)\sqrt{Z}/(p_Y,p_X,p_Z), HZ/(pY,pZ,pX)H\sqrt{Z}/(p_Y,p_Z,p_X), ZH/(pZ,pX,pY)\sqrt{Z}H/(p_Z,p_X,p_Y), and HZH/(pX,pZ,pY)H\sqrt{Z}H/(p_X,p_Z,p_Y) with II the single-qubit identity gate, HH the Hadamard gate, and Z\sqrt{Z} the π2\frac{\pi}{2} ZZ-rotation gate. Since these can be picked independently on each data qubit, a QEC code with nn data qubits will have ∣A6n∣=6n|\mathcal{A}_6^n|=6^n possible CDs with A6={I,H,Z,HZ,ZH,HZH}\mathcal{A}_6=\{I,H,\sqrt{Z},H\sqrt{Z},\sqrt{Z}H,H\sqrt{Z}H\} the full CD set. An example CD is shown in Figure 1a.

Figure 1. a) Example Clifford deformation (CD) on the distance-3 surface code. Data qubits are represented by filled circles and check qubits by black squares. Connections between data and check qubits represent the applied two-qubit gates. The color of a data qubit indicates the specific change made to its connected gates. b,c,d) Outline of the Evolution-Based Best-arm Identification (EBBI) method. b) Initialization: Uniformly pick KK random CDs from An\mathcal{A}^n and simulate each until WW logical errors have been observed. The posterior over the logical error rate PLP_L is modeled as a beta distribution. c) Sampling: At each step, the posterior with the largest standard deviation is simulated and decoded 1.25S1.25S additional times with SS the number of shots already used for that candidate. d) Prune and re-populate: Any posterior satisfying Eq. (1) is pruned and replaced by a mutation of the current best CD, selected by drawing one random number from each surviving posterior and taking the lowest; the mutation is warmed up similarly to panel b. If no CD satisfies Eq. (1), EBBI returns to panel c.

Symmetry in the noise model can reduce the number of unique CDs. For example, in the code-capacity or phenomenological noise model regime, assuming pX=pYp_X=p_Y makes the 6 deformations pairwise identical: I∼ZHI\sim\sqrt{Z}H, and H∼ZHH\sim\sqrt{Z}H, resulting in a reduced CD set A3={I,H,HZH}\mathcal{A}_3=\{I,H,H\sqrt{Z}H\} with ∣A3n∣=3n|\mathcal{A}_3^n|=3^n CDs. This becomes a bit more complicated in the circuit-level noise model regime, where single-qubit gates from circuit compilation [Appendix § 1.3.3] will transform a ZZ-error into an XX- or YY-error. It can, however, be shown that the reduction from 6 to 3 deformations still holds in the case considered here [Appendix D]. This reduces the search space from 696^9 to 393^9, matching the case [23] considered. Symmetries thus have the ability to vastly reduce the total search space, although the space still remains exponentially large in the number of qubits nn.

Evolution-Based Best-arm Identification

EBBI aims to identify the optimal CD for an arbitrary Pauli-stabilized QEC code, biased noise model, and decoder using as few simulations as possible. EBBI is a hybrid between a best-arm identification [36] algorithm and an evolutionary algorithm, as best-arm identification usually assumes a small, limited set of options, which is not the case here. The advantage of EBBI is that it obtains all information about the circuit implementation, noise model, and decoder assumptions through simulation steps. This allows it to work with any decoder, including those whose underlying assumptions are not known, as would be the case with machine learning decoders. Below we outline the three steps EBBI goes through: initialization, sampling, and prune and re-populate.

Initialization An active Clifford-deformation set A\mathcal{A} is selected. This could be the full set A6\mathcal{A}_6, the reduced set A3\mathcal{A}_3, or some other subset of A6\mathcal{A}_6; the search space is then An\mathcal{A}^n. EBBI uniformly samples KK random CDs from An\mathcal{A}^n as candidates. Each candidate CD undergoes a warm-up phase, in which simulations are run until WW logical faults have been observed. The true PLP_L of the CD is modeled as a beta distribution with parameters α=#LogicalFaults+1\alpha=\#\mathrm{LogicalFaults}+1 and β=#SuccessfulDecodings+1\beta=\#\mathrm{SuccessfulDecodings}+1 [Figure 1b].

Sampling This step aims to reduce the uncertainty in the candidates PLP_L. EBBI selects the candidate distribution with the largest standard deviation and samples it until its standard deviation has been reduced by a factor of 1.5, requiring S⋅(1.52−1)=1.25SS\cdot(1.5^2-1)=1.25S additional shots, where S=α+β−2S=\alpha+\beta-2 is the number of shots already used on the candidate CD [Figure 1c]. The factor of 1.5 is a hyperparameter of the model that can be fine-tuned: too small a value would trigger the simulation step too often and result in unnecessary overhead, while too large a value would risk wasting sampling steps on candidates that are later pruned out.

Prune and re-populate If the γ\gamma lower bound of the kk’th CD, CDk\mathrm{CD}_k, after resampling exceeds the 1−γ1-\gamma upper bound of at least one other CD:

FBeta(αk,βk)−1(γ)>min⁡j≠kFBeta(αj,βj)−1(1−γ),(1)F_{\mathrm{Beta}(\alpha_k,\beta_k)}^{-1}(\gamma)>\min_{j\ne k}F_{\mathrm{Beta}(\alpha_j,\beta_j)}^{-1}(1-\gamma), \tag*{(1)}

with FBeta(α,β)−1F_{\mathrm{Beta}(\alpha,\beta)}^{-1} the quantile function of a beta distribution with parameters α\alpha and β\beta, CDk\mathrm{CD}_k is deemed unlikely to be optimal and is pruned; otherwise it is kept and this step is repeated. We use γ=2.5%\gamma=2.5\% (corresponding to non-overlap of the central 95% credible regions) and observe good performance [Figure 2]. Too small a γ\gamma is expected to waste valuable shots, while too large a γ\gamma risks pruning out good candidates.

Figure 2. Median performance over 25 independent runs of EBBI and random search as a function of shot count. The PLP_L of specific CDs of interest [Table III] have been plotted as horizontal lines for comparison. The spread over all runs and over the central 15 out of 25 runs can be found in Figure 11 in Appendix G. a-b) use the HBD noise model [34]. a) uses the distance-3 surface code with 3 syndrome extraction rounds. During the runtime of EBBI and random search, the noise model used noise strength psearchp_{\mathrm{search}} and η=500\eta= 500, while the plotted points use p=0.1%p = 0.1\% and η=500\eta= 500 with an estimated PLP_L from 10810^8 shots. Reference lines for the PLP_L of the CSS (undeformed code), XZZX [22] and B-XZZX (Figure 3a,Figure 3b) deformations are plotted, with the PLP_L of the XY [21] deformation lying outside the upper limit of the y-axis. b) same as panel a but for the distance-5 surface code with 5 syndrome extraction rounds. c-d) same as panels a, b but under our HBD-SI1000 noise model, where each operation uses a different noise strength, see Table I.

Once a CD is pruned via Eq. (1), it is replaced by a new candidate. Intuitively, two CDs that differ in deformation on only a single qubit, referred to as neighboring CDs, should have similar error rates, which motivates a mutation strategy. This correlation in neighboring CDs has been validated in the distance-3 surface code and shown to have Pearson correlation of ρ=0.83\rho=0.83 and ρ=0.82\rho=0.82 for the two noise models that we are considering [Appendix E], and from the above argument we would expect ρ\rho to increase with larger code distance as the relative change becomes smaller; EBBI’s performance on the distance-5 surface code [Figure 2b,Figure 2d] is consistent with this. Based on this observation, the current best CD, CDbest\mathrm{CD}_{\mathrm{best}}, is identified by drawing a single sample from each candidate’s beta distribution and selecting the CD with the smallest sampled value, akin to Thompson sampling [37]. The new candidate CD is then generated by, on each qubit, either picking a random deformation uniformly from A\mathcal{A} with probability M\mathcal{M} or copying the deformation on that qubit from CDbest\mathrm{CD}_{\mathrm{best}} with probability 1−M1-\mathcal{M}, keeping the total number of active candidates fixed at KK. If the mutation has already been used, this step is repeated with M\mathcal{M} increased by 1% until an unseen CD is found; if M\mathcal{M} exceeds 1, no new CD will be added and EBBI continues with one fewer active candidate. The new candidate undergoes the same warm-up process described above, before EBBI returns to the sampling step.

EBBI terminates once a shot budget or a wall-clock time limit is reached, at which point it returns the candidate with the lowest mean μ\mu plus standard deviation σ\sigma. We use min⁡(μ+σ)\min(\mu+\sigma) rather than min⁡(μ)\min(\mu) to bias the returned CD towards candidates with good statistics (i.e., low remaining uncertainty in the PLP_L estimate); this choice was observed to substantially reduce the false-positive rate. See Algorithm 1 in the appendix or the full code and raw results on Zenodo [38].

Results

Setup

While EBBI will work for any stabilizer code, we here limit our focus to the surface code. This is done for two reasons: (1) Several CDs of the surface code are already known, including the XZZX [22] and XY [21] CD, and it is the code that was studied in Ref. [23], which introduced the generalization of CDs. (2) The surface code has only a single logical qubit, meaning that performance improvement can be uniquely measured by the single logical qubit PLP_L. This is unlike codes with multiple logical qubits co-encoded in the same physical qubits where tradeoffs between the different encoded qubits PLP_L might need to be considered.

Simulations are carried out in Stim [39] with a circuit-level biased noise model. The Stim circuits are compiled down to single-qubit rotations, CZ gates, and initialization and measurement in the Z-basis Appendix § 1.3.3. The reported PLP_L is determined from simulating and decoding the same circuit in both the X- and Z-basis under the same noise seed (circuit-level errors will be the exact same in both runs) and comparing the two results to determine which logical Pauli error occurred, giving us PLIP_L^I (no logical error), PLXP_L^X, PLYP_L^Y, PLZP_L^Z with PL=PLX+PLY+PLZP_L=P_L^X+P_L^Y+P_L^Z; we will refer to this as a single shot as the two simulation runs use the same seed and thus experience the same errors at the same locations. The hybrid biased-depolarizing (HBD) noise model [34] is used as a baseline. All operations in the HBD noise model use the same error probability pp. However, on real devices, simple operations such as single-qubit gates will have lower error rates than more complicated operations like two-qubit gates. To get closer to realistic noise while remaining platform agnostic, we have changed the relative noise terms to match the commonly used SI1000 noise model [40] and will refer to this modified HBD noise model as HBD-SI1000. Both noise models are summarized in Table I. Both noise models also satisfy the conditions that allow us to focus on the A3\mathcal{A}_3 deformation set instead of the full A6\mathcal{A}_6 set.

The decoders PyMatching [35], BeliefMatching [33], BP-OSD [41], Tesseract [42] and the CudaQ tensor network (CudaQ-TN) decoder [43, 44] were tested on the CSS (undeformed code), XZZX, XY and B-XZZX Sec. IV C, Figure 3a,Figure 3b CDs on both the distance-3 and distance-5 surface codes Appendix § 2. In all cases, Tesseract or CudaQ-TN gave the lowest PLP_L, followed by BP-OSD, BeliefMatching and finally PyMatching Figure 12 in Appendix H. PyMatching performed particularly badly on the XY surface code. We attribute this to the HZHH\sqrt{Z}H deformation, which converts the dominant ZZ-errors into YY-errors that trigger detectors in both the XX- and ZZ-type decoding graphs; PyMatching requires these errors to be decomposed into independent edges, discarding the correlation between them. Consistent with this, BeliefMatching, which reintroduces such correlations [33], improves PLP_L more for the XY CD than for any other CD in all four settings Figure 12 in Appendix H. However, PyMatching was 113–413× faster than the other decoders on a single CPU core, and 75–97× faster than CudaQ-TN on an NVIDIA H200 GPU Table VI in Appendix H. At the ∼1011\sim10^{11} shots per run used in Figure 2, this corresponds to ∼110\sim110 core-hours per distance-5 run under HBD noise with PyMatching, compared with ∼22 000\sim22\,000–45 00045\,000 core-hours with BeliefMatching, BP-OSD, or Tesseract Table VI in Appendix H. We therefore use PyMatching to benchmark both EBBI and random search.

Figure 3. Generalization of results. a) Optimal distance-3 CD on the surface code under the HBD-SI1000 noise model, obtained from a search over all 393^9 A3\mathcal{A}_3-CDs; it is also the best CD found by EBBI. b) Best distance-5 CD on the surface code under HBD-SI1000 noise found by EBBI. c) Improvement in PLP_L over the XZZX surface code for the undeformed CSS code under HBD-SI1000(p=0.1%p = 0.1\%, η=500\eta= 500), the tiled optimal distance-3 CD [23] (panel a) and the discovered B-XZZX code. The error bars show one standard deviation and are too small to see in the plot; each PLP_L at distance-3 to distance-9 is estimated from 101010^{10} shots in both the logical X and Z bases of the surface code, with distance-11 using 101110^{11} shots.

Figure 12. The effect on PLP_L (estimated from 10810^8 shots) induced by the decoder across 4 CDs on the distance-3 and 5 surface code under either HBD or HBD-SI1000 noise. Both noise models use p=0.001p = 0.001 and η=500\eta= 500. The error bars on the data are too small to see and hidden behind the markers. The raw data for each data point can be found in Table V. The following decoder abbreviations are used: PyMatching [35], BeliefMatching [33], BP-OSD [41], Tesseract [42] and the CudaQ Tensor Network (CudaQ-TN) decoder [43, 44].

DistanceNoise modelDecoderCSSXZZXXYB-XZZX
3HBDPyMatching3.3731(58)×10−33.3731(58) \times10^{-3}2.6005(51)×10−32.6005(51) \times10^{-3}5.3951(73)×10−35.3951(73) \times10^{-3}3.2569(57)×10−33.2569(57) \times10^{-3}
3HBDBeliefMatching3.0349(55)×10−33.0349(55) \times10^{-3}2.5559(50)×10−32.5559(50) \times10^{-3}4.2939(65)×10−34.2939(65) \times10^{-3}2.8547(53)×10−32.8547(53) \times10^{-3}
3HBDBP-OSD2.9517(54)×10−32.9517(54) \times10^{-3}2.4657(50)×10−32.4657(50) \times10^{-3}4.0424(63)×10−34.0424(63) \times10^{-3}2.7748(53)×10−32.7748(53) \times10^{-3}
3HBDTesseract2.7454(52)×10−32.7454(52) \times10^{-3}1.9830(44)×10−31.9830(44) \times10^{-3}3.8773(62)×10−33.8773(62) \times10^{-3}2.5950(51)×10−32.5950(51) \times10^{-3}
3HBDCudaQ-TN2.6836(52)×10−32.6836(52) \times10^{-3}1.9344(44)×10−31.9344(44) \times10^{-3}3.8531(62)×10−33.8531(62) \times10^{-3}2.5228(50)×10−32.5228(50) \times10^{-3}
3HBD-SI1000PyMatching4.3723(66)×10−34.3723(66) \times10^{-3}3.9204(62)×10−33.9204(62) \times10^{-3}6.4594(80)×10−36.4594(80) \times10^{-3}3.7263(61)×10−33.7263(61) \times10^{-3}
3HBD-SI1000BeliefMatching4.1204(64)×10−34.1204(64) \times10^{-3}3.6532(60)×10−33.6532(60) \times10^{-3}4.4681(67)×10−34.4681(67) \times10^{-3}3.6063(60)×10−33.6063(60) \times10^{-3}
3HBD-SI1000BP-OSD4.0457(63)×10−34.0457(63) \times10^{-3}3.6107(60)×10−33.6107(60) \times10^{-3}4.1056(64)×10−34.1056(64) \times10^{-3}3.5602(60)×10−33.5602(60) \times10^{-3}
3HBD-SI1000Tesseract3.7870(61)×10−33.7870(61) \times10^{-3}3.3101(57)×10−33.3101(57) \times10^{-3}3.9329(63)×10−33.9329(63) \times10^{-3}3.0559(55)×10−33.0559(55) \times10^{-3}
3HBD-SI1000CudaQ-TN3.7244(61)×10−33.7244(61) \times10^{-3}3.3202(58)×10−33.3202(58) \times10^{-3}3.9858(63)×10−33.9858(63) \times10^{-3}3.0794(55)×10−33.0794(55) \times10^{-3}
5HBDPyMatching6.508(26)×10−46.508(26) \times10^{-4}3.535(19)×10−43.535(19) \times10^{-4}1.3368(37)×10−31.3368(37) \times10^{-3}4.646(22)×10−44.646(22) \times10^{-4}
5HBDBeliefMatching4.933(22)×10−44.933(22) \times10^{-4}2.705(16)×10−42.705(16) \times10^{-4}7.323(27)×10−47.323(27) \times10^{-4}3.552(19)×10−43.552(19) \times10^{-4}
5HBDBP-OSD4.245(21)×10−44.245(21) \times10^{-4}2.219(15)×10−42.219(15) \times10^{-4}5.859(24)×10−45.859(24) \times10^{-4}2.945(17)×10−42.945(17) \times10^{-4}
5HBDTesseract3.872(20)×10−43.872(20) \times10^{-4}1.999(14)×10−41.999(14) \times10^{-4}5.234(23)×10−45.234(23) \times10^{-4}2.700(16)×10−42.700(16) \times10^{-4}
5HBD-SI1000PyMatching7.377(27)×10−47.377(27) \times10^{-4}5.422(23)×10−45.422(23) \times10^{-4}1.2364(35)×10−31.2364(35) \times10^{-3}5.126(23)×10−45.126(23) \times10^{-4}
5HBD-SI1000BeliefMatching6.945(26)×10−46.945(26) \times10^{-4}5.139(23)×10−45.139(23) \times10^{-4}6.628(26)×10−46.628(26) \times10^{-4}4.682(22)×10−44.682(22) \times10^{-4}
5HBD-SI1000BP-OSD6.108(25)×10−46.108(25) \times10^{-4}4.397(21)×10−44.397(21) \times10^{-4}5.244(23)×10−45.244(23) \times10^{-4}3.949(20)×10−43.949(20) \times10^{-4}
5HBD-SI1000Tesseract5.963(24)×10−45.963(24) \times10^{-4}4.226(21)×10−44.226(21) \times10^{-4}4.913(22)×10−44.913(22) \times10^{-4}3.747(19)×10−43.747(19) \times10^{-4}

Table V. Estimated PLP_L from 10810^8 shots with p=0.1%p = 0.1\% and η=500\eta= 500 on the CSS, XZZX, XY and B-XZZX CDs. Bold entries indicate the CD with the lowest recorded PLP_L.

Decoderd=3d = 3 HBDd=3d = 3 HBD-SI1000d=5d = 5 HBDd=5d = 5 HBD-SI1000Compute resource
PyMatching25.5 s (1×)32.8 s (1×)6 m 34 s (1×)9 m 01 s (1×)1 core, AMD EPYC 9475F
BeliefMatching53 m 06 s (125×)1 h 01 m (113×)22 h 20 m (204×)22 h 06 m (147×)1 core, AMD EPYC 9475F
BP-OSD1 h 11 m (168×)1 h 23 m (153×)45 h 09 m (413×)42 h 53 m (285×)1 core, AMD EPYC 9475F
Tesseract1 h 49 m (258×)2 h 53 m (317×)27 h 03 m (247×)40 h 15 m (268×)1 core, AMD EPYC 9475F
CudaQ-TN41 m 12 s (96.9×)41 m 06 s (75.3×)——1 NVIDIA H200 NVL, 141 GB

Table VI. Runtime of the different decoders tested on both HBD and HBD-SI1000 noise with p=0.1%p = 0.1\% and η=500\eta= 500 using 10810^8 shots. The numbers in parentheses show how much faster PyMatching is compared to the given decoder, noise model and code distance.

Estimating PLP_L reliably requires O(1/PL)\mathcal{O}(1/P_L) shots, which becomes expensive as larger QEC codes are considered. To mitigate this, we propose that during the search phase of either EBBI or random search we artificially increase the physical error rate from p→psearch≥pp \to p_{\mathrm{search}} \ge p. As psearchp_{\mathrm{search}} gets closer to the code threshold, the code distance will have a diminishing effect on PLP_L, making it easier to reliably identify good CDs with a limited number of shots. Based on an exhaustive evaluation of all 939^3 distance-3 surface code A3\mathcal{A}_3-CDs at p∈{0.1%,0.25%,0.5%}p \in\{0.1\%,0.25\%,0.5\% \} and η=500\eta=500, the ordering does not change significantly, as indicated by a Pearson correlation between ρ=0.9975\rho=0.9975 and ρ=0.9998\rho=0.9998 over all CDs, and between ρ=0.9355\rho=0.9355 and ρ=0.9970\rho=0.9970 over the top 100 CDs; HBD was generally observed to have higher correlation than HBD-SI1000 [Fig. 7 and Fig. 8 in Appendix E].

HBDHBD-SI1000
CSS (d=3d = 3)3.4×10−33.4 \times10^{-3}4.4×10−34.4 \times10^{-3}
CSS (d=5d = 5)6.5×10−46.5 \times10^{-4}7.4×10−47.4 \times10^{-4}
XZZX (d=3d = 3)2.6×10−32.6 \times10^{-3}3.9×10−33.9 \times10^{-3}
XZZX (d=5d = 5)3.5×10−43.5 \times10^{-4}5.4×10−45.4 \times10^{-4}
XY (d=3d = 3)5.4×10−35.4 \times10^{-3}6.5×10−36.5 \times10^{-3}
XY (d=5d = 5)1.3×10−31.3 \times10^{-3}1.2×10−31.2 \times10^{-3}
B-XZZX (d=3d = 3)3.3×10−33.3 \times10^{-3}3.7×10−33.7 \times10^{-3}
B-XZZX (d=5d = 5)4.6×10−44.6 \times10^{-4}5.1×10−45.1 \times10^{-4}

Table III. Comparison of surface code PLP_L for different CDs and noise models considered in this work. For each noise model and code distance the score of the best performing code is highlighted in the table. The PLP_L for the other mentioned decoders along with their uncertainties are reported in Table V in Appendix H.

For testing, EBBI is compared against random search [23], which uniformly and without replacement picks CDs from AnA^n. We run EBBI with K=10K = 10 candidates at a time, and sample each new candidate until W=500W = 500 logical faults have been observed. We use a pruning threshold of γ=2.5%\gamma= 2.5\% and a mutation rate of M=43%n\mathcal{M} = \frac{43\%}{n}, which results in a single-qubit mutation 80% of the time and a multi-qubit mutation 20% of the time. If the mutated CD matches one already used, it is discarded and resampled with M\mathcal{M} increased by 1%. As argued in Appendix D, we can limit our search to A3A_3 instead of the full A6A_6 set, reducing the number of possible CDs from 6n→3n6^n \to3^n. Random search runs using a fixed number of shots per CD (listed in Table II), which has been chosen to balance a reliable estimate of the PLP_L of each CD against exploring a large number of CDs.

psearchp_{\mathrm{search}}Distance-3 surface codeDistance-5 surface code
0.0011 000 00010 000 000
0.0025400 0004 000 000
0.005200 0002 000 000

Table II. Number of shots used by random search per CD, as a function of noise model strength during the search phase psearchp_{\mathrm{search}} and code distance of the surface code.

Performance

Across all cases tested (each case is the median PLP_L over 25 independent runs), EBBI shows a significant speedup over random search. For the distance-3 surface code, EBBI finds the optimal CD in almost all cases [Table IV in Appendix G] (confirmed by an exhaustive search over all 393^9 A3A_3-CDs [Appendix E]). Under psearch=p=0.1%p_{\mathrm{search}} = p = 0.1\% and HBD noise, the median EBBI run reaches the optimum using ∼450×\sim450\times fewer shots than random search [Fig. 2a], and ∼30×\sim30\times fewer under HBD-SI1000 [Fig. 2c]. Increasing psearchp_{\mathrm{search}} to 0.5% expands this gap to ∼1100×\sim1100\times under HBD noise. Under HBD-SI1000 noise with psearch∈{0.25%,0.5%}p_{\mathrm{search}} \in\{0.25\%, 0.5\%\}, the random search median never reaches the optimal PLP_L for two reasons: (i) each random search run samples CDs without replacement and stops once it repeatedly fails to draw a CD it has not previously used, so in practice each run covers only ≈78%\approx78\% of the 393^9 CDs; and (ii) its per-CD PLP_L estimates are too noisy to resolve the separation between the optimal and second-best CDs, which is about one standard deviation of the random search estimate. For the distance-5 surface code, no random search run converged: finding the optimum by uniform sampling requires on the order of 325≈10123^{25} \approx10^{12} CDs, each using 10710^7 shots, which is far beyond our simulation budget. Under HBD noise, the EBBI median reaches the XZZX deformation for all three psearchp_{\mathrm{search}} settings [Fig. 2b]; we believe it to be optimal, as no CD explored by EBBI or random search beats it. Under HBD-SI1000 noise, the best CD found is B-XZZX [Sec. IV C], but the fraction of runs that end on it drops with psearchp_{\mathrm{search}}: 16 of 25 runs at psearch=0.1%p_{\mathrm{search}} = 0.1\%, 6 at 0.25% and none at 0.5%. Two failure modes contribute. First, some runs never sample B-XZZX (7, 13 and 23 runs, respectively [Table IV in Appendix G]) and end on a CD with a higher PLP_L than B-XZZX, also when evaluated at the elevated psearchp_{\mathrm{search}}, which likely indicates that they are stuck in a local minimum. Second, some runs do sample B-XZZX, but end pruning it out at a later stage (2, 6 and 2 runs, respectively [Table IV in Appendix G]). Potential fixes to these two problems are discussed in Sec. V.

The plots in Figure 2 clearly show that using psearch>pp_{\mathrm{search}} > p can reduce the shot count by 1 to 2 orders of magnitude. For the distance-3 surface code under HBD noise, increasing psearchp_{\mathrm{search}} from 0.1% = pp to 0.5% = 5p5p allows the median EBBI run to find the optimal CD 10× faster while random search finds it 4× faster [Fig. 2a]. Meanwhile, under HBD-SI1000 noise, the gain from increasing psearchp_{\mathrm{search}} is slightly larger for EBBI at about 12×, while the median random search run fails to identify the optimal CD under both psearch=0.25%p_{\mathrm{search}} = 0.25\% and 0.5% [Fig. 2c]. For the distance-5 surface code, the gain increases to close to 80× for EBBI under HBD noise when increasing psearchp_{\mathrm{search}} from 0.1% to 0.5% [Fig. 2b], with random search never converging due to the exponentially large 3253^{25} space. Under HBD-SI1000 noise, increasing psearchp_{\mathrm{search}} is less successful; at psearch=0.25%p_{\mathrm{search}} = 0.25\%, EBBI almost converges to the B-XZZX code while for psearch=0.5%p_{\mathrm{search}} = 0.5\% it does not converge at all to the B-XZZX code. This could either be a result of the lower Pearson correlation under HBD-SI1000 compared to HBD, especially in the top 100 CDs, which was seen in the exhaustive search results for distance-3 [Fig. 7 and Fig. 8 in Appendix E] or something caused by the pruning logic in EBBI. To test this, we used the B-XZZX CD found at psearch=pp_{\mathrm{search}} = p and compared its PLP_L against that of the final CDs found at psearch∈{0.25%,0.5%}p_{\mathrm{search}} \in\{0.25\%, 0.5\%\} at their corresponding noise models and saw that B-XZZX remains the CD with the lowest PLP_L. This leads us to conclude that the failure to converge to the B-XZZX code at psearch∈{0.25%,0.5%}p_{\mathrm{search}} \in\{0.25\%, 0.5\%\} is a result of EBBI and not the noise-boosting itself. These results demonstrate the practical feasibility of increasing psearchp_{\mathrm{search}} as a method for reducing the required number of shots in circuit-level simulation-based optimization of CDs.

Generalization to larger codes

A strong dependence between the CD found and the noise model is observed. In both the distance-3 and distance-5 instances under HBD noise, the well-known XZZX CD is rediscovered by EBBI. However, when the noise model is changed to HBD-SI1000, XZZX is no longer optimal and a new code, B-XZZX, is discovered, despite the HBD-SI1000 noise model using the same bias η=500\eta= 500 as that of the HBD noise model and differing only in the relative noise strengths between operations.

The best CD found under the HBD-SI1000 noise model for the distance-3 and 5 cases [Figure 2c,Figure 2d] can be generalized to larger surface code distances. It can be viewed as the XZZX CD [22] with a modified border. All the qubits on the left and right edges and on the NE and SW corners use the HH deformation, while the remaining edge qubits use no deformation [Figure 3a,Figure 3b]. This generalized form differs from the XZZX code on only 2(d−1)2(d-1) qubits in the distance-dd case. For this reason we will refer to it as the bordered XZZX code or simply B-XZZX.

Remarkably, despite the B-XZZX code differing from the XZZX code on only a diminishing fraction 2/d−2/d22/d - 2/d^2 of the qubits, its relative performance over the XZZX code increases with code distance [Figure 3c]. We note that the improvement over XZZX flattens out between d=9d = 9 and d=11d = 11 and could potentially decrease after this point; however, the same thing was observed between d=3d = 3 and d=5d = 5 making it hard to conclude anything definitively. At d=11d = 11 the PLP_L under HBD-SI1000 noise with p=0.1%p = 0.1\% and η=500\eta= 500 is ∼10−7\sim10^{-7} making it increasingly expensive to test at even larger code distances. This shows that despite EBBI only being tested on d=3d = 3 and d=5d = 5 surface codes, it is possible to generalize the CD pattern into a scalable CD that maintains good performance.

We speculate that the performance gains of the B-XZZX code under the HBD-SI1000 noise model are a result of primarily X-errors left on the data qubits by the CX gates [Appendix C1]. Interestingly, the B-XZZX code prefers having two CX and one CZ gate on the edge data qubits instead of two CZ and one CX; this choice results in a more even distribution of X and Z errors on the edge data qubits—the gate choice mainly contribute X-errors, while idling of the data qubits during check-qubit measurement mainly contribute Z-errors.

A different proposal for scaling up found CDs on the surface code to larger distances is given in Ref. [23]. They propose taking the optimal distance-3 CD from an exhaustive search over all 393^9 A3\mathcal{A}_3-CDs and tiling the result to obtain larger-distance deformations. The optimal CD from an exhaustive search yields exactly the distance-3 B-XZZX code; however, tiling it to larger distances under the PyMatching decoder [35] does not preserve its performance advantages Figure 3c. Already at distance-5, its performance becomes worse than the regular XZZX code. These results contrast with the findings in Figure 6 of Ref. [23] where tiling the code to larger distances continued to give the lowest PLP_L. We note that our setup differs significantly from that in Ref. [23] where they used a code-capacity noise model with near-perfect decoding, while here we use a circuit-level noise model with a sub-optimal decoder. This illustrates the non-trivial problem of generalizing small CDs to larger distances.

Figure 6. Rank-plot of the PLP_L of the 393^9 distance-3 surface code A3A_3-CDs under HBD-SI1000(p=0.1%,η=500)(p = 0.1\%, \eta= 500) noise.

Discussion and outlook

In this work we have ranked the CDs by directly estimating their PLP_L through circuit-level simulations, which becomes expensive as the size of the codes increases. An alternative to this is to construct a cheap surrogate for the performance of a CD and optimize for that instead of PLP_L directly. Ref. [32] has done exactly this, using a decoder-independent surrogate that allows them to find optimal CDs extremely fast, keeping up with an ever-changing calibration map. However, under both the HBD and HBD-SI1000 circuit-level noise models considered here, the optimal distance-3 surface code A3\mathcal{A}_3-CD changes depending on whether the PyMatching or BP-OSD decoder is used; a Pearson correlation of ρ=0.88\rho= 0.88 and ρ=0.30\rho= 0.30 between the two decoders’ PLP_L over all A3\mathcal{A}_3-CDs is observed for the HBD and HBD-SI1000 noise models respectively Figure 10 in Appendix § 2. Thus, to reliably and quickly find the optimal CD for sub-optimal real-time decoders, the surrogate will have to incorporate information about the decoder in addition to information about the noise model and QEC code.

Figure 10. Pearson correlation of the PLP_L of all 393^9 A3A_3-CDs between the PyMatching and BP-OSD decoders with the optimal CD for either decoder marked in addition to the named CDs in this paper. The PLP_L were estimated using 10810^8 shots for PyMatching and 10710^7 shots for BP-OSD due to computational cost. Left: uses the HBD noise model with p=0.1%p=0.1\% and η=500\eta=500. Right: uses the HBD-SI1000 noise model with the same parameters as HBD.

Boundary modifications similar to the ones we perform on the XZZX code to get the B-XZZX code have been applied to the XY code. Ref. [33] noted that while the XY surface code requires n=d2n = d^2 Z-errors for an undetectable logical error, if just a single non-Z-error is allowed, an undetectable logical error can be constructed using only n−1\sqrt{n} - 1 Z-errors on the boundary of the code. They show that if a deformation is performed on every other edge of the code, O(n)\mathcal{O}(\sqrt{n}) non-Z-errors are required to achieve the same effect, significantly increasing the performance of the code Appendix § 1.14 of Ref. [33]. However, we believe that what we are seeing in the B-XZZX code is something different as both a logical-X and Z error can be constructed using a single non-Z-error and n−1\sqrt{n} - 1 Z-errors. Thus, the increasing performance of the B-XZZX code over XZZX as the code distance dd increases remains unexplained.

In Sec. IV B we observed two failure modes of EBBI for the distance-5 surface code under HBD-SI1000 noise. First, some runs get stuck in a local minimum. One solution to this is to replace a pruned CD with a uniformly random CD instead of a mutation once many consecutive mutations have been pruned. This allows EBBI to escape local minima, but may add significant overhead, since a random CD is unlikely to be close to optimal. Second, some runs discover the optimal CD only to prune it out at a later stage, a result of overly aggressive pruning. This happens when a new CD, whose PLP_L estimate is still based on few logical errors, appears better than the optimal CD by chance, causing the optimal CD to satisfy (1). We see three possible solutions. (i) Decreasing γ\gamma reduces the rate of such false pruning, at the cost of more shots per CD. (ii) Increasing WW gives a more accurate initial PLP_L estimate of each new CD, reducing the risk that it falsely appears better than the optimal CD. (iii) A previously pruned CD could be re-added, in place of a mutation, once it no longer satisfies Eq. (1).

For device-level application of EBBI, a per-qubit calibration map of the ZZ-bias and of the relative noise strengths between operations and qubits is needed. While the two noise models considered in this work, HBD and HBD-SI1000, are both uniform noise models, the power of EBBI comes from its use of the strong PLP_L correlations between similar CDs. We do not expect that going from a noise model where all qubits are identical to a per-qubit noise model will have any significant effect on this correlation and thus expect that EBBI will continue to perform well under per-qubit noise models calibrated from real devices.

While we already see that EBBI performs well, there are several things that might improve its performance even further. Pruning: The way the pruning step currently works is that once a CD is pruned it cannot be added back in at a later point; we have tried removing this restriction, but it resulted in significantly slower convergence. It would be interesting to explore the possibility of allowing a CD that has previously been pruned out to be re-added under certain conditions. Mutation: The mutation step currently picks random deformations uniformly from A\mathcal{A} on a subset of the qubits. This could potentially be made more efficient by using the cross-entropy method [45, 46] for this sampling, so that elements of A\mathcal{A} that have worked well in the past are more likely to be used in the future. In the case of the PyMatching decoder this would decrease the usage of the HZHH\sqrt{Z}H deformation that introduces correlated errors, which we expect would decrease the effective search space from 3n→2n3^n \rightarrow2^n depending on how quickly the HZHH\sqrt{Z}H deformation is ruled out.

Conclusion

In this work, we have introduced EBBI, a scalable optimization framework for identifying high-performing Clifford-deformed QEC codes under general physical noise models and decoders. We evaluated the framework using realistic circuit-level noise models suitable for a variety of qubit types and practical decoding based on the minimum weight perfect matching algorithm. With the surface code as an example case, EBBI identifies CDs overlooked so far where code boundaries are relevant even at large code distances. Looking ahead, our results establish a CD optimization as a practical tool for tailoring quantum error-correcting codes to hardware-specific noise characteristics that is broadly applicable to various stabilizer codes, decoders, and quantum computer architectures.

Acknowledgment

We would like to thank Birk Nøhr Dissing, Jakob Mannstadt, and Eoghan Ryan for helpful discussions during the development of EBBI and interpretation of the results.

This work was supported by the Novo Nordisk Foundation, Grant number NNF22SA0081175, NNF Quantum Computing Programme.

Data availability

The data and code that support the findings of this paper are openly available [38].

EBBI Pseudocode

Algorithm 1: EBBI

Figure 1b.

Noise model expansions

Description of the noise channels E\mathcal{E} used in Table I as a quantum channels following the definition from Ref. [34]. In the following ρ=∣ψ⟩⟨ψ∣\rho= \lvert\psi\rangle\langle\psi\rvert is the density matrix of the quantum state of the system ∣ψ⟩\lvert\psi\rangle and XX, YY and ZZ are the Pauli gates with II the identity.

OperationHBDHBD-SI1000
1Q gatesDEP1(p)\mathrm{DEP}_1(p)DEP1(p/10)\mathrm{DEP}_1(p/10)
CZCZBias2(p,η)\mathrm{Bias}_2(p,\eta)Bias2(p,η)\mathrm{Bias}_2(p,\eta)
InitZ\mathrm{Init}_ZX-error(p)\mathrm{X\text{-}error}(p)X-error(2p)\mathrm{X\text{-}error}(2p)
MeasZ\mathrm{Meas}_ZX-error(p)\mathrm{X\text{-}error}(p)X-error(5p)\mathrm{X\text{-}error}(5p)
Data idleBias1(p,η)\mathrm{Bias}_1(p,\eta)Bias1(2p,η)\mathrm{Bias}_1(2p,\eta)

Table I. Implementation of hybrid biased-depolarizing (HBD) [34] and the SI1000-like HBD (HBD-SI1000) as a function of the noise model strength p=pX+pY+pZp=p_X+p_Y+p_Z and phase-bias η=pZ/(pX+pY)\eta=p_Z/(p_X+p_Y). See Appendix § 1.3.3 for details.

EpDEP(ρ)=(1−p)ρ+p3(XρX+YρY+ZρZ)(2)\mathcal{E}^{\mathrm{DEP}}_{p}(\rho) = (1-p)\rho+ \frac{p}{3}(X\rho X + Y\rho Y + Z\rho Z) \tag*{(2)}
EpX(ρ)=(1−p)ρ+pXρX(3)\mathcal{E}^{X}_{p}(\rho) = (1-p)\rho+ pX\rho X \tag*{(3)}
Ep,ηBias1(ρ)=(1−p)ρ+p2(η+1)(XρX+YρY)+ηpη+1ZρZ(4)\mathcal{E}^{\mathrm{Bias1}}_{p,\eta}(\rho) = (1-p)\rho+ \frac{p}{2(\eta+1)}(X\rho X + Y\rho Y) + \frac{\eta p}{\eta+1}Z\rho Z \tag*{(4)}
Ep,ηBias2(ρ)=(1−p)ρ+ηp3(η+1)∑P∈{IZ,ZI,ZZ}PρP†+p12(η+1)∑P∈P2∖{II,IZ,ZI,ZZ}PρP†(5)\mathcal{E}^{\mathrm{Bias2}}_{p,\eta}(\rho) = (1-p)\rho+ \frac{\eta p}{3(\eta+1)}\sum_{P\in\{IZ,ZI,ZZ\}}P\rho P^\dagger+ \frac{p}{12(\eta+1)}\sum_{P\in\mathcal{P}_2\setminus\{II,IZ,ZI,ZZ\}}P\rho P^\dagger \tag*{(5)}

with P2={I,X,Y,Z}⊗2\mathcal{P}_2 = \{I,X,Y,Z\}^{\otimes2} the set of the 16 two-qubit Pauli strings.

Noiseless operations While most operations (initialization, gates, idling, and measurements) are noisy, there are a few places where we implement them perfectly. During the basis change from ∣00⋯0⟩\lvert00\cdots0\rangle to the Clifford-deformed logical XX or ZZ projection, we use noise-less single qubit gates. The same goes for the basis change right before logical readout. We do this to ensure that the noise model between the XX and ZZ memory experiment places the Pauli-errors at the exact same locations in the circuit under the same seed, independent of whether the logical XX and ZZ basis is used. This is what enables us to infer PLXP^{X}_{L}, PLYP^{Y}_{L}, PLZP^{Z}_{L}, instead of PLX+PLYP^{X}_{L}+P^{Y}_{L} and PLZ+PLYP^{Z}_{L}+P^{Y}_{L} for the XX and ZZ memory experiments respectively, that we would otherwise get when the error locations are not the same.

Circuit construction

Circuit construction can be viewed in three levels. (1) The circuit is constructed using all three two-qubit controlled gates (CX\mathrm{CX}, CY\mathrm{CY} and CZ\mathrm{CZ}) and check qubits are initialized and measured in the XX-basis. This is the most direct construction from the code schematics Figure 1a, Figure 4a left. (2) Measurement and initialization can be compiled to the ZZ-basis using HH gates and the CX\mathrm{CX} and CY\mathrm{CY} gates can be constructed with CX=(I⊗H)CZ(I⊗H)\mathrm{CX} = (I\otimes H)\mathrm{CZ}(I\otimes H) and CY=(I⊗HYZ)CZ(I⊗HYZ)\mathrm{CY} = (I\otimes H_{YZ})\mathrm{CZ}(I\otimes H_{YZ}) Figure 4a right. (3) Finally, the single-qubit gates HH and HYZH_{YZ}, along with their products HHYZHH_{YZ} and HYZHH_{YZ}H can be Euler decomposed into a ZZ–XX–ZZ rotation Figure 4b. The two ZZ rotations are usually handled in the control software without requiring any signals to be sent to the quantum chip, making them instantaneous and error free.

Figure 4. a) Circuit diagrams illustrating stabilizer measurements in the surface code under different deformations in A3A_3. Left: Measurement circuits expressed using the corresponding controlled-Pauli interactions. Right: Controlled-XX and controlled-YY operations are decomposed into a single controlled-ZZ gate together with basis changes on the data qubit. b) ZXZZXZ Euler decomposition up to a global phase of the basis-change gates used in panel a and their products. Virtual RZR_Z rotations (dashed boxes) are implemented in software and therefore introduce negligible latency and are thus treated as ideal in this work.

For this reason, the HH, HYZH_{YZ}, HHYZHH_{YZ}, and HYZHH_{YZ}H can all be viewed as a single π/2\pi/2 XX-rotation and be given the exact same single-qubit depolarization error channel.

Bias of CX and CY gates

This choice of compilation of CX and CY gates using single-qubit rotations and CZ gates leads to a bias on the CX and CY gates. Going from our noise model [Table I, Appendix § 1.3.2], the CZ gates primarily produce Z-errors on both target and control qubits under high bias η≫1\eta\gg1. The control qubit (check qubit in the case of QEC) remains unmodified, maintaining a dominant Z-error term, while the target qubits (data qubits) transform the Z-error into X-errors (Y-errors) after the application of HH (HYZH_{YZ}) gates for CX (CY) gate. If the single-qubit rotations have low error rates, which is the case under the HBD-SI1000 noise model, the target qubit (data qubit) will be heavily biased in the XX (YY) direction for the CX (CY) gate. However, under the HBD noise model where the noise strength of the single-qubit operations is the same as that of the two-qubit CZ gate, this effect is washed out due to the large depolarization channel.

Reducing the Clifford-deformation set in the circuit-level noise model regime

Here we give an informal argument for why it is sufficient to test A3\mathcal{A}_3 deformation set and not the full A6\mathcal{A}_6 deformation set under both the HBD and HBD-SI1000 noise models; confirmed empirically by comparing detector error models for the respective circuits.

The full CD set can be written in terms of the reduced set as A6=A3∪ZA3\mathcal{A}_6 = \mathcal{A}_3 \cup\sqrt{Z}\mathcal{A}_3 where equality holds up to Pauli factors that only flip stabilizer signs and therefore do not affect PLP_L. In the code-capacity and phenomenological noise models, this is immediate: Z\sqrt{Z} swaps the pXp_X and pYp_Y channels, so assuming pX=pYp_X = p_Y results in identical noise and thus identical PLP_L.

At the circuit level using HBD or HBD-SI1000 noise, a similar thing is going on. As for the data idling errors, the argument used in the code-capacity noise model carries over directly. The XX-errors on initialization and measurements remain unaffected by the CD as they commute with the CZ gates (after being turned into Z-errors by the HH gates on the check qubits) and result in a classical readout error, just like in the phenomenological noise model case.

As for the errors that occur during the stabilizer measurement: The Z\sqrt{Z} swaps CX and CY two-qubit gates, which after circuit compilation [Appendix § 1.3.3] leads to swapping the HH and HYZH_{YZ} single-qubit gates; leaving the gate count and ordering unchanged. Both the HBD and HBD-SI1000 noise models apply DEP errors on both of these gates, which from its pX=pY=pZp_X = p_Y = p_Z symmetry leaves the detector error model unchanged. The only non-uniform noise channel occurs after the CZ gate, which primarily produces Z errors that will change into X or Y after the HH or HYZH_{YZ} gates respectively, depending on whether a Z\sqrt{Z} deformation was applied. However, this has no net effect on the detector error model as the commutation relations with the other detectors in the code are unchanged (any stabilizer acting on the given data qubit is transformed the same way as the error, so whether they commute is unchanged). As a result, applying a Z\sqrt{Z} deformation on any data qubit in the code will have no net effect on the detector error model and thus not change PLP_L, independent of which decoder is used.

To confirm that this holds in practice, Stim detector error models have been compared. Two circuits are created; the first circuit uses a random uniformly drawn CD from A6\mathcal{A}_6 while the second circuit modifies the CD by applying Z\sqrt{Z} to a subset of the qubits at random. The detector error models from the two circuits are then compared using Stim's dem1.approx_equals(dem2, atol=1e-15). This was done on both the distance-3 and distance-5 surface codes, 1000 times each, under either HBD or HBD-SI1000 noise and in both the logical X and Z-basis. An exact match in the detector error models was observed for all cases used in this paper, confirming empirically the validity of using EBBI on the A3\mathcal{A}_3 set instead of the full A6\mathcal{A}_6 set.

As the number of distance-3 surface code A3\mathcal{A}_3-CDs is small, 39=19 6833^9 = 19\,683, an exhaustive search is a feasible option and can be used to verify the findings from EBBI. Figure 5 and Figure 6 show the results of an exhaustive search using PyMatching over the HBD and HBD-SI1000 noise models, respectively, with p=0.1%p = 0.1\% and η=500\eta= 500, matching the conditions that EBBI and random search were benchmarked against in Figure 2. The CDs run along the X-axis and have been sorted by their PLP_L; the four named CDs: CSS, XZZX, XY and B-XZZX, have also been highlighted. These plots clearly show that a sharp improvement in the CD’s PLP_L only happens in the top fraction of the space, matching the code-capacity results from Figure 2a in Ref. [23].

Figure 5. Rank-plot of the PLP_L of the 393^9 distance-3 surface code A3A_3-CDs under HBD(p=0.1%,η=500)(p = 0.1\%, \eta= 500) noise.

Impact from scaling physical error rates

In the main text we make the claim that scaling the physical error rate pp only has a small effect on the CD ordering and is thus a practical way of reducing shot counts for both EBBI and random search. Here we do an exhaustive search using PyMatching over both the HBD and HBD-SI1000 noise models, with η=500\eta= 500 and p∈{0.1%,0.25%,0.5%}p \in\{0.1\%, 0.25\%, 0.5\% \}, matching the settings used in Figure 2. Figure 7 and Figure 8 show the correlation under HBD and HBD-SI1000 noise respectively, between the base p=0.1%p = 0.1\% and the elevated p=0.25%p = 0.25\% and p=0.5%p = 0.5\%, over both all 393^9 A3A_3-CD set, and over the top 100 CDs (the 100 CDs with the lowest PLP_L under p=0.1%p = 0.1\%). We see that the correlation holds very strongly for the HBD noise model, and decreases slightly for the HBD-SI1000 noise model.

Figure 7. Pearson correlation of the CD PLP_L as the HBD noise model error strength pp is increased from p=0.1%p = 0.1\% to p=0.25%p = 0.25\% (left plot) and p=0.5%p = 0.5\% (right plot). Correlation numbers are reported for both the entire CD space and for only the 100 CDs with the lowest PLP_L (at p=0.1%p = 0.1\%) shown in the insets. Each PLP_L was estimated using 10810^8 shots.

Figure 8. Same as Figure 7 but using the HBD-SI1000 noise model instead.

Correlation

Lastly, we use the exhaustive search results for PyMatching under p=0.1%p = 0.1\% and η=500\eta= 500 for both noise models to check the correlation in the CD’s PLP_L between two CDs that only differ in deformation on only a single qubit. We call a CD that differs from a different CD on only a single qubit a neighbor and denote its PLP_L as PLnbrP_L^{\mathrm{nbr}}. In the distance-3 surface code A3A_3-CD case with 3 possible deformations per qubit, each qubit can be changed to two other deformations and we have 9 data qubits, thus giving each CD 18 neighbors. The results are shown in Figure 9.

Figure 9. Correlation plots between PLP_L and PLnbrP_L^{\mathrm{nbr}} between two CDs that differ on only a single qubit on the distance-3 surface code. Left: using the HBD noise model, Right: using the HBD-SI1000 noise model, both with p=0.1%p = 0.1\% and η=500\eta= 500.

Random Search

Random search chooses uniformly random CDs of the QEC code and samples each a fixed number of times to estimate their PLP_L. Random search keeps track of only the CD with the lowest estimated PLP_L. It is initialized with a fixed shot budget BB along with how many shots SCDS_{\mathrm{CD}} to spend per CD, meaning it will sample B/SCDB/S_{\mathrm{CD}} random CDs.

This method does not scale well with codes of increasing size due to two factors: (1) the number of possible CDs grows exponentially as ∣A∣n|\mathcal{A}|^n in the number of data qubits nn so the number of tested CDs will have to also grow exponentially to keep up; (2) as the code distance dd increases, PLP_L decreases, increasing the number of required shots per CD as O(1/PL)O(1/P_L). It could be argued that we only care about the top qq percentile and thus only need O(q−1)O\left(q^{-1}\right) samples; however, for the distance-3 surface code under circuit-level noise we see that there is a sharp drop in PLP_L close to the qq percentile [Figure 5,Figure 6]. This is similar to what was seen in Figure 2a in Fig. 2a in [23] for the code-capacity case. The second point could be mitigated by artificially increasing the physical qubit error rate to near threshold, which was observed to help but not solve the problem entirely [Figure 2].

Algorithm 2: Random Search

General Inputs: QEC code C\mathcal{C}; QEC Decoder D\mathcal{D}; noise model N\mathcal{N}; shot budget BB

Method Inputs: Shots per CD SCDS_{\mathrm{CD}}

P_L^* ← 1;                         /* best seen P_L */
used_cd ← ∅;
for i ← 1 to ⌊B/S_CD⌋ do
    for j ← 1 to 100 do
        CD ← RandomCliffordDeformation(C);
        if CD ∉ used_cd then
            used_cd ← used_cd ∪ {CD};
            break;
    if j = 100 then
        return CD_best;
    P_L ← EstimateLER(CD, D, N, S_CD);
    if P_L < P_L^* then
        P_L^* ← P_L;
        CD_best ← CD;
return CD_best;

EBBI and random search run spread

Figure 2 showed the median PLP_L over 25 runs for each of the 24 settings: two code distances, two noise models, two methods, and three psearchp_{\mathrm{search}} values. In Figure 11, these settings are split into 12 plots instead of the 4 used in Figure 2, one for each combination of code distance, noise model and psearchp_{\mathrm{search}}. This allows us to show both the full spread in PLP_L over all 25 runs and the spread over the central 15 runs (20th to 80th percentile). Additionally, Table IV shows, for each setting, how many runs ended at the optimal CD (or what we believe is the optimal CD in the distance-5 case), how many runs found the optimal CD at some point but did not end with it as their final output, and how many runs never found the optimal CD.

psearchp_{\mathrm{search}}d=3d=3 surface coded=5d=5 surface code
HBD (XZZX)HBD-SI1000 (B-XZZX)HBD (XZZX)HBD-SI1000 (B-XZZX)
EBBI0.1%25/0/025/0/023/2/016/2/7
0.25%25/0/024/0/122/2/16/6/13
0.5%25/0/025/0/025/0/00/2/23
Random search0.1%19/0/615/3/70/0/250/0/25
0.25%21/0/49/4/120/0/250/0/25
0.5%20/0/59/4/120/0/250/0/25

Table IV. Result of each of the 25 runs per setting in the form a/b/c. a: Runs that ended at the optimal CD (XZZX for HBD and B-XZZX for HBD-SI1000). b: Runs that at some point found the optimal CD but then pruned it. c: Runs that never found the optimal CD at any point.

Figure 11. Same results as shown in Figure 2, but with each plot split into a row of 3 plots, allowing for additional per-run details. Lightly shaded region shows the full spread over all 25 runs. Heavily shaded hashed region shows the spread of the central 15 runs (20th to 80th percentile).

The spread confirms that the medians in Figure 2 are representative of the individual runs. For the distance-3 surface code under both noise models, and for the distance-5 surface code under HBD noise, nearly all EBBI runs end at or near the optimal CD, and the EBBI spread is narrow compared to that of random search. The exception is the distance-5 surface code under HBD-SI1000 noise, where the number of EBBI runs ending at B-XZZX drops from 16 to 0 as psearchp_{\mathrm{search}} increases from 0.1% to 0.5%, with most of the remaining runs never sampling B-XZZX.

Optimal CD depends on decoder

To test to which degree the choice of decoder impacts which CD is optimal, we compare PyMatching decoding against BP-OSD decoding on the A3A_3-CDs. An exhaustive search over all A3A_3-CDs using either PyMatching or BP-OSD for both the HBD and HBD-SI1000 noise models, at p=0.1%p=0.1\% and η=500\eta=500, is performed. In the HBD case, we see that the ordering remains somewhat similar, with a Pearson correlation of ρ=0.88\rho=0.88, but that the optimal CD has changed to a different one [Figure 10 left].

In the HBD-SI1000 case, the difference in ordering becomes much stronger with the Pearson correlation dropping down to ρ=0.30\rho=0.30, making the two CD orderings almost independent of each other [Figure 10 right]. This highlights the importance of the role the decoder plays in determining optimal or close to optimal CDs.

In addition to the PyMatching and BP-OSD decoders, we also test the BeliefMatching, Tesseract and CudaQ-TN decoders on the four named CDs in this paper, CSS, XZZX, XY, and B-XZZX. Figure 12 shows the results of these tests, with the exact numbers reported in Table V. This data shows that especially the XY CD’s PLP_L can

be significantly reduced by switching to a better decoder while the other CDs see smaller improvements. The runtime for each decoder is listed in Table VI. The four CPU decoders, PyMatching, BeliefMatching, BP-OSD and Tesseract, only ran on a single CPU core, which gives plenty of opportunity for parallelization in the future, which would allow EBBI and random search to either use better decoders or run on larger QEC codes. The CudaQ-TN decoder on the other hand uses a full GPU and will thus be much harder to speed up.

References

  1. [1]P. W. Shor, Scheme for reducing decoherence in quantum computer memory, Physical Review A 52, R2493 (1995).pubmed.ncbi.nlm.nih.gov/9912632
  2. [2]P. W. Shor, Fault-tolerant quantum computation, in Proceedings of the 37th Annual Symposium on Foundations of Computer Science (1996) pp. 56–65.arxiv.org/abs/quant-ph/9605011
  3. [3]D. Gottesman, Surviving as a quantum computer in a classical world, Lecture notes, University of Maryland (2026).
  4. [4]P. Webster, L. Berent, O. Chandra, E. T. Hockings, N. Baspin, F. Thomsen, S. C. Mith, and L. Z. Cohen, The Pinnacle Architecture: reducing the cost of breaking RSA-2048 to 100 000 physical qubits using quantum LDPC codes (2026), arXiv:2602.11457 [quant-ph].arxiv.org/abs/2602.11457
  5. [5]M. Cain, Q. Xu, R. King, L. R. B. Picard, H. Levine, M. Endres, J. Preskill, H.-Y. Huang, and D. Bluvstein, Shor’s algorithm is possible with as few as 10,000 reconfigurable atomic qubits (2026), arXiv:2603.28627 [quant-ph].arxiv.org/abs/2603.28627
  6. [6]R. Babbush, A. Zalcman, C. Gidney, M. Broughton, T. Khattar, H. Neven, T. Bergamaschi, J. Drake, and D. Boneh, Securing elliptic curve cryptocurrencies against quantum vulnerabilities: resource estimates and mitigations, PRX Quantum 7, 031001 (2026), arXiv:2603.28846 [quant-ph].arxiv.org/abs/2603.28846
  7. [7]S. B. Bravyi and A. Y. Kitaev, Quantum codes on a lattice with boundary (1998), arXiv:quant-ph/9811052 [quant-ph].DOI
  8. [8]E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Topological quantum memory, Journal of Mathematical Physics 43, 4452 (2002).DOI
  9. [9]A. G. Fowler, M. Mariantoni, J. M. Martinis, and A. N. Cleland, Surface codes: towards practical large-scale quantum computation, Physical Review A 86, 032324 (2012).DOI
  10. [10]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 605, 669 (2022).DOI
  11. [11]R. Acharya et al., Suppressing quantum errors by scaling a surface code logical qubit, Nature 614, 676 (2023).DOI
  12. [12]R. Acharya et al., Quantum error correction below the surface code threshold, Nature 638, 920 (2025).DOI
  13. [13]N. P. Breuckmann and J. N. Eberhardt, Quantum low-density parity-check codes, PRX Quantum 2, 040101 (2021).DOI
  14. [14]S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall, and T. J. Yoder, High-threshold and low-overhead fault-tolerant quantum memory, Nature 627, 778 (2024).DOI
  15. [15]Z. Liang, K. Liu, H. Song, and Y.-A. Chen, Generalized toric codes on twisted tori for quantum error correction, PRX Quantum 6, 020357 (2025).DOI
  16. [16]T. J. Yoder, E. Schoute, P. Rall, E. Pritchett, J. M. Gambetta, A. W. Cross, M. Carroll, and M. E. Beverland, Tour de gross: a modular quantum computer based on bivariate bicycle codes (2025), arXiv:2506.03094 [quant-ph].arxiv.org/abs/2506.03094
  17. [17]B. Gu, T. Noszko, V. Steffan, J. N. Eberhardt, J. Roffe, J. Eisert, and S. Koutsoumpas, Nearest-neighbour gates are all you need: high-rate quantum low-density parity-check codes on a planar grid (2026), arXiv:2606.19482 [quant-ph].arxiv.org/abs/2606.19482
  18. [18]G. M. Nixon, C. K. McLauchlan, and C. C. L. van Rest, Vine codes: low-overhead quantum LDPC codes on a planar square grid (2026), arXiv:2606.20263 [quant-ph].arxiv.org/abs/2606.20263
  19. [19]D. Gottesman, Stabilizer codes and quantum error correction, Ph.D. thesis, California Institute of Technology, Pasadena, CA (1997), arXiv:quant-ph/9705052 [quant-ph].DOI
  20. [20]P. Aliferis and J. Preskill, Fault-tolerant quantum computation against biased noise, Physical Review A 78, 052331 (2008).DOI
  21. [21]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, Physical Review X 9, 041031 (2019).DOI
  22. [22]J. P. Bonilla Ataides, D. K. Tuckett, S. D. Bartlett, S. T. Flammia, and B. J. Brown, The XZZX surface code, Nature Communications 12, 2172 (2021).
  23. [23]A. Dua, A. Kubica, L. Jiang, S. T. Flammia, and M. J. Gullans, Clifford-deformed surface codes, PRX Quantum 5, 010347 (2024).DOI
  24. [24]J. Roffe, L. Z. Cohen, A. O. Quintavalle, D. Chandra, and E. T. Campbell, Bias-tailored quantum LDPC codes, Quantum 7, 1005 (2023).DOI
  25. [25]R. Lescanne, M. Villiers, T. Peronnin, A. Sarlette, M. Delbecq, B. Huard, T. Kontos, M. Mirrahimi, and Z. Leghtas, Experimental suppression of bit-flips in a qubit encoded in an oscillator, Nature Physics 16, 509 (2020).DOI
  26. [26]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).DOI
  27. [27]B. Hetényi and J. R. Wootton, Tailoring quantum error correction to spin qubits, Physical Review A 109, 032433 (2024).
  28. [28]D. B. Higginbottom, A. T. K. Kurkjian, C. Chartrand, M. Kazemi, N. A. Brunelle, E. R. MacQuarrie, J. R. Klein, N. R. Lee-Hone, J. Stacho, M. Ruether, et al., Optical observation of single spins in silicon, Nature 607, 266 (2022).
  29. [29]K. Sahay, J. Jin, J. Claes, J. D. Thompson, and S. Puri, High-threshold codes for neutral-atom qubits with biased erasure errors, Physical Review X 13, 041013 (2023).DOI
  30. [30]Y. Seis, B. J. Brown, A. S. Sørensen, and J. F. Goodwin, Improving trapped-ion-qubit memories via code-mediated error-channel balancing, Physical Review A 107, 052417 (2023).DOI
  31. [31]K. Tiurev, P.-J. H. Derks, J. Roffe, J. Eisert, and J.-M. Reiner, Correcting non-independent and non-identically distributed errors with surface codes, Quantum 7, 1123 (2023).
  32. [32]W. J. Yun, A. Nemec, and J. M. Baker, Computationally efficient optimization of per-qubit Clifford deformation for non-uniform biased noise (2026), arXiv:2608.17870 [quant-ph].arxiv.org/abs/2608.17870
  33. [33]O. Higgott, T. C. Bohdanowicz, A. Kubica, S. T. Flammia, and E. T. Campbell, Improved decoding of circuit noise and fragile boundaries of tailored surface codes, Physical Review X 13, 031007 (2023).DOI
  34. [34]J. Etxezarreta Martinez, P. Schnabl, J. Oliva del Moral, R. Dastbasteh, P. M. Crespo, and R. M. Otxoa, Leveraging biased noise for more efficient quantum error correction at the circuit-level with two-level qubits, Physical Review Applied 25, 014021 (2026).
  35. [35]O. Higgott and C. Gidney, Sparse Blossom: correcting a million errors per core second with minimum-weight matching, Quantum 9, 1600 (2025).DOI
  36. [36]J.-Y. Audibert and S. Bubeck, Best arm identification in multi-armed bandits, in COLT-23th Conference on learning theory-2010 (2010) pp. 13–p.
  37. [37]W. R. Thompson, On the likelihood that one unknown probability exceeds another in view of the evidence of two samples, Biometrika 25, 285 (1933).DOI
  38. [38]J. R. Bønnelkye, B. Joecker, P. Krogstrup, V. P. Michal, and M. K. Svendsen, EBBI: Code for decoder- and noise-aware optimization of clifford-deformed quantum error-correcting codes (2026).
  39. [39]C. Gidney, Stim: a fast stabilizer circuit simulator, Quantum 5, 497 (2021), arXiv:2103.02202 [quant-ph].DOI
  40. [40]C. Gidney, M. Newman, A. Fowler, and M. Broughton, A fault-tolerant honeycomb memory, Quantum 5, 605 (2021).DOI
  41. [41]J. Roffe, D. R. White, S. Burton, and E. Campbell, Decoding across the quantum low-density parity-check code landscape, Physical Review Research 2, 043423 (2020).DOI
  42. [42]L. Aghababaie Beni, O. Higgott, and N. Shutty, Tesseract: a search-based decoder for quantum error correction (2025), arXiv:2503.10988 [quant-ph].arxiv.org/abs/2503.10988
  43. [43]The CUDA-Q development team, CUDA-Q (2025).
  44. [44]NVIDIA Corporation, CUDA-QX Development Team, CUDA-QX (2025), cudaq-cqe tensor network decoder.
  45. [45]R. Rubinstein, The cross-entropy method for combinatorial and continuous optimization, Methodology and computing in applied probability 1, 127 (1999).DOI
  46. [46]P.-T. De Boer, D. P. Kroese, S. Mannor, and R. Y. Rubinstein, A tutorial on the cross-entropy method, Annals of operations research 134, 19 (2005).DOI

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Pick where to look, or just type