Correcting non-independent and non-identically distributed errors with surface codes

A common approach to studying the performance of quantum error correcting codes is to assume independent and identically distributed single-qubit errors. However, the available experimental data shows that realistic errors in modern multi-qubit devices are typically neither independent nor identical across qubits. In this work, we develop and investigate the properties of topological surface codes adapted to a known noise structure by Clifford conjugations. We show that the surface code locally tailored to non-uniform single-qubit noise in conjunction with a scalable matching decoder yields an increase in error thresholds and exponential suppression of sub-threshold failure rates when compared to the standard surface code. Furthermore, we study the behaviour of the tailored surface code under local two-qubit noise and show the role that code degeneracy plays in correcting such noise. The proposed methods do not require additional overhead in terms of the number of qubits or gates and use a standard matching decoder, hence come at no extra cost compared to the standard surface-code error correction.


Konstantin
Tiurev: konstantin.tiurev@quantumsimulations.deity measurements, admits fast and efficient decoding, and exhibits one of the highest thresholds among quantum codes with a two-dimensional qubit architecture.
As other topological QECCs, the surface code turns a collection of noisy qubits into a more robust logical qubit by redundantly encoding information in a non-local way.Assuming that single-qubit errors occur independently with probability p, the error rate of the logical qubit can be made arbitrary small when p is below a threshold value p th > 0 [1,9,10].For a standard Calderbank-Shor-Steane (CSS) surface code in the presence of depolarizing noise and assuming error-free parity measurements, the error threshold is estimated to be around p th ≈ 16% when a perfect-matching algorithm is used for decoding [11][12][13].
With the actual experimental implementation of quantum error correcting codes moving closer to reality [14][15][16][17][18][19], interest is shifting towards devising schemes for quantum error correction that would respect physical desiderata that arise from properties of the chosen hardware implementation.This reflects several aspects of the code design.In particular, the performance of an error correcting code heavily depends on the structure of noise affecting the physical constituents.In order to accommodate this, steps have been taken recently to adapt quantum error correcting codes and decoding procedures to such kind of errors [11,[20][21][22][23][24][25][26].Given some classical knowledge of structures that errors commonly take, the error correction procedure can be tailored to more efficiently handle such structured noise, resulting in dramatically reduced logical error rates and increased thresholds.For instance, the noise threshold of the standard CSS surface code is noticeably reduced when physical qubits experience biased noise [11], e.g., qubits are more prone to dephasing than bit flips.Simply adapting the aspect ra-tio of the surface code allows to noticeably enhance the code performance [27].References [11,20,[22][23][24] employ a more involved procedure, referred to as Clifford deformation, to tailor the code stabilizers and a decoder to a given noise structure.The two prominent examples are the XY [22,24,28] and the XZZX [11,29] codes, both significantly outperforming the CSS surface code for biased noise in terms of the threshold and sub-threshold scaling.Tailoring an error correction strategy to a known noise structure hence plays a crucial role for protecting quantum information, and is expected to be increasingly important as technological development progresses.
Research within the field of QECCs typically assumes that all physical qubits that make up the code are identical, that is, every qubit experiences noise that can be modelled as an independent and identically distributed (iid) process.In experimental reality, however, this assumption often turns out to be unrealistic.In modern quantum chips [30][31][32], noise characteristics vary notably from one qubit to another [33][34][35][36], which significantly compromises the performance of existing error correcting schemes [33,36].In certain devices, qubits not only have different error rates, but are also prone to different types of Pauli errors [34], with Rigetti's Aspen-M-2 [32,34] and IBM's Washington [31,34] being two such examples.Furthermore, experimental benchmarks show that errors can correlate across multiple qubits, either due to direct interactions [37,38], such as unwanted cross-talk [36,[39][40][41][42], or via coupling to a common bosonic bath [43].Recent experiments have proven that such correlated errors have a crucial effect on the efficiency of surface-code quantum error correction [36].An optimal code design should respect a known non-iid noise structure of a particular device.However, despite the apparent practical importance, the performance and optimization of QECCs in the presence of non-iid errors have been barely investigated.Several works have discussed correction of multi-qubit correlated errors [43][44][45][46][47][48], while the research of QECCs under non-identically distributed errors has been ignored until very recently and is limited to only a few publications [33,34,36,49,50].
In this work, we investigate the error correcting capabilities of the surface code in the presence of non-iid noise and propose ways to adapt the error correction procedure to more efficiently battle such noise.Firstly, we design a Clifford-deformed version of the surface code tailored to efficiently cor-rect non-identically distributed Pauli errors when used in conjunction with a scalable perfect-matching decoder [51].We numerically benchmark the performance of the noise-tailored code versus nonoptimized CSS surface codes and demonstrate that (i) the sub-threshold logical error rates are exponentially suppressed as a function of the code distance and (ii) the threshold grows monotonically as noise becomes less uniform across qubits.Secondly, we show that similar improvements in error correcting capabilities of the surface code can be achieved by modifying input parameters of a matching decoder in a situation where qubits experience non-identically distributed total error rates.Finally, we study the behaviour of the surface code under a combination of single-qubit and local two-qubit errors.We show that the code stabilizers can be adapted to a known correlated noise structure to make syndrome configurations plausible for efficient perfect-matching decoding.Strikingly, our numerical simulations suggest that the sub-threshold scaling can be significantly improved even when no information about the noise structure is provided to the decoder.Instead, it suffices to merely account for code degeneracy [52], i.e., for a number of equivalent shortest-path logical operators, which is determined by a combination of a surface code geometry and a noise model.We expect this framework to be useful when tailoring codes to physical needs that arise in superconducting, trappedion, or photonic architectures.
The remainder of this article is organized as follows.Section 2 introduces the standard surface code and a decoder based on a minimum weight perfect matching (MWPM) algorithm [51,53,54] and shows that the code can be locally transformed by a process known as Clifford deformation.Section 3 introduces a variant of the surface code designed to correct non-identically distributed Pauli errors.In Sec. 4, we study the performance of the surface code under correlated errors between nearest-neighbor data qubits and point out a crucial role of code degeneracy for correcting such errors.We conclude in Sec. 5 by discussing potential directions for improving the performance of noise-tailored error correcting codes.

Overview of the surface code
In order to appreciate the idea of tailoring the code design to noise of a known structure, we start by reviewing elements of the surface code.The basic idea of a QECC is to redundantly encode the state of a sin-gle logical qubit into a larger array of noisy physical qubits.Encoding is achieved by fixing N −1 independent parity check operators, or stabilizers, on N bare qubits, with the remaining degrees of freedom corresponding to the logical qubit.Throughout the course of computation, errors are detected by measuring stabilizers and subsequently corrected.If bare qubit errors are sufficiently rare, i.e., occur with probability below the threshold value p th , the logical error rate can be made arbitrary small by increasing a number of physical qubits in the code.The challenge is to design practical QECCs that allow to detect and correct the most common errors in realistic experimental settings.Among other choices, the surface code offers particularly high thresholds while requiring only parity checks within sets of nearest-neighbor qubits in a two-dimensional qubit layout.Below we describe the basic operation of the surface code and the decoding procedure.

CSS surface code
The surface code is a stabilizer quantum error correcting code formed of qubits placed on the edges of a 2D square lattice, as shown in Fig. 1.Particularly, the surface code of d 1 × d 2 qubits arranged on lattice L contains N = d 1 d 2 + (d 1 − 1)(d 2 − 1) qubits and has a distance d = min(d 1 , d 2 ).Since the original surface code is a CSS code, it is referred to as the CSS surface code, following the nomenclature of Ref. [20].The code space of the surface code is described by its stabilizer group S, which is an Abelian subgroup of the N -qubit Pauli group P N , the group generated by products of single-qubit Pauli operators together with suitable scalar factors.Particularly, the stabilizer group of the standard surface code is generated by two types of stabilizers, namely, star and plaquette operators defined as respectively.Here and in the following, X i , Y i and Z i denote the respective qubit Pauli operators applied to qubit with vertex label i ∈ L. We will also use X, Y, Z for the abstract Pauli operators when the support is not specified.♢ and □ denote cells as subsets of L of four nearest-neighbor qubits and form, respectively, primal and dual sub-lattices illustrated in Fig. 1.Operators on the logical qubit are defined as chains of single-qubit Pauli operators connecting opposite edges of the lattice and commuting with all stabilizers.Measuring stabilizers hence does not reveal information about the state of the logical qubit.
With the above definition (1), a logical X ( Z) operator corresponds to any chain of single-qubit X (Z) operators connecting top and bottom (left and right) edges of the lattice in Fig. 1.Basis state vectors of the logical qubit are then defined in a standard way, and, by construction, obey Stabilizers (1) are measured throughout the computation and the result of their measurement, also called the error syndrome, indicates which error has occurred.We note that stabilizer measurement is itself a process prone to errors and the measurement apparatus can in principle return incorrect eigenvalues.In such a case, repetitive extraction of syndromes is necessary to define the correct syndrome configuration.Here we restrict our analysis to a simpler case of perfect syndrome measurements and only consider errors that occur in data qubits.The code tailoring techniques introduced in this paper only require single-qubit Clifford rotations on data qubits.Since no additional multi-qubit operations are involved, such code tailoring does not introduce additional error propagation paths between the qubits of the code.Hence, the gain in performance observed for perfect stabilizer measurement will preserve on the fault-tolerant regime too.
For the CSS surface code defined according to Eq. (1), a single-qubit X (Z) error commutes with all star (plaquette) stabilizers and therefore only creates pairs of defects, or anyons, in the dual (primal) sub-lattice.Decoding is performed by finding the most probable chains of errors corresponding to a measured syndrome.The most commonly used decoder is based on the MWPM algorithm.It first constructs an input graph by assigning each measured defect a vertex, with weighted edges corresponding to chains of errors connecting two defects.Assuming that single-qubit X and Z errors occur with equal probability p, weights w i,j ≥ 0 between vertices i, j are chosen according to where is the probability of connecting two stabilizers that have horizontal distance l x and vertical distance l z by the shortest chain of single-qubit errors.Substituting Eq. (5) into Eq.(4) and ignoring a common coefficient − log(p) > 0, the edges of the input graph are weighted according to the Manhattan distance which is the distance induced by the vector l 1 -norm.The algorithm then searches for a perfect matching such that the sum of the weights of the edges is minimal, corresponding to a maximally probable error chain, and returns indices of defects that should be locally paired by the correction.MWPM in its standard implementation assumes single-qubit X and Z errors independently, hence decoding takes place separately in dual and primal sub-lattices.Pauli Y errors create pairs of defects in the two sub-lattices simultaneously, which compromises the capabilities of the standard matching decoder.Certain modified versions of the MWPM algorithm can, to some extent, take correlations beyond the paradigm of independent X and Z errors into account and therefore demonstrate the improved decoding efficiency in the presence of Y errors [24,55].For simplicity, here we will focus on the matching algorithm in its standard form.However, we note that Clifford deformation methods suggested in this paper can in principle be combined with more advanced versions of the MWPM decoder, e.g.those taking into account correlations between deformed sub-lattices [55] or allowing for parallel decoding [56].
Finally, there are classes of decoders not based on matching algorithms.As such the tensor-network decoder of Ref. [57] is capable of finding the optimal code-capacity thresholds, however, for the price of runtime scaling exponentially with the code size, rendering it incompatible with fast on-the-go error correction in real quantum hardware.

Clifford-deformed surface codes
In the previous Section, we have constructed a CSS surface code according to the stabilizers of Eq. (1).Equivalently, one can choose an alternative set of stabilizers by applying single-qubit Clifford transformations to the stabilizers of the CSS code.Building on the steps taken in Ref. [20] we refer to any code derived in such a way as a Clifford-deformed QECC.
In a Clifford-deformed surface code, the quantum states of each of the physical qubits i ∈ L of the code are conjugated with a unitary U ∈ C 1 /U (1) from the single-qubit Clifford group of order 24.The Clifford group is the group of unitaries that maps Pauli operators onto Pauli operators under conjugation.Specifically, the Hadamard gate H maps Pauli X to Pauli Z operators, while H Y Z = H √ ZH (both contained in the Clifford group) intertwines between Pauli Y and Z.In what follows, the term Clifford deformation will refer to a replacement of a qubit Pauli operator by a different Pauli operator according to one of those conjugations [58].
Any set of operators derived via Clifford deformations-in the form of Clifford conjugations-will form legitimate code stabilizers, since such conjugations preserve commutativity.Indeed, applying a unitary U i ∈ C 1 /U (1) to Pauli operators X and Z measured on qubit i transforms the operators as and preserves anti-commutation, Since operators measured on other qubits are intact, commutation of stabilizers is preserved and a unitary U i can be chosen for each qubit i independently.Therefore, the surface code admits local Clifford deformations that can be chosen independently for each physical qubit.In the focus of this work are new instances of Clifford-deformed surface codes, following up on and building upon Ref. [22].We start by discussing examples of uniformly deformed surface codes in Sec.2.3 and subsequently introduce noisetailored local deformations in Sec. 3.

Surface codes for biased noise
Clifford-deformed surface codes have demonstrated an exceptional performance when physical qubits are affected by biased noise [11,22].Consider an error model in which each qubit is independently subject to a diagonal Pauli channel E of the form where p x , p y , p z ∈ [0, 1] are the probabilities of the corresponding single-qubit Pauli error and p = p x + p y + p z ∈ [0, 1] is a physical qubit error rate.This being a random unitary process, it is clear that E is a valid quantum channel for all allowed parameters.In particular, noise biased towards dephasing corresponds to p z > p x , p y .Reference [22] has used a modified surface code, where the transformation H Y Z has been applied to all qubits of the code.Such transformation leaves Pauli X unchanged, while transforming the plaquette stabilizers to The resulting code is therefore referred to as the XY code.Alternatively, the XZZX code [11] can be obtained from the CSS code by applying a Hadamard transformation to qubits on even rows of the code.This effectively replaces both the star and plaquette l Y 1 a h e V n 2 K u W r + 0 q p e p u Z l k c n 6 B S d I w 9 d o y q q o T p q I I o G 6 B m 9 o j f n x X l 3 P p z P e W n O y X q O 0 U I 4 X 7 / 4 p Z 0 s < / l a t e x i t > l Y 1 a h e V n 2 K u W r + 0 q p e p u Z l k c n 6 B S d I w 9 d o y q q o T p q I I o G 6 B m 9 o j f n x X l 3 P p z P e W n O y X q O 0 U I 4 X 7 / 4 p Z 0 s < / l a t e x i t > H2 < l a t e x i t s h a 1 _ b a s e 6 4 = " Z x m n o O 2 H + v f 4 t r V j E r x p w 3 g y x e 0 Z v z 4 r w 7 H 8 7 n v H T N y X p O 0 E I 4 X 7 / 6 T 5 0 t < / l a t e x i t > H3 < l a t e x i t s h a 1 _ b a s e 6 4 = " Y g e Z I / F U r k i q l z q J K K               stabilizers by

a t e x i t s h a 1 _ b a s e 6 4 = " g u V 4 j E c T 5 E U 3 / N l 6 9 o p i / g T 1 R V c = " > A A A C D n i c b Z C 7 S g N B F I Z n 4 y 3 G W 9 T S Z j
where single-qubit Pauli operators acting on north, east, west, and south qubits within each stabilizer, and given the respective indices, are oriented as shown in Fig. 2 (a).The improved performance of the deformed codes originates from the amount of information available to the decoder.As an illustration, assume an infinitely biased noise described by a phase-flip channel Since Pauli Z operators commute with all stabilizers B □ of the form (1), the dual sub-lattice of the CSS code never detects such error events and hence does not provide any useful information to the decoder.On the other hand, transforming dual stabilizers according to Eq. (10) doubles the amount of useful syndrome information available to the decoder in the XY code.Similarly, Pauli Z errors always create defects in either dual or primal sub-lattice of the XZZX code, depending on which physical qubit has been affected by an error event.
The important difference between the two codes is in the decoder that can be employed to find the correct error configuration.In the case of the XY code, a single-qubit Z error event simultaneously creates two pairs of anyons in both sub-lattices.When decoding such syndrome configurations, decoders based on perfect matching [24] behave suboptimally, even when correlations are partially taken into account [55].Hence, although both the primal and dual sub-lattices of the code contain information about the occurred errors, decoding such configurations require alternative, usually much more computationally demanding methods, such as the maximum likelihood decoding [28,57].On the other hand, the same single-qubit Z error only creates anyons in one of the sub-lattices of the XZZX code at a time, making it well-suitable for perfect-matching decoding.Below we will aim at constructing codes that admit efficient decoding with MWPM algorithms as they, due to their fast performance, can potentially be implemented for practical error correction in quantum hardware.

Tailoring aspect ratios
The XZZX code as in Fig. 2 (a), i.e., defined on a non-rotated lattice, performs non-optimally on a square-shaped lattice due to the structure of logical operators.For a square surface code of distance d, the probabilities of logical X and Z errors are P (sq) ( X) = O(p d x ) and P (sq) ( Z) = O(p d z ), respectively.Hence, for biased noise with the logical errors of a square-shaped XZZX code occur predominantly due to the logical Z error, P fail ≈ P (sq) ( Z) ≫ P (sq) ( X).
The failure rate of the code can be minimized by arranging the qubits on a rectangular lattice with an aspect ratio as in Fig. 2 (a).For a rectangular surface code containing the same number of qubits as a distance-d squared code, (15) the logical failure rate obeys leading to greatly suppressed logical failure rates in the regime of a large bias [27].Furthermore, all paths connecting two anyons labelled by i and j in the XZZX code are realized with an equal probability Weights of the input matching decoder graph (4) hence yield a weighted Manhattan distance, For completeness, we introduce an alternative configuration of the surface code that yields optimal logical error rates on a square lattice for arbitrary noise bias.We refer to this code as the XXZZ code owing to the stabilizers configuration shown in Fig. 2 (b).For such a code, logical operators X and Z are products of alternating per-qubit Pauli X and Z operators.For sufficiently large lattices, the probabilities of logical errors X and Z are, therefore, approximately equal independently of the noise bias, Therefore, the aspect ratio A = 1 can be kept constant for any bias [59].

Non-identically distributed errors
Physical qubits that constitute a QECC are conventionally assumed to be identical.However, available measurement data shows that noise characteristics in modern multi-qubit devices can vary significantly from one qubit to another, with some qubits being noisier that others [33-36, 49, 60-63].In addition, different qubits within one device can be prone to different types of Pauli errors, e.g., such that some qubits are more susceptible to phase flips, while others are more prone to bit flips [34].The probabilities of different Pauli error channels can be expressed using qubit coherence times T 1 (relaxation time) and T 2 (dephasing time) as Hence, qubits limited by their T 1 are more prone to X and Y errors, while qubits limited by T 2 are more prone to Z errors.Experimental data shows that coherence times T 1 and T 2 depend heavily on hardware platform, design and manufacturing parameters of a particular device.As such, the parameter T 1 /T 2 is relatively uniform across qubits in superconducting chips from Google Quantum AI and Zuchongzi [35].
On the other hand, in devices such as Rigetti's Aspen-M-2 [32] and IBM's Washington [31], coherence times of different qubits within the same chip are vastly different, as shown by the calibration data presented in Ref. [34].The noise model that takes into account non-uniformities in total and relative Pauli error rates captures the differences in the noise parameters of real qubits.
In this Section, we assume that noise channels of individual qubits can be measured.In Subsections 3.1-3.3,we construct and benchmark Clifforddeformed surface codes locally tailored to efficiently correct non-uniform Pauli noise.In Subsection 3.4, we show that non-uniform total noise can be more efficiently corrected when the MWPM decoder is provided with information about local error rates of individual qubits.In Subsection 3.5, we combine the two methods for correcting an arbitrary non-identically distributed noise.

Noise-aware Clifford deformations
Our aim is to consider Clifford deformations such that the most probable syndrome configurations for a given noise model are maximally compatible with perfect-matching decoding.As discussed in the previous section, the efficiency of such an MWPM decoder is compromised by interactions between the dual and primal lattices, i.e., by single-qubit Pauli error events that simultaneously create defects in all four stabilizers surrounding the qubit.One can minimize such events by applying noise-tailored local Clifford deformations introduced earlier in Sec.2.2.
Definition 1 (Clifford deformed codes for non-uniform Pauli diagonal noise).Consider a qubit located at site i ∈ L and a set of stabilizers S i which have that qubit in their support.The qubit is subject to Pauli diagonal noise channels with weights p

as the Pauli operator reflecting the maximum weight
z } in the Pauli channel and M i as the Pauli operator corresponding to medium weight m i := max{p In the MHHM code, stabilizers from S i located east and west (north and south) of qubit i measure operators M i (H i ) on that qubit, as illustrated in Fig. 3 (a).The MMHH code is similar, but with stabilizers chosen as in Fig. 3

(b).
As an example, consider qubit i with p y .Then, in the MHHM code the stabilizers lo-cated horizontally and vertically from qubit i measure Pauli Y and Z operators on that qubit, respectively.The commutativity of stabilizers is guaranteed by the anti-commutativity of Y and Z, as in Eq. 8. Since for each qubit the transformation (7) can be chosen independently, the MHHM and the MMHH codes can always be constructed according to known error rates of qubits in the code.We refer to two possible layouts of a code locally optimized for perfectmatching decoding as the MHHM [Fig. 3 (a)] and MMHH [Fig. 3 (b)] surface codes due to their similarity to the XZZX [Fig. 2 (a)] and XXZZ [Fig. 2 (b)] codes, respectively.

A paradigmatic toy example
The exact model of how the noise bias varies from one qubit to another depends heavily on a particular hardware implementation of physical qubits.Our aim here is to provide a convincing argument that tailoring the code to local noise structure can be advantageous for decoding.We first demonstrate the proposed scheme on a simple toy model.Assume that the probabilities of low (l), medium (m), and highrate (h) errors are identical across qubits, but for each qubit located at site i ∈ L we choose where π i denotes a random permutation applied at a qubit i, i.e., for each qubit we randomly assign low, medium, and high rates to different Pauli errors.This is not meant to be a realistic noise model, but has been designed to explain the functioning of the approach.Using the known rates of Pauli errors at each individual qubit, one can transform the CSS surface code into the MMHH or MHHM code by applying local Clifford deformations to it.It is easy to see that the Clifford-deformed MMHH (MHHM) code in the presence of the noise described by Eq. ( 21) is equivalent to the XXZZ (XZZX) code affected by the noise with π i = 1.Put another way, noise-informed Clifford deformations effectively undo the permutations applied to errors in Eq. ( 21), turning the surface code into one of the biased-tailored codes.

A more realistic noise model
We will now investigate the code performance in a more realistic error model, where the total error probabilities as well as the relative probabilities of different Pauli errors vary between qubits.For a qubit located at site i ∈ L we generate the error probabilities in two steps.First, we choose the error probabilities according to where k = {x, y, z} and N (µ, σ P ) is a truncated at 0 and 1 normal distribution with mean µ and standard deviation σ P .Next, we normalize Pauli error probabilities p where p (i) is also generated according to the normal distribution for each site i ∈ L. This process generates the probabilities of low, medium, and high rate errors independently for each qubit and randomly assigns these probabilities to Pauli errors.Noise in our model is hence characterized by an average error rate p and a pair of parameters σ = (σ P , σ tot ) defining, respectively, variations in types of Pauli errors and in total error rates of qubits.We will refer to the noise model described by σ = (σ P > 0, 0) as uniform total noise, and to the noise model with σ = (0, σ tot > 0) as uniform Pauli noise.A trivial case of σ = (0, 0) corresponds to the iid error model.Knowing the rates of Pauli errors of each qubit, the noise-tailored surface codes can now be constructed according to the patterns of Fig. 3, as in the previous toy example.

Benchmarking locally-tailored codes
We have numerically simulated and assessed the performances of the CSS code, the XXZZ code, and noise-tailored MHHM and MMHH codes using a modified version of the QECSIM Python package [64].First, we benchmark the performance of the error correcting codes using a matching decoder with input weights defined according to the Manhattan distance.For square-shaped codes (CSS, XXZZ, MMHH), we use the MWPM algorithm with the standard Manhattan weights calculated as in Eq. (6).The MHHM code performs optimally on a rectangular lattice due the structure of its logical operators, similarly to the XZZX code under biased noise.Hence, for decoding a syndrome of the MHHM code we use the weighted Manhattan distance metrics similar to Eq. (18),  1: Error correction thresholds of different surface codes determined in Appendix A. The first column provides the thresholds observed for a uniform total error model described by σ = (1/2, 0).The second column corresponds to a non-uniform error rate with σ = (0, 1/2).In the third column, both total and Pauli error rates vary between qubits.We benchmark the performance of decoders with weights determined according to two distance metrics.The first metrics is defined according to the Manhattan distances of Eq.where ⟨p h ⟩ and ⟨p m ⟩ are the probabilities of highand medium-rate errors averaged over all qubits in the code.
Figure 4 (a) demonstrates the comparison between sub-threshold logical error rates of different variants of the surface code versus a code distance d.The noise-tailored codes clearly demonstrate exponentially suppressed logical failure rates when compared to the CSS and XXZZ codes.We also summarize the error correction thresholds for four descriptive sets of parameters σ in Table 1.We observe that when the code stabilizers are tailored to non-uniform Pauli noise the thresholds are improved as well.As expected, the advantage of using the locally-tailored MHHM and MMHH codes over the CSS and XXZZ codes grows as we increase σ P , both in terms of thresholds [Fig.9] and sub-threshold scaling [Fig.4 (a)].On the contrary, changing σ tot does not affect the error correction capabilities of the codes; both the threshold and sub-threshold scaling remain intact as we vary σ tot .In Appendix A, we explore the decoding capabilities of different codes for a wider range of parameters σ and discuss the thresholds calculation procedure in more detail.Green and blue curves correspond to, respectively, the CSS and noisetailored MMHH codes.The curves are derived using a standard MWPM decoder with the Manhattan distance defined in Eq. (6).Data is shown for p = 0.1 and σ tot = 1/2 in Eq. (22).Solid and dashed lines correspond to σ P = 0.125 and σ P = 0.5, respectively.The XXZZ and XZZX codes yield logical error rates identical to those of the CSS code, while the MHHM code demonstrates a scaling similar to that of the MMHH code.These curves are hence not shown.(b) Tailoring a matching decoder to local total noise.Black (purple) curve correspond to the MHHM code in conjunction with a decoder using the Manhattan (Dijsktra) distance metrics.Solid and dashed lines correspond to noise models with σ tot = 0.25 and σ tot = 0.5, respectively.

Noise-aware matching decoder
The improved performance of the surface code observed in Fig. 4 (a) and Appendix A is achieved solely by adapting the code stabilizers, while the decoder uses the distance metrics of Eqs. ( 6) and (25).That is, no information about local error rates has been provided to the decoder.However, a decoder can as well be tailored to more reliably decode error syndromes by utilizing the available information about the error model [33].Here we investigate the behaviour of the surface codes in conjunction with a decoder that uses the local error rates of each qubit.The weights of the matching graph are calculated according to the probabilities of the shortest weighed paths using Dijkstra algorithm, which we implement with the PyMatching package [65].
Our numerical simulations show that implement-ing a noise-aware decoder instead of the one based on the Manhattan distance does not noticeably improve error correction capabilities of the code against nonuniform Pauli noise, that is, both threshold and subthreshold scaling are nearly unaffected when we vary σ P at a fixed σ tot .In contrast, such a modification yields improvement in the presence of non-uniform total errors, i.e., when we increase σ tot .As such, Table 1 demonstrates noticeably higher error thresholds enabled by a noise-aware decoder compared to the case of Manhattan distance for σ tot = 0.5.As we show in Fig. 4 (b), the sub-threshold error rates also scale more favourably when Dijkstra metrics is used, with logical error rate decreasing as σ tot grows.We explain this behaviour by the fact that errors become less random when σ tot is increased.As an illustrative example, consider a situation where the total error probabilities of certain qubits are close to zero.In such a case, the decoder knows that errors should not take place on these qubits and makes a more informative decision about locations of errors, resulting in more accurate decoding.For a detailed comparison of the two decoders, we refer the reader to Appendix B and figures therein.

Correction of non-uniform errors
Summarizing this Section, we considered two types of non-uniformity in qubit noise: variation in relative Pauli error rates and variation in total error rates of qubits.We have shown that the former can be countered by applying noise-aware Clifford deformations to the code stabilizers, and the latter can be corrected more efficiently by making the decoder noise-aware.The advantage of tailoring the code stabilizers become more apparent as we introduce stronger variations in Pauli noise (increase σ P ), while using the noise-aware decoder becomes more advantageous as we introduce stronger variations in total noise (increase σ tot ).Importantly, the modifications to the code stabilizers and the decoder input weights are independent and can hence be implemented simultaneously to correct arbitrary non-identically distributed noise.Further steps can be made along the same lines of research.As such, the residual correlations that take place between the dual and primal sub-lattices due to low-rate Pauli errors can be partially taken into account by an advanced version of the MWPM decoder [55].Furthermore, local Clifford deformations can in principle be combined with belief propagation or belief matching [23], which might lead to an improved accuracy, but are likely to be much more com-putationally demanding than the fast matching decoder used in our simulations.We leave the question of designing alternative decoding algorithms outside of the scope of this paper.Finally, we note that here we have focused on investigating the properties of the surface code on a non-rotated lattice, as in Fig. 1.The sub-threshold scaling can be further improved by applying analogous local Clifford deformations on the surface code with rotated geometry.In particular, it has been shown that the number of physical qubits required to achieved a given logical error rate is reduced by half when the rotated code configuration is used [66].

Correlated errors and code degeneracy
We now turn to the case where correlated errors are present between data qubits of the surface code.
For concreteness, we focus on two-qubit interactions between nearest-neighbour qubits.Such two-qubit noise is architecture specific and occurs due to various physical mechanisms.In superconducting chips, unwanted cross-talk correlations can take place when a CNOT gate is executed via cross-resonance (CR) technique [67,68].Qubits involved in the CR gate can not be efficiently isolated from their environment and are inevitably exposed to neighbouring qubits via a ZZ interaction [40,69].Particularly, in the context of surface-code error correction, a CNOT gate between data and ancilla qubits can cause unwanted ZZ error between the data qubit involved in the gate and one of the neighbouring data qubits [39].Similar cross-talk noise is ubiquitous in other hardware platforms as well.In silicon spin qubits, ZZ crosstalk errors can occur due to microwave-induced phase shifts [41].In a trapped ion system, laser intensity spillover onto the neighbouring ions during gate applications can lead to unwanted XX-type cross-talk errors between the qubits involved in the desired gate and their neighbours [70].
The effect of correlated noise on surface-code error correction has been analysed in a very recent experimental work [36].The authors have benchmarked correlations that occur between data qubits during the operation of a 39-qubit Google Sycamore quantum processor and concluded the crucial importance of taking nearest-neighbour correlated errors into account for accurate estimations of the performance of error correction protocols.On the other hand, correlated errors on qubits located further apart are less probable and expected to have less destructive effect on the error correction fidelity, as discussed in Ref. [43].Hence, our focus here is on local two-qubit errors only.
Consider qubits subject to a combination of singlequbit depolarizing noise and two-qubit noise of the form Here, N m ⊂ L is a set of all nearest neighbors of m ∈ L and p XX , p ZZ ∈ [0, 1] are the probabilities of correlated two-qubit bit-and phase-flip errors, respectively.Our choice of two-qubit noise model ( 27) is motivated by experimental data, showing that XX and ZZ are the most ubiquitous types of two-qubit errors omnipresent in various hardware platforms, as discussed above.The total noise channel affecting qubit m then reads where p 1 and p 2 = p XX + p ZZ are the probabilities of single-and two-qubit errors, respectively.In a weakly interacting regime, p 2 /p 1 ≪ 1, the dynamics are dominated by single-qubit errors and the probability of connecting two defects via the most probable chain of errors reads This expression is identical to Eq. ( 5) up to a prefactor l x + l z l x , which takes into account the number of shortest strings of single-qubit errors connecting two stabilizers and will be referred to as the degeneracy factor.As explained in Ref. [13]-and confirmed by our simulations-accounting for degeneracy does not have effect on correcting single-qubit errors in the surface code with the standard geometry.Hence the degeneracy factor was omitted in the previous sections, leading to the Manhattan distance of the form (6). On the other hand, below we will show that accounting for degeneracy is crucial for efficient correction of correlated errors, or when correction is performed on the rotated surface-code lattice.Assume now a regime of strong interactions, where p 2 /p 1 ≫ 1.From Fig. 5 (a), it is straightforward to check that the noise described by the quantum channel (27) flips dual and primal stabilizers of the CSS code in pairs, producing a syndrome well suitable for the MWPM decoder.The probability of connecting the defects within each sub-lattice via a chain of twoqubit errors can be deduced from Fig. 5 (a) and reads where l m = max(l x , l z ) and the pre-factor accounts for the degeneracy of shortest strings composed of two-qubit errors.The input weights of the MPWM can then be approximated by taking into account single-and two-qubit error stings and read which is valid to the lowest order in the limits of weak (p 2 /p 1 ≪ 1) and strong (p 2 /p 1 ≫ 1) coupling regimes [71].We numerically investigate the performance of the CSS surface code in the presence of noise described by a quantum channel of Eqs.(28) and (27) with p XX = p Y Y = 0.5.We benchmark the performance of the surface code accompanied by a matching decoder that uses (i) the standard Manhattan distance metrics of Eq. ( 6) and (ii) distance determined according to Eq. (31), i.e., that takes single-and twoqubit errors with the corresponding degeneracies into account.As expected, the latter decoder yields much Fig.6: Simulated logical error rates versus code distance in the presence of nearest-neighbor correlations.Qubits are affected by a combination of single-qubit depolarizing noise and local two-qubit bit-and phase-flip errors, as described by Eq. (28).When used in conjunction with the standard CSS code, such two-qubit noise produces stabilizers defects in pairs, making the syndrome well suitable for the MWPM decoder.The blue (squares) curve corresponds to the MWPM with edges weighted according to the standard Manhattan distance (6).The green (circles) curve corresponds to the weights that take syndrome degeneracy into account, i.e., defined according to Eq. (32).The red (diamonds) curve corresponds to a decoder that explicitly takes into account the probability of two-qubit errors, as in Eq. (31).Data is shown for p = 0.125 and p 1 = 0.25p.more efficient error correction capabilities when twoqubit errors are present, see Fig. 6.This result is in agreement with the observation of Ref. [43].
Our simulations, however, show a surprising feature of error correction in the presence of correlated two-qubit noise: the term P 2 in Eq. (31) is, in fact, redundant, and ignoring it has vanishingly small effect on the performance of the decoder, as shown in Fig. 6.Instead, merely accounting for syndrome degeneracy in Eq. ( 29) is responsible for the suppressed logical error rates.Ignoring the probability of connecting two defects by a chain of two-qubit errors P 2 , Eq. (31) reduces to where we have omitted a constant shift − log p 1 > 0. As we show in Fig. 6, matching decoders with weights defined according to Eqs. (31) and (32) perform nearly identically, meaning that no information about the magnitudes of single-and two-qubit noise is required by the decoder to efficiently decode a syndrome in the presence of correlated two-qubit noise.
To explain this peculiar feature, we first turn to the case of single-qubit noise present in two configurations of the surface code: the standard [Fig.7   and the rotated [Fig.7 (b)] surface codes.The effect of the syndrome degeneracy in two such configurations has recently been investigated in Ref. [13].
The authors have shown that taking syndrome degeneracy into account improves the decoding accuracy for the case of the rotated surface code, but has no effect for the standard code, which agrees well with our numerical simulations provided in Appendix C. The difference in effect that syndrome degeneracy has on decoding can be attributed to degeneracy of logical operators produced by single-qubit errors.Figure 7 shows examples of such logical operators realized by shortest chains of single-qubit errors in the two configurations.While the standard surface code only supports d such logical errors, the rotated code can support a much larger number of them due to a high degree of logical operator degeneracy.Intuitively, in the former case a minimum-length path of singlequbit errors that traverses at least d/2 qubit locations occurs with much higher probability due to degeneracy.Hence, to adequately assess the error probabilities, degeneracy has to be taken into account in the case of the rotated code.
A similar, but opposite effect takes place when correlated errors are present in the system: Local two-qubit errors form highly-degenerate shortestpath logical operators in the non-rotated code, while the rotated code only supports d shortest two-qubit chains, see Fig. 7. Hence, taking the degeneracy into account in Eq. (32) has a positive effect of decoding two-qubit errors in the non-rotated surface code, which agrees with the results of Fig. 6.Following the same logic, one can expect that taking degeneracy into account for decoding similar correlated errors in the rotated code will have negligible effect of the accuracy.This also agrees well with our numerical simulations provided in Appendix C. Hence, taking code degeneracy into account plays a similar and important role for decoding single-qubit error on the rotated code as for decoding two-qubit error on the non-rotated code.Put another way, turning on correlated errors can be thought of as partial rotation of the code in the context of logical operator degeneracy.To summarize, Ref. [13] has shown that the choice of boundary conditions influences decoder performance.Here, we generalize this observation by showing that the performance is determined by a combination of the error model and the boundary conditions.
As shown in Fig. 5 (a), the standard CSS surface code used in conjunction with a MPWM decoder is well suited for correcting two-qubit noise described by a quantum channel (27).It is, however, not unreasonable to assume an experimental setup, or an algorithm, where the leading two-qubit error takes the form of an XZ channel, e.g., due to design aspects of a particular hardware implementation, or as a hook error copied from an ancilla qubit during stabilizer measurements [72].Such a two-qubit error of XZtype described by a quantum channel creates four defects in both dual and primal sublattices of the CSS code, hence compromising the performance of a matching decoder.To maintain the compatibility with a decoder, the code can be Clifford-deformed.For example, as we show in Fig. 5 (b), the XZZX obeys the same dynamics under XZ correlations as the CSS code under two-qubit bit-flip and phase-flip channel (27).Hence, knowing the type of the leading two-qubit noise, the surface code can be made compatible with the MPWM decoder under such noise by choosing an appropriate Clifford deformation.
As we have shown above, a MWPM decoder can efficiently handle correlated nearest-neighbor errors of certain types without the need of adjusting the decoding procedure to a known structure of the noise.Instead, merely taking syndrome degeneracy into account effectively adjusts the matching decoder to a noise model.Physical qubits in the surface code can in principle be affected by correlated errors other than two-qubit Pauli errors.In the future, it will be interesting to investigate if a similar argument holds when qubits are affected by correlated errors of different structures.

Conclusion
In conclusion, we have studied the performance of Clifford-deformed surface codes in the presence of non-identically distributed and correlated two-qubit errors.In both cases the sub-threshold logical error rates are shown to be exponentially suppressed compared to the standard codes.Hence, the code footprint, i.e., the number of physical qubits required to achieve a target logical error rate, is exponentially smaller than in the case of the CSS code.Importantly, the improved decoding accuracy is achieved using a fast matching decoder that does not require numerically extensive pre-processing and can potentially be implemented in real quantum hardware.We have studied the performance of matching decoders with input parameters defined according to different distance metrics and shown the advantage of using the shortest weighted paths as graph weights in the case of non-uniform qubit error rates.Our aim has been to demonstrate the principle of noise-tailored local Clifford deformations.To this aim, we have used simple error models as test cases.This can be seen as a further substantial step towards designing quantum error correction schemes optimized for a particular hardware implementation.Finally, we have investigated the connection between code degeneracy and structures of the noise affecting qubits in the rotated and non-rotated surface code configurations.This in turn allowed us to identify cases where taking code degeneracy into account has a positive effect on decoding accuracy.
In this work, we have considered the performance of noise-tailored surface codes for simple code capacity noise models where only the data qubits are subject to error.As a direction for further work, it would be interesting to investigate noise-tailored codes under more realistic circuit level noise models for which it is assumed every location in the error correction circuit has the potential to introduce errors.At the circuit level, an important design consideration is the choice of two-qubit entangling gates.If an entangling operation turns one species of Pauli errors to another, it can trigger error propagation events that cause the noise channel to become unbiased.This can diminish the benefits of bias-tailoring.Fortunately, bias-preserving hardware implementations of entangling gates have been proposed that are designed to maintain the system's noise-asymmetry.For instance, it is shown in Ref. [73] that bias-preserving gates can be achieved using stabilized cat qubits in driven nonlinear oscillators.This architecture has been demonstrated to integrate well with the XZZX code [29], and it would be interesting to investigate similar schemes in the setting of the Clifforddeformed codes explored in this work.
The notion of Clifford deformations makes sense also for other topological quantum error correcting codes beyond the toric or surface codes.For example, various instances of Clifford-deformed 3D codes have been studied in [74].Bias-tailoring has also been shown to be a useful technique for quantum low density parity check codes [75].Many of the developed ideas of Clifford-deformed codes beyond the iid setting readily carry over to other codes as well, giving rise to new sets of commuting stabilizers that are adapted to the noise model.It also seems perfectly conceivable that coherent errors can be addressed in a way similar to the one described here.Additionally, it would be interesting to investigate the influence of Clifford deformations on the performance of other decoders such as the union find decoder and belief matching.It is the hope that the present work can contribute to the line of thought of bringing notions of quantum error correction closer to ideas on actual quantum hardware development, and to think about quantum error correction in more physically motivated terms.

A Error thresholds calculation
We obtain the threshold estimates of Table 1 using the critical exponent method described in Refs.[79,80].Specifically, for physical error rates near the threshold we fit the logical error rate to the function P fit : R + → R with P fit (x) = B 0 + B 1 x + B 2 x 2 , ( where x := (p − p th ) αd β .( Here, d is the code distance, p is the single-qubit error rate, and B 0 , B 1 , B 2 , α, β are fitting parameters.Figure 8 shows near-threshold logical failure rates and threshold estimates of different codes.The thresholds are also summarized in Table 1.We see that the noise-tailored surface codes demonstrate error correcting thresholds exceeding those of the CSS code by ≈ 2.3% for σ P = 0.5.In Fig. 9 we compare the thresholds of the codes for a wider range of values σ P .We observe increasing thresholds of the noise-tailored codes as σ P grows.On the other hand, we see little to no difference between error thresholds derived for nonuniform (σ tot = 0.5) and uniform (σ tot = 0) total error rates, meaning that Clifford deformations do not help with correcting variations in total error rates.22) with σ tot = 1/2.Thresholds are calculated using a MWPM matching decoder with input weights defined according to the Manhattan distance.The threshold of the MMHH increases with the variation in relative Pauli noise described by σ P , while the threshold of the CSS code remains constant.

B Shortest-path matching
Figure 10 provides estimation of the error-correction threshold of different codes in the case when we use a noise-aware decoder and define the input weights according to the Dijkstra distance.In contrast to the decoder that uses Manhattan distance metrics, the decoder with Dijkstra-based metrics demonstrates a clear improvement of the error correction thresholds as σ tot grows, see Figs.

C Code geometry and syndrome degeneracy
In Fig. 12, we investigate the impact of code geometry and syndrome degeneracy.One can observe a qualitatively opposite behaviour when degeneracy is accounted for decoding error syndromes in rotated and nonrotated surface codes.In the presence of single-qubit errors, adding the degeneracy term has little, negative effect on the decoding fidelity when the non-rotated code (a) is used, while noticeably enhances it in the rotated code (b).When the code is subject to two-qubit errors, adding the degeneracy term has an opposite effect, as shown in (c,d).Here, code stabilizers are chosen according to Fig. 5, such that only one of the sub-lattices is affected by a single two-qubit error event.To generate the data in panels (a,b,c) the physical error rate is set to p = 0.1 and in (d) p = 0.05.

D Carbon footprint of numerical simulations
The carbon footprint associated with the numerical simulations in this paper are summarised below.Guidance on the reporting the carbon cost of scientific research can be found in Ref. [81].

Fig. 1 :
Fig. 1: The CSS surface code.Physical qubits are arranged on the edges on a rectangular lattice and shown with orange circles.Star and plaquette stabilizers are defined in Eq. (1) and shown with blue and salmon tiles, respectively.Logical X ( Z) operators are chains of singlequbit Pauli operators shown in red (blue).
t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = " > A A A C D n i c b Z C 7 T g J BF I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R J A E N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y Mr a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0 X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R J A E N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d G P 2 U a B Z c w K X Q S A z H j I z a A t k X F Q j B + m h 0 6 o W d W 6 d F + p O 1 T S D P 1 b 0 f K Q m P G Y W A r Q 4 Z D s 5 y b i v / l 2 g n 2 b / x U q D h B U H y 2 q J 9 I i h G d / p r 2 h A a O c m y B c S 3 s r ZQ P m W Y c r T c L W w L N R o B 2 g o U L S 1 R F m H l l r F X e s j G r 0 L w s e 5 X y V b 1 S q t 7 O T c u T E 3 J K z o l H r k m V 3 J M a a R B O g D y T V / L m v D j v z o f z O S v N O f O e Y 7 I Q z t c v 2 J G c m A = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R J A E N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d G P 2 U a B Z c w K X Q S A z H j I z a A t k X F Q j B + m h 0 6 o W d W 6 d F + p O 1 T S D P 1 b 0 f K Q m P G Y W A r Q 4 Z D s 5 y b i v / l 2 g n 2 b / x U q D h B U H y 2 q J 9 I i h G d / p r 2 h A a O c m y B c S 3 s r Z Q P m W Y c r T c L W w L N R o B 2 g o U L S 1 R F m H l l r F X e s j G r 0 L w s e 5 X y V b 1 S q t 7 O T c u T E 3 J K z o l H r k m V 3 J M a a R B O g D y T V / L m v D j v z o f z O S v N O f O e Y 7 I Q z t c v 2 J G c m A = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0 k N q + x Z W c F W o r E 4 A J a 7 H a z x Q 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R C 4 R N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 X A o B T z L J l / 9 c 5 w 9 i K Q y 6 7 r e T W V v f 2 N z K b u d 2 d v f 2 D / K H R 3 U T J Z p D j U c y 0 s 2 A G Z B C Q Q 0 F S m j G G l g Y S G g E w 7 t J v v E E 2 o h I P e A o B j 9 k f S V 6 g j O 0 U v W x k y + 4 R X c a d B W 8 O R T I P C q d / E + 7 G / E k B I V c M m N a n h u j n z K N g k s Y 5 9 q J g Z j x I e t D y 6 J i I R g / n R 4 6 p m d W 6 d J e p O 1 T S K f q 3 4 6 U h c a M w s B W h g w H Z j k 3 E f / L t R L s 3 f i p U H G C o P h s U S + R F C M 6 + T X t C g 0 c 5 c g C 4 1 r Y W y k f M M 0 4 W m 8 W t g S a D Q H t B A s X l q i K c O q V s V Z 5 y 8 a s Q v 2 y 6 J W K V 9 V S o X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0 k N q + x Z W c F W o r E 4 A J a 7 H a z x Q 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R C 4 R N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 X A o B T z L J l / 9 c 5 w 9 i K Q y 6 7 r e T W V v f 2 N z K b u d 2 d v f 2 D / K H R 3 U T J Z p D j U c y 0 s 2 A G Z B C Q Q 0 F S m j G G l g Y S G g E w 7 t J v v E E 2 o h I P e A o B j 9 k f S V 6 g j O 0 U v W x k y + 4 R X c a d B W 8 O R T I P C q d / E + 7 G / E k B I V c M m N a n h u j n z K N g k s Y 5 9 q J g Z j x I e t D y 6 J i I R g / n R 4 6 p m d W 6 d J e p O 1 T S K f q 3 4 6 U h c a M w s B W h g w H Z j k 3 E f / L t R L s 3 f i p U H G C o P h s U S + R F C M 6 + T X t C g 0 c 5 c g C 4 1 r Y W y k f M M 0 4 W m 8 W t g S a D Q H t B A s X l q i K c O q V s V Z 5 y 8 a s Q v 2 y 6 J W K V 9 V S oX w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R J A E N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d G P 2 U a B Z c w K X Q S A z H j I z a A t k X F Q j B + m h 0 6 o W d W 6 d F + p O 1 T S D P 1 b 0 f K Q m P G Y W A r Q 4 Z D s 5 y b i v / l 2 g n 2 b / x U q D h B U H y 2 q J 9 I i h G d / p r 2 h A a O c m y B c S 3 s r Z Q P m W Y c r T c L W w L N R o B 2 g o U L S 1 R F m H l l r F X e s j G r 0 L w s e 5 X y V b 1 S q t 7 O T c u T E 3 J K z o l H r k m V 3 J M a a R B O g D y T V / L m v D j v z o f z O S v N O f O e Y 7 I Q z t c v 2 J G c m A = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R J A E N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d G P 2 U a B Z c w K X Q S A z H j I z a A t k X F Q j B + m h 0 6 o W d W 6 d F + p O 1 T S D P 1 b 0 f K Q m P G Y W A r Q 4 Z D s 5 y b i v / l 2 g n 2 b / x U q D h B U H y 2 q J 9 I i h G d / p r 2 h A a O c m y B c S 3 s r Z Q P m W Y c r T c L W w L N R o B 2 g o U L S 1 R F m H l l r F X e s j G r 0 L w s e 5 X y V b 1 S q t 7 O T c u T E 3 J K z o l H r k m V 3 J M a a R B O g D y T V / L m v D j v z o f z O S v N O f O e Y 7 I Q z t c v 2 J G c m A = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0k N q + x Z W c F W o r E 4 A J a 7 H a z x Q 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R C 4 R N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 X A o B T z L J l / 9 c 5 w 9 i K Q y 6 7 r e T W V v f 2 N z K b u d 2 d v f 2 D / K H R 3 U T J Z p D j U c y 0 s 2 A G Z B C Q Q 0 F S m j G G l g Y S G g E w 7 t J v v E E 2 o h I P e A o B j 9 k f S V 6 g j O 0 U v W x k y + 4 R X c a d B W 8 O R T I P C q d / E + 7 G / E k B I V c M m N a n h u j n z K N g k s Y 5 9 q J g Z j x I e t D y 6 J i I R g / n R 4 6 p m d W 6 d J e p O 1 T S K f q 3 4 6 U h c a M w s B W h g w H Z j k 3 E f / L t R L s 3 f i p U H G C o P h s U S + R F C M 6 + T X t C g 0 c 5 c g C 4 1 r Y W y k f M M 0 4 W m 8 W t g S a D Q H t B A s X l q i K c O q V s V Z 5 y 8 a s Q v 2 y 6 J W K V 9 V S oX w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0k N q + x Z W c F W o r E 4 A J a 7 H a z x Q 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R C 4 R N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 X A o B T z L J l / 9 c 5 w 9 i K Q y 6 7 r e T W V v f 2 N z K b u d 2 d v f 2 D / K H R 3 U T J Z p D j U c y 0 s 2 A G Z B C Q Q 0 F S m j G G l g Y S G g E w 7 t J v v E E 2 o h I P e A o B j 9 k f S V 6 g j O 0 U v W x k y + 4 R X ca d B W 8 O R T I P C q d / E + 7 G / E k B I V c M m N a n h u j n z K N g k s Y 5 9 q J g Z j x I e t D y 6 J i I R g / n R 4 6 p m d W 6 d J e p O 1 T S K f q 3 4 6 U h c a M w s B W h g w H Z j k 3 E f / L t R L s 3 f i p U H G C o P h s U S + R F C M 6 + T X t C g 0 c 5 c g C 4 1 r Y W y k f M M 0 4 W m 8 W t g S a D Q H t B A s X l q i K c O q V s V Z 5 y 8 a s Q v 2 y 6 J W K V 9 V S o X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R J A E N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d G P 2 U a B Z c w K X Q S A z H j I z a A t k X F Q j B + m h 0 6 o W d W 6 d F + p O 1 T S D P 1 b 0 f K Q m P G Y W A r Q 4 Z D s 5 y b i v / l 2 g n 2 b / x U q D h B U H y 2 q J 9 I i h G d / p r 2 h A a O c m y B c S 3 s r Z Q P m W Y c r T c L W w L N R o B 2 g o U L S 1 R F m H l l r F X e s j G r 0 L w s e 5 X y V b 1 S q t 7 O T c u T E 3 J K z o l H r k m V 3 J M a a R B O g D y T V / L m v D j v z o f z O S v N O f O e Y 7 I Q z t c v 2 J G c m A = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R J A E N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d G P 2 U a B Z c w K X Q S A z H j I z a A t k X F Q j B + m h 0 6 o W d W 6 d F + p O 1 T S D P 1 b 0 f K Q m P G Y W A r Q 4 Z D s 5 y b i v / l 2 g n 2 b / x U q D h B U H y 2 q J 9 I i h G d / p r 2 h A a O c m y B c S 3 s r Z Q P m W Y c r T c L W w L N R o B 2 g o U L S 1 R F m H l l r F X e s j G r 0 L w s e 5 X y V b 1 S q t 7 O T c u T E 3 J K z o l H r k m V 3 J M a a R B O g D y T V / L m v D j v z o f z O S v N O f O e Y 7 I Q z t c v 2 J G c m A = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0 X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0 X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0 X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0 X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0 X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > X < l a t e x i t s h a 1 _ b a s e 6 4 = " g m y Y z c M n T D 0 Y j R 6 w / Z V z 7 N Z e / 4 w = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t L G E R J A E N m R 2 O M C E 2 d n N z F k T s u E J b C z 0 V e y M r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d r a / g m 1 g 6 L B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n t 7 a + s b m V 3 y 7 s 7 O 7 t H x Q P j 5 o m S j S H B o 9 k p F s B M y C F g g Y K l N C K N b A w k P A Y j O 6 m + c c n 0 E Z E 6 g H H M f g h G y j R F 5 y h l e q t b r H k l t 0 s 6 C p 4 c y i R e d S 6 x Z 9 O L + J J C A q 5 Z M a 0 P T d X w 7 N y 1 L T s g p O S c e u S Z l c k 8 q p E Y 4 A f J M X s m b 8 + K 8 O x / O 5 6 w 0 4 8 x 7 j s l C O F + / 2 + W c m g = = < / l a t e x i t > Z < l a t e x i t s h a 1 _ b a s e 6 4 = " o u 0

Fig. 2 :
Fig. 2: Surface codes tailored to biased noise in the (a) XZZX and (b) XXZZ configurations.(a) In the XZZX code, each code stabilizer is the product of two Pauli X (on horizontally located qubits) and two Pauli Z (on vertically located qubits) operators.Logical X ( Z) operator is shown with solid red (blue) line and corresponds to a product of single-qubit X (Z) Pauli operators.(b) In the XXZZ code the stabilizers are of two types.Stabilizers on even diagonals are products of Pauli X operators on qubits to the north and west and Pauli Z operators on qubits to the south and east, as shown with plain tiles.Stabilizers on odd diagonals differ by interchanging X and Z Paulis and are shown with shaded tiles.Logical X and Z operators are products of alternating X and Z single-qubit Pauli operators.
t e x i t s h a 1 _ b a s e 6 4 = " h / 3 x m 6 s 5 8 Y 4 8 o b X m 2 a 4 8 0 E x t s + s = " > A A A C E H i c b Z D L S g M x F I Y z 9 V b r r e r S T b A I b i w z U t F l 0 Y 0 b o a K 9 Q D u U T J q 2 o Z l k S M 4 I Z e g j u H G h r + J O 3 P o G v o l L 0 + k s b O u B w M d / r v m D S H A D r v v t 5 F Z W 1 9 Y 3 8 p u F r e 2 d 3 b 3 a 1 b / O n 0 F I 1 D J o E K Y k z b c y P w E 6 K B U 8 E m h U 5 s W E T o i A x Y 2 6 I k I T N + k p 4 6 w S d W 6 e G + 0 v Z J w K n 6 t y M h o T H j M L C V I Y G h W c x N x f 9 y 7 R j 6 V 3 7 C Z R Q D k 3 S 2 q B 8 L D A p P / 4 1 7 X D M K Y m y B U M 3 t r Z g O i S Y U r D t z W w J N R g z s B A t n l r B U k L p l r F X e o j H L 0 D g v e 5 X y x X 2 l V L 3 O T M u j I 3 S M T p G H L l E V 3 a I a q i O K B u g Z v a I 3 5 8 V 5 d z 6 c z 1 l p z s l 6 D t F c O F + / A R C d M Q = = < / l a t e x i t > M1 < l a t e x i t s h a 1 _ b a s e 6 4 = " h / 3 x m 6 s 5 8 Y 4 8 o b X m 2 a 4 8 0 E x t s + s = " > A A A C E H i c b Z D L S g M x F I Y z 9 V b r r e r S T b A I b i w z U t F l 0 Y 0 b o a K 9 Q D u U T J q 2 o Z l k S M 4 I Z e g j u H G h r + J O 3 P o G v o l L 0 + k s b O u B w M d / r v m D S H A D r v v t 5 F Z W 1 9 Y 3 8 p u F r e 2 d 3 b 3 i / k H D q F h T V q d K K N 0 K i G G C S 1 Y H D o K 1 I s 1 I G A j W D E Y 3 0 3 z z i W n D l X y E c c T 8 k A w k 7 3 N K w E o P d 1 2 v W y y 5 Z T c N v A x e B i W U R a 1 b / O n 0 F I 1 D J o E K Y k z b c y P w E 6 K B U 8 E m h U 5 s W E T o i A x Y 2 6 I k I T N + k p 4 6 w S d W 6 e G + 0 v Z J w K n 6 t y M h o T H j M L C V I Y G h W c x N x f 9 y 7 R j 6 V 3 7 C Z R Q D k 3 S 2 q B 8 L D A p P / 4 1 7 X D M K Y m y B U M 3 t r Z g O i S Y U r D t z W w J N R g z s B A t n l r B U k L p l r F X e o j H L 0 D g v e 5 X y x X 2 l V L 3 O T M u j I 3 S M T p G H L l E V 3 a I a q i O K B u g Z v a I 3 5 8 V 5 d z 6 c z 1 l p z s l 6 D t F c O F + / A R C d M Q = = < / l a t e x i t > H1 < l a t e x i t s h a 1 _ b a s e 6 4 = " o o G J T l o 1 m K x / 3 c / P Q f U j g n S Y e r 4 = " > A A A C E H i c b Z D L T g I x F I Y 7 e E O 8 o S 7 d N B I T N 5 I Z g 9 E l 0 Q 1 L j H J J Y E I 6 p Q M N n X b S n j E h h E d w 4 0 J f x Z 1 x 6 x v 4 J i 4 t w y w E P E m T L / + 5 9 g 9 i w Q 2 4 7 r e T W 1 v

H1<
l a t e x i t s h a 1 _ b a s e 6 4 = " o o G J T l o 1 m K x / 3 c / P Q f U j g n S Y e r 4 = " > A A A C E H i c b Z D L T g I x F I Y 7 e E O 8 o S 7 d N B I T N 5 I Z g 9 E l 0 Q 1 L j H J J Y E I 6 p Q M N n X b S n j E h h E d w 4 0 J f x Z 1 x 6 x v 4 J i 4 t w y w E P E m T L / + 5 9 g 9 i w Q 2 4 7 r e T W 1 v 9 9 I x e 0 Z v z 4 r w 7 H 8 7 n t H T F m f U c o b l w v n 4 B + / m d L g = = < / l a t e x i t > M3 < l a t e x i t s h a 1 _ b a s e 6 4 = " o 2 + G U p j t W 4 e Q 1 b X 1 3 E Z + c 2 t 7 Z 7 e w t 1 8 3 K t G U 1 a g S S j c D Y p j g k t W A g 2 D N W D M S B Y I 1 g s H N J N 9 4 Y t p w J R 9 h G D M / I j 3 J Q 0 4 J W O n h r n P e K R T d k p s G X g Q v g y L K o t o p / L S 7 i i Y R k 0 A F M a b l u T H 4 I 6 K B U 8 H G + X Z i W E z o g P R Y y 6 I k E T P + K D 1 1 j I + t 0 s W h 0 v Z J w K n 6 t 2 N E I m O G U W A r I w J 9 M 5 + b i P / l W g m E V / 6 I y z g B J u l 0 U Z g I D A p P / o 2 7 X D M K Y m i B U M 3 t r Z j 2 i S Y U r D s z W w J N B g z s B A u n l r B U k L p l r F X e v D G L U D 8 r e e X S x X 2 5 W L n O T M u h Q 3 S E T p C H L l E F 3 a I q q i G K e u g Z v a I 3 5 8 V 5 d z 6 c z 2 n p k p P 1 H K C Z c L 5 + A Q R k n T M = < / l a t e x i t > M4 < l a t e x i t s h a 1 _ b a s e 6 4 = " U d 6 B z c H q + v D p t D j X s u 5 2 7 / r T B X 0 = " > A A A C E H i c b Z D L S g M x F I Y z 9 V b r r e r S T b A I b i w z U t F l 0 Y 0 b o a K 9 Q D u U T J q 2 o Z l k S M 4 I Z e g j u H G h r + J O 3 P o G v o l L 0 + k s b O u B w M d / r v m D S H A D r v v t 5 F Z W 1 9 Y 3 8 p u F r e 2 d 3 b 3 z o v z 7 n w 4 n 7 P S n J P 1 H K K 5 c L 5 + A Q Y O n T Q = < / l a t e x i t > H4 < l a t e x i t s h a 1 _ b a s e 6 4 = " / A M C r l Z 4 J f D K v D r 9 R V D Z S 7 p P E k Y = " > A A A C E H i c b Z D L T g I x F I Y 7 e E O 8 o S 7 d N B I T N 5 I Z g 9 E l 0Q 1 L j H J J Y E I 6 p Q M N n X b S n j E h h E d w 4 0 J f x Z 1 x 6 x v 4 J i 4 t w y w E P E m T L / + 5 9 g 9 i w Q 2 4 7 r e T W 1 v f 2 N z K b x d 2 d v f 2 D 4 q H R 0 2 j E k 1 Z g y q h d D s g h g k u W Q M 4 C N a O N S N R I F g r G N 3 N 8 q 0 n p g 1 X 8 h H G M f M j M p A 8 5 J S A l R 5 q v U q v W H L L b h p 4 F b w M S i i L e q / 4 0 + 0 r m k R M A h X E m I 7 n x u B P i A Z O B Z s W u o l h M a E j M m A d i5 J E z P i T 9 N Q p P r N K H 4 d K 2 y c B p + r f j g m J j B l H g a 2 M C A z N c m 4 m / p f r J B D e + B M u 4 w S Y p P N F Y S I w K D z 7 N + 5 z z S i I s Q V C N b e 3 Y j o k m l C w 7i x s C T Q Z M b A T L F x Y w l J B 6 p a x V n n L x q x C 8 7 L s V c p X 9 5 V S 9 T Y z L Y 9 O 0 C k 6 R x 6 6 R l V U Q 3 X U Q B Q N 0 D N 6 R W / O i / P u f D i f 8 9 K c k / U c o 4 V w v n4 B / a O d L w = = < / l a t e x i t > M2 < l a t e x i t s h a 1 _ b a s e 6 4 = " 1 U 6 z q g f L k 3 e D V w S n g t R w z M a h W d Q = " > A A A C E H i c b Z D L T g I x F I Y 7 e E O 8 o S 7 d N B I T N 5 I Z g t E l 0 Y 0 b E 4 w i J D A h n d K B h k 4 7 a c + Y E M I j u H G h r + L O u P U N f B O X l m E W A p 6 k y Z f / X P s H s e A G X P f b y a 2 s r q 1 v 5 D c L W 9 s 7 u 3 n b n 0 D 3 8 S l 6 b Q L 2 3 o g 8 P G f a / 4 g F t y A 6 3 4 7 K 6 t r 6 x u b u a 3 8 9 s 7 u 3 n 7 h 4 L B h V K I p q 1 M l l G 4 F x D D B J a s D B 8 F a s W Y k C g R r B s O b S b 7 5 x L T h S j 7 C K G Z + R P q S h 5 w S s N L D X b f S L R T d k p s F X g Z v B k U 0 i 1 q 3 8 N P p K Z p E T A I V x J i 2 5 8 b g p 0 Q D p 4 K N 8 5 3 E s J j Q I e m z t k V J I m b 8 N D t 1 j E + t 0 s O h 0 v Z J w J n 6 t y M l k T G j K L C V E Y G B W c x N x P 9 y 7 Q T C K z / l M k 6 A S T p d F C Y C g 8 K T f + M e 1 4 y C G F k g V H N 7 K 6 Y D o g k F 6 8 7 c l k C T I Q M 7 w c K 5 J S w V Z G 4 Z a 5 W 3 a M w y N C 5 K X r l U u S 8 X q 9 c z 0 3 L o G J 2 g M + S h S 1 R F t 6 i G 6 o i i P n p G r + j N e X H e n Q / n c 1 q 6 4 s x 6 j t B c O F + / B 7 i d N Q = = < / l a t e x i t > H5 < l a t e x i t s h a 1 _ b a s e 6 4 = " Q + b k 8 1 b c g a s 1 Z N j b D 9 I x e 0 Z v z 4 r w 7 H 8 7 n v H T N y X p O 0 E I 4 X 7 / / T Z 0 w < / l a t e x i t > H < l a t e x i t s h a 1 _ b a s e 6 4 = " w / 3 K / Y m z x 8 9 5 G 0 H Y D V n d r P L O C w 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t K G E R C 4 J b M j s c I A J s 7 O b m b M m Z M M T 2 F j o q 9 g Z W 1 / B N 7 F 0 u B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n s 7 G 5 t b 2 T 3 c 3 t 7 R 8 c H u W P T x o m S j S H O o 9 k p F s B M y C F g j o K l N C K N b A w k N A M R g / T f P M J t B G R e s R x D H 7 I B k r 0 B W d o p V q l m y + 4 R X c W d B 2 8 B R T I I q r l 0 F b w 4 F M o 9 K J / / T 7 k Y 8 C U E h l 8 y Y l u f G 6 K d M o + A S x r l 2 Y i B m f M j 6 0 L K o W A j G T 6 e H j u m Z V b q 0 F 2 n 7 F N K p + r c j Z a E x o z C w l S H D g V n O T c T / c q 0 E e z d + K l S c I C g + W 9 R L J M W I T n 5 N u 0 I D R z m y w L g W 9 l b K B 0 w z j t a b h S 2 B Z k N A O 8 H C h S W q I p x 6 Z a x V 3 r I x q 1 C / L H q l 4 l W 1 V C j f z k 3 L k h N y S s 6 J R 6 5 J m d y T C q k R T o A 8 k 1 f y 5 r w 4 7 8 6 H 8 z k r z T j z n m O y E M 7 X L 8 Z D n I 0 = < / l a t e x i t > M < l a t e x i t s h a 1 _ b a s e 6 4 = " g u V 4 j E c T 5 E U 3 / N l 6 9 o pi / g T 1 R V c = " > A A A C D n i c b Z C 7 S g N B F I Z n 4 y 3 G W 9 T S Z j A I N o Z d i W g Z t L E R E j A X S J Y w O z l J h s z O L j N n h b D k C W w s 9 F X s x N Z X 8 E 0 s n V w K k 3 h g 4 O M / 1 / m D W A q D r v v t Z N b W N z a 3 s t u 5 n d 2 9 / Y P 8 4 V H d R I n m U O O R j H Q z Y A a k U F B D g R K a s Q Y W B h I a w f B u k m 8 8 g T Y i U o 8 4 i s E P W V + J n u A M r V R 9 6 O Q L b t G d Bl 0 F b w 4 F M o 9 K J / / T 7 k Y 8 C U E h l 8 y Y l u f G 6 K d M o + A S x r l 2 Y i B m f M j 6 0 L K o W A j G T 6 e H j u m Z V b q 0 F 2 n 7 F N K p + r c j Z a E x o z C w l S H D g V n O T c T / c q 0 E e z d + K l S c I C g + W 9 R L J M W I T n 5 N u 0 I D R z m y w L g W 9 l b K B 0 w z j t a b h S 2 B Z k N A O 8 H C h S W q I p x 6 Z a x V 3 r I x q 1 C / L H q l 4 l W 1 V C j f z k 3 L k h N y S s 6 J R 6 5 J m d y T C q k R T o A 8 k 1 f y 5 r w 4 7 8 6 H 8 z k r z T j z n m O y E M 7 X L 8 Z D n I 0 = < / l a t e x i t > H < l a t e x i t s h a 1 _ b a s e 6 4 = " w / 3 K / Y m z x 8 9 5 G 0 H Y D V n d r P L O C w 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t K G E R C 4 J b M j s c I A J s 7 O b m b M m Z M M T 2 F j o q 9 g Z W 1 / B N 7 F 0 u B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n s 7 G 5 t b 2 T 3 c 3 t 7 R 8 c H u W P T x o m S j S H O o 9 k p F s B M y C F g j o K l N C K N b A w k N A M R g / T f P M J t B G R e s R x D H 7 I B k r 0 B W d o p V q l m y + 4 R X c W d B 2 8 B R T I I q r l 0 F b w 4 F M o 9 K J / / T 7 k Y 8 C U E h l 8 y Y l u f G 6 K d M o + A S x r l 2 Y i B m f M j 6 0 L K o W A j G T 6 e H j u m Z V b q 0 F 2 n 7 F N K p + r c j Z a E x o z C w l S H D g V n O T c T / c q 0 E e z d + K l S c I C g + W 9 R L J M W I T n 5 N u 0 I D R z m y w L g W 9 l b K B 0 w z j t a b h S 2 B Z k N A O 8 H C h S W q I p x 6 Z a x V 3 r I x q 1 C / L H q l 4 l W 1 V C j f z k 3 L k h N y S s 6 J R 6 5 J m d y T C q k R T o A 8 k 1 f y 5 r w 4 7 8 6 H 8 z k r z T j z n m O y E M 7 X L 8 Z D n I 0 = < / l a t e x i t > M < l a t e x i t s h a 1 _ b a s e 6 4 = " g u V 4 j E c T 5 E U 3 / N l 6 9 o pi / g T 1 R V c = " > A A A C D n i c b Z C 7 S g N B F I Z n 4 y 3 G W 9 T S Z j A I N o Z d i W g Z t L E R E j A X S J Y w O z l J h s z O L j N n h b D k C W w s 9 F X s x N Z X 8 E 0 s n V w K k 3 h g 4 O M / 1 / m D W A q D r v v t Z N b W N z a 3 s t u 5 n d 2 9 / Y P 8 4 V H d R I n m U O O R j H Q z Y A a k U F B D g R K a s Q Y W B h I a w f B u k m 8 8 g T Y i U o 8 4 i s E P W V + J n u A M r V R 9 6 O Q L b t G d Bl 0 F b w 4 F M o 9 K J / / T 7 k Y 8 C U E h l 8 y Y l u f G 6 K d M o + A S x r l 2 Y i B m f M j 6 0 L K o W A j G T 6 e H j u m Z V b q 0 F 2 n 7 F N K p + r c j Z a E x o z C w l S H D g V n O T c T / c q 0 E e z d + K l S c I C g + W 9 R L J M W I T n 5 N u 0 I D R z m y w L g W 9 l b K B 0 w z j t a b h S 2 B Z k N A O 8 H C h S W q I p x 6 Z a x V 3 r I x q 1 C / L H q l 4 l W 1 V C j f z k 3 L k h N y S s 6 J R 6 5 J m d y T C q k R T o A 8 k 1 f y 5 r w 4 7 8 6 H 8 z k r z T j z n m O y E M 7 X L 8 Z D n I 0 = < / l a t e x i t > H < l a t e x i t s h a 1 _ b a s e 6 4 = " w / 3 K / Y m z x 8 9 5 G 0 H Y D V n d r P L O C w 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t K G E R C 4 J b M j s c I A J s 7 O b m b M m Z M M T 2 F j o q 9 g Z W 1 / B N 7 F 0 u B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n s 7 G 5 t b 2 T 3 c 3 t 7 R 8 c H u W P T x o m S j S H O o 9 k p F s B M y C F g j o K l N C K N b A w k N A M R g / T f P M J t B G R e s R x D H 7 I B k r 0 B W d o p V q l m y + 4 R X c W d B 2 8 B R T I I q r A H k m r + T N e X H e n Q / n c 1 6 a c R Y 9 p 2 Q p n K 9 f v f G c i A = = < / l a t e x i t > H < l a t e x i t s h a 1 _ b a s e 6 4 = " w / 3 K / Y m z x 8 9 5 G 0 H Y D V n d r P L O C w 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t K G E R C 4 J b M j s c I A J s 7 O b m b M m Z M M T 2 F j o q 9 g Z W 1 / B N 7 F 0 u B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n s 7 G 5 t b 2 T 3 c 3 t 7 R 8 c H u W P T x o m S j S H O o 9 k p F s B M y C F g j o K l N C K N b A w k N A M R g / T f P M J t B G R e s R x D H 7 I B k r 0 B W d o p V q l m y + 4 R X c W d B 2 8 B R T I I q r A H k m r + T N e X H e n Q / n c 1 6 a c R Y 9 p 2 Q p n K 9 f v f G c i A = = < / l a t e x i t > H < l a t e x i t s h a 1 _ b a s e 6 4 = " w / 3 K / Y m z x 8 9 5 G 0 H Y D V n d r P L O C w 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t K G E R C 4 J b M j s c I A J s 7 O b m b M m Z M M T 2 F j o q 9 g Z W 1 / B N 7 F 0 u B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n s 7 G 5 t b 2 T 3 c 3 t 7 R 8 c H u W P T x o m S j S H O o 9 k p F s B M y C F g j o K l N C K N b A w k N A M R g / T f P M J t B G R e s R x D H 7 I B k r 0 B W d o p V q l m y + 4 R X c W d B 2 8 B R T I I q r e H j u m Z V b q 0 F 2 n 7 F N K p + r c j Z a E x o z C w l S H D g V n O T c T / c q 0 E e z d + K l S c I C g + W 9 R L J M W I T n 5 N u 0 I D R z m y w L g W 9 l b K B 0 w z j t a b h S 2 B Z k N A O 8 H C h S W q I p x 6 Z a x V 3 r I x q 1 C / L H q l 4 l W 1 V C j f z k 3 L k h N y S s 6 J R 6 5 J m d y T C q k R T o A 8 k 1 f y 5 r w 4 7 8 6 H 8 z k r z T j z n m O y E M 7 X L 8 Z D n I 0 = < / l a t e x i t > M < l a t e x i t s h a 1 _ b a s e 6 4 = " g u V 4 j E c T 5 E U 3 / N l 6 9 o p i / g T 1 R V c = " > A A A C D n i c b Z C 7 S g N B F I Z n 4 y 3 G W 9 T S Z j e H j u m Z V b q 0 F 2 n 7 F N K p + r c j Z a E x o z C w l S H D g V n O T c T / c q 0 E e z d + K l S c I C g + W 9 R L J M W I T n 5 N u 0 I D R z m y w L g W 9 l b K B 0 w z j t a b h S 2 B Z k N A O 8 H C h S W q I p x 6 Z a x V 3 r I x q 1 C / L H q l 4 l W 1 V C j f z k 3 L k h N y S s 6 J R 6 5 J m d y T C q k R T o A 8 k 1 f y 5 r w 4 7 8 6 H 8 z k r z T j z n m O y E M 7 X L 8 Z D n I 0 = < / l a t e x i t > H < l a t e x i t s h a 1 _ b a s e 6 4 = " w / 3 K / Y m z x 8 9 5 G 0 H Y D V n d r P L O C w 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t K G E R C 4 J b M j s c I A J s 7 O b m b M m Z M M T 2 F j o q 9 g Z W 1 / B N 7 F 0 u B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n s 7 G 5 t b 2 T 3 c 3 t 7 R 8 c H u W P T x o m S j S H O o 9 k p F s B M y e H j u m Z V b q 0 F 2 n 7 F N K p + r c j Z a E x o z C w l S H D g V n O T c T / c q 0 E e z d + K l S c I C g + W 9 R L J M W I T n 5 N u 0 I D R z m y w L g W 9 l b K B 0 w z j t a b h S 2 B Z k N A O 8 H C h S W q I p x 6 Z a x V 3 r I x q 1 C / L H q l 4 l W 1 V C j f z k 3 L k h N y S s 6 J R 6 5 J m d y T C q k R T o A 8 k 1 f y 5 r w 4 7 8 6 H 8 z k r z T j z n m O y E M 7 X L 8 Z D n I 0 = < / l a t e x i t > M < l a t e x i t s h a 1 _ b a s e 6 4 = " g u V 4 j E c T 5 E U 3 / N l 6 9 o p i / g T 1 R V c = " > A A A C D n i c b Z C 7 S g N B F I Z n 4 y 3 G W 9 T S Z j e H j u m Z V b q 0 F 2 n 7 F N K p + r c j Z a E x o z C w l S H D g V n O T c T / c q 0 E e z d + K l S c I C g + W 9 R L J M W I T n 5 N u 0 I D R z m y w L g W 9 l b K B 0 w z j t a b h S 2 B Z k N A O 8 H C h S W q I p x 6 Z a x V 3 r I x q 1 C / L H q l 4 l W 1 V C j f z k 3 L k h N y S s 6 J R 6 5 J m d y T C q k R T o A 8 k 1 f y 5 r w 4 7 8 6 H 8 z k r z T j z n m O y E M 7 X L 8 Z D n I 0 = < / l a t e x i t > H < l a t e x i t s h a 1 _ b a s e 6 4 = " w / 3 K / Y m z x 8 9 5 G 0 H Y D V n d r P L O C w 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t K G E R C 4 J b M j s c I A J s 7 O b m b M m Z M M T 2 F j o q 9 g Z W 1 / B N 7 F 0 u B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n s 7 G 5 t b 2 T 3 c 3 t 7 R 8 c H u W P T x o m S j S H O o 9 k p F s B M y A H k m r + T N e X H e n Q / n c 1 6 a c R Y 9 p 2 Q p n K 9 f v f G c i A = = < / l a t e x i t > H < l a t e x i t s h a 1 _ b a s e 6 4 = " w / 3 K / Y m z x 8 9 5 G 0 H Y D V n d r P L O C w 8 = " > A A A C D n i c b Z C 7 T g J B F I Z n 8 Y Z 4 Q y 1 t J h I T G 8 m u w W h J t K G E R C 4 J b M j s c I A J s 7 O b m b M m Z M M T 2 F j o q 9 g Z W 1 / B N 7 F 0 u B Q C n m S S L / + 5 z h / E U h h 0 3 W 8 n s 7 G 5 t b 2 T 3 c 3 t 7 R 8 c H u W P T x o m S j S H O o 9 k p F s B M y

Fig. 3 :
Fig. 3: Noise-tailored surface codes in the (a) MHHM and (b) MMHH configurations.On each given qubit, stabilizers measure Pauli operators corresponding to medium and high rate errors.(a) Operators H i and M i correspond to high-rate and medium-rate Pauli errors of qubit i ∈ L they are measured on.Stabilizer s of the MHHM code measures operators M i (H i ) on qubits i in the neighborhood of s located to the horizontally (vertically) from it.Logical X and Z operators are products of Pauli operators corresponding to medium and high rate local errors, respectively.(b) As in (a), operators M i and H i are chosen locally accordingly to error rates of a given qubit.Stabilizers of the MMHH code located on even diagonals (solid tiles) differ from the stabilizers located on odd diagonals (dashed tiles) by interchanging operators M i and H i .For brevity, subscripts of singlequbit operators composing stabilizers of (b) and logical operators in (a,b) are omitted in the figure.
(6) [CSS and MMHH] and Eq.(25) [MHHM].The second metrics uses the known local error rates and calculates shortest weighted paths calculated with Dijkstra algorithm.

5 Fig. 4 :
Fig.4: Sub-threshold logical failure rates vs. code distance d of squared-shaped surface codes.(a) Tailoring codes stabilizers to local Pauli noise.Green and blue curves correspond to, respectively, the CSS and noisetailored MMHH codes.The curves are derived using a standard MWPM decoder with the Manhattan distance defined in Eq.(6).Data is shown for p = 0.1 and σ tot = 1/2 in Eq.(22).Solid and dashed lines correspond to σ P = 0.125 and σ P = 0.5, respectively.The XXZZ and XZZX codes yield logical error rates identical to those of the CSS code, while the MHHM code demonstrates a scaling similar to that of the MMHH code.These curves are hence not shown.(b) Tailoring a matching decoder to local total noise.Black (purple) curve correspond to the MHHM code in conjunction with a decoder using the Manhattan (Dijsktra) distance metrics.Solid and dashed lines correspond to noise models with σ tot = 0.25 and σ tot = 0.5, respectively.

Fig. 5 :
Fig.5: Surface codes tailored for a known two-qubit noise channel.(a) Two-qubit phase-flip and bit-flip errors between nearest neighbors create anyons within one of the sub-lattices, as shown with green tiles, and can be efficiently decoded.(b) In the presence of, e.g., XZ correlations, the code stabilizers can be Clifford-deformed to maintain the same decoding capabilities as in (a). (a)]

Fig. 7 :
Fig.7: Examples of logical X operators of the (a) nonrotated and (b) rotated surface codes.Single-and twoqubit errors are shown schematically with red dots and blue dumbbells, respectively.In (a), single-qubit error can form only d different shortest-path logical operators, while the number of shortest-path logical operators formed by two-qubit errors is highly degenerate.For the rotated surface code of (b), the situation is reversed, i.e., the number of logical errors due to single-qubit errors is highly degenerate.

Fig. 8 :
Fig. 8: Logical error rates of the (a,d) CSS and (b,e) MMHH, and (c,f) MHHM surface codes in the presence of non-identically distributed Pauli errors with σ P = 0.5.In panels (a)-(c) the total qubit noise is nonuniform with σ tot = 0.5.In panels (d)-(f) the total qubit noise is uniform.The syndromes are decoded using MWPM with distance metric calculated according to the Manhattan distance.Error bars show one standard deviation.

Fig. 9 :
Fig.9: Error correction thresholds of the CSS (red squares) and MMHH (blue circles) surface codes versus the standard deviation σ P in Eq. (22) with σ tot = 1/2.Thresholds are calculated using a MWPM matching decoder with input weights defined according to the Manhattan distance.The threshold of the MMHH increases with the variation in relative Pauli noise described by σ P , while the threshold of the CSS code remains constant.
Figure10provides estimation of the error-correction threshold of different codes in the case when we use a noise-aware decoder and define the input weights according to the Dijkstra distance.In contrast to the decoder that uses Manhattan distance metrics, the decoder with Dijkstra-based metrics demonstrates a clear improvement of the error correction thresholds as σ tot grows, see Figs.10 and 11.

Fig. 10 :
Fig.10: Same as Fig.8, but for a matching decoder that uses input weights defined according to the shortest weighted paths.The parameters of the noise used for simulations are identical to those used in Fig.8.

Fig. 11 :
Fig.11: Error correction thresholds of the MMHH code versus the standard deviation of the total error rate σ tot in Eq. (24) with σ P .Red squares and blue circles correspond to matching decoders that use input weights defined according to the Manhattan and Dijkstra distance metrics, respectively.Other codes demonstrate qualitatively similar behaviour and are not shown.

Fig. 12 :
Fig.12: Numerically simulated logical failure rates of the surface code with and without syndrome degeneracy taken into account.Different panels correspond to (a,c) non-rotated and (b,d) rotated surface codes in the presence of (a,b) single-qubit and (c,d) two-qubit Pauli errors.In the presence of single-qubit errors, adding the degeneracy term has little, negative effect on the decoding fidelity when the non-rotated code (a) is used, while noticeably enhances it in the rotated code (b).When the code is subject to two-qubit errors, adding the degeneracy term has an opposite effect, as shown in (c,d).Here, code stabilizers are chosen according to Fig.5, such that only one of the sub-lattices is affected by a single two-qubit error event.To generate the data in panels (a,b,c) the physical error rate is set to p = 0.1 and in (d) p = 0.05.