A cellular automaton decoder for a noise-bias tailored color code

Self-correcting quantum memories demonstrate robust properties that can be exploited to improve active quantum error-correction protocols. Here we propose a cellular automaton decoder for a variation of the color code where the bases of the physical qubits are locally rotated, which we call the XYZ color code. The local transformation means our decoder demonstrates key properties of a two-dimensional fractal code if the noise acting on the system is infinitely biased towards dephasing, namely, no string-like logical operators. As such, in the high-bias limit, our local decoder reproduces the behavior of a partially self-correcting memory. At low error rates, our simulations show that the memory time diverges polynomially with system size without intervention from a global decoder, up to some critical system size that grows as the error rate is lowered. Furthermore, although we find that we cannot reproduce partially self-correcting behavior at finite bias, our numerics demonstrate improved memory times at realistic noise biases. Our results therefore motivate the design of tailored cellular automaton decoders that help to reduce the bandwidth demands of global decoding for realistic noise models.


Introduction
It remains a significant challenge to produce a largescale quantum computer with noisy quantum systems. We therefore look for robust quantum errorcorrecting codes that can compensate for the limitations of quantum computing hardware as it is scaled to solve difficult problems reliably. Topological quantum error-correcting codes now make up the bedrock of modern designs to realize a scalable quantum computer. Notably, a significant majority of experimental efforts [5,20,29,49,70] are now working to produce a surface code [26,30,44,63]. The underlying physics of this code is a two-dimensional topological phase of matter that gives rise to anyonic quasiparticle excitations [44]. Other phases, known as fracton topological phases [19,36,53,60,75], demonstrate ex-otic quasiparticle excitations with restricted dynamics that can be exploited to produce high-performance error-correcting codes [16,56,66]. In particular, so called type-II fracton topological phases [36,75] give rise to passive memories at finite temperature that demonstrate partial self correction [11,13,17].
Real physical qubits are likely to experience biases in their noise parameters. Certain qubits have even been designed to maintain their bias as they undergo unitary operations [33,34,52,61,62]. As such, considerable work has been invested in producing tailored quantum error-correcting codes together with specialized decoding algorithms that concentrate on correcting common types of error [3, 4, 9, 15, 21-23, 28, 35, 41, 42, 48, 55, 67, 69, 72-74, 78]. In the limit of very high bias, certain codes have been shown to reproduce the restricted dynamics of the quasiparticle excitations of fracton topological codes in lowerdimensional systems [9,67,74]. These dynamics can be understood in terms of the materialized symmetries [16,44], or more generally the system symmetries of a code together with its noise model [74]. Such symmetry restricted fractons have recently gained interest from a condensed matter perspective [68] as they circumvent known restrictions on the existence of fractons in two dimensions [1].
Here, we investigate the dynamics of a variation of the color code, which we call the XYZ color code, that is modified to change the nature of its excitations. At infinite bias, this code reproduces the behavior of a type-II fracton code [13,59], whose logical operators have a fractal-like support. In contrast, other examples such as the XZZX code [9,76] and the tailored surface code [72] give rise to lineons [9] and type-I fractons [56,74], respectively, under an infinite bias noise model. The generic features of passive self-correcting quantum memories can be exploited for active quantum error correction protocols where syndromes are measured and corrected manually. For instance, their corresponding codes can be readily decoded using local cellular automata [6]. Such decoders [14,26,[37][38][39][40]58] are valuable when communication speed is limited. At a practical level, there is a limited bandwidth between quantum hardware that runs at milli-Kelvin temperatures [24,25,64], and the classical control software running decoding algorithms, that operates outside of the dilution refrigerator. More fundamentally, as we scale a quantum computer, the speed of light may limit its performance if the system depends on results from a global decoder that must first receive information from many non-local sites of a large system.
It is difficult to find practical quantum errorcorrecting codes that can be decoded locally. This is because known self-correcting memories are local only in four dimensions [14,26,38,58], and therefore require non-local interactions to be realized in three spatial dimensions. In contrast, work to produce cellular automaton decoders for two-dimensional codes under general noise models tend to compromise the threshold of the system [14,37,39,40]. Moreover, known examples typically require some parameter, such as their speed or memory size, to diverge as the size of the quantum error-correcting code approaches infinity. Given these challenges it is interesting to design local decoders for low-dimensional codes under more constrained settings, such as highly biased noise models.
In this work we propose a cellular automaton decoder for the XYZ color code that is designed to mimic the behavior of partial self correction at infinite noise bias. To test the decoder, we conduct numerical simulations to measure how long the cellular automaton decoder can preserve the quantum memory without intervention from a global decoding algorithm. Like a partially self-correcting quantum memory, we find that the memory time diverges polynomially up to some fixed system size that depends on the rate of errors that the physical qubits experience. This means that if we aim to maintain a logical qubit for an arbitrarily long time, then the number of calls that need to be made to a global decoder decreases with system size, provided the physical error rate is sufficiently low.
Furthermore, we also test our cellular automaton decoder at finite bias. Although we find that we cannot reproduce the standard signatures of partial self correction at any finite bias that is not diverging towards an infinitely biased noise model, we do find constant factor improvements in memory time. This amounts to approximately a factor of three increase in memory time for experimentally realistic biases, where the dephasing error rate is around 100-times greater than other noise processes. Our results therefore demonstrate that certain codes, together with local cellular automaton decoders, can be tailored to correct for biased noise to ease the demand placed on global decoding subroutines.
The remainder of the manuscript is structured as follows. In Sec. 2, we introduce the XYZ color code, and describe an efficient maximum likelihood global decoder at infinite bias. Next, in Sec. 3, we describe the cellular automaton decoder, and derive its mapping to the Newman-Moore Model, a classical spin Hamiltonian with fracton-like excitations. Sec. 4 con- A bipartion of the honeycomb lattice, and its mapping to the square lattice using a two-qubit unit cell (circled in red). The shaded hexagon illustrates how the lattice is deformed to fit a square geometry. Partitions are indicated by white and black circles, respectively. (b) Stabilizers A/Bi,j are defined as having qubit (i, j, b) at the top left corner. (c) Identification of the edges of a 3×3 honeycomb lattice to get a torus. Edges of the same color (red, blue, and purple) are identified. tains our numerical results at infinite bias. In Sec. 5, we show results at finite bias, as well as describing the global renormalization-group decoder [13], that we use as a benchmark. Finally, in Sec. 6, we conclude and discuss future work. In Appendix A, we show that there exists an infinite family of codes at appropriate system sizes with no degeneracy of logical operators at infinite bias, and in Appendix B, we prove a lemma that implies that the maximum likelihood decoder has a 50% threshold at these system sizes.

The XYZ Color Code
In this section, we introduce the XYZ color code. We show that, if we restrict ourselves to a noise model that is infinitely biased towards one type of Pauli error, the only allowed logical errors of this code are fully described by the evolution of an elementary cellular automaton. These biased logical operators are fractal-like, and not string-like, with weights growing faster than the linear system size. We next describe an efficient global decoder, which finds the most probable logical error at infinite bias.

The Model
The XYZ color code is a stabilizer code defined on a three-colorable honeycomb lattice, where a single qubit is placed on each vertex of the lattice. The vertices are bicolored [47], black and white, such that no two vertices of the same color are touching, see Fig. 1 (a). The code space of the XYZ color code is the simultaneous +1 eigenspace of all of the stabilizers of the code. Its stabilizers generate a group, S ⊂ P N ; which is an Abelian subgroup of the Pauli group acting on N qubits such that −1 ∈ S. Up to phases, the Pauli group is generated by the standard Pauli operators X q and Z q acting on qubits indexed by vertices q. It is also helpful to define the group of Pauli-Z operators P Z N ⊂ P N . This is the group of operators that can be generated from the product of Pauli-Z operators only.
The stabilizer group for the XYZ color code is generated by A-and B-type stabilizers, A p and B p , shown in Fig. 1(b). The A-type stabilizers act on each plaquette with Pauli X and Z operators on the black and white vertices, respectively, and the B-type stabilizers act with Z and Y , respectively, on the black and white vertices. We concentrate on the lattice with periodic boundary conditions. We therefore identify the boundaries of the three-colorable lattice as shown in Fig. 1(c).
The XYZ color code is equivalent under an on-site unitary circuit to the conventional two-dimensional color code [7,8] defined on a hexagonal lattice. As such, it inherits the generic properties and code parameters of the CSS color code. For instance, on the torus, the code has four logical qubits [8], that are acted on by string-like logical operators. The standard color code is a Calderbank-Shor-Steane (CSS)type code, meaning that the stabilizer group can be generated by operators that are each products of either only Pauli-Z operators, or only Pauli-X operators. We obtain the XYZ color code by applying the unitary rotation U = q∈white U q to the CSS color code where U q acts on the standard Pauli operators as U q X q U † q = Z q and U q Z q U † q = Y q . Indeed, several papers have recently demonstrated improvements in threshold using a similar local change of basis, see e.g. Refs. [9,23,65,67,73]. A similar code was also obtained [71] by applying a Hadamard rotation to alternate qubits. We expect that this code behaves equivalently to the XYZ color code under noise that is biased in an appropriate choice of basis.
We also introduce some terminology to describe error correction with the XYZ color code. We consider states that lie outside the codespace, E|ψ where |ψ is a code state and E is a Pauli error. We say that a defect, or an excitation, lies at a plaquette p unless both A p E|ψ = (+1)E|ψ and B p E|ψ = (+1)E|ψ . The syndrome is the configuration of defects on the entire lattice.
In the sublattice picture, it is helpful to visualize the lattice on an L × H rectangular geometry, with L and H each a multiple of three to maintain three colorability on the periodic lattice. We use the two-qubit unit cell shown in Fig. 1(a) to describe coordinates on the honeycomb lattice. There are therefore N = 2LH qubits. Qubits are labeled (i, j, b) or (i, j, w), where b and w indicate the black and white sublattices, respectively. Stabilizers A i,j and B i,j are the stabilizers acting on the plaquette with top left qubit (i, j, b).

Noise Models
We consider several different noise models. In each noise model, we begin with a system in a logical state and take Pauli noise that acts independently on every qubit. Each Pauli error, X, Y , or Z, occurs as a Poisson process with rates γ X , γ Y , and γ Z , respectively. If we wait for a fixed time, say, between calls to a global decoder, then there are probabilities p X , p Y , and p Z of having an error on each qubit. It is clear that these probabilities grow with the error rates, and always lie between 0 and 1/2. We define γ tot and p tot as the sums of the rates and probabilities, respectively.
The main noise model we consider is infinitely biased noise, with γ X = γ Y = 0, and γ Z > 0. This error model is of particular interest when the code experiences a highly biased dephasing noise [23,32]. However, an equivalent discussion holds for any choice of single Pauli operator, since the stabilizer group is symmetric under the interchange X → Z → Y → X.
A related noise model is infinitely biased sublattice noise, where we consider Z noise only on the black sublattice. The reason we can do this is that at infinite bias, the sublattices effectively decouple. This is because Pauli-Z operators acting on the black sublattice only excite the A-type stabilizers, whereas Pauli-Z operators acting on the white sublattice only excite the B-type stabilizers. We use this noise model at some points for simplicity, but infinitely biased noise on the white sublattice is equivalent, up to spatial transformations.
In both cases of infinitely biased noise, we can describe the state of the system with a string of bits s. Let |ψ be the starting logical state. After some time t of accumulating errors, the state may be written where q = (i, j, b/w) is a qubit index and s q ∈ {1, 0}. This notation is helpful when defining the cellular automaton decoder. Finally, we consider finitely biased noise. In this setting, we allow Y errors as well as Z errors. Since X = −iY Z, the entire Pauli group P N may be implemented by this error channel. The bias of the error channel is parameterized by the ratio ζ ≡ γ Z /γ Y . For global decoding, we may also define ζ p = p Z /p Y .

Logical Operators at Infinite Bias
We refer to any operator that commutes with the stabilizer group, but has a nontrivial action on the code space, as a logical operator. In other words, the logical operators are the set Z(S)\S, where Z(S) is the centralizer of the stabilizer group.
We now consider what logical errors may occur under infinitely biased noise. These are the set of logical operators that are also members of P Z N . We call such operators biased logical operators. For simplicity, we restrict ourselves to infinitely biased single sublattice noise. We specify a logical operator R using a series of bitstrings R (j) . Each R (j) represents the action of the operator on row j, with bit R (j) i being 1 if R acts as Z on site (i, j, b), and 0 if it acts as the identity. Since stabilizer A i,j has only one X operator on row j and two on row j + 1, R (j) must be completely determined by R (j+1) . In order to satisfy all stabilizers, we then require ( Fig. 2(a)): where addition is performed mod 2. Additionally, due to periodic boundary conditions, indices of the bit string are only defined modulo L, where L is the linear size of the system. The function f : is called the update rule, or evolution rule. This is an example of a local update rule [27,79,80], or cellular automaton: each bit in R (j) depends only on a local region in R (j−1) . In particular, it is an example of an elementary cellular automaton. Elementary cellular automata have been studied extensively and classified. In Wolfram's classification of elementary cellular automata, Eq. 2 is called rule 102 [77]. Starting from a bit string with only a single index equal to one, its evolution is a discrete form of the Sierpinski fractal, see Fig. 2(b). The Sierpinski fractal form of logical operators gives an intuitive explanation for the lack of string-like operators at infinite bias. In particular, the Sierpinski fractal has dimension log(3)/ log(2). If the system size is L × L, then the weight of the fractal scales as L log(3)/ log (2) . A string-like logical operator, on the other hand, has weight scaling as L. We make this intuition rigorous in Appendix A, by proving that there exists an infinite family of system sizes with no stringlike operators.
Due to the periodic boundary conditions, there is an additional constraint on which evolutions under rule 102 constitute logical operators. For an arbitrary row R (j) , we have f H R (j) = R (j) , where H is the height of the system. Fig. 2(c) is an example of a configuration that respects periodic boundary conditions.
This condition cannot always be satisfied. For example, f n R (j) always has an even number of 1s, so if R (j) has an odd number of 1s, then it cannot satisfy any periodic boundary conditions. In fact, for an arbitrary system size, it is not obvious that any configurations can satisfy the periodicity constraint. In Appendix A, however, we show that if the system has linear dimensions that are multiples of three, and are not both even, then there are always at least two independent logical operators in P Z N on each sublattice. Indeed, lattices sizes that are multiples of three are required to satisfy the three-colorability constraint of the color code. Furthermore, these logical operators are not equivalent to each other or the identity under multiplication by stabilizers, so they are distinct operators on the logical space. Additionally they are not string-like, with weight scaling as LH/3, i.e. linear in the total number of qubits. Depending on the system size, there may also be additional logical operators. The valid configurations of elementary cellular automata with periodic boundary conditions are quite complex [27,79], and, to our knowledge, an analytic formula for the number of such configurations for arbitrary system size has not been found. The number of valid periodic configurations has been calculated for certain system sizes, and it oscillates wildly with small changes in size [50]. This can be seen as a classical analogue to the highly oscillatory behavior of the ground state degeneracy in some fracton models [11,36,80].
Nevertheless, in Appendix A, we show that for an infinite family of system sizes, there are exactly two independent biased logical operators. Unlike the typical case with CSS codes, each of these is the only representative of its equivalence class under multiplication by stabilizers.
Since these two operators have weight scaling as N , it means the code also has O(N ) distance scaling at infinite bias. We also find an infinite one-parameter family within this larger family, of system sizes with L = 3(2 n ) and H = 3(2 n + 1).

Optimal Decoder
We require a decoding algorithm to read out encoded logical information. Here we concentrate on decoding the effective fractal code in the limit of infinite bias. Earlier work has demonstrated decoding algorithms for fractal codes based on clustering [12], and minimum-weight perfect matching [56]. Here we propose an optimal decoder for the XYZ color code at infinite bias.
Our decoder is a maximum likelihood decoder, returning the lowest weight error in P Z N that causes a given syndrome. In Appendix B, we prove the following lemma, which shows that the decoder has a 50% threshold: Lemma 1: consider a family of error correction codes C, parameterized by system size N . Let the error channel be i.i.d. and infinitely biased. Define L(N ) to be the set of biased logical operators. If |L(N )| is constant with N , and if every error in L(N ) has support polynomial in N , then a maximum likelihood decoder for C has a 50% threshold.
This lemma holds for any of the special system sizes mentioned in the previous section, where there exist a constant number of biased logical operators with weight scaling as O(N ). Our decoder therefore has a 50% threshold for these system sizes, the maximum value possible for i.i.d. biased noise.
Before describing the decoding algorithm itself, we briefly discuss notation. The decoder corrects errors on the black and white sublattices independently, so we can once again restrict to single sublattice noise. We again write an operator E ∈ P Z N as a string of bits E (j) i that is 1 if Z acts on site (i, j, b), and 0 otherwise. We use this notation to write errors and correction operators.
We are also interested in the syndrome of an operator E, denoted S (j) i (E), which is 1 if the A-type stabilizer A i,j is excited by E, and 0 otherwise. We neglect the B-type stabilizers as they are not excited by errors on the sublattice of interest.
Our decoding algorithm has 3 steps: 1. Find an operator C 1 that moves all of the defects of the syndrome onto row 0.

Return the most likely error
We now explain how each of these steps may be computed efficiently.

Moving Syndromes onto Row 0
When we apply a Z operator to site (i, j, b), it creates excitations at A i,j , A i,j−1 , and A i−1,j−1 . If there is already a defect on (i, j, b), it moves the defect onto two sites in the row above. Starting from the bottom row, S (H) , we then apply Z to every site where the syndrome is 1. We repeat row by row until we get to row 0. This defines C 1 . The remaining syndrome S(C 1 E), is 0 on all rows except for S (0) .

Finding the operator C 2
We now want to invert the excitation map; in other words, find an operator such that its syndrome is identical to that of C 1 E. In general, this problem may be difficult, but because we have moved all of the syndromes onto one line, this takes a particularly simple form. To see this, note that S (j) (E) = 0 implies that This is again cellular automaton rule 102, given in Eq. 2. This tells us that vanishes on all rows except 0, this then means that . The operator C 1 E (0) now satisfies the following equation: By Eq. 3, f is linear. We may therefore solve Eq. 4 for C 1 E (0) efficiently using Gaussian elimination. Note that the solution given is not generally unique or equal to C 1 E (0) ; this degeneracy reflects the fact that there are logical operators and possibly products of stabilizers that can be implemented by infinitely biased noise. However, at this stage we only care about finding a potential correction, and not finding the most likely correction.
We label our solution C 2 . To find the rest of C 2 , we simply use the evolution rule in Eq. 3.

Returning the most likely correction
We now look for alternative corrections that may be more likely. To do this, we simply enumerate over all possible logical operators. Using the results from Appendix A and choosing the right system size, we only need to consider two independent logical operators in the infinite bias case. Taking products, as well as the identity, means there are four possibilities. These four potential corrections all represent inequivalent operators on the logical space. The most likely error therefore represents the most likely logical state before errors occurred. We then apply each logical operator R to C 1 C 2 , and return the RC 1 C 2 with the lowest weight.
The runtime of this decoding algorithm is polynomial in the system size. The first step has a runtime of O(LH). In the second step, the runtime for the Gaussian elimination is O(L 2 ), and the time to evolve the where N L is the number of biased logical operators. Since in the previous section we mentioned a one-parameter family of system sizes with two independent biased logical operators, N L can be made to be constant, see Appendix A.

Cellular Automaton Decoder
A local decoder is a local quantum channel which, when applied on top of an error channel, reduces the logical error rate. A local decoder cannot share quantum or classical information across arbitrarily large distances. In particular, if the decoding operation applies a correction operator C q to qubit q, then C q cannot depend on any stabilizer measurement outside of some local neighborhood of q, independent of system size.
In this section, we present a local decoder for infinitely biased noise in the XYZ color code. First, however, we briefly review the Newman Moore model [54], a classical spin Hamiltonian that exhibits an energy barrier between ground states that is logarithmic in linear system size. We then derive a probabilistic local decoder, under which the ensemble of states of the XYZ color code converges to a thermal distribution for the Newman Moore model. We use this relationship to derive a duality between the error rate γ Z of the quantum memory and the inverse temperature β of the Newman-Moore model.

The Newman-Moore Model
We find a simple relationship between the Newman-Moore model and the XYZ color code at infinite bias, and we use this relationship to design a cellular automaton decoder for the XYZ color code at infinite bias that mimics the Newman-Moore model. The Newman-Moore model [54] is a classical statistical mechanical model with fragile glassy dynamics [12,[17][18][19] and no randomness, see also Refs. [27,79,80]. Its ground states have been shown to be separated by an energy barrier that scales logarithmically with system size [31,54]. This energy barrier can protect logical information encoded in the ground states of the system in a thermal environment. This is because it is energetically unfavorable for the environment to introduce an error that will cause error correction to fail.
The degrees of freedom of the Newman-More model are spins σ i = 0, 1, defined on a triangular lattice. The Hamiltonian is a sum of local three-body terms, where each term is a sum of the spins σ j = 0, 1 on a right-facing triangle, see Fig. 3: Let us now look at the relationship between the Newman-Moore model and the XYZ color code. We consider the Hamiltonian whose ground states are the code space of the XYZ color code. If we take the error channel to be infinitely biased single sublattice noise, then we need only consider excitations of the A i,j terms. The A i,j terms of H AB are only excited by Pauli-Z errors on the three sites where their support is a Pauli-X term. Using the bit string notation s i,j,b defined in Sec. 2.2, Eq. 6 becomes: such that the energy eigenvalues of H AB are those of H N M given in Eq. 5, where we replace the labels for the spin variables.
The mapping we have described is illustrated in Fig. 3. The three-body term is again composed of spins at the vertices of right facing triangles, so this Hamiltonian is exactly the Newman-Moore model. If we instead consider the Hamiltonian with both stabilizers, we get two disjoint copies of the Newman-Moore model.
More generally, the duality in the next section uses a slightly different, but morally equivalent, stabilizer Hamiltonian, This Hamiltonian has the advantage of being symmetric under exchange of X, Y , and Z errors, so it performs equally against noise that is biased to introduce Pauli-X, Pauli-Y or Pauli-Z errors.
To summarize, the code space of the XYZ color code at infinite bias is dual to the ground space of a classical Hamiltonian, the Newman-Moore model. We note that such a duality is a standard property of bias-tailored codes [9,72,73], but the features of the target Hamiltonian depend critically on the choice of initial code. For example, in the more common biastailored surface codes, the emergent classical model is a product of 1D Ising Hamiltonians. These Ising Hamiltonians lead to a repetition code structure [73] that allows for a 50% threshold, just as in the XYZ color code. However, the XYZ color code has an additional feature: its classical Hamiltonian hosts a logarithmically growing energy barrier, while the energy barrier of the 1D Ising model is constant. For this reason, we expect that only the XYZ color code will host a local decoder.

Probabilistic Cellular Automata
We propose a cellular automaton decoder that simulates the thermal dynamics of the Newman-Moore model at infinite bias. We achieve this using a local circuit of stabilizer measurements and Pauli-Z rotations, where the flips happen according to some probability distribution dictated by the local measurements. This circuit is an example of a stochastic cellular automaton.
At the most general level, a stochastic, or probabilistic cellular automaton is a sequence of states s (T0) , s (T1) , ... following a local update rule, but with the addition of randomness. Specifically, the state s (Ti) is no longer simply a deterministic function of s (Ti−1) , but may depend on some random variables as well.
We define a stochastic cellular automata to be a continuous time Markov chain with a few conditions on locality. Namely, the states are bit arrays, the only nonzero transition rates are between bit arrays that differ only in a local neighborhood of a point, and the transition rates themselves are only functions of the state in the same neighborhood. We now make each of these statements precise.
A continuous time Markov chain [57] is defined by a set of states {s (1) , s (2) , ..., s (n) }, and an n×n transition matrix Γ. State s (i) transforms to state s (j) following a Poisson process with rate Γ ij . The first condition for a continuous time Markov chain to be a stochastic cellular automaton can be stated as follows. If Γ ij is not zero, then there must exist an index q such that where B R (q) is a ball of radius R around q and R does not depend on system size. The second condition is that the transition rates Γ ij are a local function of the states, with R and q chosen as before. In other words, if the state changes near some point, the rate of that transition must only depend on the state restricted to a neighborhood of that point. A local decoder is a local cellular automaton applied to some noisy code state E |ψ where E is some Pauli error, and |ψ is a logical state. At infinite bias, we again use the notation in Sec. 2.2 to represent E |ψ as a bit string s. We use a cellular automaton that only applies Z to one qubit at a time. That is, the only process that occurs with nonzero rate is |ψ → Z q |ψ . As a shorthand, we define the rate for this process as whereq is the string with 1 at index q and 0 elsewhere. This cellular automaton must run without destroying logical information. Therefore, it can only measure stabilizers. We then require that γ q is a function only of the stabilizers in a neighborhood of q, and not any more general function of S.

Cellular Automaton Decoder
We now define a probabilistic cellular automaton rule that maps onto thermal fluctuations of the Newman-Moore model. At infinite bias, the total transition rate G q , or the total rate of a Z flip occurring on qubit q, is given by the sum of the cellular automaton transition rate and the error rate Let ω be the change in energy of the Hamiltonian in Eq. 8 upon applying Z q . Since H is local, ω is only a function of local stabilizers in a neighborhood of q, so γ q , and therefore G q , may depend on ω. We then require that G q satisfies the detailed balance condition: for some β > 0. It is easily shown that if the transition rates of any Markov chain meet this condition, then the thermal distribution is a fixed point distribution of the chain. Here Z is the partition function of H at inverse temperature β. There is still a great degree of freedom in satisfying Eq. 13. First, there is the choice of G q (ω). A simple solution to Eq. 13 is given by [17,46] With this solution, the transition rates of the cellular automaton rule are Next there is the choice of β. Any β may be used as long as Eq. 16 is always greater than 0. It makes sense to use the largest possible value of β, since this should increase the lifetime of any ground state. We then choose β such that the smallest γ q (ω) is 0. From Eq. 8, ω takes values in the range [−6, +6]. Therefore, we require Under the local decoder and infinitely biased noise, the XYZ color code is then dual to a Newman-Moore Hamiltonian, see Eq. 8, with an inverse temperature that diverges logarithmically as the error rate vanishes.

Demonstration of Partial Self-Correction
We look to determine the performance of our cellular automaton decoder. In practice, this decoder will need to be supported by a global decoding system where the cellular automata operate at a high frequency, and the global decoder is called at a slower rate that is determined by communication speed and bandwidth limitations. Here, however, we focus on the performance of the cellular automaton decoder alone. We evaluate its performance by asking for how long the XYZ color code can maintain its logical information using the cellular automaton decoder for various noise parameters and system sizes.
In this section, under an infinitely biased noise model, we demonstrate that the cellular automaton decoder we have proposed can reproduce the behavior of a partially self correcting memory. Partial self correction is a phenomenon first found in fracton codes [11,13], characterized by memory time growing quickly with system size up to some critical linear system size L C , which diverges with β. After reaching this size, memory time then falls off slowly.
This scaling lies in an intermediate regime towards true self correction, where quantum information is stored in a bistable phase at finite temperature. Selfcorrecting memories, such as the four-dimensional toric code [2] have a memory time that grows exponentially with system size below a critical temperature. However, partial self-correcting memories are more stable than memories such as the two-dimensional toric code [2], that have only a constant energy barrier between ground states.
There are two scaling laws for memory time that we use as signatures to demonstrate partial self correction [13,17]. First, the maximum memory time T max , or the memory time at L = L C , scales exponentially in β 2 : where a is a positive constant. Second, at system sizes far below L C , the memory time grows as a power law in L, where the exponent is proportional to β: where C is another positive constant. We numerically identify these signatures of partial self correction using our cellular automaton decoder at infinite bias.

Methodology
We simulate the dynamics of the cellular automaton decoder and noise channel with the Bortz-Kalos-Lebowitz (BKL) algorithm [10]. This algorithm is well-suited to simulating continuous-time processes, such as the Poisson processes defined in Sec. 3. Our simulation code is provided in a github repository in Ref. [51].
To evaluate the memory time, we choose an interval ∆t, and run the global decoding algorithm at intervals approximately ∆t apart during the BKL algorithm, to determine if the logical information can still be recovered. We do not apply the correction resulting from the global decoder, but instead check if this correction would create a logical error. We repeat this sequence until a logical error is created, and the total time is recorded as the memory time T mem .
The interval ∆t between exact decoding sequences can be made larger to speed up the simulation. In order not to severely impact precision, it is chosen to be a fraction no larger than 10 −3 of the total memory time. Due to the nature of the BKL algorithm, the time between exact decoding steps is not exactly ∆t. Instead, an exact decoding step is performed after the first spin flip that occurs at a time greater than ∆t after the last exact decoding step. Typically, this is still very close to ∆t.
In order for the exact decoder to be efficient, we use system sizes with minimal degeneracy of logical operators, as shown in Appendix A. We computed the number of independent biased logical operators before running the simulations, and checked in each case that there are four per sublattice.
We calculate the memory time by evaluating the half life, or the median memory time over many samples collected for each data point. Each data point is obtained using between 100 and 2000 samples, depending on system size. For consistency, we have only chosen system sizes of the form L × H = 3n × 3(n + 1) (21) for certain values of n. The set of system widths L we use is:

Partial Self Correction
Our numerical data that demonstrates partial self correction for the infinitely biased noise model is shown in Fig. 4. We now show that this scaling satisfies Eqs. 19 and 20. This is consistent with the behavior of partially self-correcting memories. The first signature of partial self-correction is the scaling of maximum memory time T max with temperature in Eq. 19. We find A plot of the maximum memory time and best fit is shown in Fig. 5. Here, units are used where the The quadratic dependence may be contrasted with the Arrhenius-law scaling found in a code with no selfcorrection [17]. In that case, the maximum memory time simply scales as exp(bβ), with b on the order of the energy gap. A best linear fit of the exponent is also shown in Fig. 5. For that fit We find that b is much larger than the gap, which is 6, see Eq. 8. The next signature of partial self-correction comes from the power law scaling of memory time with system size at small sizes, in Eq. 20. This scaling is clearest at error rates (and thus temperatures) much lower than those in Figs. 4 and 5. Because the maximum memory time T max occurs at larger and larger system sizes as temperature decreases, this means that lower temperatures will have a larger region where the memory time grows exponentially.
The growth of memory time with linear system size for small sizes is shown in Fig. 6. We use system sizes ranging from 6×9 to 24×27, where T mem is far below T max at the relevant temperatures. We find that at small system sizes, In both Eqs. 23 and 25, we have found similar scaling to fracton codes in three dimensions. In Ref. [13], such scaling has been proven analytically as a lower bound for Haah's cubic code, as well as other topological codes with a logarithmic energy barrier between code states. The proof involves the use of a generalpurpose renormalization group decoder. Here, the Newman-Moore model also exhibits a logarithmic energy barrier, and we use an exact decoder, which must perform at least as well as the renormalization-group decoder. Therefore, it is encouraging that the XYZ color code reproduces these same signatures at infinite bias.
Finally, we note the small oscillations of the curves in Figs. 4 and 6. These oscillations cannot be fully explained by random error, as they correlate between different curves and are greater than the sample error. Similar patterns are also seen in fracton codes [13,17]. Regardless, partial self correction occurs at much larger time scales, and is therefore robust to these variations.

Finite Bias
We now consider the more realistic case of finite bias, where Pauli-Z errors are predominant, but are not the only type of error. We look to determine if the behavior we witnessed at infinite bias is robust when ζ = γ Z /γ Y is large, but not infinite.
To summarize our results, we find that finite bias inhibits the partially self-correcting behavior we observed where other types of error occur at a rate that is much slower than the memory time of the system. Indeed, this is consistent with the observations of other recent work [42], where it is shown that the logical failure rate scaling is highly sensitive to a small amount of finite bias. However, we find that there are some modest improvements to the memory time that persist at physically relevant biases.
First, we find that our decoder demonstrates a threshold that improves with bias. We also show that the local cellular automaton decoder, which we stress is designed to correct for infinitely biased noise, still leads to an increase in memory time for low enough bias, although we do not observe that this improvement grows significantly with system size.
Since partial self correction is not a property of the thermodynamic limit, we do not expect the results of this section to define any sharp phase transitions. For example, it is always possible to find a bias high enough such that partial self correction occurs at some inverse temperature β. To see this, note that the median time for one Y error to occur is given by the half-life of the exponential distribution, where N is the number of qubits. If T Y is much larger than the infinitely biased memory time, then most simulations will fail from Z errors before even a single Y error occurs. However, given the scaling of T max in Eq. 23, this requires that ζ must grow at least as fast as exp(β 2 ). This is only a lower bound, since the critical system size L C increases with β as well, and therefore this scaling may need to grow even faster to maintain an effective infinite bias limit. This exponential scaling may be implausible in a physical architecture, so we instead study a constant range of biases, with ζ between 10 and 100. Such values are in line with some experimental qubit implementations [23,45]. At these values, T Y is much smaller than T max for all of the inverse temperatures we study, and thus Y errors can have a major effect on memory times.
In this regime, several difficulties appear. First, the exact decoder of Sec. 2.4 no longer provably finds a valid correction. In fact, it can be checked that a single X or Y error causes this decoder to fail. A second problem is that the exact duality with the Newman-Moore model no longer holds. With finite bias, all of the terms in Eqs. 5 and 8 become 6-body terms. Both of these issues are related to the fact that a Y error creates a set of defects that cannot be created locally with Z errors.
Most importantly, the full set of logical operators may be implemented by the error channel, including string-like logical operators. Therefore, the energy barrier becomes a constant for any finite bias, and the bounds from Ref. [13] that define partial selfcorrection no longer hold.

Methodology
To simulate the XYZ color code at finite bias, we use the same cellular automaton decoder as in Sec. 3, along with the BKL algorithm. Our finite bias code is again included in Ref. [51]. The total transition rate for Z flips on qubit q, G Z q , is still given by Eq. 15. However, at finite bias, we add Y errors to our rate equation as well, with a rate given by Pauli-Y errors break the duality to the Newman-Moore model, as discussed previously. They also break detailed balance, since the rate of Y flips in Eq. 27 is not dependent on the energy of Eq. 8. We could restore detailed balance by introducing a cellular automaton rule that makes Y flips as well as Z flips, for example However, there is little advantage to doing so. Since the Hamiltonian in Eq. 8 no longer has a logarithmic energy barrier, even very small thermal fluctuations lead to logical errors. In our numerics, we were unable to find any benefits to such a strategy. For simplicity, we use the cellular automaton to make only Z-type corrections.
With our dynamics now specified, the next step is to find a decoder to evaluate success or failure of memory. For this, we use the renormalization-group decoder due to Bravyi and Haah [13]. This decoder, which works by identifying correctable clusters of errors, is proven to have a threshold for any translationally invariant topological code with independent and identically distributed single-qubit errors. Since the decoder does not take any information about the parameters of the local error channel, we use the same decoding procedure for all values of the bias.
We find that the threshold of this decoder varies between p c = 0.09 and p c = 0.14, depending on the value of the bias, ζ p = p Z /p Y . The threshold is defined as the critical value p c = p Y +p Z such that below p c , the chance of logical failure vanishes as the system size increases towards the thermodynamic limit. A plot of the threshold versus bias is shown in Fig. 7. There is a small improvement of about 5% as bias increases, approximately linear in 1/ζ p .
It is interesting that this improvement occurs in a decoder that does not use information about the bias at all. Rather, the improvement is coming from the different structure of the error syndrome at higher bias. This may be due to the fact that string-like errors become less likely as bias increases, leading to more syndromes for errors of the same weight.

Results
The lack of partial self correction with finite bias is immediately apparent in Fig. 8. We repeat the same measurements as in Fig. 4, but with a bias of ζ = 100. Instead of finding partial self-correction, we find that memory time changes very little with system size. While there is a small decrease at the start, followed by an even smaller increase, these effects are many orders of magnitude smaller than the self-correcting behavior seen at infinite bias.
The steep initial decline of the curves in Fig. 8 is evidence that a very small number of Y errors causes a significant decrease in memory time. To see this, we estimate T Y (Eq. 26), the median time before the first Y error. At the smallest system size of 6×9, we have T Y ≈ 0.64/γ tot . This value ends up being slightly larger than the measured memory time, which means that some simulations must occur without Y errors, and thus match the infinite bias results. For any larger system size, however, T Y is much smaller than the measured memory time, so that Y errors occur with high probability in every simulation run. The fact that 6×9 is special is the result of our choice of ζ = 100. For any system size, we can always choose ζ such that T Y is high enough that it is highly improbable that any Y errors occur before memory failure. However, as mentioned earlier, ζ must grow larger and larger with system size to ensure this.
This property is illustrated more clearly in Fig. 9. Here, we compare memory times at different values of the bias, holding total error rate fixed at γ tot = 10 −5 . At the leftmost point in the figure, where ζ = 100, the system size with the highest memory time is 6×9. However, as ζ falls to 10, the memory time of 6×9 becomes worse than all of the other sizes, as T Y falls by about a factor of 10.
In Fig. 9, we also plot the memory times of the XYZ color code where no cellular decoder is used, and compare them with the cases where we do use the cellular automaton decoder. Without a local decoder, errors simply accumulate until a logical error occurs. For large enough bias, it is clear that the cellular automaton still increases the memory time. For ζ > 25, using the cellular automaton decoder outperforms the case where we use no local decoding for all system sizes shown. While this increase in memory time does not vary appreciably with system size, it does so substantially with bias. For architectures with a large but finite bias, it may then be efficient to use the local cellular automaton decoder to reduce the frequency of global decoding steps. To summarize, we find that finite bias has a major destructive effect on memory time, removing most of the improvement with system size that we saw in Sec. 4. The probability of memory failure increases steeply after just one Y error occurs. However, even with these strong effects, the cellular automaton decoder still has improved memory time over the case without a local decoder for a reasonably wide range of biases and system sizes.
The extent to which these results depend on the decoder used, rather than the code itself, is still somewhat inconclusive. From Fig. 7, it is clear that the renormalization-group decoder has a far worse threshold than our exact decoder, even at very high bias. The renormalization-group decoder, however, is a general-purpose decoder with a threshold that is often exceeded by decoders tailor-made to specific codes. Furthermore, it has been previously shown in other codes that decoders exist with thresholds asymptotically approaching 50% as bias approaches infinity [9]. It is unclear whether such an efficient decoder exists for the XYZ color code, and whether it would result in significant improvement of memory times.

Conclusion
To summarize, we have investigated error correction with the XYZ color code, a variant of the CSS color code whose physical qubits are locally rotated, undergoing errors from a biased noise model using a cellular automaton decoder. Under an infinitely biased noise model, logical errors have a fractal support, and as such, excitations have constrained dynamics akin to those of a type-II fracton model. Our simulations show that, at infinite bias, our local decoder reproduces the signatures of a partially self-correcting memory, namely, a memory time that diverges with system size, up to a critical system size. Therefore, in the limit of very high bias, with low error rates and modest system sizes, we expect that the code requires less intervention from a global decoding system as we scale the code distance. This may be valuable in the situation where the bandwidth between quantum hardware and classical control systems are limited. Although we were not able to reproduce the same partially self-correcting phenomena at finite biases using our local decoder, we have observed modest improvements in memory time for realistic biases we might expect to find with real hardware, of the order of ζ ∼ 100. Again then, it may be valuable to use a cellular automaton decoder in this regime to reduce the communication demands required by a global decoder.
The discovery of a self-correcting quantum memory will furnish us with a stabilizer code that can be decoded locally, thereby minimizing the communication demands for decoding. However, the dimensionality of known self-correcting memories means they are impractical for realization. As an interim, we can find partially self-correcting codes in lowerdimensional systems. Here we have witnessed partial self correction in a two-dimensional system in the limit of very high noise bias.
An important question for future work is to understand the effects of imperfect measurements on the local decoder. In order to do this using our methodology, we must also realize the idealized continuous-time cellular automaton decoder as a discrete-time cellular automaton decoder, since a real-life circuit can only make measurements at a finite rate. In general, a continuous time cellular automaton is the limit of a discrete cellular automaton with a small time step, but it is possible that this limit is modified in the presence of measurement errors.
It will also be valuable to extend this partially selfcorrecting behavior to systems that experience finite bias. One approach to achieve this might be to investigate other local decoders. We might expect that we could discover better cellular automaton rules to this end that go beyond the intuition we have used to design our local decoder that is based on the physics of a finite-temperature environment. We might also consider using a cellular automaton decoder to decode three-dimensional partially self-correcting codes such as the cubic code. We may find that this code will serve as a practical alternative if classical communication is highly constrained, even where qubits experience a more generic noise model. are supported by the Australian Research Council via the Centre of Excellence in Engineered Quantum Systems (EQUS) project number CE170100009, and by the ARO under Grant Number: W911NF-21-1-0007. DJW also acknowledges support from the Simons foundation. Some of the computing for this project was performed on the Sherlock cluster. We would like to thank Stanford University and the Stanford Research Computing Center for providing computational resources and support that contributed to these research results. BJB changed affiliation to IBM Quantum during the preparation of this manuscript.

A Optimal System Sizes for Exact Decoding
In this section, we prove that systems of size 3m by 3n, where at least one of m or n is odd, always have two independent and inequivalent biased logical operators, which have extensive support. We then show that an infinite family of system sizes exist where these are the only biased logical operators.

A.1 Existence of Logical Operators
Recall that a biased logical operator is a logical operator made up of only one type of Pauli operator. Due to the decoupling of the stabilizer generators at infinite bias, a basis of biased logical operators exists such that each operator is supported on only one sublattice. We start by recalling that for logical operators in P Z N on the black sublattice, the following condition is required for each row: where R (j) is a bitstring representing the support of the operator on row j. It can easily be checked that logical operators in P X N on the black sublattice satisfy the same relation. For logical operators on the white sublattice, in either P Y N or P Z N , the relation is This is simply Eq. 29, but flipped along both axes. Let us define the following notation to write down logical operators, using a matrix of bits W : For example, We use similar notation for X operators, and operators on the black sublattice. An example of a matrix whose rows satisfy Eqs. 29 and 30 is: Since we require both dimensions of the system to be multiples of 3, we can tile this block to fill the entire system. We can also cycle the rows to get 3 different logical operators; however, one of them is the sum (mod 2) of the other two. Therefore, this makes two independent operators. One of these operators is shown on the hexagonal lattice in Fig. 10.

A.2 Commutation Relations
We have so far shown that these operators commute with the stabilizers, but not that they are logical or independent. To do this, we find the commutation relations for a complete set of known logical operators for the XYZ color code. A simple basis of logical operators in the CSS color code is given by horizontal and vertical lines, of either X or Z, on red or blue cells (the cells can always be colored, due to 3-coloring criterion of the lattice) [7]. Let us denote these operatorsZ x,R ,Z x,B ,Z y,R ,Z y,B ,X x,R ,X x,B ,X y,R ,X y,B . (Note that we use upper case B to represent blue cells, and lower case b to represent the black sublattice.) A pair ofZ andX operators anticommute when they are of different colors and perpendicular to eachother. Applying the local unitary to shift into the XYZ color code causes these to decompose into products of two string-like operators, each of a single Pauli type. For example:  The other logical operators can be derived from these two. We can cycle colors R → G → B by shifting one column to the left. (This labeling of colors is not important, but the direction of the shifts must be consistent.) We can also takeZ toX operators by taking Z → X and Y → Z.
Next, let us denote our potential "logical" operators as follows: Here, the . . . represents repeating the block. From Eq. 34, we see that every 3 columns ofZ x,R anticommute with one block each of L Let us, for now, assume both dimensions are odd multiples of 3. We then calculate all of the commutation relations in a similar way to those forZ (x,y),R . Table 1 then gives the commutation relations for all L, M , and logical operators. Based on these relations and the completeness of the basis of logical operators, we can determine, modulo products of stabilizers:  is a further set of logicals generated by 6 × 6 blocks, which can tile the system in this case. We will not discuss the even case further here. The other case is when one dimension is even and the other is odd. As an example, say that the width is even, but the height is odd. In this case, all of the commutation relations involvingZ x,R ,Z x,B ,X x,R , andX x,B become +1. Then, Eq. 36 becomes Again, a maximal commuting sector of the logical Pauli group is generated. However, in this case, 100% biased noise of both X or Z can only act on the same logical sector. Therefore, the M and L operators are not complete when one side has even length. This latter fact can be easily checked with Eq. 35, and the fact that there are an even number of blocks in the system. The same holds when the width is odd, and the height is even.

A.3 Other Logical Operators
We now ask whether there are further logical operators besides those given by Eq. 33, when restricted to biased noise. We will look for independent combinations of all X or all Z's not given by blocks of Eq. 33. Note that these may not be independent when we quotient by products of stabilizers. However, we are still interested in finding as few of these logical operators as possible to simplify our calculations.
We can answer this question with results from Ref. [50]. Before we begin, we note that most of the results in that reference are for rule 90. However, rule 90 on a string of length 2n is equivalent to two copies of rule 102 on a string of length n.
The important result we need is given by Lemma 3.4 of Ref. [50], which states that the lengths of all cycles divide the length of a cycle reached with an initial configuration that has a single 1 (for example, 100000...). Note that this initial configuration is not part of a cycle, but it must eventually reach a cycle due to the finiteness of the system. This gives a simple construction for system sizes that only allow the operators with cycle length 3. First, choose a width L = 3n. Next, find the length Π L of the cycle reached from the bitstring with a single 1. Finally, let the system height be H = 3p, where p is a prime that does not divide Π L . This guarantees GCD(H, Π L ) = 3, so that the only cycles are of length 3. Another construction is to take L = 3(2 n ) and H = 3(2 n + 1). In this case Π L can be shown to be 3(2 n ) (see Fig. 2 (b) for an example), so only length 3 cycles are allowed here as well.
In fact, constraining the logical operators to have periodicity 3 in the y-direction also forces them to have periodicity 3 in the x-direction, which forces them to be of the form of Eq. 33. To see this, we again denote the bit at position i, j of a logical operator as R . But we can also use Eq. 30 to show: Similarly, we have Using the fact that R , and adding the equations together, we find Therefore, the logical operator must have periodicity 3 in the x direction. By checking all 8 cases, we can see that the only nontrivial possibilities are of the form in Eq. 33.

B Optimal Decoder Threshold
In this section, we prove the following lemma, from which the 50% threshold of the XYZ color code at infinite bias follows. We restate the lemma here.
Lemma 1: consider a family of error correction codes C, parameterized by system size N . Let the error channel be i.i.d. and infinitely biased. Define L(N ) to be the set of biased logical operators. If |L(N )| is constant with N , and if every error in L(N ) has support polynomial in N , then a maximum likelihood decoder for C has a 50% threshold.
Proof : A maximum likelihood decoder fails for any error E when there exists a logical error L such that LE is more likely than E.
For lightness of notation, we keep the functional dependence on N implicit for the remainder of the proof. This sum may be bounded from above: This overcounts Eq. 41, because there may be some errors for which there is more than one logical error L which satisfies P (LE) ≥ P (E).
We now define the error E as the product E = E L EL, where E L is the error restricted to the support of L, and EL is the error on the complement. Then P (E) = P (E L )P (EL).
Let us suppose p Z < 1 2 . Therefore, if P (LE) ≥ P (E), Since at least half of the errors in L must cancel errors in E to reduce the total support. Now, since every L in L has support growing polynomially in system size N , there exist positive constants K L , α L such that if P (LE) ≥ P (E), Therefore, This can be expressed using the cumulative distribution function of the binomial distribution: Where F (k; n, p) is the cumulative distribution function of the binomial distribution with n trials and k or fewer successes. Due to Hoeffding's inequality [43], this can be bounded by We then have Since there are a constant number of L in L, this sum vanishes as N → ∞, when p Z < 1 2 . This proves the lemma.