2-D Compass Codes

The compass model on a square lattice provides a natural template for building subsystem stabilizer codes. The surface code and the Bacon-Shor code represent two extremes of possible codes depending on how many gauge qubits are fixed. We explore threshold behavior in this broad class of local codes by trading locality for asymmetry and gauge degrees of freedom for stabilizer syndrome information. We analyze these codes with asymmetric and spatially inhomogeneous Pauli noise in the code capacity and phenomenological models. In these idealized settings, we observe considerably higher thresholds against asymmetric noise. At the circuit level, these codes inherit the bare-ancilla fault-tolerance of the Bacon-Shor code.


I. INTRODUCTION
At the heart of scalable quantum computing is faulttolerance.The celebrated quantum threshold theorem [1][2][3] ensures that with sufficiently accurate components, we can perform arbitrarily long quantum computations with polylogarithmic overhead.For physical systems that prefer local interactions, topological codes have emerged as leading candidates for fault-tolerant quantum computation [4][5][6][7][8][9][10][11].Among these, the surface code is a particularly enticing choice, offering depolarization accuracy thresholds in excess of 15% assuming noiseless error-correction with a planar architecture [12].
Another code family which has generated significant interest are the subsystem Bacon-Shor codes [13].These codes have many desirable properties: their gauge group is 2-local, measurements can be performed with bare ancilla with virtually no loss in performance [14,15], and they support fault-tolerance schemes that avoid costly magic-state distillation [16].Unfortunately, while Bacon-Shor codes offer some of the highest concatenated thresholds [14], they fail to have any threshold when grown as a local family on a lattice without concatenation [17].
In the present article, we investigate codes derived from the quantum compass model on a square lattice [18].This model provides a natural framework for constructing subsystem and subspace stabilizer codes.These codes can be viewed as different gauge-fixes of the Bacon-Shor code, and so include the (rotated) surface codes, as well as codes with certain topological defects, as members [6,7].While we focus on a subfamily of (generalized) surface codes [19] with desirable fault-tolerance properties, the design space for these codes is much larger.Two advantages of this family are its malleability, making it suitable for correcting asymmetric noise, and fault-tolerant bare-ancilla syndrome extraction inherited from measuring along the gauges of the template Bacon-Shor code.
Tailoring codes and decoders to specific noise models can often yield fruitful improvements in threshold scaling.For biased noise models, one can choose fault-tolerance schemes and gates that take advantage of asymmetric error rates [20][21][22].Indeed, simply choosing the right decoder can yield tremendous gains in the effective threshold [23][24][25][26].One can even customize codes directly to device level noise [27] or biased error-rates [28,29].Such asymmetric noise models are motivated experimentally by the observation that dephasing noise dominates certain quantum computing architectures [30].By modifying the stabilizers and boundaries of a planar code directly, one can also obtain denser packings of logical qubits [19] and optimized performance with respect to erasures [31].
We similarly modify the geometry of planar codes using the convenient language of compass codes, adapting the density of the syndrome information to better correct biased and spatially dependent Pauli noise.To quantify the value of this adapted syndrome data, we consider randomized [4,32], minimum-weight perfect matching [4,12], and union-find [33] decoders that treat X-and Ztype errors independently.We choose different decoders depending on the context, but generally observe similar performance across all three.In particular, we expect that tuning correlated decoders to account for these different noise models will boost code performance even further [23].
The idea is simple: one should tesselate a lattice according to the relative likelihood of errors in that part of the lattice.Although these codes remain local, there is a trade-off between the locality of their stabilizers and their robustness against asymmetric noise, similar to [22].We analyze these codes numerically in the code capacity and phenomenological noise models, and observe considerably higher thresholds against asymmetric noise in these idealized settings.We leave a discussion of the challenges posed by circuit-level noise to the conclusion.
The paper is structured as follows.In Section II, we introduce 2-D compass codes and the noise models we consider.In Section III, we determine the threshold behavior in two randomized families of codes interpolating between Bacon-Shor codes, surface codes, and Shor's code.In Section IV, we quantify the threshold of 2-D compass codes tailored for different asymmetric noise models.In Section V, we demonstrate fault-tolerance for the compass code family using only bare-ancilla syndrome extraction.We conclude with some discussion in Section VI.

II. BACKGROUND A. 2-D Compass Codes
The quantum compass model on a square lattice is defined generally by the Hamiltonian [34,35], Here, (i, j) indexes a qubit according to its displacement from the top-left corner of the lattice.Closely connected with this model are Bacon-Shor codes, which are stabilizer subsystem codes with gauge operators realized by the two-body interaction terms of the compass model [13].This family is a standard example of codes requiring only local measurements for error-correction, but which are not topological, with stabilizers that extend the length of the lattice.
The gauge group of a Bacon-Shor code is generated by G = X i,j X i,j+1 , Z i,j Z i+1,j , with stabilizer group S = j X i,j X i+1,j , i Z i,j Z i,j+1 .When defined on an L×L lattice, these 2L-body stabilizer generators leave us with (L − 1) 2 gauge degrees of freedom to format as we please.
Our tool for constructing compass codes will be the method of gauge-fixing, by which we can insert gauge transformations into the stabilizer group [5,36].Operationally, this corresponds to inserting a gauge operator g into S and then removing the set of all gauge operators h which anticommute with g from G. Note that as Bacon-Shor codes are CSS codes [37,38], if we perform fixes of either X-or Z-type, we will preserve the CSS structure.
We focus on a subclass of surface codes that are easy to specify via a coloring of the lattice, see Figure 1.In that graphical language, red plaquettes correspond to "cuts" in the vertical Z-type stabilizers.We index plaquettes according to the index of their top-left qubit; then, for a red plaquette in the (i, j)-th cell of the lattice, we fix the gauge operator i k=0 Z k,j Z k,j+1 , whereas for a blue plaquette, we fix j k=0 X i,k X i+1,k .Bacon-Shor codes correspond to an empty coloring, whereas the standard surface code correspond to a red and blue checkerboard.Note that a plaquette can be colored either red or blue, but not both, as the resulting stabilizers would not commute.FIG.1: An example of a compass code on a 9 × 9 lattice.Red and blue plaquettes represent cuts in the Z-type and X-type stabilizers, respectively.The bold lines outline the Z-and X-type stabilizers in the leftand right-side pictures, respectively.As there are no blank plaquettes, all of the gauge degrees of freedom are fixed.

B. Noise Models
In order to carry out numerical simulations, we restrict ourselves to asymmetric Pauli noise.We consider the ηbiased depolarizing channel with error rate p, defined as where p = p X +p Y +p Z and η = p Z /(p X +p Y ).We make the simplifying assumption that p X = p Y , matching the definition in [23].The notion of a physical error rate p is then well-defined, as the fidelity of such a channel to the identity is independent of η.
We consider both symmetric but biased noise, in which each qubit experiences the same error channel, as well as spatially inhomogeneous noise models, in which the error channel may depend on the qubit's position in the lattice.In the latter case, we define the error-rate and bias of the channel on the lattice as a whole as the average fidelity and bias over each qubit in the lattice.Note that we must be careful in comparing such models.For example, concentrating noise on a small subset of qubits might always produce perfectly correctable errors, whereas distributing that noise symmetrically will not.
Finally, depending on the context, we consider either the code capacity setting, in which syndrome measurements are assumed perfect, or the phenomenological setting, in which the syndrome measurements can be faulty.

C. Decoders
Inherent to any discussion on thresholds is a choice of decoder.We focus on three decoders: randomized, minimum-weight perfect matching, and union-find decoding.We choose among these according to our computational needs.
Each of these decoders corrects X-and Z-type errors independently.Thus, any gains in threshold scaling are a product of the tailored syndrome information alone; it is these gains we aim to quantify.For example, we expect that using a correlated decoder with X-and Ytype stabilizers would augment the threshold further [23].

Decoder Graph
For independent correction of X-and Z-type errors on a CSS code, the relevant decoding information is captured in the decoder (hyper-)graph.The decoder graph for phase errors is constructed by associating a vertex to each X-type stabilizer and a (hyper-)edge to each qubit, where the edges connects all stabilizers incident to that qubit.The decoder graph for bit-flip errors is defined analogously.Note that for the subspace codes we consider, the decoder graph corresponds to a cellulation realizing that code as a homological surface code.For an example of the phase-error decoder graph of a compass code, see Figure 4.
The task of a decoder is then, given some syndrome information in the form of marked nodes, identify the corresponding edge configuration producing those marked nodes up to homology.The question we consider in this paper is, What threshold gains do we obtain by modifying the phase and bit-flip decoder graphs according to asymmetrically distributed edge failure probabilities?

Maximum-Likelihood and Randomized Decoding
The maximum-likelihood decoder is one that takes in syndrome information, and chooses the most likely errorclass producing that syndrome.Formally, its probability of success is given by p succ = s Pr E s , where the sum runs over all syndromes s and E s is the most likely errorclass conditioned on syndrome s.This decoder will yield optimal thresholds, but is often inefficient to implement.
The related randomized decoder is a probabilistic decoder that, conditioned on syndrome s, chooses to correct error-class E with probability Pr E|s .Thus, its probability of success is given by p succ = E Pr(E) Pr E|s E , where s E is the syndrome associated to E. The randomized decoder can well-approximate the maximumlikelihood decoder in the limit of large lattices.Its threshold can also often be estimated thanks to a wellestablished connection to statistical mechanics [4,39].

Minimum-Weight Perfect Matching Decoding
The minimum-weight perfect matching (MWPM) decoder assigns to each syndrome the error-class corresponding to a most-likely individual error producing that syndrome.Its probability of success is then p succ = s Pr E s where E s is a most-likely error producing syndrome s.
This decoder is implemented by constructing a minimum-weight perfect matching among the marked vertices in the decoder graph.The edge weights between two marked vertices correspond to the most probable path between them; for symmetric noise, this is simply the shortest-path, but for asymmetric noise it need not be.Fortunately, Edmond's blossom algorithm runs efficiently on graphs without hyper-edges, taking O(n 3 ) time on a graph with n nodes [40].
Within the subfamily of compass codes we focus on, each qubit participates in at most two stabilizer generators.As a result, the corresponding decoder graphs contain no hyper-edges, and so compass codes inherit the efficient MWPM decoder of the surface code.
When dealing with boundary conditions, some care must be taken to ensure a perfect-matching exists, since the parity of the marked nodes may no longer be even.We use the techniques of [12] to estimate the logical error rates in the presence of boundaries.

Asymmetrically-Weighted Union-Find Decoding
The final decoder we will use is an asymmetricallyweighted variant of the union-find decoder recently proposed in [33].This decoder is guaranteed to performed optimally on errors of weight at most d/2 , and has been shown empirically to perform almost as well as MWPM on toric codes with respect to its threshold.
For simplicity, our simulations are run with a periodic north-south boundary condition, which suffices for threshold comparison [41].However for completeness, we summarize the decoder on lattices with boundary, along with our modifications to account for asymmetric error rates.Decoding proceeds in two steps.
(1) Asymmetrically-Weighted Syndrome Validation.The first step is (weighted) syndrome validation.In this step, we form an erasure that is consistent with the observed syndrome and which accounts for the asymmetric error rates.To satisfy the first property, we save each node as a cluster, growing all clusters with an odd number of marked nodes by half-edges.After each growth, we fuse those clusters that intersect.The cluster growth terminates when each cluster has an even number of marked nodes, indicating that we can form a hypothetical erasure that is consistent with the observed syndrome.Furthermore, we use the weighted-growth heuristic, growing only those odd clusters in each step whose boundary is smallest.We refer to the reader to [33] for a more lengthy description of syndrome-validation.
In the case of a decoder graph with boundary, we no longer have a guarantee that there are an even number of syndromes in our graph.This is because some of the syndromes might condense at the boundary.To accommodate for this, we simply treat the boundary as a sink in which every cluster that fuses with the boundary is assigned an even parity.
After this, syndrome verification concludes by choosing a spanning forest within the clusters.We asymmetrically weight syndrome verification by using Kruskal's algorithm to choose a maximum-weight spanning forest, where each edge is weighted according to its probability of failure [42].This increases the probability of identifying the erroneous qubits.
(2) Peeling With Boundaries.Having associated to the graph an erasure forest that is consistent with the observed syndrome and asymmetric error rates, the second step is to apply maximum-likelihood erasure decoding in the form of an altered peeling decoder [43].
To each leaf node of the resulting erasure forest, we apply the rules: (i) If the leaf node is marked, apply a phase flip to the corresponding edge and flip the mark of the connected node.Then remove the leaf node and edge from the erasure tree.
(ii) If the leaf node is unmarked, remove it and the corresponding edge from the erasure tree.
At this stage, we have an erasure forest with no leaf nodes and potentially some open edges connecting to the open boundaries.Unfortunately, these open edges are missing their leaf nodes, and so we cannot peel.In [43], this is avoided by growing the spanning forest so that each tree has at most one open edge, and then peeling towards that edge.However, for asymmetricallydistributed noise, a maximum-weight spanning forest might not take this form.
Instead, we can use dynamic programming to find a maximum-probability error configuration consistent with syndrome information in linear time.Fix any tree inside the forest, with edges weighted according to their error probabilites, and root the tree at any node.Each node in this tree corresponds to a stabilizer, which will be either marked or unmarked.Our aim is to identify a subset S of edges that is both consistent with the syndrome information, and has maximal failure probability.We will then apply our phase-error correction to this set.
We proceed recursively.To each node v, we will associate two values.First, we compute the maximum weight of S v for the subtree rooted at v over all sub-spanning trees that include the parent edge.Second, we compute the same maximum weight of S v over all sub-spanning trees that do not include the parent edge.Each of these updates takes constant time, assuming that the children were previously evaluated and that v has bounded degree.Iterating over all vertices in the tree and trees within the forest, this terminates in linear time, and can be used to produce the desired S.
By using a tree structure, the union-find growth algorithm takes O(n • α(n)) time, where α is the exceptionally slow-growing inverse Ackermann's function.However, because we find a maximum-weight spanning tree, this variant requires O(n log(n))-time preprocessing.The union-find decoder is the most time-efficient of the three decoders we consider.
For a pictoral skeleton of the decoder, see Figure 2. A comparison of the decoder error-rates with and without the asymmetric alteration on the surface code is shown in Figure 3. There, the error model is generated by choosing a error probability p i ∈ r [0, 2p] for each physical qubit i uniformly at random.The value p i is passed to the asymmetric decoder to inform Kruskal's algorithm.This additional information results in an improvement on the error-rate, but with little effect on the threshold.FIG.2: The square represents the decoder graph (unseen) with north-south open boundary conditions.First, the clusters (dashed enclosures) are grown to an erasure consistent with the (red) marked syndromes.We then find maximum-weight spanning trees, with unmarked syndromes in black.After peeling the leaf nodes, we decode the trees using dynamic programming.

III. THRESHOLD SCALING
Before we consider asymmetric noise models, we ask the more fundamental question, how does the threshold behave in these compass codes?In particular, Bacon-Shor codes have no threshold while surface codes boast some of the highest thresholds.Compass codes provide a framework for interpolating between these two, and so we examine the threshold scaling here first.
We use the code's CSS structure to argue directly about phase-flip errors of probability p; bit-flip errors can be decoded analogously and independently.To correct phase errors, the relevant information about the code FIG.3: A comparison of logical error-rates for the asymmetric decoder (solid lines) versus the symmetric decoder (dashed lines).Each data point was generated with 10 6 independent Monte-Carlo trials.consists of G Z and S X , the Z-type gauge subgroup and the X-type stabilizer subgroup, respectively.

A. Surface-Density Codes
The first family of codes we consider are the (randomized) surface-density codes, which interpolate between the Bacon-Shor and surface code.Each code is determined stochastically according to a surface-density q surf in the following way.Given a square lattice, for each plaquette of one color in the checkerboard configuration of the surface code, we cut the corresponding X-type stabilizer at that plaquette with probability q surf .Correspondingly, q surf = 0 is equivalent to the Bacon-Shor family (with respect to phase errors) and q surf = 1 is equivalent to the surface code.

Ising Models Associated to Quantum Codes
We identify the scaling of the threshold with the surface-density under a randomized decoder.To do so, we exploit a connection between the threshold of quantum codes and critical temperatures of associated Ising models [4,32,39].
We summarize this connection briefly.Let G 0 be a minimal generating set of G Z .Let the g i ∈ G 0 be indexed by i, and associate to each generator an Ising spin s i = ±1.Index the physical qubits by j ∈ {1, . . ., L 2 } and define g i (j) := 1 if g i is supported on site j 0 otherwise.
For any Pauli Z-error E, define (τ E ) k to be −1 if E is supported on site k, and +1 otherwise.For physical error-rate p, we can define the virtual temperature β p according to the Nishimori line [44] so that Define τ to be a quenched vector-valued random variable that takes value τ E with probability p |E| (1 − p) L 2 −|E| .Under this randomly-disordered statistical model, we can express our success probability using the randomized decoder as

Numerical Simulations
Parameters of the Simulation.We map surfacedensity codes to their corresponding anisotropic Ising models on random graphs.We generate random samples of the model with the given q surf and p for various system sizes L, with the temperature determined by the Nishimori line according to the disorder parameter p.For each random trial, we use a cluster algorithm [45] and improved estimator to compute the Binder cumulant [46].Finally, we scan over p (at a separation of 0.1 for ln(p)) and look for a transition point.The system size we use ranges from L = 5 to L = 61, the number of steps for the cluster update ranges from 10 6 to 10 8 , and the number of random trials for each parameter set ranges from 200 to 10 4 .
In general, as the transition point p c increases with q surf , it enhances the frustration in the system and so more steps are needed for convergence.This is verified by the autocorrelation of the observables.However, for larger q surf , the slope of the Binder cumulant U with respect to − ln(p) also increases.As a result, less samples and smaller system sizes are required to achieve the same level of accuracy.
Numerical Results.Interestingly, simulations suggest that the threshold grows linearly with the surface density, see Figure 5.In particular, a positive density is both necessary and sufficient for the presence of a threshold.The linearity contrasts with the the threshold scaling of the less restricted code family that we consider next.FIG.5: Scaling of the critical disorder p c with respect to the surface-density q surf .Autocorrelation is checked using a binning analysis; fit is linear through the origin.The widest error bars are of total width ≈ 1%.At q surf = 1, the results closely match the established critical point at p c = 0.1094 ± 0.0002 [47].

B. Shor-Density Codes
We next turn our attention to Shor-density codes, which form a randomized family of codes that interpolate between Bacon-Shor codes and their full X-type gauge-fix, Shor's subspace code.These codes are defined similarly to surface-density codes according to a new parameter which we call the Shor-density q shor .For these codes, X-type stabilizers are cut at each plaquette with probability q shor .Thus, q shor = 0 again corresponds to the Bacon-Shor code whereas q shor = 1 corresponds to Shor's subspace code [48].
Of course, the thresholds for such codes are one-sided: more cuts for one type of stabilizer leaves less for the other.Consequently, such codes are best suited for asymmetric noise models.Note that these codes remain local, in the sense that the expected maximum stabilizer weight grows logarithmically in the lattice size for any fixed q shor .
Because the associated graphs to these codes have a richer structure which may hinder convergence of the clustering algorithm, we instead study these codes using the union-find decoder.We generate a new decoder graph and error in each round, and perform 10 6 Monte Carlo trials for each data point.We then exploit the efficiency of the union-find decoder to run 300 Monte-Carlo trials on a 1001 × 1001 lattice to verify the thresholds, which should sharply converge to either p L = 0 or p L = 0.5 about the threshold.This large lattice size is necessary to mitigate the growing finite-size effects.FIG.6: Scaling of the estimated threshold p with respect to the Shor-density q shor .The fit is quadratic through the origin; the finite-size effects are apparent.All points were obtained on 81 × 81 size lattices, except for q shor = 0.9.To emphasize finite-size effects, this was performed on a 631 × 631 lattice, which is greater than necessary for fault-tolerant computation [8].
The threshold scaling in Figure 6, nearly saturates the zero-rate quantum Gilbert-Varshamov bound [37], mirroring results obtained on other lattice configurations [49,50].One thing to note is the normalizing finitesize effects at very high and very low densities.Note that, at q shor = 1, we essentially have disjoint copies of a repetition code.This has a threshold of 50%, since the union-find decoder behaves optimally on errors of weight < L/2 [33].However, we observe a pseudothreshold of ≈ 45% for union-find decoding on a 1001 × 1001 lattice, matching the analytical solution where p rep is the probability of failure of a repetition code of length L, Summary.These simulations suggest that the threshold is determined predominantly by the density of syndrome measurements, rather than their specific configuration, for symmetrically distributed noise.The usual surface code does not far outperform randomized codes of equal density by this metric; it does only slightly, as its symmetry will minimize the number of L/2 -weight errors that introduce a logical error.This is reinforced by the observation that the threshold appears to scale linearly with surface-density, but is strictly convex with respect to Shor-density.

IV. ASYMMETRIC NOISE
Next, we turn our attention to asymmetric noise.We consider two different types: biased noise that is symmetrically distributed throughout the lattice, and asymmetrically distributed noise.In both cases, we find that substantial gains can be made by tailoring the decoder graphs to the noise directly.We analyze these in both the code capacity and phenomenological models, and compute their thresholds under different noise biases.

A. Biased but Symmetric Noise
For biased noise that is symmetrically distributed, we construct a family of compass codes we call elongated codes.These codes are defined by a parameter ∈ N + we call the elongation of the code, and are constructed by cutting the Z-stabilizers at the (i, j)-th plaquettes for all i − j ≡ 0 (mod ).The X-stabilizers are then cut at all remaining plaquettes, resulting in a subspace code.This is similar to the approaches of [14,22], which consider concatenations with different phase-flip repetition codes.
Under this definition, we obtain Shor's code for = 1 and the surface code for = 2.For > 2, we obtain an asymmetrization of Kitaev's toric code in the bulk with extended 2 -body plaquette operators.This family illustrates a simple compass code is well-equipped to correct asymmetric noise, while sacrificing somewhat in locality.
It is worth noting that choosing asymmetric lattice dimensions as in [28] may alter the logical error-rate of a code family, but will not change the threshold, as it is a property of the bulk.Thus, the elongation of the code refers to a stretching of the bulk stabilizer geometry, not the lattice itself.
As the elongation grows, finite-size effects play a greater role.As such, we use MWPM decoding to perform simulations on smaller lattices at lower elongations, and union-find decoding to test larger lattices.While these larger lattices also suffer from finite-size effects, we use the efficiency of union-find decoding to simulate lattices of between 10 3 and 10 4 qubits, which is the estimated code-size required for full-scale fault-tolerant computation [8].
Furthermore, we estimate the phenomenological threshold by simulating (2 + 1)-D elongated codes.For a physical lattice of linear size L, this corresponds to performing L rounds of faulty syndrome extraction, followed by an ideal round, and then decoding.The corresponding decoder graph is then L + 1 copies of the initial decoder graph with L time-like slices of edges connecting the corresponding vertices in each space-like slice.These time-like edges represent faulty measurements.
Although the size of each stabilizer is independent of the lattice size, we scale the probability of failure for each stabilizer linearly with its weight.We assume the usual phenomenological normalization that plaquette stabilizers are faulty at the physical error rate p.Despite some increasing stabilizer weights, we observe substantial threshold gains in both the code capacity and phenomenological models.
Tables I and II show the code-capacity thresholds using the MWPM and union-find decoder, respectively, while Table III shows the phenomenological threshold using the union-find decoder.In these tables, η opt refers to the optimal bias that realizes the threshold p thr , while η * is the bias above which the codes will outperform the surface code.thresholds on lattices comprised of higher-weight stabilizers.This suggests that union-find decoding may better exploit the degeneracy of certain lattices; in particular, one should use MWPM for Z-type errors and union-find decoding for X-type errors on elongated lattices.Our estimates for established surface code thresholds match those found in [12] at 10.3% for MWPM decoding and in [33] at 9.95% and 2.65% for union-find decoding in 2and (2 + 1)-D, respectively.

B. Spatially Dependent Noise
We conclude by considering noise that is asymmetrically distributed throughout the lattice.To illustrate the idea, we focus on a simple noise model in which dephasing noise decays linearly from the right-hand side of the lattice according to the function p z (i, j) = (w(j/L)+(1− w)(1 − j/L)) • p tot /2.Here, i and j are the coordinates of a qubit, L is the linear size of the lattice, and w is a con-stant that determines the degree of incline.We further assume that p x = p tot /2, so that p tot is the total infidelity of the channel.Note that the average bias between the dephasing noise and bit-flip noise is symmetric.
The idea is simple: when the noise is distributed asymmetrically, the stabilizer information can be chosen to match the noise.Intuitively, lower weight stabilizers add more error-information about the qubits nearby.With this in mind, we define a randomized family of codes we call (p z -)tailored codes.At each plaquette, we choose to cut the corresponding X-type stabilizer with probability 2p z (i, j)/p tot , where i, j are the coordinates of the upper-left qubit at that plaquette.Then, in the presence of a high amount of dephasing noise, many low-weight X-type stabilizers will appear to aide in error-correction.
We observe that the tailoring of these codes to the noise model can augment error rates, see Figure 7.It is worth noting, however, that simply weighting the probability of each cut according to the surrounding qubits may not always be the optimal strategy.In particular, in the low error-rate limit, this will become an optimization problem that seeks to minimize the weights of uncorrectable paths of length L 2 in the decoder graph.

V. FAULT-TOLERANCE WITH BARE ANCILLA
One of the major advantages that comes with the locality of the Bacon-Shor code is fault-tolerant bare-ancilla syndrome extraction [14,15].Although this extraction scheme is the simplest and least resource-intensive, most codes incur some loss in effective distance due to highweight correlated errors produced by errors on the ancilla.For the standard and rotated surface codes, these "hook" errors can be carefully designed to ensure no significant loss in performance [4,6].
In the compass code framework, this resilience to correlated errors is a general phenomenon resulting from measuring stabilizers along the Bacon coding without a loss in effective distance.However, it is not necessarily maximum-likelihood decoding on the memory.One simple counter-example is Shor's code, where a single well-placed ancilla error can effect a weight d memory error that maximum-likelihood will misdiagnose as a weight d − 1 memory error, resulting in failure.
The above does imply that performing MWPM with respect to linear-probability faults in the decoder graph is fault-tolerant.Introducing these faults amount to triangulating the decoding graph, similar to hook errors in the surface code case [4,12].Determining circuit-level compass code performance in this model is the subject of future inquiry [51].

VI. CONCLUSIONS
In this article, we have described an ansatz for designing planar codes stemming from the 2-D compass model.We have provided evidence that simple subfamilies of this class may be useful for correcting biased noise in idealized code capacity and phenomenological noise models, particularly if that bias is distributed geometrically.In particular, one can bias the stabilizers locally towards correcting a certain error-type.
There are two central challenges for these codes in the more realistic circuit-level noise model.Although these codes are still local, there is a trade-off between the bias of the codes and the locality of the stabilizer measurements.We have demonstrated that fault-tolerant measurement in Bacon-Shor [14,15] and surface codes [4,6] using bare ancilla can be adapted to the compass model, if measurements are performed in the correct order.Nevertheless, these correlated errors will deteriorate code performance as higher-weight stabilizer outcomes become less reliable.This might be mitigated by using other flag-type schemes, or by preserving some gauge degrees of freedom.We would expect that these gains would persist, but at the expense of higher bias and code overhead.As such, we leave a more involved circuit-level analysis to future work.
The second concern is whether the biased noise model itself can persist at the circuit level.To remain experimentally motivated, one must choose operations that preserve the bias [20,22,23].Consequently, the construction of simple and bias-preserving fault-tolerant gadgets is key to utilizing asymmetric noise.
Finally, we have only narrowly broached the design space offered by these codes.Exploring different configurations according to other geometrically-defined noise [31], generalizing to codes defined on the 3-D compass model, and using correlated decoders [23][24][25][26]52] are all avenues to explore.More generally, finding other LDPC constructions adapted to biased noise may give the best of both worlds, mitigating the overhead of asymmetrization while taking advantage of the bias.

− 1 pFIG. 4 :
FIG. 4: The left-hand side represents the graph describing the two-body Ising model.The right-hand side represents its dual, the decoder graph.The blue squares represent cuts in the X-type stabilizers on a 9 × 9 lattice.The connectivity on the left-hand graph determines the sparsity on the right.
FIG. 7:Error-rates for gradually (w = 0.25, top) and steeply (w = 0.10, bottom) inclined linear noise, computed on a lattice of size 33 × 33 using union-find decoding in the high-noise regime.Here, p fail represents the total probability of a failure in either the X-or Z-type decoders.

TABLE I :
Thresholds for the MWPM decoder in the code-capacity model.Simulations were done on lattices of size at most 17 × 17.Notably, a relatively smaller noise bias is required to outperform the surface code in the phenomenological setting.Unsurprisingly, the MWPM outperforms the unionfind decoder as a whole, but surprisingly, displays lower

TABLE II :
Thresholds for the union-find decoder in the code-capacity model.Simulations were done on lattices of size at most 81 × 81.

TABLE III :
Thresholds for the union-find decoder in the phenomenological model.Simulations were done on lattices of size at most 35 × 35 × 35.