Mitigating Temporal Fragility in the XY Surface Code

An important outstanding challenge that must be overcome in order to fully utilize the XY surface code for correcting biased Pauli noise is the phenomena of fragile temporal boundaries that arise during the standard logical state preparation and measurement protocols. To address this challenge we propose a new logical state preparation protocol based on locally entangling qubits into small Greenberger-Horne-Zeilinger-like states prior to making the stabilizer measurements that place them in the XY-code state. We prove that in this new procedure $O(\sqrt{n})$ high-rate errors along a single lattice boundary can cause a logical failure, leading to an almost quadratic reduction in the number of fault-configurations compared to the standard state-preparation approach. Moreover, the code becomes equivalent to a repetition code for high-rate errors, guaranteeing a 50% code-capacity threshold during state preparation for infinitely biased noise. With a simple matching decoder we confirm that our preparation protocol outperforms the standard one in terms of both threshold and logical error rate in the fault-tolerant regime where measurements are unreliable and at experimentally realistic biases. We also discuss how our state-preparation protocol can be inverted for similar fragile-boundary-mitigated logical-state measurement.


I. INTRODUCTION
Fault-tolerant, scalable quantum computation with noisy physical hardware relies on encoding quantum information in a large number of physical qubits making up an error correcting code.Two important performance metrics for an error correcting code are its threshold, which is the physical error rate below which error correction becomes successful, and the amount of error suppression possible for a given number of qubits.These depend on its distance which sets the minimum weight of an uncorrectable error, the number of faultconfigurations leading to uncorrectable errors, and their likelihood which heavily depends on the details of underlying noise model [1,2].
Biased-Pauli noise is a common noise model describing many practical qubit architectures in which errors that cause bit-flips are far less likely than those that only lead to phase-flips [3][4][5][6][7][8][9][10]. When only phase-flip noise is present, we say that the noise is infinitely biased.The discovery of native bias-preserving controllednot gates [9][10][11][12][13] has driven research towards tailoring codes to be highly effective at correcting biased-Pauli noise [14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29].Two leading candidates for such codes are the XY surface code [19] and XZZX surface code [23].These are obtained from the standard CSS surface code by local Clifford-deformation of its stabilizers [30].Their favorable properties arise from the underlying symmetry of their stabilizers due to which these codes reduce to repetition codes when noise is infinitely biased (see [31] for further discussion on the role of symmetries in error correction).Thus, these codes have a 50% threshold at infinite bias.Moreover, compared to the planar XZZX surface code, the XY code can also tolerate quadratically higher weight phase errors, making it more desirable for correcting strongly biased noise.
It is natural to ask if the favorable properties of the XY code persist during logical state preparation, which is the very first step in any quantum algorithm.In the standard approach, a logical X state |+ L ⟩ is prepared by initializing each physical qubit in the |+⟩ state, followed by a measurement of all the code stabilizers.However, in this process half of the stabilizers cannot be used for detecting phase errors, destroying the symmetry of the XY code, a phenomenon that has been referred to as temporal fragile boundaries [32].As a consequence, the code does not reduce to a repetition code under pure phase noise and, as we will show, the threshold at infinite bias degrades to ∼ 11%.Moreover, during state preparation the code distance to phase errors scales as √ n where n is the number of physical qubits of the code.In contrast, if all the stabilizers could be used for error correction then the code could tolerate more phase-flip errors and its distance to these high-rate errors would be n.Thus, fragile boundaries during state preparation cause an overall degradation of the XY code.Similar fragile-boundary-induced degradation also arises during standard approach for logical measurements.
In this work, we propose a new logical state preparation protocol to mitigate the effect of fragile boundaries.In our protocol, physical qubits are entangled into local two-and four-body Greenberger-Horne-Zeilinger(GHZ) states before being entangled into the surface code state by stabilizer measurements.This initialization pattern allows us to use three-fourths of the stabilizers for correcting phase noise and, as we prove, the code reduces to a single repetition code for phase errors with distance √ n.Thus a 50% threshold against phase-noise is guaranteed in the state preparation process, a substantial improvement over the standard preparation scheme.Moreover, the fact that there is a single repetition code implies that there are O(2 ) fault-configurations in the standard preparation protocol where 3.41 ≤ α ≤ 3.67 [2].Thus, our scheme is able to mitigate the degrading effect of fragile-boundaries.
While our analytical results are limited to the case of pure phase noise, we numerically examine the performance of our scheme under fault-tolerant setting where some bit-flip errors and measurement errors are present.For decoding we use a modified minimum-weight matching (MWPM) algorithm as proposed in [22] and implemented using an open-source library [33].We find that our code is successful at reducing the effects of fragile temporal boundaries at experimentally realistic noise biases.We also discuss how our state-preparation scheme can be inverted for fragile-boundary-mitigated logical state measurement.Finally, we present short-depth circuits for Bell-state preparation that are compatible with the conventional layout of the surface code and that introduce minimum additional noise into the code.
This paper is organized as follows.Section II starts with a brief outline of the XY surface code.The standard logical state preparation scheme is described in section II A and our new scheme along with the main theorems are described in section II B. Finally, section III presents the results of numerical simulations and we conclude with discussion on Bell state preparation and further opportunities in section IV.

II. XY CODE
We focus on the rotated XY code, also referred to as the tailored surface code [18,19], which is defined on a d× d square lattice for odd d with data qubits on the vertices.The X-and Y -type stabilizer generators are defined on the faces of the lattice in an alternating checkerboard pattern as shown in Fig. 1.The X (Y )-type stabilizers are product of Pauli X (Y ) operators on data qubits around each face.This d × d rotated XY code encodes a single logical qubit in n = d 2 physical qubits.The X (Y )type logical operator is a product of Pauli X (Y ) acting on qubits on a string connecting the left (top) and right (bottom) boundary.The distance to X and Y errors is d.The only non-trivial Z-type logical operator is a Pauli Z acting on every qubit [19].
X (Y ) errors anticommute with the Y (X)-stabilizers creating pairs of syndrome defects oriented diagonally as shown by green (blue) stars in Fig. 1.A Z error anticommutes with both X-and Y -type stabilizers leading to four syndrome defects, with pairs on neighboring rows (or columns) oriented vertically (or horizontally), as shown by red stars in Fig. 1.The underlying structure of syndrome defects generated due to pure Z errors leads to enhanced performance against pure phase noise.More precisely, it has been shown that a d × d rotated XY code, reduces to a length-d 2 or equivalently a length-n repetition code under pure Z noise [19].Consequently, its threshold to pure Z noise is 50% and the distance to Z Z Y X FIG. 1. Layout of a rotated XY code, its stabilizers, and error syndromes for high-rate(Z) and low-rate(X, Y ) errors.
errors is exactly the number of qubits n.Thus, the code also leads to lower logical error rates under pure Z noise compared to the standard surface code with O( √ n) Zdistance.However, the high Z-distance in the XY-code is fragile when X or Y are present [32].At any one of the four spatial boundaries, O( √ n) Z errors can combine with a single X or Y error to cause a undetectable logical error.In addition to the spatial fragile boundaries, there are temporal fragile boundaries that occur during state preparation and measurement.While a strategy to mitigate spatial fragile boundary by modifying the stabilizers has been proposed previously [32], we present the first approach for mitigating temporal fragile boundaries.

A. Standard Logical State Preparation
We first describe the phenomena of temporal fragile boundaries in the standard state preparation approach.For concreteness we consider the preparation of the |+ L ⟩ state but the analysis can be extended to preparation of the |− L ⟩ , |+i L ⟩ , |−i L ⟩ states as well.
The protocol for the preparation of |+ L ⟩ begins by the initialization of each physical qubit in the |+⟩ state in step 1, followed by the measurement of all the code stabilizers in step 2 [1].The initial unentangled product state |+⟩ ⊗n is the +1 eigenstate of X L and all the Xstabilizers.In the absence of errors, the outcomes of all the X-stabilizer measurements are guaranteed to be +1, while the Y -stabilizer measurements result in outcomes randomly chosen from (+1, −1).Since the stabilizers commute with the logical operators, the qubits after measurements are projected in the |+ L ⟩ state up to a local gauge determined by the outcomes of the Y -stabilizer measurements.Z or Y errors can be detected as they anticommute with the X-stabilizers and can be corrected.However, because the outcomes of the Y -stabilizer measurements are completely random, they cannot be used to detect Z errors.As a result, a Z error only produces two syndrome defects and cannot be differentiated from Y errors.In fact, at this stage the code appears to be iden-tical to the standard surface code with a ∼ 11% threshold and d = √ n distance to Z-noise on data qubits [1].Moreover, the number of ways to get a minimum-weight Z error scales as O(α √ n ) where 3.41 ≤ α ≤ 3.67 [2].

B. New Protocol
We first describe the new protocol to prepare the |+ L ⟩ state which proceeds in two steps.The protocol begins, in step 1, by initializing the qubits in Bell states as indicated in Fig. 2. The four physical qubits around the Y -stabilizer plaquettes, highlighted by dark blue squares, are entangled into the GHZ state Each pair of qubits involved in the two-body Y -stabilizer along the top X-logical boundary, marked by dark blue line, is entangled into the Bell state and the remaining qubits along a Y -logical boundary, marked as blue dots, are prepared in |+⟩.We will refer to all the qubits except the ones prepared in single-qubit |+⟩ states as bulk qubits.Subsequently in step 2 all the stabilizers of the code are measured.
Note that |ϕ 4 ⟩ and |ϕ 2 ⟩ are respectively the +1 eigenstates of X ⊗4 and X ⊗2 .Thus the initial state is a +1 eigenstate of all the X-stabilizers and X-type logical operators.Consequently, in the absence of errors, the poststabilizer-measurement state is the +1 eigenstate of the X-type logical operators and all the X-stabilizer measurement outcomes must be +1.
Importantly, |ϕ 4 ⟩ and |ϕ 2 ⟩ are +1 eigenstates of Y ⊗4 and Y ⊗2 , respectively.Consequently, in the absence of errors, the measurement of outcomes of the marked Ystabilizers must be +1.The measurement outcomes of the unmarked Y stabilizers are random (±1).Thus, unlike in the standard protocol, half of the Y -stabilizers can be used to detect errors in the new scheme.Note that although only |+ L ⟩ is prepared in Theorem 1, |+i L ⟩ can be prepared in a similar manner due to the symmetry of the XY code as shown in Appendix A. We now state the main theorem.
Theorem 1.In the new state-preparation protocol for the square d × d XY code, Z errors on all the bulk qubits are correctable (part I) and Z errors on data qubits at the temporal boundary can be decoded as a single repetition code of length d (part II).
Corollary 1 (Fault-configurations).There are O(2 √ n ) least-weight fault-configurations due to pure Z errors, where n = d 2 is the total number of qubits.This is nearly quadratic improvement over the least-weight fault-configurations in the standard state-preparation approach.
Proof.Consider the square lattice of the XY code in Fig. 2 where the qubits are placed on the vertices.We will use indices (i, j) ∈ {1, 2, ..., d} 2 to denote the location of data qubits.Z errors on the data qubits can be expressed as Z(z) = i,j (Z i,j ) zi,j with a corresponding binary vec- implies no (a Z) error on the data qubit located at (i, j).Thus the probability for z i,j = 1 is equal to the probability of Z errors and the problem of decoding Z errors reduces to correctly determining z.
In the following, we will refer to the X and Y stabilizers with fixed measurement outcome of +1 as fixed stabilizers.Under pure Z errors, the syndrome measurement of any fixed stabilizer S is (i,j)∈supp S (−1) zi,j , where supp S denotes the set of qubits on which S is supported.Thus, it is possible to interpret (i,j)∈supp S z i,j = 0 as the parity checks of a classical code where denotes summation modulo two.A −1 outcome of measuring a fixed stabilizer results in the violation of this parity check.The parity checks can be decoded to determine z and the location of Z errors.Next we show that these parity checks reduce to a number of independent classical repetition codes.
First, consider pairs of qubits on the top row for which we have two-bit parity checks z 1,2j−1 ⊕ z 1,2j , j = 1, 2, ..., (d − 1)/2 due to the fixed Y stabilizers.Each of the two-bit checks forms a classical 2-bit repetition code REP (2).By adding the check z 1,2j−1 ⊕ z 1,2j to the four-bit parity check z 1,2j−1 ⊕z 1,2j ⊕z 2,2j−1 ⊕z 2,2j , corresponding to the fixed X stabilizers directly below the top Y stabilizers, we reduce that four-bit parity check to a two-bit parity check z 2,2j−1 ⊕z 2,2j .Adding this new twobit parity check to the next four-bit parity arising due to the fixed Y stabilizer in the next row again reduces the latter to a two-bit parity check.In this recursive manner, all four-bit parity checks reduce to two-bit parity checks z i,2j−1 ⊕ z i,2j for i = 1, 2, ..., d and j = 1, 2, ..., (d − 1)/2 with support on pairs of adjacent qubits in every row.
We can apply this same procedure but this time starting with pairs of qubits on the leftmost column for which we have two-bit parity checks z 2i,1 ⊕ z 2i+1,1 , i = 1, 2, ..., (d − 1)/2 due to the fixed X stabilizers.By adding the check z 2i,1 ⊕z 2i+1,1 to the four-bit parity check z 2i,1 ⊕ z 2i,2 ⊕ z 2i+1,1 ⊕ z 2i+1,2 , corresponding to the fixed Y stabilizers directly to the right of the X stabilizers, we reduce that four-bit parity check to a two-bit parity check z 2i,2 ⊕ z 2i+1,2 .Continuing the recursion, all fourbit parity checks this time reduce to two-bit parity checks z 2i,j ⊕ z 2i+1,j with support on pairs of adjacent qubits in every column for i = 1, 2, ..., (d − 1)/2 and j = 1, 2, ..., d.Now consider z 2i,2j−1 , z 2i,2j , z 2i+1,2j−1 , z 2i+1,2j , for i, j = 1, 2, ..., (d − 1)/2, which are supported on qubits around the fixed Y stabilizers.These form a classical 4-bit repetition code REP(4) with parity checks Thus we see that for every fixed Y stabilizer there cor- At the outset it seems that the probability of successful decoding will be severely limited by the REP(2) and REP(4) codes.However, incorrect decoding of a REP (2) or REP(4) results in a flip applied to every bit in its support.Equivalently, this results in Z error applied to every qubit in the support of the corresponding fixed Y stabilizer.However, these qubits are prepared in the entangled states |ϕ 2 ⟩ or |ϕ 4 ⟩ which are eigenstates of Z ⊗2 and Z ⊗4 and are thus invariant under these operators.Hence Z errors on all qubits other than the ones on the last column are correctable.This proves part I of Theorem 1.
Finally, we consider the last column of qubits.For this column, each fixed X stabilizer is supported in two qubits.The classical parity checks z i,d ⊕ z i+1,d (i = 1, 2, ..., d) form a classical d-bit repetition code REP(d).Decoding the classical repetition code results in decoding Z errors on these qubits, which is part II of Theorem 1.Thus, fewer than (d − 1)/2-flips on these bits can be corrected.The number of least-weight fault configurations is the threshold for the classical repetition code is 50%, the threshold for Z errors in the quantum code is also 50%, from which Corollary 2 follows.

A. Noise model and decoder
The analysis in the previous section demonstrates the advantage of our scheme over standard state preparation scheme under pure Z-noise.In practice there will be some bit-flip noise affecting the qubits.To compare the performance of the two approaches in this experimentally relevant situation we resort to numerical simulation of FIG. 3. Scaling of logical error rate below threshold for various p with pm = 0. Filled circles show the logical error rates at different p with the new protocol.For comparison, the subthreshold scaling curve for p = 0.05 with standard protocol is also plotted with square markers.The solid and dotted lines are obtained from linear fits.Filled triangles are the logical error rates of repetition codes with distance d and bit-flip rate p.The dashed lines through the triangles are just drawn for easy visualization.
the state preparation protocol with practical decoding algorithms.We will use a phenomenological model where (a) X, Y , and Z errors are applied, with probabilities p x , p y , and p z respectively, on data qubits after they are initialized in the product state |+⟩ ⊗d 2 in case of standard scheme or Bell states in case of our proposed scheme, (b) X, Y , and Z errors are applied, with probabilities p x , p y , and p z respectively, on data qubits after each round of stabilizer measurements and (c) measurement errors are applied with probability p m .For fault-tolerance to measurement errors, we perform d rounds of stabilizer measurements after the measurements in step 2. Our aim is to estimate the logical error rate as a function of the total probability of errors on the data qubits p = p x + p y + p z for a given bias η = p z /(p x + p y ).We also assume p x = p y for simplicity.
In the standard state-preparation approach, a Z error on the data qubits flips two stabilizers in the measurement round in step 2. In contrast, in our scheme, a Z error on a qubit on the top or right boundary flips two stabilizers while a Z error on any other qubit flips three stabilizers in step 2. A Y error in either schemes flips two stabilizer measurement outcomes.In both the schemes after the first measurement round, a Z error always flips all neighboring stabilizers since all stabilizers can be used for error correction.This implies that standard minimum-weight perfect matching (MWPM) algorithm cannot be used to optimally correct for Z-biased noise and instead we use a modified MWPM algorithm introduced in [22].We refer to this as the Tuckett decoder, which we further adapt to account for the fact that only certain stabilizers can used for error correction in the first measurement round (see Appendix D for details).

B. No measurement error, pm = 0
We first benchmark the adapted Tuckett decoder under ideal measurements p m = 0 and η = ∞, so that only pure Z noise is present.In this limit we find that the adapted Tuckett decoder results in a 49.1(2)% threshold for our state-preparation scheme and 10.1(1)% threshold for the standard scheme, which are in agreement with our analytical predictions.Next, we analyze the subthreshold scaling of logical error rate.The filled-circles in Fig. 3 show the logical error rate as a function of d for different values of p with η = ∞ and p m = 0 for the new preparation scheme.For comparison, the filled triangles are the logical error rates for repetition codes of length d as a lower bound of the performance of our protocol.We observe that the numerically obtained logical error rate of our is systematically larger than that for repetition code, indicating that there is scope to further improve over the decoder.
For our preparation scheme we find the fit parameters to be (α, β, γ, δ) = (0.46(1), 0.04(1), 0.243(9), −0.7( 1)).Recall Theorem 1 due to which (d + 1)/2 phase-flip errors occurring on the last column of qubits are uncorrectable so that the logical error rate scales as p (d+1)/2 (at low p) and α ideal = 0.5.The value of the slope with the adapted Tuckett decoder, α ∼ 0.46, is close to α ideal .Despite good agreement with the ideal slope, the adapted Tuckett decoder does not reduce to an ideal decoder as shown with examples in the Appendix D.
Nonetheless, at fixed p, p L for our scheme is several orders of magnitude smaller than with the standard preparation scheme, as seen for example, by comparing the logical error rate for p = 0.05 with the standard preparation scheme (filled red squares) and the new scheme (filled red circles).For more precise comparison, we examine the error suppression factor Λ which determines how fast the logical error rate decreases as the distance increases at a given p (p L = O(Λ −d )) [34].We obtain Λ for p = 0.05 from the slopes of the fitted straight lines through the red circles and squares respectively for the two protocols.For our protocol we get Λ = 2.3(1) which is nearly twice of Λ = 1.2(1) for the standard protocol, indicating a much faster suppression in logical error rates as larger codes are used with our protocol.The large difference in the values of Λ indicates that the number of fault configurations with the adapted Tuckett decoder for our scheme is indeed much smaller compared to that for the standard approach.
Despite the sub-optimality of the Tuckett decoder, it reproduces the analytically predicted thresholds and overall sub-threshold scaling behavior for η = ∞ fairly well.Thus, we also use it for the finite-η case.For an experimentally realistic high bias η = 10 4 [12,28], the threshold for the total error rate with our scheme is 15.1(2)% in comparison to that of 10.2(1)% with the standard approach.A plot of threshold as a function of We now consider non-zero measurement errors and assume p m = p [22].The plot of threshold as a function of η with the two schemes is shown in Fig. 4. In this case, the threshold difference between the two schemes is less dramatic.At infinite bias the threshold increases from 5.66(1)% for the standard scheme to 7.47(5)% for our scheme, while for η = 10 4 the threshold increases from 5.62(2)% to 6.03(4)%.Figure 5 compares the logical error rates for the two preparation approaches with d = 7.For η = ∞ we find that the logical error rate with our scheme is about an order of magnitude smaller compared to the standard approach.However, the difference between the two approaches becomes smaller as p decreases.
We attribute this effect to the decreasing contribution from temporal boundaries at smaller p where the gain from our protocol is reduced.For example, at η = 10 4 and p = 4%, the state preparation error rate with our approach almost reaches the floor set by the logical memory error rate (5.3(1) × 10 −3 ) for the same parameters shown as black triangle in Fig. 5.The standard preparation scheme clearly cannot reach this floor due to large contribution from temporal boundary errors.On the other hand at η = 10 4 and p = 0.6%, the logical memory error rate is 1.5(2) × 10 −5 .Our state preparation reaches this value but the logical error rate with the standard preparation scheme is slightly higher 2.8(2) × 10 −5 .
These results confirm that our scheme can indeed reduce the amount of additional state-preparation errors due to temporal fragile boundaries.For low physical error rates where the improvement looks less significant, the dominant contribution to logical error rate is mainly from measurement errors and not due to temporal boundaries.

IV. DISCUSSION
In this work we proposed a new state-preparation protocol for the XY code which mitigates the effect of fragile temporal boundaries based on using local GHZ states.We also studied the performance of our approach with a practical decoder.In Appendix C we discuss how this protocol can be inverted to realize fragile-boundarymitigated logical measurements.
Practically, it is necessary to be able to prepare the GHZ states with a short-depth circuit in a biaspreserving way.One possible circuit is shown in Fig. 6(a) in which the GHZ states are prepared using CX gates between the data qubits.One drawback of this circuit is that a single high-rate Z error on the data qubit which is the common target for all the CX gates can spread to multiple data qubits causing a correlated error.Moreover, this circuit is also not compatible with the standard connectivity of the surface code where the data qubits don't interact with each other directly, but only interact with an ancilla.
To overcome these shortcomings, we also give an alternative circuit in Fig. 6(b) and 6(c).This circuit can be effectively understood as first creating a five-(three-) body GHZ state on four(two) data qubits and one ancilla, and then disentangling the ancilla from the remaining data qubits.Crucially, the ancilla is left in the |+⟩ state at the end in the absence of noise.A single Z-type error on the ancilla causes it to end up in the |−⟩ state.Thus a X-measurement performed on the ancilla at the very end reveals the presence of Z errors on it.The GHZ state is used in the code only after the ancilla is measured in |+⟩.Importantly, this heralding eliminates to first-order error correlations on data qubits caused by Z errors on the ancilla.This implies that the effective noise resulting from this circuit, to first order, can be modeled as inde-pendent single-qubit Pauli errors on qubits applied after the circuit which are already accounted for in the phenomenological noise model as independent Pauli noise is applied to qubits after the GHZ state preparation and before the code stabilizers are measured.This ancillanoise robustness comes at the cost of one extra CX gate compared to the circuit in Fig. 6(a) and compared to the standard stabilizer measurement circuit.Ultimately, future work should consider a full circuit-level simulation of our scheme with additional modifications to mitigate the fragile spatial boundaries [32].
Moreover, there is considerable room for improving the performance of our scheme by improving the decoder.One possible path would be to combine the Tuckett decoder with belief-propagation [32,[35][36][37].Ultimately, in order to fully understand the advantages and limits of our scheme a hypergraph decoder will be necessary.While such a decoder may be inefficient, approximate solutions may be sufficient to reach reasonably low error rates with reasonable latency [38,39].
Other than the XY code, another example where the problem of temporal fragile boundary appears is the tailored XZZX surface code [29] which also reduces to a nbit repetition code at infinite bias as a quantum memory, where n is the number of physical qubits.As Z L = Z ⊗n , the standard way to prepare |0 L ⟩ would be to initialize qubits in |0⟩ ⊗n .Remarkably however in this case all stabilizer measurement outcomes are random, preventing us from detecting any error occurred during state preparation.Initializing qubits in local entangled states may allow us to fix more stabilizers and thus gain information about errors in the first round.We leave this as an open problem for future work.The standard protocol for X L measurement proceeds by measuring each data qubit in the X basis [1].The measurement outcomes x i ∈ {0, 1} can be added to obtain the logical measurement result x L = i x i .
In the absence of errors, the measurement outcomes of qubits supported by an X-type stabilizer S must sum to FIG. 8. Noise thresholds as a function of bias η for the standard state-preparation (blue) and the new protocol (red) for pm = 0.

zero:
v∈supp S x v = 0 since all measurements commute with S. The X-type stabilizers can thus be effectively used to detect and correct data qubit Z errors (caused by a physical Z or Y error on the data qubit or by a measurement errors).The Y -type stabilizers do not provide any information about errors since they don't commute with the data qubit X measurements.Thus, there is no way to detect X errors which is not a problem as these errors don't affect the X L measurement anyway.Nonetheless, only half the stabilizers can be used for correcting errors and there is no way to distinguish a Z error from Y error.This results in fragile temporal boundaries similar to the case of state preparation.
We overcome this challenge by "inverting" the new state preparation protocol.We measure the local operators that stabilize the Bell states |ϕ 4 ⟩ and |ϕ 2 ⟩ which are {Y Y Y Y, XXII, IXXI, IIXX} and {Y Y, XX} respectively.The qubits in the last column are measured in the X basis.The result of X L measurement can be inferred from summing over all disjoint XX and X measurements.Moreover, the measurement outcomes obey the set of REP(4), REP(2), and REP(d) parity checks as described under Theorem 1.
We know from the discussion under Theorem 1 that incorrect decoding of a REP(2) or REP(4) results in Z ⊗2 or Z ⊗4 applied to qubits supporting |ϕ 2 ⟩ or |ϕ 4 ⟩.However, Z ⊗2 on |ϕ 2 ⟩ or Z ⊗4 on |ϕ 4 ⟩ commutes with operators being measured.Thus we conclude that in this new measurement protocol for the square d × d XY code, Z errors on data qubits at the temporal boundary can be decoded as a single repetition code REP(d) on the last column of qubits.It also follows that there are O(2 √ n ) least-weight fault-configurations, where n = d 2 is the total number of qubits and that the threshold to pure Z noise is 50%.In this work, we apply the XY code decoder exploiting the symmetries of the code and noise bias [22].We refer the reader to [22] for details.In this section we only highlight the modifications made to the original decoder for state-preparation.
The only difference between the original decoder and the decoder we use is how the matching graph is weighed in the first time-step to account for the temporal boundaries.We need to add virtual vertices at the temporal boundaries.The vertex for an unfixed stabilizer can be either matched to its virtual temporal vertex with zero weight, or matched to any other vertices with normal weights corresponding to qubit X, Y , Z errors.The vertex for a fixed stabilizer can be matched to its virtual temporal vertex with weight corresponding to measurement errors p m .
For the standard preparation approach however, the syndromes due to Z errors are identical to the syndromes due to Y errors in the first time-step.Thus, we modify the Tuckett decoder in this case so that only diagonal edges corresponding to Y errors are allowed in the first time-step with weight corresponding to the probability of Z and Y errors.If we don't do this and instead use parallel edges like in the original Tuckett decoder then the performance of the standard approach degrades substantially.
Recall that in the case of state preparation with the new protocol, an optimal decoder should correct up to (d − 1)/2 Z errors on the last column of qubits, however, with an example shown in Fig. 9 we find that the Tuckett decoder is unable to achieve this.The unfixed stabilizers or stabilizers whose measurement outcome is unknown and cannot be used for error correction are marked with thick black outline in the figure for clarity.Figure 9(a) shows the syndromes in filled stars due to two Z errors on qubits marked in red circles.The solid lines shows the possible edges from matching.In this case the decoder assigns Z errors to qubits correctly.However, there is an alternate edge-matching of same weight shown in Fig. 9(b).In this case the decoder assigns Z errors to qubits marked in solid blue, which differs from the actual Z errors in red by a logical operator.

FIG. 4 .
FIG.4.Noise thresholds as a function of bias η for the standard state-preparation (blue) and the new protocol (red) for pm = p.

FIG. 5 .
FIG. 5. Logical error rates for the standard (filled-squares) and new preparation (filled-circles) schemes with pm = p at η = ∞ (red) and η = 10 4 (blue) for d = 7.The solid and dashed lines are shown as guides for the eye and are not obtained from any fits.The black triangles show memory logical error rate at p = 0.6%, 4% for η = 10 4 .
Appendix C: Logical Measurement of XL FIG. 2. The initialization pattern for |+L⟩ in our new state preparation protocol.The fixed Y stabilizers are marked by dark blue outline.All the X stabilizers are fixed.