Clifford-deformed Surface Codes

Various realizations of Kitaev's surface code perform surprisingly well for biased Pauli noise. Attracted by these potential gains, we study the performance of Clifford-deformed surface codes (CDSCs) obtained from the surface code by applying single-qubit Clifford operators. We first analyze CDSCs on the $3\times 3$ square lattice and find that, depending on the noise bias, their logical error rates can differ by orders of magnitude. To explain the observed behavior, we introduce the effective distance $d'$, which reduces to the standard distance for unbiased noise. To study CDSC performance in the thermodynamic limit, we focus on random CDSCs. Using the statistical mechanical mapping for quantum codes, we uncover a phase diagram that describes random CDSC families with $50\%$ threshold at infinite bias. In the high-threshold region, we further demonstrate that typical code realizations outperform the thresholds and subthreshold logical error rates, at finite bias, of the best-known translationally invariant codes. We demonstrate the practical relevance of these random CDSC families by constructing a translation-invariant CDSC belonging to a high-performance random CDSC family. We also show that our translation-invariant CDSC outperforms well-known translation-invariant CDSCs such as the XZZX and XY codes.


I. INTRODUCTION
Optimization of quantum error-correcting (QEC) codes for realistic noise models is one of the essential steps towards reducing overhead in fault-tolerant quantum computing.Among QEC codes, Kitaev's surface code [1][2][3] and a multitude of its variants [4][5][6][7][8] are perhaps the most experimentally feasible as they can be implemented in two-dimensional architectures with only nearest-neighbor interactions and offer reasonably high circuit noise thresholds.Realistic noise, however, is likely to exhibit bias toward one type of error.For example, biased noise can be found or engineered in the architectures based on superconducting qubits [9], trapped ions [10] and spin qubits [11,12].Furthermore, noise bias can be preserved through careful engineering of fault-tolerant protocols or quantum gates [13][14][15].
Bias in realistic noise can be beneficial from the perspective of QEC.Two prominent examples are the XY and XZZX surface codes [6,8].While both are Cliffordequivalent to the CSS surface code, they both significantly outperform the latter in terms of the threshold and subthreshold scaling of the logical error rate for noise biased towards Pauli Z errors [6-8, 16, 17].
Inspired by these significant improvements, we provide a thorough study of the performance of surface codes against biased noise.For concreteness, we focus on L × L square lattices, where L is odd, with open boundary conditions; see Fig. 1.We consider stabilizer codes that are obtained from the surface code by the application of single-qubit Clifford operators.We collectively refer to such codes as Clifford-deformed surface codes (CDSCs).
We assume that every qubit is affected by independent FIG. 1.A Clifford-deformed surface code on the 5 × 5 square lattice with open boundary conditions.Qubits are on vertices and, in the absence of Clifford deformations, X and Z stabilizer generators are associated with gray and white faces, respectively.To modify the stabilizer group, we apply single-qubit Clifford operations H and H √ ZH to blue and red qubits, respectively.We depict two stabilizer generators.and identically distributed (IID) biased Pauli noise with physical error rate p = p X + p Y + p Z and bias η ≥ 0.5, where p X = p Y = p Z /(2η) are the Pauli error rates.Then, for a given error rate and bias, we seek CDSCs with optimal performance in terms of either the logical error rate or the code-capacity threshold.
For infinite bias, we explore the threshold phase diagram for random CDSCs and conjecture the existence of a connected region, where the corresponding codes have a threshold of 50%.For a moderate noise bias η ∼ 100, we numerically find that typical random CDSCs in the high-threshold region can outperform the thresholds and subthreshold logical error rates of the best known translationally invariant codes, such as the XY and XZZX surface codes.We use the statistical-mechanical description of error correction thresholds [3,18] to opti-mize the QEC performance while also uncovering novel types of correlated percolation problems [19][20][21] and phase transitions in disordered realizations of the 8vertex model [22,23].More generally, one can consider time-dependent constant-depth Clifford circuits to improve the QEC performance which shares similarities with other dynamically-generated QEC codes [24][25][26][27] arising in the context of random circuits, measurementinduced phase transitions, and Floquet dynamics.

II. CLIFFORD DEFORMATIONS
Given any stabilizer code [28], we can modify its stabilizer group by applying arbitrary single-qubit Clifford operators or other low-depth circuits [29].Although the resulting code is topologically equivalent to the original code, the QEC performance can be improved, especially for biased Pauli noise.This is exemplified by the XZZX surface code [8] that is obtained from the CSS surface code by applying the Hadamard gate H to every other qubit.
We are interested in the QEC performance of the CDSCs against Pauli noise biased towards Pauli Z errors.Since we assume a symmetry between Pauli X and Y errors, i.e., p X = p Y , it is sufficient to consider Clifford deformations whose action (by conjugation) on the single-qubit Pauli operators is either trivial, or X ↔ Z, or Y ↔ Z.Such Clifford deformations are tensor products of the identity operator I, H, and

Small CDSCs and effective distances
We now study a small surface code and demonstrate that there is a wide range of possible Clifford deformations and associated code performances.For the representative values of the physical error rate p = 10 −2 and bias η = 500 we compare the performance (measured in terms of the logical error rate) of CDSCs on the 3 × 3 square lattice; Fig. 2(a).There are 3 9 = 19683 CDSCs to consider [30].Also, for a selection of codes we study their performance as a function of bias η for fixed error rate p = 10 −2 ; Fig. 2(b).For the depolarizing noise, that is a special case of Pauli biased noise with η = 0.5, all the CDSCs have the same performance, whereas in the regime of the large noise bias, i.e., η ≳ 10 6 , the XY surface code provides a clear advantage over other CDSCs, including the CSS and XZZX surface codes.To find the logical error rate we use the maximum-likelihood decoder.
Although all CDSCs on the 3×3 square lattice have distance three, their logical error rates can be vastly different.Moreover, the relative performance of codes changes with the noise bias; see Fig.  error rate p and bias η as follows Here N = log pη(1 + η) −1 (1 − p) −1 is a normalization factor, n is the number of qubits, p log and p cor are the probabilities of the most likely Pauli operator that, respectively, implements a non-trivial logical operator and is non-correctable.By definition, t ′ ≥ d ′ /2.Also, for the depolarizing noise, we have The quantities d ′ and t ′ , roughly speaking, capture log probabilities of the most likely non-trivial logical operator and non-correctable error, respectively.Since d ′ and t ′ depend on the noise bias η, they constitute a better proxy to the logical error rate than standard code distance d.Note that this proxy is valid whenever p is low and one can ignore entropic factors.Knowing d ′ and t ′ allows us to predict which CDSCs on the 3×3 square lattice perform best for given p and η; see Fig. 2(b).Note that we use d ′ and t ′ as alternative measures of code performance for our analysis of small codes.However, they are not efficiently calculable for large system sizes that we consider in the next section.

III. RANDOM CDSCS
We now consider the Clifford-deformed surface codes in the thermodynamic limit.In the thermodynamic limit, it is inefficient to study all possible Clifford deformations, even when the deformations are limited to single-qubit operations I, H and H Y Z .Instead, we construct random realizations of the CDSC by selecting, independently for every qubit, I, H, or H Y Z with probabilities 1 − Π XZ − Π Y Z , Π XZ , and Π Y Z , respectively.As discussed in Sec.II, we consider symmetric Z bias (p X = p Y ) and in this case, it is sufficient to consider these single-qubit Clifford operations to find inequivalent code performances of CDSCs.Given Π XZ and Π Y Z , we refer to the resulting family of CDSCs as the (Π XZ , Π Y Z ) random CDSC.Our goal is to understand the performance of a typical realization of the (Π XZ , Π Y Z ) random CDSC [31].
To perform a systematic study of CDSC performance in the thermodynamic limit, we now explore the phase space (Π XZ , Π Y Z ) of all random CDSCs, where, by definition, Π XZ , Π Y Z ≥ 0 and Π XZ +Π Y Z ≤ 1; see Fig. 3(a).The (0, 0) and (0, 1) random CDSCs correspond to the CSS and XY surface codes, respectively.Due to the code and noise symmetries, the (Π XZ , 0) and (1−Π XZ , 0) random CDSCs are equivalent.We choose the (0, 0) random CDSC to be the reference code to which we apply Clifford deformations.Note that the XZZX code is a realization of the (0.5, 0) random CDSC.

A. Infinite bias phase diagram for random CDSCs
To evaluate the performance of random CDSCs, we first study their behavior at infinite bias.In particular, using the principles of statistical mechanics, we conjecture the existence of a region in the (Π XZ , Π Y Z ) phase space where the corresponding random CDSCs have a 50% threshold; see Fig. 3(a).We support this conjecture via tensor network simulations for random CDSCs by applying a straightforward adaptation of the tensor network decoder by Bravyi et al. [32], which efficiently approximates the maximum likelihood decoder [33].
To understand the (Π XZ , Π Y Z ) phase space, we invoke the connection between thresholds of QEC codes and phase transitions in statistical-mechanical classical spin models [3,18,[34][35][36][37][38].The key idea behind this statistical-mechanical mapping is that a certain partition function of the disordered statistical-mechanical model gives the probability of a logical class of errors.Due to this, the mapping relates the optimal error-correction threshold of CDSCs to a critical point along the Nishimori line [39], which is a symmetric submanifold in the parameter space, for a two-dimensional random-bond Ising model (RBIM) [40].For the CSS surface code, which corresponds to the point (0, 0), this RBIM is given by the 8-vertex model [22,23] whose disordered Hamiltonian (neglecting boundary terms), contains the following  Typical realizations of random CDSCs in the blue region of the (ΠXZ , ΠY Z ) phase space have a 50% threshold.The black and orange boundaries enclose regions where the s X and s Z sublattices order; in the region enclosed by purple boundaries we expect the system to order due to the JY constraints.
(b) Random-bond Ising model associated with a CDSC; the Hamiltonian is obtained by applying the deformations that define the CDSC to the Hamiltonian in Eq. ( 3).We highlight the clusters (c = 0, 1, 2) used in the approximate analytical method to estimate thresholds for the XY code [33].Spins circled in green are summed over while others are fixed.
two-and four-body terms, i.e., where s X * , s Z * = ±1 are Ising spins associated with every X and Z stabilizer generator of the surface code, and the summation is over locations of qubits, i.e., all and crossings; see Fig. 3(b).E is a Pauli error for the CSS code that determines the quenched disorder τ P = ±1 via EP = τ P P E for every single-qubit Pauli P = X, Y, Z.Moreover, J P = 1 4β log p X p Y p Z , where β is the inverse temperature, is the coupling strength along the Nishimori line.For the CDSC, depending on the deformation H or H Y Z , the relevant Hamiltonian is obtained from Eq. ( 3) by permuting the corresponding coupling constants τ Since for η = ∞ there are only Pauli Z errors, the disorder for the coupling constant J Z in Eq. ( 3) is fixed, i.e., τ Z = 1 and J Z = ∞.Thus, the product of any spins that are coupled by J Z has to be 1.Moreover, since p X = p Y = 0, J X = J Y .The constraints are specified, according to the Clifford deformation, as follows, which we call J Z , J X and J Y constraints, respectively.Note that, in the statistical-mechanical mapping, the stabilizers that are violated due to a Z error on a qubit correspond to the spins involved in the constraint associated with that qubit.We first focus on the point (0.5, 0), which is an extreme point of the 50% threshold region.To understand it, we start from the (0, 0) point and move toward (0.5, 0) along the Π XZ axis by applying H deformations.Since H permutes the coupling constants τ X J X ↔ τ Z J Z , we get a correlated bond percolation problem for the J X and J Z constraints on the s Z and s X sublattices, respectively.To explain this concretely, we first state the regular bond percolation problem on the square lattice.Each bond on the square lattice is assigned a probability of occupancy.If this probability of occupying a bond is less than the critical value of 0.5, the probability of finding a macroscopic connected cluster of occupied bonds is zero in the thermodynamic limit of infinite system size.In our case, we have two square sublattices that are dual to each other (see Fig. 3(b)) and we are interested in the probability of a macroscopic connected cluster of occupied bonds on both of these square sublattices.The Hadamard H gate turns an occupied bond/constraint on one lattice to an occupied bond/constraint on the dual lattice associated with the same qubit.Hence, the bond percolation problem on the two dual square sublattices is correlated.
For Π XZ < 0.5, i.e., below the critical point for the bond percolation problem, the J X constraints do not percolate.However for Π XZ = 0.5, both the J Z and J X constraints exhibit critical fluctuations.This is indicative of a second-order phase transition.Generally speaking, as we approach a second-order phase transition, the correlations transition from exponential to power-law decays and right at the critical point, we get scale-invariant fluctuations extending over the full system.For our case, these critical fluctuations manifest in the probability of finding a connected cluster of weight A of J X and J Z constraints on the s Z and s X sublattices, respectively.This probability scales as O(1/A τ ), where τ = 187/91 is the Fisher exponent, while the weight of the largest cluster in the system scales as L a for a = 2/(τ − 1) [19].There is also an important relation between the perimeter of the critical clusters P and their area A ≈ P 4a/7 [41].
We present a heuristic argument that these critical clusters of constraints (that correspond to infinite strength couplings) are sufficient to order the entire system.Assume we are in the ordered phase and take a droplet, i.e., a simply connected region of perimeter ℓ and area A ℓ ≥ ℓ.Fixing ϵ ∈ (0, 0.75), the probability Π ℓ that this droplet has an overlap with at least one critical cluster of perimeter P ≥ O(ℓ 1+ϵ ) scales as Π ℓ ≈ A ℓ /ℓ (1+ϵ)4a(τ −2)/7 ≥ O(ℓ 1−(1+ϵ)5/84 ).Thus, Π ℓ converges to one with increasing ℓ.Due to the spin constraints, reversing the spins in such a droplet also requires flipping all the spins in the overlapping critical clusters, thereby, leading to an energetic cost, β∆H E ≥ O(ℓ 1+ϵ ) for typical disorder realizations along the Nishimori line; since this is a 2D RBIM, the energy cost scales with the perimeter and for the overlapping clusters, it is dominated by their combined perimeter instead of the droplet perimeter ℓ.Applying Peierls' argument [42], the energetic cost of flipping the spins in these droplets will typically dominate the entropic contributions to the free energy arising from the number of droplets N ℓ < 4 ℓ with perimeter ℓ.As a result, at any finite tempera-ture, droplets with large perimeters will be prevented from fluctuating (flipping the spins), because of the critical clusters of spin constraints.Thus, the ordered phase along the Nishimori line is stable against the proliferation of macroscopic droplets of area O(L 2 ) for any finite temperature as L → ∞.Based on these arguments, we conjecture that typical (0.5, 0) code realizations remain ordered at any finite temperature along the Nishimori line, which implies that the (0.5, 0) random CDSC threshold is 50%.Numerical simulations confirm our predictions [33].
We note that connected clusters of constraints that span the lattice imply the existence of a logical operator made of Pauli Z's supported on the same qubits as the cluster constraints.In other words, the connected critical clusters identify non-local operators that commute with all local stabilizer terms.In particular, the critical percolation clusters on one of the two (dual) sublattices corresponds to the Z-logical operator.In two dimensions, numerical estimates of the typical length of the minimum spanning path indicate the scaling O(L 1.1 ) [19].This implies that the Z distance (defined as the weight of the minimum-weight logical operator comprising Pauli Z's) for the (0.5, 0) CDSC scales as O(L 1.1 ).
To explain the region Π Y Z ≥ 0.5, we recall that the (0, 1) CDSC is the XY code which has a 50% threshold [7] and its associated RBIM has J Y constraints on all qubit locations.Thus, for the XY code, the free energy cost of insertion of a disorder domain wall corresponding to a logical operator comprising Pauli Z's in the RBIM diverges with L for any finite temperature.The XY code is the limiting case of Π Y Z = 1 in which the cluster of J Y constraints spans the entire lattice.More generally, we expect that a macroscopic cluster of J Y constraints is sufficient to order the entire system.Again, using the result of square lattice bond percolation having a critical point of 0.5, we expect macroscopic clusters of J Y constraints to occur for Π Y Z ≥ 0.5.Furthermore, we argue that the macroscopic connected cluster of J Y constraints in the phase space region defined by Π Y Z ≥ 0.5 is sufficient to order the system.
In the region defined by boundaries Π XZ + Π Y Z > 0.5 and Π XZ , Π Y Z < 0.5, we cannot focus on the J Y constraints or J X /J Z constraints alone.In fact, in this region, the J Y constraints combine with the J X and J Z constraints to form a macroscopic cluster of constraints on the s Z and s X sublattices, respectively.We conjecture that such a "mixed" cluster can also stabilize the ordered phase i.e., ordering via these mixed macroscopic clusters could explain the interior of the phase diagram.An ordering arising from such a mixed cluster has not been studied in the field of percolation theory and arises especially for our problem of CDSCs under biased noise.We leave detailed investigations of this phenomenon to future work.

B. Finite-bias performance of random CDSCs
Moving away from infinite bias, we want to find (Π XZ , Π Y Z ) random CDSCs that perform best for a given error rate p and bias η.As a proxy to the logical error rate, we use the effective distance d ′ and half-distance t ′ .For instance, for the XY surface code d ′ (L) = L − N −1 log(2η) in the regime of low p and moderate η [43].Since we do not know efficient methods of calculating d ′ and t ′ for an arbitrary CDSC, we consider small linear system sizes L and study the effective distance increment ∆d ′ (L) = d ′ (L + 2) − d ′ (L) to evaluate code performance.We expect ∆d ′ (L) to be indicative of random CDSCs with good sub-threshold scaling; see Fig. 4(a).
Using tensor network simulations, we find that the (0.25, 0.5) random CDSC, which is one of the best performing code families according to ∆d ′ (3), outperforms the XY and XZZX surface codes in terms of subthreshold scaling of the logical error rate; see Fig. 4(b) and Supplemental Material [33].Moreover, its threshold exceeds the hashing bound and the thresholds of the XZZX and XY codes at a moderate bias of η = 100; see Fig. 4(c).FIG. 5. A translation-invariant CDSC belonging to the (2/9,4/9) CDSC family.The unit cell of the deformation is highlighted using a square patch.Within the unit cell, the number of Hs applied (qubits highlighted in blue) is half the number of H √ ZH's (qubits highlighted in red).
We remark that the statistical-mechanical mapping for the XY surface code without disorder is self-dual whenever p X = p Y .Hence, one can use the cluster methods [44,45] with the clusters in Fig. 3(b) to estimate thresholds at any noise bias η.We describe the method in Supplemental Material [30] and show the results for two biases in Fig. 4(c).Extending these methods to the non-self-dual regimes at a finite bias (which would apply to other CDSCs) remains an outstanding challenge.

IV. TRANSLATION-INVARIANT CODES FROM RANDOM CDSC FAMILIES
Random CDSC families, investigated in the previous section provide guidance on designing high-performance translation-invariant CDSC.In particular, they suggest ratios of Hadamard H and H √ ZH that could be applied in the unit cell associated with a translation invariant Clifford deformation.In Sec.III, we found that the (0.25, 0.5) random CDSC family performs the best among the random CDSC families in terms of subthreshold failure rates.Hence, as an example, we consider a translation-invariant realization of random CDSC family (2/9, 4/9), which is close in the (Π XZ , Π Y Z ) phase space to the (0.25, 0.5) family.We choose this family (2/9, 4/9) instead of (0.25, 0.5) since we consider surface codes on L × L square lattices, where L is odd.
We investigate the performance of a particular translation invariant code in this family that is illustrated in Fig. 5 for size L = 9.The subthreshold logical error rates, using the BSV decoder, at physical error rate p = 0.2 and bias η = 100 are shown in Fig. 6 (top).The logical error rates for the XZZX code, XY code, and the random CDSC family (0.25, 0.5) (average) are shown for comparison.It is interesting to note that this translationinvariant code not only beats the performance of XZZX and XY codes but also beats the average performance of the optimal random CDSC family (0.25, 0.5).Thus, this translation-invariant code does not yield the typical performance of the (2/9,4/9) random CDSC family which typically underperforms the (0.25,0.5) random CDSC family.In general, it is possible to design codes in a family that are atypical in code performance.
We find the BSV decoder thresholds of this code to be close to those of the (0.25, 0.5) CDSC family and track the Hashing bounds as shown in Fig. 6 (bottom).The detailed plots of logical error rate p logical versus physical error rate p and finite-size scaling at different biases η are shown in Fig. 14 in the Appendix.

V. DISCUSSION
In this work, we introduced the concept of (random) Clifford deformations of QEC codes and used it to construct CDSCs.We observed that for Pauli noise with finite bias η, random CDSCs over a broad range of parameters outperform carefully constructed translationally invariant codes, such as the XY and XZZX surface codes.Thus, the choice of Clifford deformation is an important optimization parameter in QEC that goes beyond the choice of the lattice and its boundaries.We expect that exploring spatially non-uniform Clifford de-formations, quasiperiodic, or translation invariant ones with bigger unit cells will lead to high-performing QEC codes under biased noise.As an example, we provided an explicit derandomized version of one of our highperformance random CDSC family and showed that the high performance is preserved.
To leverage the benefits of CDSCs into practical universal computation, bias-preserving syndrome measurement circuits, and fault-tolerant logical gates need to be found.The statistical mechanics approach to QEC code optimization pursued here should yield similar benefits in the fault-tolerant setting.Using equivalence relations under global Pauli permutations, our results establish that the (0.5, Π Y Z ) random CDSCs have a 50% threshold for noise infinitely biased towards any of Pauli X, Y , or Z errors (similar to the XZZX surface code).We expect such random CDSCs to have favorable performance when the bias direction is non-uniform in space while keeping the bias magnitude large i.e., different qubits can be either X-biased, Y -biased, or Z-biased.This is more clear if we work in the Heisenberg picture, in which we can consider the Clifford deformation on the noise instead of the stabilizers.Our phase diagram then illustrates spatially non-uniform configurations of noise that yield high performance from the CSS surface code.Now, consider a random CDSC family, let's say (0.25,0.5), and a noise model with large bias and spatially non-uniform bias directions, instead of the uniform Z-biased noise.In the Heisenberg picture, this effectively yields a spatially nonuniform noise model acting on the CSS code, that is different from the one given by the parameters (0.25,0.5); in other words, this leads to new effective parameters (Π eff XZ , Π eff Y Z ).For a wide class of spatially non-uniform configurations of bias directions, these new effective parameters (Π eff XZ , Π eff Y Z ) are expected to lie in our highthreshold phase and yield high performance.Overall, CDSCs may provide an attractive approach to building scalable quantum computers.on CDSCs [46].The tensor network decoder for the random CDSCs was implemented via an appropriate adaptation of qecsim [47] (a Python3 package for simulating quantum error correction using stabilizer codes) and simulations were run on the NIST Raritan cluster.The simulation code and data are available on request.We acknowledge support from the National Science Foundation (QLCI grant OMA-2120757), ARO (W911NF-18-1-0212), the Packard Foundation (2020-71479), the Simons Foundation through the collaboration on Ultra-Quantum Matter (651438, AD) and by the Institute for Quantum point of the statistical-mechanical mapping of error correction.The BSV decoder achieves a value close to it.Given a particular syndrome configuration, the goal is to calculate the probabilities of logical error classes and provide a correction operator based on the logical class with the maximum probability.Exact evaluation of the logical error class probabilities is, in general, inefficient.The BSV decoder uses an algorithm that efficiently approximates the logical error class probabilities through tensornetwork contractions.The size of the tensors being contracted is reduced through Schmidt decomposition and retaining only the χ largest Schmidt values, i.e., χ is the bond dimension of the tensors.For a modest value of χ, the method converges for a range of noise models and boundary conditions of the surface code.
Our numerical implementation uses a few minor modifications to the BSV decoder for the standard form of the surface code with a uniform noise model.To make these modifications, we keep the Heisenberg picture in mind, i.e., we keep the standard form of the stabilizers but have a spatially varying noise model depending on the Clifford deformations that are applied to the qubits.In the Heisenberg picture, the tensor redefinitions can be understood as having a different local noise model on each qubit leading to the redefinition of the associated tensor.For the random code with a given ratio of Clifford deformations Π XZ and Π Y Z , we modify the noise model on each tensor associated with a qubit according to the Pauli permutation acting on it.For example, a local noise model given by (p X , p Y , p Z ) maps to (p Z , p Y , p X ) under the Hadamard deformation H acting on the qubit.We illustrate this for a particular code realization in Fig. 7.

Appendix B: Cluster method for Maximum
Likelihood thresholds In this appendix, we describe the approximate analytical method for calculating the critical points of randombond Ising models (RBIMs) that are self-dual in the absence of disorder [44,45].We use this approach to estimate the optimal thresholds for the XY code.The partition function of the RBIM is given by where LBF({s i }, {τ P J P }) is the local Boltzmann factor (LBF) involving spins {s i } at positions {i} in a local neighborhood, interacting with coupling coefficients J P that have sign disorder τ P .The statistical mechanical model in Eq. ( 3) of main text is the so-called 8-vertex model.The Hamiltonian (neglecting boundary terms) can be written more explicitly as Example to describe the modification in the evaluation of logical error class probability due to Clifford deformations.Pauli error is shown in green letters.The goal is to evaluate the probability of the product of the error times the marked stabilizer; this product appears as a term in the logical error class probability evaluated via tensor network contraction.Without the Clifford deformations, error times the marked stabilizer gives two X operators and one Z operator resulting in a probability p 2 X pZ (1 − p) L 2 −3 where p is the total error rate and L 2 is the number of qubits.Because of Hadamard H (blue) and HY Z = H √ ZH (red) Clifford deformations acting on two qubits of the marked stabilizer, we instead get three X operators resulting in probability pX p 2 Z (1 − p) L 2 −3 .Equivalently, we can modify the local noise model on the qubits, according to the Clifford deformations while keeping the stabilizers same as the CSS surface code to get the same logical error class probability as with deformed stabilizers and a spatially uniform Z bias model.
where s X * and s Z * are Ising spins associated with every X and Z stabilizer generator of the surface code, and the summation is over all qubit locations, i.e., and crossings; see Fig. 3(b) in the main text.
For the 8-vertex model, the LBF({s i }, {τ P J P }) at inverse temperature β for the spins {s i } on a is given by LBF({s i }, {τ The LBF associated with neighboring qubit of the underlying surface code is similar but with the colors switched, i.e., .To average over the sign disorders τ P in coupling coefficients J P , we consider a replicated system with n replicas, whose partition function we can write as fol-physical error rate p = 0.2.We calculated the logical error rate from 200 000 Monte Carlo runs for code distances L = 9, 13, 17, 21.Each Monte Carlo run for simulating error correction on the random CDSC is done on a different realization consistent with the probabilities (Π XZ , Π Y Z ).Error bars were calculated through jackknife resampling.
We also include the XZZX on a torus with coprime dimensions L × (L + 1) using a minimum-weight perfect matching (MWPM) decoder for comparison since it has been shown to have extraordinary subthreshold performance as well.However, since the decoder, the number of qubits (L(L+1) as opposed to L 2 for the square lattice codes) and the boundary conditions are all different, the comparison's goal is only to justify that the random CD-SCs can beat the best known subthreshold performance.
2(b).To explain this, we introduce notions of the effective distance d ′ and halfdistance t ′ of a QEC code for the IID Pauli noise with (a).

FIG. 3 .
FIG. 3. (a) Phase diagram for random CDSCs at infinite bias.Typical realizations of random CDSCs in the blue region of the (ΠXZ , ΠY Z ) phase space have a 50% threshold.The black and orange boundaries enclose regions where the s X and s Z sublattices order; in the region enclosed by purple boundaries we expect the system to order due to the JY constraints.(b) Random-bond Ising model associated with a CDSC; the Hamiltonian is obtained by applying the deformations that define the CDSC to the Hamiltonian in Eq. (3).We highlight the clusters (c = 0, 1, 2) used in the approximate analytical method to estimate thresholds for the XY code[33].Spins circled in green are summed over while others are fixed.
FIG. 4. (a)Effective distance increment ∆d ′ (L = 3) for random CDSCs and p = 0.02, where we averaged over 2000 realizations for each point.(left) For η = 100, the highest value is obtained for the (0.25, 0.5) random CDSC.(right) ∆d ′ (3) as a function of η.For large η, ∆d ′ (3) for the XY surface code starts to increase with η (which is consistent with the Z distance of the XY surface code being L 2 for infinite bias[7]) and exceeds ∆d ′ (3) for the (0.25, 0.5) random CDSC.(b) Subthreshold logical error rates p logical of random CDSCs on the L × L square lattice for p = 0.2 and η = 100.(c) Thresholds p th for the (0.25, 0.5) and (0.5, 0) random CDSCs and hashing bound p h.b. as functions of η.The difference p th − p h.b. is tabulated in percentage for some codes and biases.

FIG. 6 .
FIG.6.Top: Subthreshold logical error rates p logical of the translation-invariant (TI) code in the (2/9,4/9) CDSC family (see Fig.5) on the L×L square lattice for p = 0.2 and η = 100.The subthreshold logical error rates for the XZZX code and the XY code are shown for comparison.Bottom: Thresholds p th for the TI code and the hashing bound p h.b. as functions of bias η.

21 FIG. 10 .FIG. 11 .
FIG.10.Logical error rate p logical versus physical error rate p and finite size scaling for the (0.25,0.5) random CDSC at different biases η and using bond dimension χ for the BSV decoder as indicated.Each data point for logical error rate p logical is averaged over 120 000 Monte Carlo runs.

FIG. 12
FIG. 12. (a) 50% threshold phase diagram.The random CDSCs whose code performance was studied numerically are marked (green circles).(b) Performance of Random CDSCs outside the blue region (50% thresholds) of the phase diagram.Logical error rate p logical versus physical error rate p for the (ΠXZ , ΠY Z ) random CDSCs at bias η = 10 8 .Each data point is averaged over 60 000 Monte Carlo runs of the BSV decoder with a bond dimension, χ = 56.

FIG. 13 . 21 FIG. 14 .
FIG. 13.Performance of Random CDSCs inside the blue region (50% thresholds) of the phase diagram.Logical error rate p logical versus physical error rate p for the (ΠXZ , ΠY Z ) random CDSCs at bias η = 10 8 .Each data point is averaged over 60 000 Monte Carlo runs of the BSV decoder with a bond dimension, χ = 56.