Practical quantum error correction with the XZZX code and Kerr-cat qubits

The development of robust architectures capable of large-scale fault-tolerant quantum computation should consider both their quantum error-correcting codes, and the underlying physical qubits upon which they are built, in tandem. Following this design principle we demonstrate remarkable error correction performance by concatenating the XZZX surface code with Kerr-cat qubits. We contrast several variants of fault-tolerant systems undergoing different circuit noise models that reflect the physics of Kerr-cat qubits. Our simulations show that our system is scalable below a threshold gate infidelity of $p_\mathrm{CX} \sim 6.5\%$ within a physically reasonable parameter regime, where $p_\mathrm{CX}$ is the infidelity of the noisiest gate of our system; the controlled-not gate. This threshold can be reached in a superconducting circuit architecture with a Kerr-nonlinearity of $10$MHz, a $\sim 6.25$ photon cat qubit, single-photon lifetime of $\gtrsim 64\mu$s, and thermal photon population $\lesssim 8\%$. Such parameters are routinely achieved in superconducting circuits.


I. INTRODUCTION
A scalable quantum computer will require a large number of almost perfect qubits. To this end, impressive progress has been made in engineering high-quality quantum systems in the laboratory that can perform some requisite set of operations that are needed for quantum computation [1][2][3][4][5][6][7][8][9][10][11][12][13][14]. While we cannot expect to reduce qubit noise arbitrarily with laboratory engineering alone, the theory of quantum error correction [15][16][17][18][19][20] has shown that we can produce logical qubits that experience nextto-no noise by using a redundancy of high-quality physical qubits, provided the noise strength on the physical qubits as they perform computational operations is below some threshold value [21]. Nevertheless, it still remains a significant experimental challenge to produce scalable quantum error-correcting codes using available technology. In order to overcome this challenge we should codesign the code in unison with the underlying qubit architecture. This way we can build better error-correcting systems that specifically target the dominant sources of errors.
A promising approach to realize a high-quality physical qubit is to encode it in a bosonic mode [7][8][9][10][11][12][13][22][23][24][25][26][27][28][29][30][31][32][33][34]. Broadly speaking, encoding a qubit in the larger Hilbert space of an oscillator gives more room to protect the encoded information from noise, either through active error correction or autonomous stabilization of the codespace. One of the simplest incarnations of this idea is the Kerr-cat qubit, where orthogonal superpositions of * andrew.darmawan@yukawa.kyoto-u.ac.jp † shruti.puri@yale.edu two coherent states |±α define a physical qubit [23,[35][36][37]. The Kerr-cat qubit is realized by parametric pumping of a Kerr-nonlinear oscillator, as recently demonstrated in a superconducting circuit platform using a Superconducting Nonlinear Asymmetric Inductive eLement (SNAIL) [11]. This qubit is stabilized against bit flips. Specifically, bit flips are exponentially suppressed with the photon number ∼ |α| 2 , leading to a highly biased noise channel for large α [37]. Surprisingly, it has recently been proposed that the controlled-not gate (CX) can be executed with Kerr-cat qubits without changing this noise profile [37]. This enables us to go beyond schemes where it is assumed that only diagonal entangling gates can be used without introducing bit-flip errors at a significant rate [38,39].
The error correction capabilities of the XZZX code complement the biased noise of the Kerr-cat qubits. This motivates the present work where we demonstrate a very robust architecture for scalable fault-tolerant quantum computing by combining Kerr-cat qubits and the XZZX code. To this end, we perform elaborate simulations for a concatenated scheme undergoing a circuit error model arXiv:2104.09539v2 [quant-ph] 18 Oct 2021 that reflects noise sources that have been identified in recent experimental demonstrations of Kerr-cat qubits [11]. Simulating these details enables us to express the threshold error rates we obtain in terms of real laboratory parameters to interrogate the experimental viability of our proposal directly. Figure 1 shows what a Kerr-cat XZZX chip may look like if implemented with SNAILs. The dominant physical error channels for Kerr-cat qubits are photon loss and gain, quantified by a single-photon loss rate κ and the oscillator's thermal population n th [11]. The noise model of the Kerr-cat qubit is a function of κ, n th , as well as the "cat size" |α| 2 and the Kerr-nonlinearity of the oscillator K. With |α| 2 = 6.25 and a thermal population of 8%, we find a threshold of κ/K = 2.5 × 10 −4 . This corresponds to a total infidelity of ∼ 6.5% for the noisiest logical operation in the error correction circuit, CX, for which pure Pauli Z errors occur ∼ 351 times more frequently than other Pauli errors during the gate. This noise threshold can be reached, for example, using a superconducting Kerr cat realization with K/(2π) = 10 MHz, a parametric pump strength of 62.5 MHz, and a single photon lifetime κ −1 = 63.6 µs. We remark that the experimental demonstration of the Kerr-cat qubit in Ref. 11 showed that frequency fluctuations are heavily suppressed when the SNAIL is pumped into the catsubspace, such that requirements on flux noise (characterized by the T 2 time of the un-pumped SNAIL) are greatly relaxed compared to frequency tunable transmons. These parameters are routinely achieved in superconducting circuits [56,57], suggesting that Kerr cats well below threshold may be realized in the near future, making the proposed architecture a promising approach to large-scale fault-tolerant quantum computing.
While our protocol achieves exceptional performance using Kerr-cat qubits, we also show that similar improvements may be attainable in other biased-noise architectures. Using the XZZX code with a generic biased circuit noise model we observe roughly a factor of two improvement in the threshold error rate over the standard CSS version of the surface code. Surprisingly, we still find that the XZZX code has a 50% higher threshold error rate than the CSS surface code when using standard CX gates rather than bias-preserving CX gates.
We also perform exact simulations on small codes that represent near-term experiments. These simulations allow us to study non-Pauli noise models with optimal decoders and reveal that the high performance of our scheme at both high and low biases is relatively insensitive to suboptimal implementation of gates and decoding compared to other schemes. This paper is structured as follows. In Sec. II we review the definition of the XZZX surface code and describe how it can be implemented in a Kerr-cat architecture. In Sec. III we review Kerr-cat qubits and describe the bias-preserving gates available to them. In Sec. III B we describe the important noise processes affecting Kerr-cat qubits and the methods we have used to simulate noisy = SNAIL = DC flux-bias for the SNAIL = out-of-plane interconnect through which all the microwave drives (such as the two-photon drives, coupling drives for CX gates and drives for single-qubit gates) are applied = resonator for qubit readout FIG. 1. Schematic for a possible realization of the XZZX surface code using a 2D lattice of nearest-neighbor capacitively coupled SNAIL-based Kerr-cat qubits. Data qubits are represented in magenta and ancilla qubits in green. A DC flux line is present to bias the SNAIL at the point of desired nonlinearities. The lattice arrangement is such that neighboring SNAILs resonate at different frequencies to minimize cross-talk. Microwave drives applied at appropriate frequencies through the out-of-plane interconnects parametrically activate gate operations [11,37]. Importantly, no extra nonlinear control/coupling elements are required unlike other biased noise bosonic qubits. For direct readout of ancilla and data qubits, an additional readout resonator is available at each site. This readout resonator also provides the ability to parametrically introduce two-photon dissipation in the SNAILs which could be used for autonomous leakage correction. gate execution. In Sec. IV we present results of numerical simulations, demonstrating that very high thresholds can be achieved using XZZX codes and Kerr-cat qubits. The performance of low-distance codes under biased noise is presented in Sec. V. A discussion of the results along with potential future research directions are provided in Sec. VI. Details of the surface code simulation methods and some advantages of Kerr-cat qubits over purely dissipative cat qubits are included in Appendices A and B respectively.

II. THE XZZX SURFACE CODE
We describe the XZZX code using the stabilizer formalism, i.e., a list of commuting Pauli operators whose common +1 eigenspace defines the codespace of the code. We lay out the code with a single qubit on each vertex of the square lattice. Up to its boundaries, all of its stabilizers are the product of four Pauli terms; S f = X ⊗ Z ⊗ Z ⊗ X acting on the four qubits at the corners of each of the faces f of the square lattice, see Fig. 2(a). The XZZX code is locally equivalent [58,59] to the conventional CSS surface code [16,17]. As such it inherits its code properties. We choose a lattice of size ∼ d x × d z using n = O(d x d z ) qubits, where d x and d z correspond to the lengths of the smallest X and Z logical operators, which have a string-like support and traverse homologically non-trivial paths between opposite boundaries of the code. With open boundary conditions, the XZZX code encodes one logical qubit.

A. Stabilizer measurements
We measure stabilizer operators to identify the locations of errors that occur on the qubits of the code. As the codespace is defined as the +1 eigenspace of the stabilizers, measuring a stabilizer in the −1 state indicates an error has occurred that takes the system out of its codespace. Our stabilizer readout circuit is based on that given in Ref. [60], up to the Hadamard gates that rotate the standard surface code onto the XZZX code. Here we briefly summarize the circuit we use.
We measure each stabilizer generator using the circuit shown in Fig. 2(b). All of the stabilizer generators can be measured in parallel. We place a single ancilla in the |+ state on each face. We subsequently apply two-qubit entangling gates between the ancilla and its four nearestneighbor data qubits such that the ancilla collects the parity information for the stabilizer S f on its respective face f . We finally measure the ancilla in the Pauli-X basis to learn the value of the check.
In Fig. 2(a), we indicate the order in which qubits should be coupled to the ancilla. With the exception of qubits on the boundary, every data qubit is coupled with an ancilla qubit at each time step. The same ordering is used for checks on the boundary, except when there is no neighbouring ancilla or data qubit to couple with, at which time the qubit is left idle. This ordering enables parallel readout of all the stabilizer operators [60]. The exception to this ordering is for the small n = 9 codes in Sec. V where we use the rotated surface code layout. Here, on every second face the order of application of the two CX gates is swapped. For that particular layout, this order was shown in Ref. 61 to mitigate the effect of hook errors, in which a single error on an ancilla can propagate to two data qubits.
In a realistic device, errors may occur during gate execution, state preparation, measurements and on idle qubits. Repeated measurement of stabilizer generators provides data, called the syndrome, that allows us to correct for all of these types of errors, provided we adopt an appropriate decoding strategy.

B. Decoding
A decoder is a classical algorithm that uses the error syndrome as an input to estimate the best choice of correction that can be applied to recover the encoded state. We use a minimum-weight perfect-matching (MWPM) decoding algorithm to correct for all types of errors [17]. Note that correctly identifying the error, up to stabilizer equivalence, is equivalent to finding a correction for that error. We format the error syndrome as a list of defects, where we say that a defect appears at face f and at time t if S f (t − 1)S f (t) = −1, where S f (t) denotes the outcome of the stabilizer measurement S f made at time t. Describing the error syndrome as a list of defects means that errors can be interpreted as strings where defects lie at their endpoints [17]. This interpretation enables us to employ MWPM to estimate the error that has occurred.
The MWPM algorithm takes a graph with weighted edges and returns a matching such that the sum of the weights of the matching is minimal. Given the error model and the syndrome, the graph input to MWPM is constructed such that each node corresponds to a defect, and the weight of an edge connecting two defects is − log p, where p is the probability of the most likely error that can give rise to that pair of defects. This choice of weights implies that the edges returned by the MWPM algorithm correspond globally to the most likely error consistent with the observed syndrome.
This practical decoder is particularly well suited for decoding biased noise using the XZZX code. For the XZZX code, a Z error on any data qubit will produce a pair of defects displaced in the same direction, independent of the qubit, and this is perpendicular to the displacement produced by an X error. Thus, when the noise is strongly biased towards Z errors, the edge weights in the syndrome graph have much higher weight in one direction. This allows errors to be identified less ambiguously using MWPM, compared to when edges in both directions are more equally weighted, and results in a high threshold under biased noise. This was demonstrated using a phenomenological noise model in Ref. 51.
In realistic circuit level noise, single error events can give rise to pairs of defects separated 'diagonally' i.e. in both space and time as well as hook errors, which occur when the ancilla qubit experiences a X error halfway through the stabilizer readout circuit [an X error at A2 in Fig. 2(b)]. This error is copied onto two of the data qubits by the entangling gates. However, as the hook error is caused by a low rate event, the effect of these errors is relatively benign for biased noise. Our decoder takes into account all of these types of errors by appropriately assigning edge weights in the construction of the syndrome graph.

III. CAT QUBITS AND BIAS PRESERVING GATES
Here we describe the Kerr cat [11,36] which, in our proposal, forms the elementary qubit from which the XZZX code is built. The Kerr-cat qubit is realized in a two-photon driven Kerr nonlinear oscillator. The Hamiltonian of such an oscillator in a frame rotating at the oscillator frequency ω t is given by (1) Here, K > 0 is the strength of the nonlinearity while Kα 2 is the amplitude of the two-photon drive. The orthogonal even-and odd-parity cat states |C ± α = N ± (|α ± |−α ) are degenerate eigenstates of this Hamiltonian. As illustrated in Fig. 3, the degenerate cat-subspace C = span{|C ± α } is separated from the rest of the Hilbert space C ⊥ by an energy gap, which in the limit of large α is well approximated by |ω gap | ∼ 4Kα 2 . We will work in the basis where the cat states |C + α ≡ |+ and |C − α ≡ |− are aligned along the X-axis of the Bloch sphere, and their superpositions ( The Kerr-cat qubit has been recently realized experimentally with a capacitively shunted SNAIL [11]. The SNAIL is a flux-biased nonlinear device comprising of four Josephson junctions (Fig. 1). Both third-and fourth-order (Kerr) nonlinearities exist in the SNAIL at an appropriate value of the external magnetic flux. Due to the third-order non-linearity, a single microwave drive applied at twice the resonance frequency generates the two-photon term in the Hamiltonian in Eq. (1).
It has been shown that the error channel of the Kerrcat qubit is dominated by phase-flip errors while X and Y errors are exponentially suppressed with the average photon number a † a ∼ |α| 2 [37]. Some noise sources, such as thermal excitation, frequency-fluctuations, etc., may introduce leakage errors. Leakage can, to some extent, be autonomously corrected or "cooled" by introducing any additional photon dissipation channel without adversely affecting the bias [37]. A two photon dissipation source is preferred for such autonomous leakage correction.
The inherent nonlinearity in the Kerr cat enables a straight-forward realization of two-photon dissipation for autonomous leakage correction. For example, consider the setup in Fig. 4 which is the building block of the surface code architecture. Suppose the resonance frequency of one of the data qubit SNAILs is ω t . Each SNAIL is capacitively coupled to a readout resonator of frequency ω r . A microwave drive applied to the SNAIL at 2ω t − ω r can induce the two-photon dissipation as follows. Due to the Kerr-nonlinearity in the SNAIL, the drive photons are consumed to convert two photons in the SNAIL to one photon in the readout mode. The photon in the low-Q readout is rapidly lost to the environment, thus effectively inducing two-photon dissipation in the SNAIL. Depending on the drive amplitude, mixing between the readout and SNAIL mode, and lifetime of the readout, the strength of the two-photon dissipation achieved can be easily engineered to be K/100 − K/10.
Single-photon loss and thermal noise were observed to be the two main sources of errors in the experiment in Ref. 11. Consequently, we also consider these noise sources for the simulations in the present work. Importantly, the experiment found that non-phase-flip errors decreased with increasing cat size, confirming the theoretically predicted biased-noise property of the qubit.

A. Kerr cats and dissipative cats
In our work, the choice of the Kerr cat as the biasednoise system used for the numerical analysis is motivated by several characteristics that makes it an excellent candidate for large-scale quantum computation. Firstly, the large nonlinearities inherently present in superconducting circuits ensures a large energy gap |ω gap |, typically in the range of 10 − 300 MHz. As further described in the next section, this large gap allows fast gates (10−100 ns). The typical lifetimes in these circuits, 10−100µs [4,56,57,62], are ∼ 100 − 1000 times longer than the gate times ensuring high-fidelity gate operations [11,37]. Consequently, it becomes much easier to reach the threshold parameters estimated in our work with current experimental techniques. The inherent nonlinearity can also be exploited to implement all the single-and multi-qubit gate operations and measurements using microwave pulses, thus eliminating any need for external coupling elements and providing a hardware efficient solution for scaling up [11,37].
We now contrast the Kerr-cat qubit with the purely dissipative cat qubit which also has a strongly biased noise channel [25]. The dissipative cat is realized by engineering a two-photon drive and two-photon dissipation in a linear resonator via external nonlinear modes, such as a transmon [12,31,63]. So far, the strength of the two-photon dissipation induced this way has been limited to 10 − 100 KHz, leading to slow gate operations ( > ∼ 1µs) [64].
In addition, the lack of self-Kerr nonlinearity in purely dissipative cats makes implementation of gate operations, preparation, and measurements more challenging. This is evident, for example, from the scheme for X-basis measurement. The Kerr-cat readout (see Sec. III B for more details) proceeds by effectively rotating the qubit around the Y axis, which maps the X basis states to the Z basis. The Z basis states are subsequently mapped onto a linear readout resonator and a homodyne measurement of its field reveals the state of the Kerr-cat qubit. A useful feature of this scheme is that the strength of the homodyne field, and hence measurement fidelity, increases with the size of the Kerr-cat. The Y axis rotation is FIG. 4. A drive at 2ωt applied to the SNAIL implements the two-photon drive required to realize the Kerr-cat Hamiltonian in Eq. (1). Here ωt is the resonance frequency of the SNAIL. It is also possible to activate the two-photon dissipation for autonomous leakage correction by applying a microwave drive at 2ωt − ωr. Here ωr is the resonance frequency of the readout resonator coupled to the SNAIL. possible by freely evolving the qubit under the self-Kerr nonlinearity in the Kerr-cat mode. This rotation is not possible in purely dissipative cats and hence this simple measurement scheme cannot be employed.
In the case of dissipative cats, X-basis measurement proceeds by adiabatic deflation of the even and odd parity cat states to vacuum and single-photon Fock states respectively. The Fock states are subsequently read out via coupling to other nonlinear modes like a transmon or asymmetrically threaded SQUID [12,31]. Compared to the Kerr-cat readout scheme, this scheme is slow and its fidelity is effectively independent of cat-size.
Another challenge with dissipative cats is that additional nonlinear coupling elements required to implement quantum operations may open up new sources of dissipation in the system which can reduce the noise bias [63,64]. Finally, during gate operations, dissipative cats may suffer from non-adiabatic phase-flip errors (see Appendix B) [31]. Because this extra source of phaseflips is absent in Kerr cats, it is easier to achieve the threshold parameters in practice.
Future theoretical and experimental research in optimizing the hardware and control architecture will certainly improve both biased noise cat platforms and may even lead to development of new biased-noise qubits [48]. But because of the reasons outlined above and the current state of technology, this paper focuses on the XZZX code implementation with Kerr-cat qubits.

B. Logical Cat Operations and Noise Channels
We assume that at the beginning of the computation, each SNAIL (data and ancilla) has been pumped into the cat-qubit basis by the adiabatic pumping technique described in Refs. [11,36]. Once in the logical cat subspace, the set of bias-preserving operations in the Kerrcat platform, relevant for the XZZX code implementation, are the projective X-basis measurement, M X , and the gates {S, S † , CZ, CX}. We use the projective measurement M X for state preparation P |+ . We will now describe how these operations can be implemented.

S, S † gates
Consider the Hamiltonian of a Kerr-cat qubit when, in addition to the two-photon drive, an additional resonant microwave drive of amplitude ε is applied H Z = H cat + (aε * + a † ε). Projecting the interaction onto the logical subspace gives notation to suppress polynomial factors in x [65]). S and S † gates are implemented by applying the microwave drive, in phase (ε = ε * > 0) and π out-of-phase (ε = ε * < 0) with the two-photon drive respectively for time T S = π/8αε, see Fig. 5(a). Clearly, by increasing the cat size and strength of the microwave drive |ε| it is possible to decrease T S , thereby decreasing the probability of errors during the gate operation. Note that the drive can cause virtual transitions out of the computational cat subspace. Consequently, we must have |ε| |ω gap | so that these virtual transitions and leakage outside the qubit manifold ∼ |ε/ω gap | 2 remain negligible.

CZ gate
The implementation of a CZ gate between two Kerr cats requires a Hamiltonian interaction of the form for the corresponding drive scheme. Here the subscripts c, t refer to the control and target qubits respectively. Evolution under this Hamiltonian for time T CZ = π/8Jα 2 realizes the CZ gate. Clearly, larger α and J lead to a faster gate. To minimize virtual transitions out of the computational cat subspace we must have Jα |ω gap | [36]. The term ∝ (a † c a t + a c a † t ) is a beamsplitter interaction between the two qubits and is realized by applying a drive to either of the two qubits at their frequency difference. The third-order nonlinearity in the SNAIL consumes the drive photons to convert photons in one SNAIL to photons in the other, effective realizing the beamsplitter Hamiltonian. The term ∝ (a c + a † c ) is realized by applying a resonant microwave drive to the control SNAIL.

CX gate
The diagonal S, S † , and CZ gates are trivially bias preserving. A more challenging gate to realize, however, is the bias-preserving CX gate. Such a gate can be achieved by exploiting the continuous variable nature of the cat encoding, and temporarily leaving the cat-code subspace during the gate. The intuition for the CX gate is best understood by first considering a bias preserving X (or NOT) gate. An X gate can be executed by adiabatically changing the phase of the two coherent states |±α → |±αe iφ(t) such that φ(0) = 0 and φ(T ) = π. At time T we have thus mapped |±α → |∓α and implemented an X gate (in the large α limit where |0/1 |±α ). Similarly, a CX gate can be executed if we can condition the phase φ(T ) on the state of the control qubit. As shown in Ref. 37 this can be achieved using a total Hamiltonian (2) The interactions needed for the CX gate can be activated parametrically as shown in Fig

MX , P |+
The remaining components required for the surface code implementation are the projective X-basis measurement, M X , and preparation P |+ . The projective measurement proceeds in two steps. The first step comprises of rotating the |± ancilla states to the computational basis states |0, 1 respectively, using an S gate followed by X(π/4) = (1 + iX)/ √ 2 operation (see Fig. 6). The X(π/4) gate is a non-bias preserving gate but since this gate is being applied to the ancilla during measurement the effect of a non-dephasing error is the same as a dephasing error [38]. It is implemented by turning off the parametric drive and evolving the cats freely under the self-Kerr nonlinearity for time π/2K [11,67].
Once the |± states are rotated to |0, 1 , a controlleddisplacement (CD) operation between the Kerr-cat qubit and a linear readout resonator can be used to read out in the computational basis. The required (rotating frame) interaction Hamiltonian is H readout = H cat + g(a † 1 + a 1 )(a † r + a r )/2, where a 1 , a r are the annihilation operators for the Kerr-cat mode and the readout mode respectively and g is the beam splitter coupling between the two modes [11,67]. Projecting onto the qubit subspace gives P C H readout P C = gαZ 1 (a † r +a r ). From this projected Hamiltonian it is clear that the readout resonator experiences a displacement conditioned on the state of the qubit.
If the single-photon decay rate of the readout mode is κ r , then the qubit-dependent displacement amplitude The X(π/4) gate required for ancilla readout is not shown here. It simply requires turning off the two-photon drive on the ancilla Kerr cat for time π/2K. The speed of the homodyne measurement after the CD operation is characterized by the rate Rmeas = 2κr|β| 2 , where |β| = 2gα/κr is the maximum of readout-resonator displacement caused by the Kerrcat qubit [66].
is ∼ ∓(2giα/κ r )(1 − e −κrt/2 ). This displacement amplitude can be subsequently measured via a typical homodyne measurement and the outcome of the homodyne measurement can be used to infer the state of the ancilla qubit. Since the displacement of the readout-resonator increases with α, the subsequent homodyne measurement of its field becomes more efficient as the cat-size is increased. Consequently, higher fidelity measurements are possible by making the cat-size larger.
The interaction Hamiltonian, H readout , can be achieved by applying two microwave drives to the SNAIL: one at the frequency difference of the readout resonator and the SNAIL and the other at the sum of these two frequencies [see Fig. 5(d)]. The first drive gives rise to a beamsplitter type coupling (a † 1 a r + a † r a 1 ), while the second drive gives the squeezing type coupling (a † 1 a † r +a r a 1 ). The amplitudes of the two drives can be adjusted so that the strength of the beam-splitter and squeezing interactions are the same leading to the desired Hamiltonian H readout . In the limit of large photon number cat qubits, only one drive at the difference frequency is sufficient. In this limit, the resulting beam-splitter interaction projected in the cat-basis is P C (a † 1 a r + a † r a 1 )P C ∼ gαZ 1 (a † r + a r )

To Homodyne
FIG. 6. Circuit for projective measurement and subsequent preparation of basis states in the X basis. The top line is the data qubit and the botton is the readout resonator. The controlled-displacement or CD gate maps the state of the data qubit to the displacement of the readout mode. A homodyne measurement of the signal from the readout resonator then reveals the state of the qubit.
to a very good approximation [O * (e −2α 2 )]. This readout scheme, called quadrature readout has been demonstrated experimentally [11]. After the measurement is complete, the ancilla is projected onto one of the computational basis states conditioned on the measurement outcome. In order to re-initialize the ancilla in |+ or |− for the next round of syndrome extraction, the states can be rotated from the computational basis by applying X(π/4) † = X(−π/4) followed by S † .

IV. THRESHOLDS
A crucial figure of merit for a quantum error-correcting code is the threshold: the maximum noise strength below which it becomes possible to efficiently reduce the noise strength on the logical level arbitrarily by increasing the number of physical qubits and gates. We perform numerical simulations to estimate the threshold noise strength using both a generic biased circuit level noise model in Sec. IV A, and a realistic Kerr-cat qubit noise model in Sec. IV B. The former demonstrates the generic performance increase of the XZZX code when using biaspreserving gates and operations. The latter provides a target noise strength in a Kerr-cat architecture based on a realistic noise model. The threshold is calculated by numerically computing logical failure rates at different sizes, and determining the maximum physical noise strength below which the logical error rate decreases exponentially with system size. In each simulated run, the circuit implementing d z rounds of noisy syndrome extraction is applied followed by a single round of noiseless syndrome extraction. The final round can be thought of as a readout, in which each data qubit is measured individually, and without loss of generality can be considered noiseless as any measurement error in this round can be equally regarded as having occurred in the previous (noisy) round. The decoder is run on the observed syndrome and a logical failure occurs if the physical error and the correction, computed by the decoder, are homologically distinct. Further details of the Pauli simulation method are provided in Appendix A 1.
As is standard in most numerical studies of quantum error correcting codes, a Pauli noise model is used in these threshold calculations, enabling efficient simulation of large system sizes. Although the noise model for Kerr-cat qubits obtained through numerically solving the Lindblad master equation is not a Pauli channel, we have demonstrated with exact simulations of smaller systems, described in Sec. V B, that a Pauli approximation to the noise does not appear to significantly affect calculated logical error rates.
The results we present in this section for the XZZX code are obtained with the conventional open-boundary layout of the surface code, which has three-qubit checks on the boundary [52]. Alternative boundary conditions (including periodic in both in space and time) were also tested, and similar threshold values were obtained in all cases (despite large differences in logical error rates).
As was shown in Ref. 51, with the standard layout and open boundary conditions, the aspect ratio of the code can be tuned to the bias. By increasing the length of the logical Z operator compared to the logical X operator, an overall lower logical error rate can be obtained for a given number of qubits. Unless otherwise specified, we determine the aspect ratio using small systems by varying the length of the code relative to its width until the logical X error rate is comparable to the logical Z error rate near threshold. This aspect ratio is then fixed when scaling up the code. To make more system sizes computationally accessible, we restrict to aspect ratios such that the length of the code is a multiple of its width. As with boundary conditions, varying the aspect ratio does not appear to appreciably change the value of the threshold, provided the aspect ratio is fixed as the system is scaled up.
We also perform simulations of the standard CSS version of the surface code and an alternative variant of the surface code proposed for biased noise which we call the tailored surface code (TSC). The TSC is simply the standard surface code, but with Z checks replaced with Y checks, such that a single phase flip error on a data qubit creates four adjacent defects. This version of the surface code was studied in Refs. 41 and 42, where it was found to have strong resilience to phase-flip noise. However, we found that the thresholds obtained with the TSC with circuit level noise and a modified MWPM decoder were somewhat lower than those of the XZZX code, so we have not presented them here. Nevertheless, the TSC may have some advantages for finite-sized systems, which we discuss in Sec. V.

A. Generic biased circuit noise thresholds
First, we estimate the threshold of the XZZX surface code using a generic biased circuit noise model. We compare this to the threshold of the standard CSS version of the surface code under the same noise model and find that the XZZX code has a significantly higher threshold. Surprisingly, we also find that the XZZX code maintains a large advantage over the CSS surface code even if a standard CX gate for two-level qubits, rather than a biaspreserving CX gate, is used. The generic noise model has two parameters p z and the noise bias ζ. In the following we assume, without loss of generality, that the Pauli errors are applied after the gate. On the CZ gates, the errors Z a ⊗ I d and I a ⊗ Z d , are each assigned the probability p z and all other two-qubit Pauli errors are assigned the probability p z /ζ. We remark that in this simplistic toy model we are assuming probability of correlated Z a ⊗ Z d error to be the same as the probability of non-dephasing errors p z /ζ. This gives a total error probability (or infidelity) of p z (2 + 13/ζ) per CZ gate. Here the subscripts d, a refer to the data and ancilla qubits respectively. Single qubit noise including idle noise on data qubits and noise during ancilla preparation have a single qubit Pauli error model with X, Y and Z error probabilities given by p z /ζ, p z /ζ and p z respectively. Faulty measurements are modelled by flipping the ancilla measurement outcomes with probability p z + p z /ζ.
In the case of ordinary discrete two-level qubits, evolution under an interaction Hamiltonian of the form χ [(1 + Z a )I d /2 + (1 − Z a )X d /2] for time π/2χ would be required for the CX operation. It is easy to show that if the probability of a Z error during the gate is p z , then the resulting error channel is (writing only the Pauli-terms for brevity) π/2 0 cos 4 (φ)dφ ∼ 0.375p z and p z = (2p z /π) π/2 0 cos 2 (φ) sin 2 (φ)dφ ∼ 0.125p z . Consequently, we use this equation for probability assignment for the I a Z d , Z a I d , Z a Z d , I a Y d , and Z a Y d errors, while all other two-qubit Pauli errors are assigned the probability p z /ζ. The total infidelity of the CX gate in this case is p z (2 + 10/ζ).
For the bias-preserving CX gate in the generic noise model, unlike its ordinary counterpart described above, phase-flip errors on the data qubits may convert to Z a ⊗ Z d but they do not convert to Z a ⊗ Y d or I a ⊗ Y d errors. Consequently, in this case I a ⊗ Z d and Z a ⊗ Z d errors are assigned the probability p z /2, Z a ⊗ I d is assigned the probability p z and all other two-qubit Pauli errors are assigned the probability p z /ζ. Note that total infidelity of the CX gate in this case is larger than the infidelity of the generic non-bias-preserving CX gate by 2p z /ζ. For large ζ, for example ζ = 100 used here, this difference becomes negligibly small. The resulting logical error probability vs p z is plotted for the surface code with both bias preserving and non-bias preserving CX gates in Fig. 7(a).
For comparison, we also perform simulations of the conventional CSS surface code using the bias-preserving CX gate and the same generic biased error model.   7. Error thresholds of surface code variants with a generic circuit noise model and bias ζ = 100. In (a), we compare the threshold of the XZZX code using bias-preserving CX gates (solid lines) to its threshold using standard non-bias-preserving CX gates (dotted lines). We find that the availability of bias-preserving CX gates leads to a ∼ 25% improvement in the threshold. This result highlights the fact that along with total gate error, structure of noise in the gate plays an important role in determining the performance of the surface code variant. In (b), the threshold of the CSS code using bias-preserving CX gates is shown for comparison and is seen to be approximately half that of the XZZX code using the same bias-preserving gates.
In this model, both types of CX gate have error rates approximately equal to 2pz (see text for details of the noise model). The crossing points are circled, and the total CX error probability pCX at these points is shown. In (c), we plot the logical error rate of both code variants against √ n near the threshold of the CSS code, found in (b), where n is the number of data qubits. In all plots, error bars indicate one standard deviation.
ary, which has a code distance that is a factor of √ 2 larger than the XZZX code on the unrotated geometry using an equal number of physical qubits. The resulting logical error rates are shown in Fig. 7(b). We do not use the rotated layout for the XZZX code, since the all Z logical operator in this case is oriented at 45 • to the lattice boundaries, and we therefore cannot improve the resilience of the code against phase flips by varying the code's aspect ratio (unlike with the standard layout). We also present the logical failure rate as a function of √ n for both the XZZX code and the CSS surface code at physical error rate p = 0.005 in Fig. 7(c).
The procedure for choosing the aspect ratio for the XZZX and CSS codes using bias-preserving CX gates is as described above, which yields the same aspect ratio for both codes near threshold of around 3 : 1. To simplify comparison, we use the same aspect ratio for the XZZX code with standard CX gates, however, this may not be optimal.
As can be seen, the XZZX code using a bias-preserving gate achieves the highest threshold p z = 0.98 ± 0.05%, corresponding to a two-qubit error rate of close to 2%. This is approximately double the threshold of the CSS surface code with the same noise model, which achieves a threshold of p z = 0.50 ± 0.05%. The XZZX code with a standard non-bias-preserving CX gate performs worse than the XZZX code with a bias-preserving gate, achieving a threshold of 0.80 ± 0.05%. However this is clearly much higher than the CSS surface code threshold, suggesting that the XZZX code may be a good choice in biased-noise architectures, even when a bias-preserving CX gate is not available.

B. Kerr-cat noise thresholds
To obtain the noise models used for threshold estimates of the XZZX Kerr-cat code, we first perform a master equation simulation of the operations needed for the syndrome extraction circuit (Fig. 2): the CX and CZ gates, as well as measurement and preparation schemes described above. The simulations are performed for two cat sizes, α 2 = 1 and α 2 = 6.25.
The noise channel of the larger cat is more biased than that of the smaller one. Based on the observations in the recent experimental work [11], we subject the qubit to a white thermal noise channel represented by the Lindbladian κ 1 (1 + n th )D[a]ρ + κ 1 n th D[a † ]ρ. Thermal noise introduces leakage and in order to autonomously correct some of the leakage we add an additional two-photon dissipation to the Lindbladian κ 2 D[a 2 ]ρ, where the rate of two-photon dissipation κ 2 is fixed to κ 2 = K/10.
When the two-photon dissipation is added care must be taken to adjust the phase of the two-photon drive to preserve the cat-qubit subspace [37]. In our simulations, the two-photon dissipation is added while the gates are being implemented for all but the CX gate. The CX gate requires a time-dependent two-photon dissipation which becomes hard to numerically simulate. In practice, it also increases the number of drives that must be carefully phase-tuned in an experiment.
In order to avoid these complications, we simulate the CX gate with the following steps. First the master equation with the Hamiltonian in Eq. (2) and dissipative terms L[ρ] = i=c,t κ 1 (1 + n th )D[a i ]ρ + κ 1 n th D[a † i ]ρ is simulated with φ(t) = πt/T for time T . Next, the interactions between the control and target Kerr cats are removed and the Hamiltonian of the system is set to that of two uncoupled Kerr cats. Finally, the master equation with the two uncoupled Kerr cats is simulated with timeindependent two-photon dissipation, i=c,t κ 2 D[a 2 i ]ρ, in addition to L[ρ] for time T [37].
Of course, more phase-flip errors are introduced in the second step of the simulation. The resulting error probabilities in this two-step CX gate, which takes time T CX = 2T , will be roughly twice as high as that in the CX gate simulated with time-dependent two-photon dissipation in one step, which takes time T CX = T .
For estimating measurement errors, we performed a master equation simulation of the X(±π/4) and S ( †) gates. Subsequent steps of CD and finite efficiency homodyne measurements are simulated by stochastic master equation simulations. We assume a homodyne measurement efficiency of 60% [69]. We have found quantitative agreement between the analytic expression for homodyne measurement fidelity in Ref. 70 and numerical results from stochastic master equation simulations. For α 2 = 6.25 cat we use the beam-splitter Hamiltonian H readout = H cat + g(a † 1 a r + a † r a 1 ), while for α 2 = 1 we use H readout = H cat + g(a † 1 + a 1 )(a † r + a r )/2. Note that, if the probability of bit-flip errors during the CD gate is small (a condition which is satisfied in the biased noise cat-qubit) this step in the measurement protocol is equivalent to the well studied longitudinal readout scheme [70]. Consequently, known analytic expressions for longitudinal readout error may be used.
Observe from Fig. 5 that all gate operations [other than X(π/4)] become faster with increasing cat-size. For a given α we choose the gate speeds so that the probability of leakage outside the cat-manifold is at least an order of magnitude smaller than total infidelity. This choice is justified as the goal, when designing pulses for experimental implementation of gates, is to not limit the gate fidelity by the amount of leakage. While no pulse shaping is being used in our simulations, such techniques combined with DRAG can be used to further reduce leakage without sacrificing the gate fidelity [71,72]. In our simulations, the leakage probability per qubit, per stabilizer round is between 10 −3 and 10 −4 , which is consistent with recent experiments [73]. Additionally, the two-photon dissipation channel applied during or after the gates also checks the leakage growth. For the cat sizes considered here, the two-photon dissipation after every CX gate reduces the leakage by a factor of ∼ 10.
In this way, in our simulations of the qubit operations, we suppress leakage to a reasonable amount at the physical level but then neglect the residual leakage in the further surface code simulations. While, this is the dominant practice in literature for studying the performance of a code, further investigation must be carried out to model, quantify, and counteract the effect of leakage in the Kerr-cat-surface code architecture. Like in other platforms, further suppression of leakage may require leakage reduction units (LRUs). These units reduce leakage errors to errors in the computational basis [74,75]. In the case of Kerr cats, leakage in one qubit is unlikely to propagate to others during two-qubit gates.
Moreover, leakage is primarily confined to the lower energy subspace so that the computational-basis errors induced after LRUs remain biased. Of course, additional circuit complexity of the LRUs may effect thresholds. Assessing the performance of the surface code with LRUs optimized for Kerr cats is beyond the scope of the current work, but will be the topic of future study.
We simulate the XZZX surface code using the noise channel obtained numerically as described above. Tables I and II list the average fidelities, bias, and leakage in different operations obtained from numerical simulations for cat qubits with α 2 = 1.0 and α 2 = 6.25 respectively.  for time T , so that TCX = 2T . For fair-comparison, a twophoton dissipation channel after the CXR = RCZR † gate is also applied, for time ∼ 9/K so that the residual leakage after the CX and CXR gates are the same. The time of R gate is 2.6/K, CZ = 0.8/K giving a total time of 15/K. surface code as a function of the ratio of the single-photon loss rate and Kerr-nonlinearity κ/K. The total gate error scales as ∝ κ/K and so this is the important metric for experimentalists aiming to design the system.
The threshold values obtained for κ/K are given by (κ/K) thres ∼ 1.1 × 10 −4 for α 2 = 1.0 and (κ/K) thres ∼ 2.5 × 10 −4 for α 2 = 6.25. To illustrate the physical impli- FIG. 8. Error thresholds of the XZZX surface code with the circuit noise model for Kerr-cat qubits with a cat size (a) α 2 = 1 photon and (b) α 2 = 6.25 photons. The bottom axis shows the ratio of the single-photon loss rate κ or equivalently the inverse T1 time of the SNAIL used to realize the cat and the Kerr-nonlinear constant. The simulations also take into account a constant 8% thermal noise and two-photon dissipation κ2 = K/10 added for autonomous leakage correction. The noise channel in (b) is significantly more biased than in (a). We find the threshold κ/K of 1.1 × 10 −4 and 2.5 × 10 −4 in (a) and (b) respectively which corresponds to a CX error threshold of ∼ 3.1% and ∼ 6.5% respectively. For comparison, the threshold with α 2 = 6.25 photon cat and non-bias-preserving gate CXR = R CZ R † with R = exp(iπZt/4) exp(iπXt/4) is also shown in (b). Even though the gate infidelity of CXR is lower than that of the bias-preserving CX in Eq.
cation of these thresholds, consider a SNAIL-based Kerr cat with a Kerr-nonlinearity of K/2π = 10 MHz. Then (κ/K) thres ∼ 1.1 × 10 −4 for α 2 = 1.0 implies that the lifetime of the SNAIL (1/κ) should be longer than 144.7 µs for error correction with the XZZX surface code to be successful. For α 2 = 6.25, (κ/K) thres ∼ 2.5 × 10 −4 implies that the lifetime of the SNAIL (1/κ) should be longer than 63.6 µs for error correction with the XZZX surface code to be successful. The most noisy operation in the system is the CX gate and we see that, with the α 2 = 1.0 cat, the CX gate infidelity must be lower than 3.1%. On the other hand, with the α 2 = 6.25 cat the CX gate infidelity must be lower than ∼ 6.5%. The average CX gate bias at threshold for the α 2 = 6.25 cat is ∼ 351 while that for α 2 = 1 cat is ∼ 16. Clearly, as expected, we find that the XZZX surface code is able to tolerate more errors in the gates when the cat size is large because the noise bias increases.
The SNAIL lifetime in the first experimental demonstration of the Kerr cat was ∼ 15.5 µs, which shows that an improvement in the lifetime is required to operate below threshold with Kerr-cat qubits. Lifetimes of 50 − 100 µs are routinely achieved in superconducting Josephson-junction circuits [4,56,57,62], so that reaching a lifetime above the T 1 threshold appears very reasonable using state of the art superconducting circuit devices and fabrication. Optimizing the gate implementations and incorporating a one-step CX will further improve the threshold requirements. Finally, we note that the first Kerr-cat experiment [11] showed a strong suppression of frequency fluctuations due to 1/f noise for the pumped cat, compared to when operating the SNAILmon as a conventional transmon qubit without pumping. In practice, frequency fluctuations of the SNAIL were near negligible when pumped to the cat subspace. This suggest that, albeit the Kerr cat is a flux-tunable device, recent improvements in coherence times for fixed frequency qubits may also carry over to Kerr-cat qubits [76].

Comparison with non-bias-preserving CX gate
Note that with Kerr-cat qubits it is possible to implement a non-bias-preserving CX gate by implementing the gate sequence CX R = R CZ R † with R = exp(iπZ t /4) exp(iπX t /4). The subscript t denotes that the single qubit gate R acts on the target of the CZ. We have already discussed how exp(iπZ t /4) = S † , exp(iπX t /4) = X(π/4), and CZ gates are simulated. Unlike the bias-preserving CX gate implementation given in Eq. (2), CX R does not preserve the bias in noise. However, the gate can be implemented faster resulting in higher total fidelity. Table II also lists the gate fidelity and bias for the CX R gate for the α 2 = 6.25 photon cat. For fair-comparison, a two-photon dissipation channel after the CX R gate is also applied so that the residual leakage after the CX and CX R gates are the same for a given κ 1 , n th , and κ 2 .
To compare the two different gates, we repeat the simulation of the XZZX surface code but this time using the noise channel of the CX R gate. As shown in Fig. 8(b), the threshold in this case is lowered by ∼ 40% compared to the threshold with the bias-preserving CX. Moreover, the below-threshold logical error rate for the XZZX code is significantly higher with the CX R gate then the bias-preserving CX gate, despite the CX R gate having a lower total infidelity.

Comparison with the CSS surface code
We find that the CSS surface code with Kerr-cat noise in this parameter region does not perform as well as the XZZX code. At α = 2.5, over the range of κ/K shown in Table II, we observe a logical error rate of close to 50%, which does not decrease with system size, indicating that the CSS code is far above threshold. At lower bias α = 1, we also do not observe a threshold in the overall error rate over the range of κ/K used in our XZZX code simulations.
We also consider the scenario of Ref. 31 where the width of the CSS code is fixed d x = 3, and only the length of the code d z is scaled up. The same above threshold behavior is observed for α = 2.5, even when X logical errors are completely neglected. For α = 1, if we neglect logical X logical errors, we observe a threshold in the Z logical error rate comparable to the threshold in the overall error rate of the XZZX code at κ/K = 1.1 × 10 −4 . Given, however, that X errors are non-negligible at this bias, the the overall failure rate still appears above threshold, and so error correction with the CSS surface code does not appear to be functional in the parameter regions considered.
The high thresholds we obtain with the XZZX code are due to the fact that it appears very well suited to Kerr-cat qubit noise. One of the major advantages of this pairing is that a full round of syndrome measurements can be performed in a substantially shorter time than with the standard CSS surface code and therefore is far less prone to error. This is because, for large α, the gate that takes the longest to execute is the CX gate, while the relative time required to perform a CZ gate compared to CX tends to zero as α increases. For the CSS surface code, readout of an X check requires four data qubits to be coupled to the ancilla via CX gates, which takes at least time 4T CX . In contrast, every check in the XZZX code requires two CX gates and two CZ gates, and given that these can be parallelized, the entangling operations for a full round of syndrome measurements can be performed in time 2(T CX + T CZ ). In the limit of large α, the total time taken to apply the gates for a round of syndrome measurements with the XZZX code is ∼ 2T CX , which is roughly equal to that of a 1D repetition code and half that of the CSS surface code.

V. SMALL CODES
Here we perform exact simulations of different quantum error-correcting codes for systems of small size undergoing biased noise. In the previous section we were able to analyse the scalability of different quantum errorcorrecting codes by simulating systems of a large number of qubits. We obtained these results using an efficient decoder and by approximating quantum noise channels as a Pauli noise channel to make simulations tractable. Exact simulations enable us to investigate other details of various codes that are specialised to biased noise.
We perform several analyses using small-scale simulations using the Kerr-cat qubit noise model described in Sec. III B and an optimal decoding algorithm. By focusing on small codes we can perform optimal decoding without concern of the efficiency of the decoder. We describe the optimal decoder and the methods we use to conduct exact simulations in Appendix A.
The smallest realization of a surface code that can correct at least one X error and one Z error has n = 9 data qubits arranged on a 3 × 3 lattice and uses the 'rotated' layout of Ref. 68. In our small-scale simulations we compare the XZZX code on this layout to the tailored surface code (TSC) [42] on the same layout and to the one-dimensional repetition code with n = 9 qubits. The TSC is an alternative surface code variant where we measure weight-four Pauli-X stabilizer checks and weight-four Pauli-Y stabilizer checks. This code has been demonstrated to have favourable properties to correct for biased noise [42,45]. We use open boundary conditions for all simulations of the n = 9 codes with two-qubit checks on the boundaries of the surface code lattices.
While in Sec. IV we have shown that the XZZX code has impressive fault-tolerant thresholds with finite noise biases, the TSC with open boundary conditions has the advantage that it can tolerate up to (n − 1)/2 dephasing errors. In contrast, a logical failure can be introduced to the 3 × 3 XZZX code with as few as two Pauli-Z errors [41].
Like the TSC, the n = 9 repetition code can also correct up to four dephasing errors with certainty. Moreover, it has the additional advantage that it requires only two entangling gates, rather than four, in the circuits used for stabilizer parity measurements. As such, the stabilizer readout circuits for the repetition code are easier to implement and less error prone than surface code stabilizers. We might therefore expect that the repetition code is more accessible to realisation using near-term experiments.
This convenience of the repetition code comes at the expense that it has no protection against bit-flip errors. Indeed, in Ref. 31, numerical simulations showed that the repetition code does not increase its suppression of logical failures for a realistic biased noise model when increasing the system size beyond n ∼ 10 qubits. Nevertheless, for a small number of qubits and a very large noise bias such that the bit-flip errors are very rare, repetition codes may outperform surface codes. We can therefore expect variations in the performance of these codes in different parameter regimes.
Our exact simulation results highlight different features of the TSC, XZZX and repetition code when using using Kerr-cat qubits. The XZZX code in particular exhibits high performance in both high and low bias regimes, it is relatively insensitive to decoder miscalibration, and it does not suffer from significant increases in logical error rate when standard CX gates are used instead of bias-preserving CX. In contrast, the repetition code will perform better when the bias is high relative to the system size, and the TSC may have an advantage in architectures where CX gates are not so noisy (compared to other operations).
In Fig. 9, we have plotted logical error probabilities obtained using Kerr-cat qubits and bias-preserving operations alongside those obtained using non-bias preserving CX and a miscalibrated decoder (which we describe in Sec. V D). The probabilities of X, Y and Z logical errors separately are shown as well as the total logical error probability (which is the sum of the former three). The noise parameters were chosen to be slightly below the threshold estimated in Fig. 8, which is a regime relevant to near-term experiments.
Certain properties of these codes are reflected in these separate logical error probabilities. For instance, the Z logical is the only one that would be affected in the presence of pure phase-flip noise (i.e. noise where the bit-flip probability is exactly zero). With the rotated layout on a 3 × 3 lattice, the weight of the smallest Z logical of the XZZX code is 3, while for the TSC and repetition codes it is 9 [42]. The Z logical is therefore much more protected than X or Y logicals for the TSC and repetition codes compared to the XZZX code, as seen in Fig. 9. We see that the repetition code's failures are almost exclusively due to bit-flip errors, rather than phase-flip errors since in Fig. 9 the Z logical errors are nearly undetectable.
We point out that, like in the Pauli simulations used to determine the threshold in Sec. IV, we have approximated the cat qubits in the exact surface code simulations as strict two-level systems, and have neglected additional levels into which the system may leak. While the leakage suppression with engineered two-photon dissipation (and noise caused by this process) is still accounted for in the qubit noise model, there remains a small amount of residual leakage that is ignored. While we believe this effect to be small (for the CX gate, the probability of leakage is an order of magnitude smaller than that of a non-dominant error), we leave a detailed study of this effect to future research.
Under the following subheadings we discuss our smallscale analysis under several different criteria. We begin by examining the break-even point of different codes. This is a pseudo threshold that tells us the noise parameters below which a small quantum error-correcting code can outperform the constituent parts from which it is built. These numbers give us an indication of the quality of the qubits we need to demonstrate quantum error correction using small-scale experiments. In addition to this, we discuss the change in performance obtained by using bias-preserving gates as compared with a more conventional gate noise model. We also use exact simulations to compare the true noise model extracted from master equation simulations (but still neglecting leakage) to the Pauli-twirl approximation, which was used in Sec. IV B. Finally, we also use small-scale simulations to investigate the loss of performance due to a miscalibrated decoder.

A. Break-even error rates
An important milestone for experimental demonstrations of error correcting codes is reaching the psuedothreshold or break-even point. We say that a code is below the pseudo-threshold if the probability of a logical error on the encoded qubit after a fixed number of rounds of error correction is less than the error probability of the noisiest element in the syndrome circuit, which in this case is the CX gate. The number of rounds was set to three for all of the following simulations.
As shown in Fig. 9(b), at high bias α = 2.5 and κ = 2.08 × 10 −4 with a bias-preserving CX and optimal decoding, the logical error rate for the XZZX code is 5.41 ± 0.09% and TSC is 5.53 ± 0.10%, which for both codes is equal, within statistical error, to the error rate of the CX gate of 5.43%. This shows that the pseudothreshold can be achieved with the XZZX and TSC at remarkably high CX gate infidelity. At this level of bias, where the probability of bit-flip errors is extremely low, the repetition code has an error rate of 1.62 ± 0.02%, which is lower than the both surface code variants. This is due to its overall shorter circuit, having fewer qubits idle during CX gate execution and also its ability to correct up to four dephasing errors with certainty.
In contrast, at a lower bias of α = 1 and with κ = 8.33 × 10 −5 with a bias-preserving CX the XZZX code is the only code of the three to be below the pseudothreshold. The advantage of the XZZX code over the repetition code here is that it can detect and correct bitflip errors, which are non-negligible at this level of bias.
The drawback of the TSC in a Kerr cat architecture comes from the fact that it requires twice as many CX gates compared to the XZZX code (which are far noisier than CZ gates). While we do not present the results here, we have found that for simple biased noise models where CZ and CX gates have roughly equal error probabilities, the 3 × 3 TSC with optimal decoding can outperform the XZZX code in terms of logical error rate for a wide range of biases. However, as efficient near-optimal decoding appears more complicated for the TSC than the XZZX code for larger systems, more work is still required before the TSC can be regarded as a practical or scalable alternative to the XZZX code under this kind of noise.
B. The necessity of bias-preserving CX gates One striking difference between the different codes is the relative importance of using bias-preserving CX gates. To test this we compared the performance of each code using the bias-preserving CX gate to a non-bias preserving preserving CX gate. See Sec. IV A for a descrip-tion of the latter CX gate. We defined this gate with the same infidelities as the bias-preserving CX gate.
The blue and orange bars in Fig. 9 represent the logical error probabilities obtained using bias-preserving CX gates and standard (non-bias preserving) CX gates respectively. While both TSC and XZZX surface codes have a higher logical error rate when not using a bias preserving CX gate, the increase in error rate is much larger for the TSC. At high bias α = 2.5, for the XZZX code, the error rate increases by around 70% when using nonbias preserving CX, while the TSC sees a huge increase of nearly 400% compared to when using a bias preserving CX gate. This is likely due to fact that the TSC uses twice as many CX gates as the XZZX code, and so using non-bias preserving CX gates reduces the overall noise bias less in the XZZX code than the TSC. This effect is also observed, although is less pronounced, at lower bias α = 1. Like the threshold results of Sec. IV, these results suggest that high performance may be achieved with Kerr cats and the XZZX code even if bias-preserving gates are not used (although the best performance is likely obtained with bias-preserving gates).
Unlike the surface code variants, the repetition code is entirely dependent on a bias-preserving CX gate. Since it is only designed to correct phase-flip errors, the additional bit-flip errors introduced with a non-bias preserving CX gate drastically reduce its performance. This can be seen in both α = 1 and α = 2.5 plots, where the logical error rate is roughly equal to the probability of an X error occurring on a data qubit somewhere in the error correction circuit.

C. Interrogating the Pauli-twirl approximation
The threshold simulations in Sec. IV are performed with a Pauli noise model, which allows efficient simulation of large systems. This Pauli noise model is obtained by taking the Pauli twirl approximation of the full noise model, which has non-Pauli or coherent terms. The Pauli twirl approximation effectively sets non-Pauli terms in the noise to zero. We do not need to apply the Pauli twirl to the noise in the exact simulations (albeit we still neglect leakage to other states). However, our exact simulation data suggests that non-Pauli terms in the physical noise have a negligible contribution to the performance of the surface code variants.
Using the Pauli twirl of the noise maps on the physical level in the exact simulation produces an average logical χ matrix with diagonal terms (which can be interpreted as logical Pauli error probabilities) within statistical error of those obtained using the full (non-Pauli) noise maps on the physical level. Furthermore, off-diagonal terms in the logical χ matrix are at least two orders of magnitude smaller than the diagonal terms for the averaged logical channel, suggesting that the averaged logical channel is close to a stochastic Pauli channel. This provides some justification for the use of the Pauli twirl approximation  . Logical error probabilities for low distance (n = 9) codes obtained by exact simulation. In (a) a moderate bias, corresponding to α = 1, is used with κ/K = 8.33 × 10 −5 . In (b) a high bias, corresponding to α = 2.5, is used with κ/K = 2.08 × 10 −4 . In both cases, the overall noise strength κ is chosen to be slightly below the threshold estimated in Fig. 8. Optimal performance (blue) is compared to the performance obtained with a miscalibrated decoder (red), and non-bias preserving CX gate (orange) for the XZZX surface code, tailored surface code and repetition code. Each data point is evaluated over 12 000 samples and error bars represent the standard error of the mean. Aside for the red bars, which are obtained using a miscalibrated decoder, optimal decoding is used in all of these simulations.
in the threshold calculations in Sec. IV.
In contrast, the repetition code preserves coherence on the logical level. The full noise-model results in slightly worse performance than its Pauli twirl, with about 10% lower fidelity in the logical channel for α = 1 and κ/K = 8.33 × 10 −5 . Furthermore, off-diagonal terms in the logical χ matrix are larger than the dominant diagonal terms. This is not particularly surprising, since the X-component of the noise is not transformed from the physical to the logical, e.g. a coherent X rotation on the first physical qubit of the repetition code results in an undetectable coherent X rotation by an equal angle of the logical qubit.

D. Miscalibrated decoding algorithms
An exact density matrix simulator can also function as an optimal decoder. It can thus be used to probe the performance gains possible with improved decoding, or, conversely performance loss if the decoder is not optimally calibrated to the noise. To demonstrate the importance of calibrating the decoder to biased gate noise, we have compared the performance of a miscalibrated decoder to the optimal decoder. With the physical CX gate chosen to be bias preserving, the miscalibrated decoder is tuned to the noise model of the standard CX (rather than the bias-preserving CX). Thus the miscalibrated decoder is not properly adapted to the noise on the CX gate, however it still correctly takes into account the bias on all other elements. The difference in performance observed between the miscalibrated decoder and optimal decoder tells us how important it is for the decoder to have an accurate characterisation of bias on the CX gate.
As shown in Fig. 9 at high bias α = 2.5 the XZZX code is much less sensitive to decoder miscalibration than the TSC code at this bias. Using a miscalibrated decoder resulted in an increase of less than 20% increase in logical error rate for the XZZX code, compared to over 100% for the TSC. The insensitivity of the XZZX code to miscalibrated decoding suggests that near optimal performance may be achieved with this code using heuristic decoding methods (like minimum weight perfect matching) where a precise characterisation of the noise model does not need to be used.
At lower bias α = 1 we see a smaller increase in logical error rate when the decoder is miscalibrated for both XZZX and TSC surface codes. This suggests that the importance of tailored decoding increases as the bias increases. In contrast, the logical error rate of the repeti-tion code, due to its relatively simple decoding requirements, appears almost completely unaffected by decoder miscalibration at both low and high bias.

VI. DISCUSSION
We propose a robust architecture for fault-tolerant quantum computing in which Kerr-cat qubits are used as the elementary qubits in an XZZX surface code. The resulting system demonstrates exceptional thresholds that can be met using a superconducting circuit architecture with parameters that appear fairly modest compared to the current state of the art. We make conservative assumptions about the Kerr-cat photon number and imperfections such as thermal noise and measurement inefficiency. For the parameters used in our simulations, the Kerr cat has an anharmonicity, given by ω gap , comparable to that of a transmon, leading to fast gates. Note, however, that our simulations were performed without pulse optimization, which may yield significant improvements [77]. Further optimization is also possible by improving the decoding algorithm, as our results were obtained using a standard minimum-weight perfect-matching decoder [60].
It remains to make a detailed analysis of the resource cost to use our error-correcting system to perform a computation below some target logical failure rate. This will be important to compare the performance of our proposal with others [31,[38][39][40][41][42][43][44][45][46][47][48][49]. Resource estimates are highly sensitive to the details of noise in laboratory systems [78], and can be improved dramatically with optimizations to the code (e.g. to the code layout and decoder) and hardware. Hence, we leave such calculations to future work. Nevertheless, given the remarkable threshold that our system exhibits, we expect we will be able to demonstrate a scalable system by realizing our proposal using modern technology.
Theoretical research should progress hand-in-hand with experimental development. To this end, details in our simulations have been motivated by the dominant sources of noise in Kerr-cat qubits that have been observed in recent experiments [11]. We should expect that as the system is scaled up in terms of both the size of the cats, and the number of qubits on a chip, that other sources of errors such as crosstalk, drive-induced heating and leakage must be accounted for. It will be important to develop better methods to characterize the noise in physical realizations of our error-correcting systems [79], and to refine our quantum error-correcting codes accordingly.
The architecture motivating our present study is based on the Kerr-cat qubit realized with on-chip superconducting SNAILs. This is a promising platform for realizing a large-scale surface-code architecture using systems presently available in the laboratory. The principles in the design and fabrication of a large-scale SNAIL chip are very similar to other circuit QED based approaches, for instance quantum processors based on tunable transmons [80]. The scalability of our proposal with existing technologies suggests a practical solution to achieve faulttolerant quantum computing in the near term. ments are flipped (i.e. the syndrome) and the residual error on the data qubits.
The Pauli simulation used for threshold calculation assumes the initial state is a noiseless surface code state, to which a number of rounds of noisy syndrome measurements are applied, followed by a single final round of noiseless syndrome measurements. The assumption that the final round of check measurements is noiseless is justified in practice since the final readout of a surfacecode qubit is performed by single qubit measurements on the data qubits for which there is no distinction between a measurement error and a data qubit error. After sampling an error, the decoding algorithm is run on the corresponding syndrome to determine a correction. If the computed correction and the sampled error belong to the same logical equivalence class, we regard the error correction as successful. If not, a logical failure is said to have occurred. By repeating the simulation many times and counting the number of logical failures, the logical failure rate can be determined. To determine the error threshold, the simulation is performed at varying error rates as the code distance d is increased. For code distance d the number of rounds of noisy measurements was set to d. The threshold was determined to be the noise strength below which increasing d led to an exponential decrease in logical failure rate.

Exact simulation
The exact simulation method involves storing the N qubit density operator of the noisy code state ρ as a 4 N component vector in memory and updating it as gates, noise and measurements are applied with matrix-vector multiplication. Given the exponential scaling in required memory, the method is only suitable for small system sizes. However, it has the advantage of allowing arbitrary noise models to be studied (rather than restricting to Pauli noise). Keeping track of the full density operator also means that the simulation algorithm may be used for optimal decoding. This type of decoding is similar to the approach described in Ref. 81 and 82. By calculating how a linearly independent set of encoded states (represented as 2 × 2 matrices) transforms under error correction for a fixed syndrome s, it is possible to calculate the logical channel E s , represented as a 4 × 4 χ matrix, conditioned on the syndrome. The optimal Pauli correction is then the one that minimises the distance of the logical channel to the identity i.e. argmin L∈I,X,Y,Z ||L • E s − I|| . (A1) For Pauli noise, this is equivalent to maximum-likelihood decoding. One simplification made for the exact simulation was that the check measurements were performed sequentially, i.e. all the gates and the ancilla of a check were applied before measuring the next check. This is in contrast to the Pauli simulation, where all checks were measured simultaneously with an interleaved 2 qubit gate pattern (described in Sec. II). This simplification to the exact simulation was made to save computational time, since performing check measurements in parallel necessitates keeping all ancilla qubits in memory (in addition to the data qubits), rather than a single ancilla qubit at a time. We remark that there is a simulation method, described in Ref. 83, based on novel tensor-network contraction techniques which can obviate the large memory cost of the simple exact simulation method we have used, however the overall computational costs in this method still remain daunting.
There is some choice in where to put idle noise in the simulation when checks are measured sequentially. We have applied idle noise to data qubits and ancilla qubits such that the total strength of the idle noise on each qubit is the same as if the gates were interleaved to measure the checks in parallel. This idle noise includes the noise on qubits left idle during measurement and preparation of ancilla as well as noise on qubits left idle while CX gates are applied to other qubits. Noise on qubits left idle during rounds of CZ gates is relatively small compared to CX gates and was neglected in our exact simulations (although it is included in our Pauli simulations). Thus the total amount of noise in the circuit is roughly equivalent in our exact simulations, to the circuit with parallelized check readout which would be used in practice, however due to the different gate order there will be some differences in how errors propagate between data and ancilla qubits. , and Kerr cats with twophoton dissipation (orange), κ2 = K/10. In (b) the grey dashed line indicates the approximate analytic expression for average residual leakage (ε/4Kα 2 ) 2 , (ε/2κ2α 2 ) 2 . In these simulations we take α = 2 and all other sources of decoherence, such as single photon loss and thermal excitations, are neglected. Note that the oscillations in the leakage for Kerr cats results from off-resonant population transfer back and forth between the cat and leakage space due to the Hamiltonian dynamics. These oscillations disappear when a smoother time-dependent pulse ε(t) is used for implementing the Sgate. Nonetheless, the average behaviour agrees well with the simple analytic estimate given by the grey line.
drive is resonant with the cat-qubit frequency, it is offresonant from the excited states by an amount |ω gap |. Consequently, this drive can only cause small amount of population transfer to the leakage state. More importantly, the amount of leakage on average ∝ (ε/ω gap ) 2 , decreases with |ω gap | [37]. An S-gate with the purely dissipative cat requires the Hamiltonian H = i(κ 2 /2)α 2 (a †2 − a 2 ) + ε(a † + a) and the engineered dissipation κ 2 D[a 2 ]ρ. The gate time is π/8αε, which is the same as the S gate time with Kerr cats. In this case, a † also causes transition to the first excited manifold |C ± α → |ψ ∓ 1 . The excited state population quickly decays back to the cat-subspace at rate ∼ 2κ 2 α 2 . The quantity ∼ 2κ 2 α 2 is also called the Lindbladian gap. The residual excited state population is (ε/2κ 2 α 2 ) 2 . Because of the transition matrix elements C ± α |a 2 |ψ ± 1 ∼ 2α and C ± α |a 2 |ψ ∓ 1 = 0, the dissipation causes transitions within the even parity and odd parity subspaces respectively. On the other hand, the leakage causes transitions between the even and odd parity subspace. Hence, cooling down of the excited state population leads to additional phase-flip errors. These additional phase-flip errors in the purely-dissipative cats are also termed as non-adiabatic errors in literature [29,84]. The amount of phase flips, ∝ ε/κ 2 α 3 , increases with ε [84]. Fortunately, the additional phase-flip errors are noticeably absent in Kerr cats. Consequently, gates with Kerr cats have higher fidelity than those with purelydissipative cats.
We demonstrate the effect of additional phase-flip errors in purely dissipative cats by simulating the S gate and comparing its fidelity with the fidelity of S gate with Kerr cats. Figure 10 shows this comparison. To keep the analysis simple we neglect other sources of decoherence in either of the two cat qubits. In the simulations we fix ε, α = 2 and hence the gate time π/8αε is the same for the two cats. We choose κ 2 = 2K so as to keep the energy and Lindbladian gaps (or equivalently the residual leakage) approximately the same in the two cats. Figure 10 clearly shows that the S gate infidelity can be significantly higher for Kerr cats than purely dissipative cats for the same amount of leakage. We also show the the infidelity of the S gate in the hybrid approach with small two-photon dissipation κ 2 = K/10 included in addition to the Hamiltonian Eq. (B1). The result shows that addition of small amount of two-photon dissipation during the Kerr cat S gate does not degrade the gate fidelity in the parameter regime used in this paper.