# Stabilized Cat in Driven Nonlinear Cavity: A Fault-Tolerant Error Syndrome Detector

Shruti Puri, Alexander Grimm, Philippe Campagne-Ibarcq, Alec Eickbusch, Kyungjoo Noh, Gabrielle Roberts, Liang Jiang, Mazyar Mirrahimi, Michel H. Devoret, Steven M. Girvin

► To cite this version:

Shruti Puri, Alexander Grimm, Philippe Campagne-Ibarcq, Alec Eickbusch, Kyungjoo Noh, et al. Stabilized Cat in Driven Nonlinear Cavity: A Fault-Tolerant Error Syndrome Detector. Physical Review X, 2019, 9 (4), pp.041009. 10.1103/PhysRevX.9.041009. hal-01936700

HAL Id: hal-01936700

https://inria.hal.science/hal-01936700v1

Submitted on 2 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Stabilized Cat in a Driven Nonlinear Cavity: A Fault-Tolerant Error Syndrome Detector

Shruti Puri,¹,² Alexander Grimm,²,³ Philippe Campagne-Ibarcq,²,³ Alec Eickbusch,²,³ Kyungjoo Noh,¹,²

Gabrielle Roberts,¹,² Liang Jiang,²,³ Mazyar Mirrahimi,²,⁴ Michel H. Devoret,²,³ and S. M. Girvin¹,²

¹Department of Physics, Yale University, New Haven, Connecticut 06520, USA

²Yale Quantum Institute, Yale University, New Haven, Connecticut 06520, USA

³Department of Applied Physics, Yale University, New Haven, Connecticut 06511, USA

⁴QUANTIC team, INRIA de Paris, 2 Rue Simone Iff, Paris 75012, France

<figure><img src="image_2.png" /></figure>

(Received 7 August 2018; revised manuscript received 16 July 2019; published 9 October 2019)

In quantum error correction, information is encoded in a high-dimensional system to protect it from the environment. A crucial step is to use natural, two-body operations with an ancilla to extract information about errors without causing backaction on the encoded information. Essentially, ancilla errors must not propagate to the encoded system and induce errors beyond those which can be corrected. The current schemes for achieving this *fault tolerance* to ancilla errors come at the cost of increased overhead requirements. An efficient way to extract error syndromes in a fault-tolerant manner is by using a single ancilla with a strongly biased noise channel. Typically, however, required elementary operations can become challenging when the noise is extremely biased. We propose to overcome this shortcoming by using a bosonic-cat ancilla in a parametrically driven nonlinear oscillator. Such a cat qubit experiences only bit-flip noise, while the phase flips are exponentially suppressed. To highlight the flexibility of this approach, we illustrate the syndrome extraction process in a variety of codes such as qubit-based toric, bosonic-cat, and Gottesman-Kitaev-Preskill codes. Our results open a path for realizing hardware-efficient, fault-tolerant error syndrome extraction.

DOI: 10.1103/PhysRevX.9.041009

Subject Areas: Quantum Physics,
Quantum Information

I. INTRODUCTION

To perform useful large-scale quantum computation, fragile quantum states must be protected from errors, which arise due to their inevitable interaction with the environment. To achieve this protection, strategies for quantum error correction (QEC) are continuously being developed. The key idea behind QEC is that natural errors and interactions generally involve low-weight operators. Therefore, in order to protect quantum information, it is stored or encoded in a *logical qubit* using the nonlocal degrees of freedom of a high-dimensional system [1]. Here, high-weight operators imply many-body operators, arising, for example, in a system of several qubits or operators involving many energy levels of a single high-dimensional physical system, arising, for example, in a harmonic oscillator. The high-weight operators characterizing the code space of quantum information are called *stabilizers* and are designed so that they commute with the logical

qubit operators but anticommute with the errors in the system [2–6]. In the absence of errors, the system lies in the +1 eigenspace of the stabilizer, and after an error occurs it moves to the −1 eigenspace. Consequently, the location and type of errors can be determined from the result of measuring the stabilizers, which are also known as an *error syndrome*. Measurement of these high-weight stabilizers would require engineering highly unnatural, many-body interactions in the system, which is undesirable for practical implementation. A more reasonable approach is to synthesize stabilizer measurements via naturally available couplings with an *ancillary* system [7]. However, interaction with the ancilla exposes the encoded system to more errors. In fact, if the measurement is not designed correctly, errors from the ancilla’s noise channel can propagate to the encoded system and damage it beyond repair. Therefore, for error correction to be successful, such a catastrophic backaction must be eliminated.

To illustrate a typical approach for synthesizing stabilizer measurements, consider a system $\mathcal{M}$ (logical qubit) which encodes quantum information in $N$ subsystems (physical qubits), and let $\hat{S}$ be a stabilizer. A code is defined by multiple stabilizers, but, for simplicity, we just consider one. Let $\hat{M}_i$, $i = 1, 2, ..., N$, be a set of low-weight operators which commute with $\hat{S}$ and can be used to

<footnote>Published by the American Physical Society under the terms of the Creative Commons Attribution 4.0 International license. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.</footnote>
synthesize $\hat{S}$ through coupling with an ancilla. As an example, the four-qubit operator $\hat{\sigma}_{z,1}\hat{\sigma}_{z,2}\hat{\sigma}_{z,3}\hat{\sigma}_{z,4}$ is a stabilizer for surface codes [8], in which case $\hat{M}_i = \hat{\sigma}_{z,i}$. On the other hand, the stabilizer for single-mode bosonic-cat codes is the parity operator $\hat{P} = \exp(i\pi\hat{a}^\dagger\hat{a})$, in which case $\hat{M} = \hat{a}^\dagger\hat{a}$ [9–11]. Here, $\hat{\sigma}_z$ is a Pauli operator, while $\hat{a}$ and $\hat{a}^\dagger$ are the photon annihilation and creation operators. The ancilla is typically a qubit which is coupled to the encoded system via the interaction Hamiltonian

$$ \hat{V} = \hat{\sigma}_x \sum_{i=1}^{N} g_i(t) \hat{M}_i, \qquad (1) $$

where $\hat{\sigma}_x$ is the Pauli operator of the ancilla qubit and $g_i$ are controllable interaction strengths. The evolution of the system is described by the unitary

$$ \hat{U}(t) = \mathcal{T} \exp \left( -i \int_{0}^{t} \hat{V}(\tau) d\tau \right) \qquad (2) $$

$$ = \cos \left( \sum_{i=1}^{N} \int_{0}^{t} g_i(\tau) \hat{M}_i d\tau \right) + i \sin \left( \sum_{i=1}^{N} \int_{0}^{t} g_i(\tau) \hat{M}_i d\tau \right) \hat{\sigma}_x. \qquad (3) $$

The couplings and duration of evolution are chosen [12–17] so that the above unitary (up to local rotations) at time $T$ becomes

$$ \hat{U}(T) = \frac{1 + \hat{S}}{2} + \frac{1 - \hat{S}}{2} \hat{\sigma}_x. \qquad (4) $$

From Eq. (4), we see that the ancilla state undergoes a bit flip at time $T$ conditioned on whether the stabilizer is $+1$ or $-1$. Thus, measurement of the ancilla yields the error syndrome. Remarkably, even though the starting Hamiltonian in Eq. (1) is low weight, its unitary evolution involves high-weight operators. During the time interval $[0, T]$, the ancilla and the encoded system are entangled, and it is crucial that errors in the ancilla do not propagate as uncorrectable errors in the encoded data. Achieving this property, also referred to as fault tolerance, is crucial for the success of QEC and requires that all possible errors in the ancilla commute with $\hat{U}(t)$ at all times. Note that the ancilla qubit’s bit-flip error $\hat{\sigma}_x$ satisfies this condition. Therefore, if a bit flip occurs at any time $\tau$ during the interval $[0, T]$, then at time $T$ the state of the system is described by the unitary $\hat{U}(T - \tau)\hat{\sigma}_x\hat{U}(\tau) = \hat{\sigma}_x\hat{U}(T) = \hat{\sigma}_x(1 + \hat{S})/2 + (1 - \hat{S})/2$. It is clear that the ancilla’s bit-flip channel only introduces an error in measurement of the syndrome without causing any backaction on the encoded system. In this case, the fidelity of syndrome extraction can be recovered by simply repeating the protocol multiple times and taking a majority

vote over the measurement outcomes. Importantly, note that dephasing $\hat{\sigma}_z$ and amplitude damping $\hat{\sigma}_-$ errors in the ancilla do not commute with $\hat{U}(t)$. In fact, a single $\hat{\sigma}_z$ error on the ancilla propagates as a high-weight error to the encoded system.

There are primarily three approaches for fault-tolerant extraction of error syndromes developed by Shor [7], Steane [18], and Knill [19]. These methods are based on using several ancillas prepared in complex quantum states and several transversal (or bitwise) entangling gates between the data and ancilla qubits, followed by ancilla measurements. For example, in Shor’s method, a single ancilla qubit is replaced with a w-qubit Greenberger-Horne-Zeilinger state, where w is the weight of the stabilizer. Steane’s approach requires a whole extra ancillary code block prepared in the encoded $|0\rangle_E$ and $|1\rangle_E$ states. Knill’s method, based on error correction by teleportation, requires two ancillary code blocks prepared in the encoded Bell state $|0\rangle_E|0\rangle_E + |1\rangle_E|1\rangle_E$. Unfortunately, these approaches lead to a rapidly growing overhead of computationally expensive entangling gates and ancilla hardware, which forces a more stringent requirement on error rates and pushes large-scale fault-tolerant quantum computation further out of reach. Some error-correcting codes, such as the surface code, are designed to be tolerant to a certain number of ancilla errors. However, the error-correcting threshold significantly degrades in the presence of noisy ancillas [20]. Alternatively, efforts are being directed towards optimizing the ancilla hardware for achieving fault tolerance [21,22]. For example, recently, a technique for syndrome extraction in bosonic-cat codes based on a three-level ancilla (or a qutrit) was demonstrated [23]. However, this technique provides protection against only first-order errors in the ancilla and is still susceptible to the second- and higher-order errors. Extending this scheme for higher-order protection requires additional drives, which may ultimately open up new sources of errors and backpropagation. An alternate technique for direct, fault-tolerant syndrome extraction in bosonic-cat codes based on engineering a high-weight stabilizer Hamiltonian has been proposed [24]. However, the practical realization of this scheme is challenging and requires new experimental developments.

In this paper, we propose an efficient method for fault-tolerant syndrome extraction. The proposed scheme is based on the observation that, in the example in Eq. (3), if the ancilla did not have any $\hat{\sigma}_z$ error, then there would be no backaction on the encoded system. More generally, if the ancilla exhibits a highly asymmetric error channel, then it would be possible to design a physical unitary which would very nearly commute with the ancilla’s error channel and will, therefore, be nearly transparent to ancilla errors. A similar approach is suggested for realizing high-fidelity gates [25] and long-distance entanglement [26]. Keeping in mind the observation made above, we propose a two-component
cat state in a pumped Kerr-nonlinear oscillator as an ancilla for fault-tolerant syndrome extraction. The cat states $|C_{\beta}^{\pm}\rangle = \mathcal{N}_{\beta}^{\pm}(|\beta\rangle \pm |-\beta\rangle)$ with $\mathcal{N}_{\beta}^{\pm} = 1/\sqrt{2(1 \pm e^{-2|\beta|^2})}$ are degenerate eigenstates of a Kerr-nonlinear oscillator under two-photon driving [27,28]. Note that these two states are orthogonal but have different normalization constants. We work in the basis so that the states along the +Z and -Z axis of the Bloch sphere, shown in Fig. 1(a), correspond to the cat states $|C_{\beta}^{+}\rangle$ and $|C_{\beta}^{-}\rangle$, respectively. In this basis, the states along the +X and -X axis correspond to the states $\langle|C_{\beta}^{+}\rangle \pm |C_{\beta}^{-}\rangle|\sqrt{2}$, which to an excellent approximation are the coherent states $|\pm\beta\rangle$ for large $\beta$. The remarkable property of such a pumped cat is that natural couplings can cause rotations only around the X axis. Intuitively, this property results from a large energy barrier created by the pump which prevents phase rotations (that is, rotation from the coherent states $|\beta\rangle$ to $|-\beta\rangle$ and vice versa). The error channel is dominated by bit-flip errors (which increase linearly with the size of the cat $|\beta|^2$ or, equivalently, the pump strength). But, more importantly, the phase flips and amplitude damping are exponentially suppressed (exponential in the size of the cat $|\beta|^2$ or the pump strength). As we saw before, the bit flips result in unreliable classical information from each measurement, while the phase flips lead to spreading of errors from the ancilla into the encoded system. Our proposal, therefore, ensures that the former source of errors is exponentially suppressed at the cost of only polynomially larger measurement errors. Since the backaction is exponentially suppressed, the measurements with the ancilla can be repeated a few times, and a simple majority vote on the classical measurement record then provides the error syndrome with a low probability of error. This repetition would be impossible if the backaction were not suppressed, because, with each measurement, more and more errors will be introduced in the data system. As a result, this pumped cat ancilla can be

used for backaction-suppressed syndrome measurements and, therefore, lead to improvements in fault-tolerance thresholds.

Here, we outline a general procedure to extract an error syndrome based on conditional rotation of the cat state around the X axis using only low-weight local interactions. We discuss the fault tolerance of this technique in detail and examine specific examples based on three distinct error-correcting codes, namely, qubit-based toric [4], bosonic-cat [9,10], and Gottesman-Kitaev-Preskill (GKP) codes [29]. Although these examples belong to the subclass of quantum codes known as stabilizer codes, the ideas for error syndrome extraction presented here could be extended to other types of codes as well. Finally, we show how the state of the cat ancilla can be read out in an efficient manner. We find that the desired interactions between the encoded system and cat ancilla can be easily realized using the inherent nonlinearity of the ancilla itself. That is, no additional coupling elements are required. Our results are applicable in different quantum computing architectures and demonstrate the advantages of exploiting hardware-specific resources for achieving fault tolerance in QEC.

## II. PUMPED-CAT SYNDROME DETECTOR

### A. Parametrically pumped nonlinear oscillator

Consider a Kerr-nonlinear oscillator driven by a two-photon drive with a frequency twice the frequency of the oscillator. Its Hamiltonian in the rotating wave approximation is

$$ \hat{H}_{\text{PCO}} = -K \hat{a}^{\dagger 2} \hat{a}^2 + P(\hat{a}^{\dagger 2} + \hat{a}^2). \quad (5) $$

In the above expression, $\hat{a}$ and $\hat{a}^{\dagger}$ are the photon annihilation and creation operators, $K$ is the strength of the Kerr nonlinearity, and $P$ is the strength of the two-photon drive. The above Hamiltonian can be rewritten as $\hat{H}_{\text{PCO}} = -K(\hat{a}^{\dagger 2} - \beta^2)(\hat{a}^2 - \beta^2) + K\beta^4$, where $\beta = \sqrt{P/K}$.

<figure><img src="image_3.png" /><figcaption>FIG. 1. (a) Bloch sphere representation of cat states. (b) The figure shows the overview of syndrome detection with a PCO. The first step is to map the error syndrome on the state of the PCO $|C_{\beta}^{+}\rangle$ or $|C_{\beta}^{-}\rangle$ via a controlled X rotation. The next step is to read out the state of the cat, which proceeds in two stages. The first stage is to rotate the cats $|C_{\beta}^{\pm}\rangle$ to the coherent states $|\pm\beta\rangle$ (using the procedure described in the main text). In the second stage, a single-photon exchange coupling between the PCO and a low-Q readout oscillator is turned on, a process known as the Q switch. This coupling leads to the displacement of the readout oscillator conditioned on the PCO state. Lastly, a homodyne measurement of the signal from the low-Q oscillator reveals the state of the PCO, thereby yielding the error syndrome.</figcaption></figure>
Clearly, the coherent states $|\pm\beta\rangle$ or, equivalently, the cat states $|C_{\beta}^{\pm}\rangle$ are the degenerate eigenstates of this Hamiltonian with eigenenergy $K\beta^4 = P^2/K$ [27]. In this paper, for simplicity, we always take the drive (P) to be positive real, and, hence, $\beta$ is also real. The two coherent states are quasiorthogonal, $\langle\beta| - \beta\rangle = \exp(-2\beta^2)$, while the cat states are exactly orthogonal. The cat states $|C_{\beta}^{\pm}\rangle$ are also the $\pm 1$ eigenstates of the photon-number parity operator $\exp(i\pi\hat{a}^{\dagger}\hat{a})$. In fact, since the Hamiltonian in Eq. (5) commutes with photon-number parity, the eigenstates of $\hat{H}_{\text{PCO}}$ are also the eigenstates of parity. As a result, the eigenspace of $\hat{H}_{\text{PCO}}$, shown in Fig. 2(a), can be divided into the even- and odd-parity subspaces denoted by the superscripts $\pm$. Henceforth, we refer to this oscillator as the pumped-cat oscillator (PCO) and denote the cat subspace with $C$. Note that, for $\beta = 0$, $|C_0^+\rangle = |n=0\rangle$ and $|C_0^-\rangle = |n=1\rangle$, where $|n=0\rangle$ and $|n=1\rangle$ are the Fock states. The cat subspace is separated from the rest of the Hilbert space $C_{\perp}$ by an energy gap $\omega_{\text{gap}} \propto 4K\beta^2$.

Note that Eq. (5) is written in the rotating frame. In this frame, the simplified Hamiltonian is described by

quasienergy eigenstates which exhibit negative energies. The eigenspectrum of the PCO plays an important role in understanding some results in later sections. Therefore, it is useful to examine it in some detail here. We begin with a displacement transformation $D(\pm\beta) = \exp(\pm\beta\hat{a}^{\dagger}\mp\beta\hat{a})$ applied to $\hat{H}_{\text{PCO}}$ so that Eq. (5) reads [30]

$$ \begin{aligned} \hat{H}' &= D(\pm\beta)\hat{H}_{\text{PCO}}D^{\dagger}(\pm\beta) \\ &= -4K\beta^2\hat{a}^{\dagger}\hat{a} - K\hat{a}^{\dagger 2}\hat{a}^2 \mp 2K\beta(\hat{a}^{\dagger 2}\hat{a} + \text{H.c.}). \end{aligned} \quad (6) $$

In writing the above expression, we use $\beta = \sqrt{P/K}$ so that the terms with $\hat{a}^{\dagger}$, $\hat{a}$, $\hat{a}^{\dagger 2}$, and $\hat{a}^2$ vanish. The constant term $E = P^2/K$ represents an energy shift and is also dropped. The vacuum $|0\rangle$ is exactly an eigenstate of $\hat{H}'$ ($\hat{H}'|0\rangle = 0$), and as a result, in the original frame, the coherent states $D(\pm\beta)|0\rangle = |\pm\beta\rangle$ or, equivalently, their superpositions $|C_{\beta}^{\pm}\rangle$ are the degenerate eigenstates of $\hat{H}_{\text{PCO}}$. In order to provide a simple intuitive understanding of the structure of the low-lying eigenstates, it is convenient to work in the limit of large $\beta$. In this limit, $\beta^2 \gg \beta^1, \beta^0$, and, hence, Eq. (6) is well approximated by $\hat{H}' = -4K\beta^2\hat{a}^{\dagger}\hat{a}$, which is

<figure><img src="image_4.png" /><figcaption>FIG. 2. (a) Illustration of the eigenspectrum of the PCO. (b) In the limit of large parametric drive P or, equivalently, large $\beta$, the PCO effectively behaves like two harmonic oscillators displaced by $\pm\beta$. The states confined in the harmonic potentials are the Fock states $|n=0\rangle$, $|n=1\rangle$, etc. The tunneling between the two potentials is exponentially suppressed, and, therefore, the eigenspectrum of $\hat{H}_{\text{PCO}}$ reduces to superpositions of pairs of degenerate displaced Fock states $[D(\beta) \pm D(-\beta)]|n\rangle$. There, of course, exist higher excited states which are not confined in the harmonic oscillator potential and cannot be described in such a simple manner. (c) The energy gap obtained by exact diagonalization of Eq. (5) (solid blue line) and the approximate gap $4K\beta^2$ (dashed blue line). As expected, the solid blue line converges to $2K$ as $\beta$ decreases. The approximate expression converges to the exact gap for large $\beta$, but it breaks down for small $\beta$ where the exact energy gap is $2K$. (d) Logarithmic (base e) plot of the energy difference between the first two (red) and second two (blue) excited states of the Hamiltonian in Eq. (5) as a function of $\beta^2$.</figcaption></figure>
the Hamiltonian of a (inverted) harmonic oscillator [30,31]. The first excited state of $\hat{H}'$ is the Fock state $|n=1\rangle$ with energy $\omega_{\text{gap}} = 4K\beta^2$ below vacuum $|0\rangle$. As a result, the displaced Fock states $D(\pm\beta)|n=1\rangle$ are the two degenerate excited states in the original undisplaced frame. Note that, since the eigenstates of $\hat{H}_{\text{PCO}}$ are also the eigenstates of the parity operator, it is more convenient to express the excited states as the two orthogonal states $|\psi_{e,1}^{\pm}\rangle = N_{e,1}^{\mp}[D(\beta)\mp D(-\beta)]|n=1\rangle$ which are the even- and odd-parity states, respectively. Here, $N_{e,1}^{\pm}$ are the normalization constants. The energy gap between the cat subspace and $|\psi_{e,1}^{\pm}\rangle$ for large $\beta$ is, therefore, $\omega_{\text{gap}} \sim 4K\beta^2$.

In essence, in the limit of large $\beta$, the PCO behaves like two harmonic oscillators displaced by $\pm\beta$ [see Fig. 2(b)]. The tunneling between the two displaced (approximate) harmonic oscillators is suppressed exponentially with $\beta$. This suppression is because the tunnel splitting can be approximated by the overlap $\langle n|D^{\dagger}(-\beta)D(\beta)|n\rangle = f(\beta^2)e^{-2\beta^2}$, where $f(\beta^2)$ is a polynomial function of $\beta^2$. As a result, the eigenspectrum of $\hat{H}_{\text{PCO}}$ reduces to superpositions of pairs of degenerate displaced Fock states $[D(\beta) \pm D(-\beta)]|n\rangle$. For a fixed $\beta$, this approximation is less and less good for higher values of $n$ and breaks down near $n \sim \beta^2$. In fact, if $\beta = 0$, that is, $P = 0$, then Eq. (5) reduces to the Hamiltonian for an undriven nonlinear oscillator with the Fock states $|n=0\rangle$ and $|n=1\rangle$ being degenerate and the next two excited states $|n=2\rangle$ and $|n=3\rangle$ being nondegenerate. Here, $\omega_{\text{gap}}$ becomes equal to the gap between Fock states $|n=0\rangle$ or $|n=1\rangle$ and $|n=2\rangle$, which is equal to $2K$. Note that this eigenspectrum is described in the frame which is rotating at the frequency of the oscillator $\omega_{\text{PCO}}$, which implies that the energy gap in the laboratory frame is $\omega_{\text{PCO}} - \omega_{\text{gap}}$; that is, external drives or perturbations at frequency $\omega_{\text{PCO}} - \omega_{\text{gap}}$ can cause transitions between $|C_{\beta}^{\pm}\rangle$ and excited states. The negative sign appears because the Kerr nonlinearity is attractive.

In order to numerically confirm the simple picture of the eigenspectrum presented above, Fig. 2(c) presents the energy gap as a function of $\beta$ evaluated by exactly diagonalizing Eq. (5) (solid blue line). It also shows the approximate gap $4K\beta^2$ (dashed blue line). Clearly, the approximate expression converges to the exact gap for large $\beta$. Figure 2(d) shows the difference in the energies of the first two ($|\psi_{e,1}^{\pm}\rangle$, red) and the second two excited states ($|\psi_{e,2}^{\pm}\rangle$, blue). As expected, the energy difference between $|\psi_{e,1}^{+}\rangle$ and $|\psi_{e,1}^{-}\rangle$ and that between $|\psi_{e,2}^{+}\rangle$ and $|\psi_{e,2}^{-}\rangle$ decrease exponentially with $\beta^2$ for large $\beta$.

## B. Syndrome detection with the PCO

The PCO interacts with the encoded system $M$ in such a way that the interaction Hamiltonian in the rotating frame is

$$ \hat{H}_I = \sum_i \chi_i(t) \hat{M}_i (\hat{a}^\dagger + \hat{a}). \quad (7) $$

In order to understand the effect of this coupling on the PCO, first note that the cat states undergo bit flips under the action of the photon annihilation operator $\hat{a}|C_{\beta}^{\pm}\rangle = \beta p^{\pm 1}|C_{\beta}^{\mp}\rangle$, where $p = N_{\beta}^{+}/N_{\beta}^{-}$ (see the Appendix A).

Recall that $N_{\beta}^{\pm} = 1/\sqrt{2(1 \pm e^{-2\beta^2})}$ and, for large enough $\beta$, $p \to 1$. While the action of the annihilation operator transforms a state within $C$ to another state which also lies in $C$, the photon creation operator $\hat{a}^{\dagger}$ can take the PCO out of $C$. However, for small couplings $\chi(t)\langle\hat{M}_i\rangle$, these spurious out-of-subspace excitations are suppressed due to the energy gap between $C$ and $C_{\perp}$. In this restricted subspace $C$, $\hat{a}^{\dagger}|C_{\beta}^{\pm}\rangle = \beta p^{\mp 1}|C_{\beta}^{\mp}\rangle$ (see Appendix A), and Eq. (7) can very well be approximated as

$$ \hat{H}_I \equiv 2\beta \hat{\sigma}_x \sum_i \chi_i(t) \hat{M}_i. \quad (8) $$

Here, $\chi_i(t) = \chi_i(t)(p+p^{-1})/2 \sim \chi_i(t)$ and $\hat{\sigma}_x = |C_{\beta}^{+}\rangle\langle C_{\beta}^{-}| + |C_{\beta}^{-}\rangle\langle C_{\beta}^{+}|$ is the effective Pauli operator in $C$. This entangling interaction is identical to Eq. (1) and leads to unitary evolution equivalent to Eq. (3). Again, the couplings $\chi_i$ and time are chosen so that the unitary evolution corresponding to Eq. (8) at time $t = T$ is given by $\hat{U}(T) = (1 + \hat{S})/2 + (1 - \hat{S})\hat{\sigma}_x/2$ (ignoring possible local rotations). As a result, the ancilla cat state in the PCO undergoes a bit flip conditioned on the stabilizer being $\hat{S} = 1$ or $\hat{S} = -1$. The error syndrome can be easily extracted by reading out the state of the cat at time $T$. Figure 1(b) provides an outline of the proposed syndrome extraction scheme, and we delve into details with specific examples shortly. Note that, in some cases, it might be physically more convenient to implement a coupling like $\sum_i \chi_i(t)(\hat{L}_i\hat{a}^{\dagger} + \hat{L}_i^{\dagger}\hat{a})$, where $\hat{L}_i^{\dagger} + \hat{L}_i = \hat{M}_i$. It is possible to synthesize fault-tolerant stabilizer measurements with such interactions as well. In fact, we use such a coupling for syndrome extraction in GKP code in Sec. IV C.

## III. SINGLE-PHOTON LOSS

We now examine the noise channel of the PCO. The major source of noise in a oscillator is single-photon loss, which arises from the single-photon exchange coupling with a bath. From the previous discussion, it is clear that if the coupling to the bath is smaller than the energy gap between the $C$ and $C_{\perp}$ subspaces, then the dynamics of the PCO is, to a very good approximation, confined to the $C$ subspace. In this restricted subspace, the effective two-level master equation becomes (see Appendix B)
$$ \dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa_c \beta^2 \mathcal{D}[p^{-1}|C_{\beta}^{+}\rangle\langle C_{\beta}^{-}| + p|C_{\beta}^{-}\rangle\langle C_{\beta}^{+}|]\hat{\rho} \quad (9) $$

$$ = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa_c \beta^2 \mathcal{D}\left[\frac{p + p^{-1}}{2}\hat{\sigma}_x + \frac{p^{-1} - p}{2}i\hat{\sigma}_y\right]\hat{\rho}, \quad (10) $$

where $\mathcal{D}[\hat{O}]\hat{\rho} = \hat{O}\hat{\rho}\hat{O}^{\dagger} - \frac{1}{2}\hat{O}^{\dagger}\hat{O}\hat{\rho} - \frac{1}{2}\hat{\rho}\hat{O}^{\dagger}\hat{O}$. Here, we assume that there are no thermal excitations in the bath; that is, the PCO can only lose photons but not gain them (see Sec. IV and Appendix C). Note that, as long as the evolution is confined to the $C$ subspace, Eq. (9) [or Eq. (10)] reduces to the common master equation of an oscillator coupled to a bath, $\dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa_c \mathcal{D}[\hat{a}]\hat{\rho}$ (because $\hat{a} = p\beta|C_{\beta}^{-}\rangle\langle C_{\beta}^{+}| + p^{-1}\beta|C_{\beta}^{+}\rangle\langle C_{\beta}^{-}|$). Appendix B presents numerical simulations which confirm the theoretically derived master equation above. It is evident from Eq. (9) that the single-photon exchange coupling with the bath leads primarily to a bit-flip error which is accompanied by an exponentially small phase-flip error $\propto (p^{-1} - p)\sim \exp(-2\beta^2)$. In other words, Eq. (10) implies that the bath lifts the twofold degeneracy of the $C$ subspace by an amount exponentially small in the size $\beta^2$. Intuitively, this result can be understood from the fact that the numbers of photons in the state $|C_{\beta}^{-}\rangle$ and $|C_{\beta}^{+}\rangle$ differ by an exponentially small amount, $\langle C_{\beta}^{+}|\hat{a}^{\dagger}\hat{a}|C_{\beta}^{+}\rangle = \beta^2 p^2$ and $\langle C_{\beta}^{-}|\hat{a}^{\dagger}\hat{a}|C_{\beta}^{-}\rangle = \beta^2/p^2$. It is more likely for a photon to be lost to the environment from $|C_{\beta}^{-}\rangle$ than $|C_{\beta}^{+}\rangle$, and this asymmetry lifts the degeneracy between the states $|C_{\beta}^{\pm}\rangle$. However, since the difference in the photon numbers decreases exponentially with $\beta$, the states $|C_{\beta}^{\pm}\rangle$ are almost degenerate even for a moderately sized $\beta$ [such as $\beta \sim 2$, $\exp(-2\beta^2) = 3.3 \times 10^{-4}$].

The preservation of the degenerate cat subspace makes the PCO an excellent meter for syndrome detection, because coupling with the bath commutes with the interaction Hamiltonian Eq. (8) and does not cause backaction on $M$. Single-photon loss to the bath does induce random flips between $|C_{\beta}^{\pm}\rangle$, which reduces the accuracy of the measurement. Nevertheless, since the backaction is exponentially suppressed, the accuracy can be easily recovered by repeating the measurement a few times and taking a majority vote. In Appendixes D–F, we examine in detail other sources of errors such as photon gain, pure dephasing, and two-photon loss, and the results are summarized in Table I. Note that single-photon gain and pure dephasing can cause leakage out of the cat manifold. However, if the spectral density of these sources of noise is narrower than the energy gap, then leakage is suppressed. In this case, we find that, irrespective of the underlying source of noise, the PCO’s error channel is reduced to bit-flip errors, while the phase flips are exponentially suppressed. It is also important to point out that it is possible that spurious excitations or sudden nonperturbative effects overcome the energy barrier and cause excitations to the $C_{\perp}$ subspace. Remarkably, we find that the fault tolerance of the syndrome measurements is still preserved under these leakage errors. To demonstrate this result, we now examine the case when the PCO is subject to white thermal noise and pure dephasing.

## IV. SINGLE-PHOTON GAIN WITH WHITE-NOISE SPECTRUM

In the presence of white thermal noise, the PCO evolves according to the master equation

$$ \dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa(1 + n_{\text{th}})\mathcal{D}[\hat{a}]\hat{\rho} + \kappa n_{\text{th}}\mathcal{D}[\hat{a}^{\dagger}]\hat{\rho}, \quad (11) $$

TABLE I. In general, interaction with the environment can lead to single-photon loss, single-photon gain, pure dephasing, and two-photon loss. When the coupling to the environment is smaller than the energy gap $\omega_{\text{gap}}$, then excitations out of the cat subspace $C$ are negligible, and the dynamics of the PCO can be restricted in $C$. In this effective two-level system, the effect of the noise source can be described with the Lindbladian $\mathcal{D}[\hat{O}]\hat{\rho} = \hat{O}\hat{\rho}\hat{O}^{\dagger} - (\hat{O}^{\dagger}\hat{O}\hat{\rho} + \hat{\rho}\hat{O}^{\dagger}\hat{O})/2$, where $\hat{O}$ is the jump operator which depends on the type of noise. The Lindbladian is derived using the Born approximation, along with the assumption that the spectral density of the noise is flat around the PCO frequency $\omega_{\text{PCO}}$. The noise spectral density at the gap frequency is assumed to be small. For more discussion on these approximations, see Appendixes B–D. The jump operators corresponding to single-photon loss, single-photon gain, pure dephasing, and two-photon loss in a PCO are listed here. Here, $p = \sqrt{1 - e^{-2\beta^2}/\sqrt{1 + e^{-2\beta^2}}$, and, for large $\beta$, $(p + p^{-1})/2 \sim 1$ while $(p^{-1} - p)/2 \sim e^{-2\beta^2}$. Therefore, we find that, as the size of the cat state increases, the only effect of the environment is to cause bit flips in the cat subspace. As $\beta$ approaches 0, the cat states $|C_{\beta}^{\pm}\rangle$ approach the Fock states $|n = 0, 1\rangle$, respectively. In this limit, the effect of noise reduces to the jump operators in a conventional two-level system as listed in the third column here.

<table><thead><tr><th>Noise type</th><th>Jump operator O in the restricted C subspace of the PCO</th><th>Jump operators as β → 0</th></tr></thead><tbody><tr><td>Single-photon loss (κ<sub>C</sub> ≪ ω<sub>gap</sub>)</td><td>β{[(p + p<sup>-1</sup>)/2]σ&#770;<sub>x</sub> + i[(p<sup>-1</sup> - p)/2]σ&#770;<sub>y</sub>}</td><td>σ&#770;<sub>-</sub></td></tr><tr><td>Single-photon gain (κ<sub>C</sub> ≪ ω<sub>gap</sub>, narrow spectral density)</td><td>β{[(p + p<sup>-1</sup>)/2]σ&#770;<sub>x</sub> - i[(p<sup>-1</sup> - p)/2]σ&#770;<sub>y</sub>}</td><td>σ&#770;<sub>+</sub></td></tr><tr><td>Pure dephasing (κ<sub>φ,C</sub> ≪ ω<sub>gap</sub>, narrow spectral density)</td><td>β<sup>2</sup>{[(p<sup>2</sup> + p<sup>-2</sup>)/2]I&#770; - [(p<sup>-2</sup> - p<sup>2</sup>)/2]σ&#770;<sub>z</sub>}</td><td>1/2(I&#770; - σ&#770;<sub>z</sub>)</td></tr><tr><td>Two-photon loss</td><td>I&#770;</td><td>I&#770;</td></tr></tbody></table>
where $κ$ is the linewidth of the oscillator and $n_{th}$ is the number of thermal photons. According to the quantum-jump approach, the dynamics of the PCO can be described by evolution under a non-Hermitian Hamiltonian $\hat{H} = \hat{H}_{PCO} - ik(1 + n_{th})\hat{a}^{\dagger}\hat{a}/2 - ikn_{th}\hat{a}\hat{a}^{\dagger}/2$, which is interrupted by stochastic quantum jumps corresponding to the operators $\hat{a}$ and $\hat{a}^{\dagger}$ [32]. When the energy gap $\omega_{gap}$ is larger than $κ$, the non-Hermitian terms in $\hat{H}$ only broaden the linewidths of the eigenstates of the PCO. As we have seen before, action of $\hat{a}$ on a state in the cat subspace results in bit flips but no leakage. Hence, a single-photon loss event introduces a bit-flip error. More importantly, however, action of $\hat{a}^{\dagger}$ on a state in the cat subspace and, hence, a single-photon-gain event causes leakage to $C_{\perp}$ in addition to a bit-flip error.

Recall that, in the limit of large $β$, the first excited states $|\psi\rangle_{e,1}^{\pm}$ are approximately the displaced single-photon Fock states $|\psi_{e,1}^{\pm}\rangle \sim [D(\beta) \mp D(-\beta)]|n=1\rangle$ [Fig. 2(b)]. In this approximation, $\hat{a}^{\dagger}|C_{\beta}^{\pm}\rangle \sim \beta|C_{\beta}^{\pm}\rangle + |\psi_{e,1}^{\pm}\rangle$, and, therefore, a single jump $\hat{a}^{\dagger}$ excites the first excited subspace at rate $\sim κn_{th}$. Recall that the coupling between the PCO and the encoded system is proportional to $\hat{M}_i(\hat{a}^{\dagger} + \hat{a})$ and in the cat subspace $(\hat{a}^{\dagger} + \hat{a}) \equiv 2\beta\hat{\sigma}_x$. Remarkably, in the first excited subspace $(\hat{a}^{\dagger} + \hat{a}) \equiv 2\beta\hat{\sigma}_{x,1}^{e,1}$, where $\hat{\sigma}_{x,1}^{e,1} = |\psi_{e,1}^{+}\rangle\langle\psi_{e,1}^{+}| + |\psi_{e,1}^{-}\rangle\langle\psi_{e,1}^{-}|$. Note that the two states $|\psi_{e,1}^{\pm}\rangle$ are (approximately) degenerate, and, therefore, the coupling term $(\hat{a}^{\dagger} + \hat{a})$ can cause transitions between these two states, but it cannot further cause transitions out of the subspace. Consequently, the excited states form another two-level ancilla with the same coupling to the encoded system. As a result, the encoded system does not gain any information about whether the PCO is in $C$ or in $C_{\perp}$. Equivalently, the encoded system is transparent to leakage errors in the PCO. Note that the PCO is excited to $|\psi_{e,n}^{\pm}\rangle$ after $n$ photon-gain events. As long as the $n$th excited subspace is twofold degenerate, it will behave as a two-level ancilla with the same coupling to the encoded system $(\hat{a}^{\dagger} + \hat{a}) \equiv 2\beta\hat{\sigma}_{x}^{e,n}$. This approximation is less and less good for highly excited states or, equivalently, when $n$ is large [see Fig. 2(b)]. It is beneficial to reduce such excitations by dissipative processes such as single- or two-photon loss, because photon-loss events transfer the population from the $n$th excited subspace to the $(n-1)$th subspace (see Appendixes E and F for more details).

In summary, the simple analysis presented here suggests that the backaction due to out-of-subspace excitations in the PCO depends on the existence of pairs of degenerate eigenstates in the spectrum of the PCO. Since the difference in the energies of the pair of eigenstates $|\psi_{e,n}^{\pm}\rangle$ decreases exponentially with the size of the cat $β$, the backaction should also decrease in the same manner. This intuitive result is justified with numerical simulations in later sections.

## V. PURE DEPHASING WITH WHITE-NOISE SPECTRUM

In the presence of white dephasing noise, the PCO evolves according to the master equation

$$ \dot{\hat{\rho}} = -i[\hat{H}_{PCO}, \hat{\rho}] + \kappa_{\phi} \mathcal{D}[\hat{a}^{\dagger}\hat{a}]\hat{\rho}, \quad (12) $$

where $κ_φ$ is the rate of pure dephasing. Again following the quantum-jump approach, the dynamics of the PCO is described by evolution under a non-Hermitian Hamiltonian $\hat{H} = \hat{H}_{PCO} - ik_φ\hat{a}^\dagger\hat{a}\hat{a}^\dagger\hat{a}/2$, which is interrupted by jumps corresponding to the operator $\hat{a}^\dagger\hat{a}$. We assume that $\omega_{gap}$ is larger than $κ_φ$ so that the non-Hermitian term only broadens the linewidths of the eigenstates of the PCO. The jump operator $\hat{a}^\dagger\hat{a}$ causes leakage. In the limit of large $β$, $\langle\psi_e^\pm|\hat{a}^\dagger\hat{a}|C_\beta^\pm\rangle \sim β$, so that the rate of leakage is $κ_φβ^2$. We can now follow the arguments in the previous section to see that the encoded system remains transparent to excitation in the $C_{\perp}$ subspace and backaction due to leakage errors remains suppressed, which becomes apparent from numerical simulations in later sections.

The analysis in the last two sections can easily be extended to other sources of noise which cause leakage out of the cat manifold, such as small corrections to the Hamiltonian due to inaccurate drive frequencies, higher-order nonlinearities, etc. The pairwise (approximately) degenerate subspace of the PCO inherently suppresses the backaction from the ancilla cat qubit to the encoded system. We now delve into the details of each stage of the syndrome extraction protocol. We begin by describing how the error syndrome of an encoded system is mapped onto the PCO [blue region in Fig. 1(b)] using specific examples.

## VI. SPECIFIC EXAMPLES FOR STABILIZER MEASUREMENTS

### A. Four-qubit stabilizer $\hat{\sigma}_{z,1}\hat{\sigma}_{z,2}\hat{\sigma}_{z,3}\hat{\sigma}_{z,4}$ in toric codes

The $n$-qubit $\hat{\sigma}_z$ stabilizer arises frequently in the toric code which is a topological quantum error-correcting code [4]. Because of its significance in two-dimensional toric codes, here we focus on the direct, eigenspace-preserving measurement of the $\hat{S}_z = \hat{\sigma}_{z,1}\hat{\sigma}_{z,2}\hat{\sigma}_{z,3}\hat{\sigma}_{z,4}$ stabilizer. The Hilbert space of $\hat{S}_z$ is classified into even $\mathcal{E}$ and odd eigenspaces $\mathcal{O}$. The eightfold degenerate even (odd) subspace comprises of states which are $+1$ ($-1$) eigenstates of $\hat{S}_z$. We define $\mathcal{E}$ (even subspace) and $\mathcal{O}$ (odd subspace) to be the code and error subspace, respectively, so that a measurement of $\hat{S}_z$ will yield $-1$ or $1$, indicating if there is or is not an error. Direct measurement of $\hat{S}_z$ requires a five-body interaction between the code qubits and an ancilla, which is challenging to realize experimentally. Instead, we perform a syndrome measurement with two-body interactions by replacing $\hat{M}_i$ with $\hat{\sigma}_{z,i}$ in Eq. (7). The resulting
interaction Hamiltonian $\hat{H}_I = \chi(t)\hat{S}_z'(\hat{a} + \hat{a}^\dagger)$, where $\hat{S}_z' = \hat{\sigma}_{z,1} + \hat{\sigma}_{z,2} + \hat{\sigma}_{z,3} + \hat{\sigma}_{z,4}$, has the form of a longitudinal qubit-oscillator coupling and has been realized experimentally [33]. For simplicity, we assume that all the interaction strengths are equal. Although it is possible to make the interaction strengths equal [23,33], our scheme does not require them to be equal. As long as the interaction strengths are known, the duration of interaction with each qubit can be adjusted to perform the syndrome measurement. An alternate approach is to keep the duration of interaction fixed but use a pair of bit-flip pulses for each qubit appropriately separated in time [16].

Following the analysis in Sec. II, the unitary corresponding to this interaction becomes $\hat{U}(t) = i \sin\{2\beta\hat{S}_z' \int_0^t \chi(\tau)d\tau\} \hat{\sigma}_x + \cos\{2\beta\hat{S}_z' \int_0^t \chi(\tau)d\tau\}$. To extract the syndrome, the PCO is initialized to the state $|C_\beta^+\rangle$ and the system evolved for a time $T_z$ so that $\int_0^{T_z} \chi(\tau)d\tau = \pi/8\beta$ [if the interaction strengths are unequal, then the duration of interaction $T_{i,z}$ must be such that $\int_0^{T_{i,z}} \chi(\tau)d\tau = \pi/8\beta$]. At this time, the unitary reduces to

$$ \hat{U}(T_z) = e^{i\pi\hat{S}_z'/4} \left[ \left(\frac{1 + \hat{S}_z}{2}\right) + \left(\frac{1 - \hat{S}_z}{2}\right) \hat{\sigma}_x \right]. \quad (13) $$

The first term in the above unitary $[\exp(i\pi\hat{S}_z'/4)]$ is just a local phase rotation of the qubits and can be kept track of in software while performing subsequent operations on qubits. Alternatively, a local $\hat{\sigma}_z$ gate can be applied to the qubit during or after the syndrome measurement to compensate for these rotations. It is clear that the state of the PCO after time $T_z$ is $|C_\beta^+\rangle$ or $|C_\beta^-\rangle$ if the qubits start in the code ($\hat{S}_z = 1$) or error subspace ($\hat{S}_z = -1$). Note that it is possible to decrease $T_z$ by just increasing $\chi_0$. However, a large $\chi_0/\omega_{gap}$ can additionally lead to phase diffusion of the qubits, and we study this effect in more detail in Appendix H.

We justify our theoretical analysis with an exact numerical simulation of the master equation (ME) of the PCO and qubits in the presence of single-photon loss (for simplicity, we assume the qubits to be lossless and use the common bosonic ME for the PCO):

$$ \dot{\hat{\rho}} = -i[\hat{H}, \hat{\rho}] + \kappa \mathcal{D}[\hat{a}]\hat{\rho}, \quad (14) $$

$$ H = -K\hat{a}^{\dagger 2}\hat{a}^2 + P(\hat{a}^{\dagger 2} + \hat{a}^2) + \chi(t)\hat{S}_z'(\hat{a} + \hat{a}^\dagger - 2\beta). \quad (15) $$

Here, $\kappa$ is the rate of single-photon loss of the PCO. All the numerical simulations in this work are carried out using open-source software [34]. The last term in the above Hamiltonian $[-2\beta\chi(t)\hat{S}_z']$ is added to cancel the deterministic single-qubit rotations [i.e., the term $\exp(i\pi\hat{S}_z'/4)$ in Eq. (13)]. We take a time-dependent qubit-oscillator interaction to simulate a realistic experimental setup where

the coupling is switched on and then turned off. The qubits are initialized in a maximally entangled state in $\mathcal{O}$, $|\psi_o\rangle$:

$$ |\psi_o\rangle = \frac{1}{\sqrt{8}} \left( \sum_i \hat{\sigma}_{x,i} + \sum_{i,j,k} \hat{\sigma}_{x,i} \hat{\sigma}_{x,j} \hat{\sigma}_{x,k} \right) |0,0,0,0\rangle, \quad (16) $$

and the stabilized cat oscillator is initialized to $|C_\beta^+\rangle$, with $P = 4K$ ($\beta = 2$), $\chi = (\pi/2)\chi_0 \sin(\pi t/T_z)$, $\chi_0 = K/20$, and $T_z = \pi/(8\chi_0\beta)$. To begin with, the ME is solved with $\kappa = 0$ to obtain the reduced density matrix of the PCO ($\hat{\rho}_{PCO}$) and qubits ($\hat{\rho}_q$). Figure 3(a) shows the probability for the PCO and qubits to be in the state $|C_\beta^-\rangle$ (red) and $|\psi_o\rangle$ (blue), respectively. As expected, after time $T_z$ we find $\langle\psi_o|\hat{\rho}_q|\psi_o\rangle = 0.9999-1$ and $\langle C_\beta^-|\hat{\rho}_{PCO}|C_\beta^-\rangle = 0.9999-1$. Next, the effect of single-photon loss is studied by using $\kappa = K/200(K/10)$. We find that at time $T_z$, while the probability for the PCO to be in the $|C_\beta^-\rangle$ state is reduced to $\langle C_\beta^-|\hat{\rho}_{PCO}|C_\beta^-\rangle = 0.93(0.52)$ because of loss-induced bit flips between $|C_\beta^+\rangle$ and $|C_\beta^-\rangle$, the qubits remain in the state $|\psi_o\rangle$, $\langle\psi_o|\hat{\rho}_q|\psi_o\rangle = 0.9999-1$. We observe that, although the fidelity of mapping the syndrome onto the ancilla cat is reduced to 52% for $\kappa = K/10$ (in which case the majority vote almost fails), the backaction on the qubits remains suppressed.

The analysis is repeated with the qubits and PCO initialized to $|\psi_e\rangle$ and $|C_\beta^+\rangle$, respectively. Here,

$$ |\psi_e\rangle = \frac{1}{\sqrt{8}} \left( \sum_{i,j} \hat{\sigma}_{x,i} \hat{\sigma}_{x,j} + \hat{I} + \hat{\sigma}_{x,1} \hat{\sigma}_{x,2} \hat{\sigma}_{x,3} \hat{\sigma}_{x,4} \right) |0,0,0,0\rangle, \quad (17) $$

as shown in Fig. 3(b) for $\kappa = 0 \langle\psi_e|\hat{\rho}_q|\psi_e\rangle \sim 1$ and $\langle C_\beta^+|\hat{\rho}_{PCO}|C_\beta^+\rangle \sim 1$ at $t = T_z$. Because of single-photon loss $\kappa = K/200(K/10)$, the probability to be in the state $|C_\beta^+\rangle$ decreases to 0.93 (0.52), but the state of the qubits is $|\psi_e\rangle$ with probability 0.9999-1. Consequently, these numerical results confirm that the qubits are transparent to the errors in the PCO. The single-photon loss in the PCO reduces the fidelity of the syndrome extraction, but this reduction can be recovered by repeating the protocol many times and taking a majority vote. For example, with $\kappa = K/200$, the fidelity of the controlled $\hat{X}$ rotation, or, equivalently, the measurement fidelity, reduces to 93%, but by repeating the procedure 5 times the probability of correctly mapping the syndrome to the PCO increases to 99.7%. In order to highlight the fault tolerance of the measurements using a PCO, we compare it with the case in which the measurement is carried out with a conventional two-level system with the same relaxation rate $\gamma = K/200(K/10)$. We find that, with the conventional qubit, the probability for the data qubits to remain in the original state decreases significantly: $\langle\psi_e|\hat{\rho}_q|\psi_e\rangle = 0.992(0.867)$ and
<figure><img src="image_5.png" /><figcaption>FIG. 3. The figure shows the dynamics of the PCO and qubits during stabilizer measurement, when $\kappa = 0$ (solid lines) and $\kappa = K/200$ (dots). Here, $\kappa$ is the rate of single-photon loss from the PCO. (a) Probability for the PCO and qubits to be in the state $|C_{\beta}^{-}\rangle$ and $|\psi_{o}\rangle$ when their initial states are $|C_{\beta}^{+}\rangle$ and $|\psi_{o}\rangle$, respectively. (b) Probability for the PCO and qubits to be in the state $|C_{\beta}^{-}\rangle$ and $|\psi_{e}\rangle$ when their initial states are $|C_{\beta}^{+}\rangle$ and $|\psi_{e}\rangle$, respectively. The states $|\psi_{o}\rangle$ and $|\psi_{e}\rangle$ are given in Eqs. (16) and (17). The parameters are $\chi = K/20$, $P = 4K$ ($\beta = 2$), and $T_{z} = \pi/8\chi_{0}\beta$ ($p \sim 1$ for $\beta = 2$). Clearly, when $\kappa = 0$, the state of the PCO at time $T_{z}$ reflects the syndrome $\langle \hat{S}_{z} \rangle$. The probability for the PCO to correctly indicate the error syndrome is reduced to approximately 93% when $\kappa = K/200$ (red dots). More importantly, as seen from the dotted blue lines, the state of the qubits after $T_{z}$ is essentially unaffected when $\kappa = K/200$. Specifically, the difference between the blue dots and solid blue line is $< 10^{-3}\%$.</figcaption></figure>

$\langle \psi_{o} | \hat{p}_{q} | \psi_{o} \rangle = 0.990(0.827)$. In other words, one would have to repeat the measurement with the PCO over 100 times before the data qubits get corrupted as much as with just a single measurement with a conventional two-level system. This result clearly demonstrates the exponential suppression of backaction when the measurement is carried out using the PCO.

Next, we examine the fault tolerance of the measurement in the presence of white-noise single-photon gain or pure

dephasing. In order to do so, we simulate the following two master equations for different pump strengths $P$ (or, equivalently, $\beta$): (i) $\hat{\rho} = -i[\hat{H}, \hat{\rho}] + \kappa(1 + n_{th})D[\hat{a}]\hat{\rho} + \kappa n_{th} D[\hat{a}^{\dagger}]\hat{\rho}$ and (ii) $\hat{\rho} = -i[\hat{H}, \hat{\rho}] + \kappa_{\phi}D[\hat{a}^{\dagger}\hat{a}]\hat{\rho}$. Here, $\hat{H}$ is given in Eq. (15), $n_{th}$ is the number of thermal photons, $\kappa_{\phi}$ is the rate of pure dephasing, and $P$ is varied from $P = K$ to $P = 16K$ so that $\beta$ changes from $\beta = 1$ to $\beta = 4$. As before, $\chi = (\pi/2)\chi_{0}\sin(\pi t/T_{z})$ and $\chi_{0} = K/20$. For each of the above master equations, two simulations are carried out: one in which the qubits are initialized in the even-parity state $|\psi_{e}\rangle$ and the other in which they are initialized in the odd-parity state $|\psi_{o}\rangle$. Figure 4(a) shows the average probability of leakage in these two simulations:

$$ \epsilon_{\ell} = \frac{1}{2} \left[ \begin{aligned} & 1 - \langle C_{\beta}^{+} | \hat{p}_{\text{PCO}} | C_{\beta}^{+} \rangle - \langle C_{\beta}^{-} | \hat{p}_{\text{PCO}} | C_{\beta}^{-} \rangle \\ & + \frac{1}{2} \left[ 1 - \langle C_{\beta}^{+} | \hat{p}_{\text{PCO}} | C_{\beta}^{+} \rangle - \langle C_{\beta}^{-} | \hat{p}_{\text{PCO}} | C_{\beta}^{-} \rangle \right]_{o} \end{aligned} \right]_{e} \quad (18) $$

where $[[]]_{o,e}$ represents the simulation with the qubits initialized to $|\psi_{o,e}\rangle$, respectively. The reduced density matrix of the PCO, $\hat{p}_{\text{PCO}}$, is evaluated at $T_{z} = \pi/4\chi_{0}\beta(p + p^{-1})$. Recall from Secs. IV and V that the rate of leakage due to photon gain is $\sim \kappa n_{th}$ while that due to dephasing is $\sim \kappa_{\phi}\beta^{2}$. Therefore, the dependence of leakage on $\beta$ in the presence of white thermal noise and pure dephasing is expected to be $\epsilon_{\ell} \sim \kappa n_{th} T_{z} \propto \beta^{-1}$ and $\epsilon_{\ell} \sim \kappa_{\phi}\beta^{2} T_{z} \propto \beta$, respectively. Indeed, this behavior is reflected in the numerically simulated leakage shown in Fig. 4(a). Figure 4(b) presents the logarithm of the average backaction on the qubits as a function of $\beta^{2}$. The backaction is evaluated as

$$ \epsilon_b = \frac{1}{2} \left[ \left[ 1 - \langle \psi_e | \hat{p}_q | \psi_e \rangle \right]_e + \frac{1}{2} \left[ 1 - \langle \psi_o | \hat{p}_q | \psi_o \rangle \right]_o \right] \quad (19) $$

From the discussion in Secs. IV and V, $\epsilon_{b}$ [or $\log(\epsilon_{b})$] is expected to decrease exponentially (or linearly) with $\beta^{2}$ for large $\beta$. Indeed, the numerical simulations shown in Fig. 4(b) approximately reproduce the predicted behavior. Remarkably, on comparison of Figs. 4(a) and 4(b) for pure dephasing (blue squares), we find that $\log(\epsilon_{b})$ decreases (approximately) linearly with $\beta^{2}$ even though $\epsilon_{\ell}$ increases with $\beta$. As explained earlier, the suppression in backaction results from the symmetric, pairwise (approximately) degenerate excited state spectra. For small $\beta$, the states are not quite degenerate enough, and so the entirety of ancilla leakage propagates as backaction to the data system. Therefore, $\epsilon_{b}$ increases at first for small $\beta$. Eventually, as $\beta$ increases further, pairs of excited states become more and more degenerate, and, despite a large amount of leakage, the backaction on the data system is suppressed. For the case of thermal noise (red squares), on the other hand, the $\epsilon_{\ell}$ and, therefore, $\epsilon_{b}$ consistently decrease, and, more importantly, $\epsilon_{b}$ decreases (exponentially) faster than $\epsilon_{\ell}$. Eventually, when the state of the cat ancilla is read out, leakage will lead only to
<figure><img src="image_6.png" /><figcaption>FIG. 4. The figure shows the leakage errors [$\epsilon_e$ in Eq. (18)] in the PCO and the corresponding backaction [$\epsilon_b$ in Eq. (19)] on the encoded qubits due to white thermal noise (red squares) and pure dephasing (blue squares). The squares are the results of simulating the master equation (i) $\hat{\rho} = -i[\hat{H}, \hat{\rho}] + \kappa(1 + n_{th})\mathcal{D}[\hat{a}] + \kappa n_{th} \mathcal{D}[\hat{a}^\dagger]$ and (ii) $\hat{\rho} = -i[\hat{H}, \hat{\rho}] + \kappa_\phi \mathcal{D}[\hat{a}^\dagger \hat{a}]$. $\hat{H}$ is given in Eq. (15), and the solid lines are merely spline interpolations. $n_{th} = 10\%$, $\kappa = K/200$, $\kappa_\phi = K/2000$, and $P$ is varied between $K$ and $16K$. $\chi = (\pi/2)\chi_0 \sin(\pi t/T_z)$, $\chi_0 = K/20$, and $T_z = \pi/4\chi_0\beta(p + p^{-1})$. The reduced density matrices $\hat{\rho}_{PCO}$ and $\hat{\rho}_q$ are evaluated at $T_z$. As expected from the simple analysis in Secs. IV and V, the backaction on the qubits exponentially decreases as the size of the cat $\beta$ in the PCO increases. In particular, $\log(\epsilon_b)$ decreases (approximately) linearly with $\beta^2$ for larger $\beta$. This decrease agrees with the behavior expected from Secs. IV and V.</figcaption></figure>

measurement errors. In the toric code, in the absence of backaction, the threshold for measurement errors is estimated to be between approximately 1.1% and 12% [35]. However, in the presence of backpropagation of errors from the ancilla to data qubits, the threshold is known to significantly decrease [35]. The stabilizer measurement scheme with the PCO suppresses this error without sacrificing the measurement fidelity too much and, therefore, enhances the performance of the code.

To quantify the advantage of the stabilizer measurement with a PCO over that with a regular qubit, we compare the

measurement infidelity $\epsilon_m$ and backaction $\epsilon_b$ when the two systems are subject to the same amount of thermal and frequency noise. The backaction is calculated according to Eq. (19), while the measurement infidelity is $\epsilon_m = [[1 - \langle C_\beta^+ | \hat{\rho}_{PCO} | C_\beta^- \rangle]]_e/2 + [[1 - \langle C_\beta^- | \hat{\rho}_{PCO} | C_\beta^+ \rangle]]_o/2$, which takes into account both bit flips of the ancilla cat as well as leakage. For $\chi_0 = K/10$, $\kappa = K/200$, $n_{th} = 10\%$, and $\kappa_\phi = K/2000$, the measurement infidelity and backaction for our scheme with an ancilla cat of size $\beta = 2.4$ in the PCO are 5.87% and 0.05%, respectively, while, for the same relaxation rate $\gamma = K/200$, $n_{th} = 10\%$, and $\gamma_\phi = K/2000$, the measurement infidelity and backaction with the conventional qubit are 1.3% and 0.4%, respectively. The measurement infidelity can be decreased by repeating the measurement several times and taking a majority vote. However, repeating the measurement also leads to an increase in the backaction. If the majority vote is taken over $m$ measurements, then we can define a total error rate $\epsilon$ introduced in the encoded system as a sum of the measurement infidelity and backaction:

$$ \epsilon = \sum_{n=(m+1)/2}^{n=m} \binom{m}{n} (1 - \epsilon_m)^{m-n} \epsilon_m^n + m\epsilon_b. \quad (20) $$

In the example above for the measurement with the PCO, $m = 5$ minimizes total error $\epsilon_{PCO}^{optimal} = 0.35\%$. On the other hand, for the measurement with a regular qubit, $m = 3$ minimizes total error $\epsilon_{optimal}^{qubit} = 1.25\%$. In this example, we find that the total error introduced in the encoded system during a measurement using a PCO with $\beta = 2.4$ is 3.5 times smaller than that during a measurement using a conventional qubit with the same amount of thermal and frequency noise. Following the same analysis, we find that, with $\beta = 3.0$, $\epsilon_{optimal}^{PCO} \sim 9\epsilon_{optimal}^{qubit}$ for $m = 7$. These examples highlight the fact that, because the backaction from the cat ancilla is smaller, the measurement can be repeated a higher number of times to reduce the overall error. Moreover, as the size of the cat increases, the backaction is reduced and the measurement can be repeated a greater number of times. The exact gain in the overall threshold or error scaling of the toric code achievable by reducing errors during stabilizer measurements is beyond the scope of this work. However, it is possible to argue qualitatively that even a moderately sized stabilized cat ancilla with $\beta^2 \sim 5-10$ is sufficient to see significant gains. Suppose the errors in the qubits are dominated by total measurement errors. Then, the code suppresses these as $(\epsilon/\epsilon_{th})^{(d+1)/2}$, where $d$ is the distance and $\epsilon_{th}$ is the threshold. A decrease in $\epsilon$ by a factor of approximately 4–10 with $\beta^2 \sim 5-10$ effectively increases the threshold by the same amount or, conversely, dramatically reduces the logical error rate by approximately $4^{-(d+1)/2} - 10^{-(d+1)/2}$.
## B. Cat code stabilizer $e^{i\pi\hat{a}_s^\dagger\hat{a}_s}$

Cat codes are bosonic error-correcting codes where the information is encoded in superpositions of coherent states [9,10]. The stabilizer for the cat code is the photon-number parity operator $\hat{P} = e^{i\pi\hat{a}_s^\dagger\hat{a}_s}$ and indicates if there are an even or odd number of photons. Here, $\hat{a}_s$ and $\hat{a}_s^\dagger$ are the photon annihilation and creation operators, respectively, for the storage or data cat. The twofold degenerate code subspace is defined by the cat states with even photon numbers: $|C_\alpha^+\rangle$ and $|C_{i\alpha}^+\rangle$, which are eigenstates of $\hat{P}$ with eigenvalue +1. The error space is comprised of the states with an odd number of photons: $|C_\alpha^-\rangle$ and $|C_{i\alpha}^-\rangle$, which are eigenstates of $\hat{P}$ with eigenvalue -1. To avoid confusion, we refer to the cat states encoding quantum information as the storage cat. In the current scheme for cat syndrome measurement [11,17], a storage oscillator which encodes the cat code-word is coupled dispersively to an ancilla qubit. The dispersive coupling between the two is used to map the parity of the cat onto the ancilla. However, a random relaxation of the ancilla during the measurement induces a random phase rotation of the cat codeword, making this scheme non-fault tolerant [11,23]. In our approach, it is possible to achieve fault-tolerant syndrome detection by replacing the operator $\hat{M}$ with the photon-number operator $\hat{n} = \hat{a}_s^\dagger\hat{a}_s$ in Eq. (7). The interaction Hamiltonian of the storage oscillator and PCO is then given by $\hat{H}_I = \chi(t)\hat{a}_s^\dagger\hat{a}_s(\hat{a} + \hat{a}^\dagger)$. This interaction, equivalent to a longitudinal interaction between the storage oscillator and the PCO, can be realized in a tunable manner [33]. The unitary evolution generated by this interaction is

$$ \hat{U}(t) = i \sin \left( 2\beta \hat{a}_s^\dagger \hat{a}_s \int_0^t \chi(\tau) d\tau \right) \hat{\sigma}_x \\ + \cos \left( 2\beta \hat{a}_s^\dagger \hat{a}_s \int_0^t \chi(\tau) d\tau \right). \quad (21) $$

The syndrome extraction proceeds by initializing the PCO to $|C_\beta^+\rangle$ and turning on the interaction between the storage oscillator and PCO for a time $T_p$ so that $\int_0^{T_p} \chi(\tau) d\tau = \pi/4\beta$. At this time, the unitary reduces to

$$ \hat{U}(T_p) = e^{-i\pi\hat{a}_s^\dagger\hat{a}_s/2} \left\{ \left(\frac{1-\hat{P}}{2}\right) \hat{\sigma}_x + \left(\frac{1+\hat{P}}{2}\right) \right\}. \quad (22) $$

The first term in the above equation $e^{(-i\pi\hat{a}_s^\dagger\hat{a}_s/2)}$ is just a deterministic rotation of the frame of reference of the storage cat which can be taken into account in software prior to further operations. If the storage is in the code subspace $x|C_\alpha^+\rangle + y|C_{i\alpha}^+\rangle$, then the states of the PCO and storage at time $T_p$ are $|C_\beta^+\rangle$ and $x|C_\alpha^+\rangle + y|C_{i\alpha}^+\rangle$, respectively (up to a deterministic frame rotation of the storage cat). On the other hand, if the storage cat is in the error subspace

$x|C_\alpha^-\rangle + y|C_{i\alpha}^-\rangle$, then the PCO evolves to the state $|C_\beta^-\rangle$ at $T_p$, while the storage cat remains in the state $x|C_\alpha^-\rangle + y|C_{i\alpha}^-\rangle$ (up to a deterministic frame rotation). Therefore, the state of the cat in the PCO indicates the error syndrome $\hat{P}$. The PCO only measures the parity of the storage without revealing information about the actual photon statistics as long as $\chi$ is small and the dynamics of the PCO can be restricted to the stabilized cat manifold. For finite $\chi/K\beta^2$, there is a small probability of excitations out of the C subspace which could cause phase diffusion in the storage cat. Partial correction is possible by applying a counterdrive to the PCO to cancel the excitations out of the C subspace on average $\hat{H}_c = -\chi\langle\hat{a}_s^\dagger\hat{a}_s\rangle(\hat{a} + \hat{a}^\dagger)$ (see Appendix I).

We confirm these theoretical results with numerical simulations of the master equation of the PCO and storage oscillator in the presence of single-photon loss (for simplicity, we assume the storage oscillator to be lossless and use the common bosonic master equation for the PCO):

$$ \dot{\hat{\rho}} = -i[\hat{H}, \hat{\rho}] + \kappa D[\hat{a}]\hat{\rho}, \quad (23) $$

$$ \hat{H} = \hat{H}_{\text{PCO}} + \chi(t)(\hat{a}_s^\dagger\hat{a}_s - \langle\hat{a}_s^\dagger\hat{a}_s\rangle)(\hat{a} + \hat{a}^\dagger - 2\beta). \quad (24) $$

The last term in the above Hamiltonian is added to compensate for the deterministic frame rotation of the storage cat ($e^{-i\pi\hat{a}_s^\dagger\hat{a}_s/2}$). The storage oscillator is initialized in an odd-parity state $|\psi_o\rangle = |C_\alpha^-\rangle + i|C_{i\alpha}^-\rangle$, and the stabilized cat oscillator is initialized to $|C_\beta^+\rangle$, with $\alpha = 2, P = 4K$ ($\beta = 2$), $\chi = (\pi/2)\chi_0 \sin(\pi t/T_p)$, $\chi_0 = K/15$, and $T_p = \pi/(4\chi_0\beta)$. To begin with, $\kappa = 0$ and the density matrix of the system is numerically estimated, from which the reduced density matrix of the PCO ($\hat{\rho}_{\text{PCO}}$) and storage oscillator ($\hat{\rho}_s$) are obtained. Figure 5(a) shows the probability for the PCO and storage oscillator to be in the state $|C_\beta^-\rangle$ (red) and $|\psi_o\rangle$ (blue), respectively. As expected, after time $T_p$, we find $\langle\psi_o|\hat{\rho}_q|\psi_o\rangle = 0.9999$ and $\langle C_\beta^-|\hat{\rho}_{\text{PCO}}|C_\beta^-\rangle = 0.9999$. Next, we study the effect of single-photon loss by using $\kappa = K/200$. We find that, although at $T_p$ the probability for the PCO to be in the $|C_\beta^-\rangle$ state is reduced $\langle C_\beta^-|\hat{\rho}_{\text{PCO}}|C_\beta^-\rangle = 0.90$ because of loss-induced bit flips between $|C_\beta^+\rangle$ and $|C_\beta^-\rangle$, the storage oscillator remains in the state $|\psi_o\rangle$, $\langle\psi_o|\hat{\rho}_q|\psi_o\rangle = 0.9999$.

We repeat this analysis but with the qubits and PCO initialized to the even-parity state $|\psi_e\rangle = |C_\alpha^+\rangle + |C_{i\alpha}^+\rangle$ and $|C_\beta^+\rangle$, respectively. As shown in Fig. 5(b) for $\kappa = 0$, $\langle\psi_e|\hat{\rho}_s|\psi_e\rangle = 0.9999$ and $\langle C_\beta^+|\hat{\rho}_{\text{PCO}}|C_\beta^+\rangle = 0.9999$ at $T_p$. Because of single-photon loss $\kappa = K/200$, the probability to be in the ancilla state $|C_\beta^-\rangle$ decreases to 0.90, but the state of the qubits is $|\psi_e\rangle$ with probability 0.9999. We now compare the backaction during measurements using the PCO with the case in which the measurement is carried out with a conventional two-level system with the same
<figure><img src="image_7.png" /></figure>

FIG. 5. The figure shows the dynamics of the PCO and the storage cat during stabilizer measurement when $\kappa = 0$ (solid lines) and $\kappa = K/200$ (dots). (a) Probability for the PCO and storage oscillator to be in the state $|C_{\beta}^{-}\rangle$ and $|\psi_{o}\rangle$ when their initial states are $|C_{\beta}^{+}\rangle$ and $|\psi_{o}\rangle$, respectively. (b) Probability for the PCO and the storage oscillator to be in the state $|C_{\beta}^{-}\rangle$ and $|\psi_{e}\rangle$ when their initial states are $|C_{\beta}^{+}\rangle$ and $|\psi_{e}\rangle$, respectively. Here, $|\psi_{o}\rangle = |C_{\alpha}^{-}\rangle + i|C_{ia}^{-}\rangle$ and $|\psi_{e}\rangle = |C_{\alpha}^{+}\rangle + |C_{ia}^{+}\rangle$. The parameters are $\chi = K/15$, $P = 4K$ ($\beta = 2$), $\kappa = 0$, and $T_{p} = \pi/4\beta\chi_{0}$. Clearly, the state of the PCO at time $T_{p}$ reflects the photon-number parity of the storage cat. The probability for the PCO to correctly indicate the error syndrome is reduced to approximately 90% when $\kappa = K/200$ (red dotted lines). However, as seen from the dotted blue lines, the state of the storage cat after $T_{p}$ is unaffected by single-photon loss from the PCO (the difference between the blue dots and lines is < $10^{-3}\%$).

relaxation rate $\gamma = K/200$. In the latter, the backaction on the storage oscillator increases by about 2 orders of magnitude: $(1 - \langle\psi_{e}|\hat{\rho}_{s}|\psi_{e}\rangle)$, $(1 - \langle\psi_{o}|\hat{\rho}_{s}|\psi_{o}\rangle) \sim 0.011$.

The fault tolerance of this scheme to white thermal noise and pure dephasing is evaluated by numerically simulating the two master equations (i) $\hat{\rho} = -i[\hat{H}, \hat{\rho}] + \kappa(1 + n_{\text{th}})D[\hat{a}] + \kappa n_{\text{th}}D[\hat{a}^{\dagger}]$ and (ii) $\hat{\rho} = -i[\hat{H}, \hat{\rho}] + \kappa_{\phi}D[\hat{a}^{\dagger}\hat{a}]$, for different pump strengths $P$. Here, $\hat{H}$ is given

in Eq. (24), $\chi = (\pi/2)\chi_{0}\sin(\pi t/T_{p})$, $\chi_{0} = K/40$, and $P$ is varied from $P = K$ to $P = 16K$. For each of the above equations, we perform two simulations: one in which the storage cat is initialized in the even-parity state $|\psi_{e}\rangle$ and the other in which it is initialized in the odd-parity state $|\psi_{o}\rangle$ with $\alpha = \sqrt{2}$. Figure 6 shows the average probability of leakage and backaction in these two simulations as defined in Eqs. (18) and (19), respectively, and evaluated at $T_{p} = \pi/2\chi_{0}\beta(p + p^{-1})$. $\hat{\rho}_{q}$ is replaced by the reduced density matrix of the storage $\hat{\rho}_{s}$ in Eq. (19). As before, the dependence of leakage on $\beta$ in the presence of white thermal noise and pure dephasing is expected to be $L \sim \kappa n_{\text{th}}T_{p} \propto \beta^{-1}$ and $L \sim \kappa_{\phi}\beta^{2}T_{p} \propto \beta$, respectively. The numerically simulated leakage, as shown in Fig. 6(a), does

<figure><img src="image_8.png" /></figure>

FIG. 6. Leakage errors ($\epsilon_{\ell}$) in the PCO and the corresponding backaction ($\epsilon_{b}$) on the storage cat due to white thermal noise (red squares) and pure dephasing (blue squares). The squares are the results of simulating the master equation (i) $\hat{\rho} = -i[\hat{H}, \hat{\rho}] + \kappa(1 + n_{\text{th}})D[\hat{a}] + \kappa n_{\text{th}}D[\hat{a}^{\dagger}]$ and (ii) $\hat{\rho} = -i[\hat{H}, \hat{\rho}] + \kappa_{\phi}D[\hat{a}^{\dagger}\hat{a}]$. $\hat{H}$ is given in Eq. (24), and the solid lines are spline interpolations. $n_{\text{th}} = 10\%$, $\kappa = K/200$, $\kappa_{\phi} = K/4000$, and $P$ is varied between $K$ and $16K$. $\chi = (\pi/2)\chi_{0}\sin(\pi t/T_{z})$, $\chi_{0} = K/40$, and $T_{p} = \pi/2\chi_{0}\beta(p + p^{-1})$. The reduced density matrices $\hat{\rho}_{\text{PCO}}$ and $\hat{\rho}_{s}$ are evaluated at $T_{p}$. The size of the storage cat is $\alpha = \sqrt{2}$. As expected from the simple analysis in Secs. IV and V, the backaction decreases exponentially as the size of the cat $\beta$ in the PCO increases.
(approximately) reproduce this behavior. Figure 6(b) presents the logarithm of the average backaction on the storage as a function of $\beta^2$. Indeed, we find that the backaction reduces (approximately) exponentially with $\sim \beta^2$ for large $\beta$.

We repeat the procedure in Sec. VI A to quantify the advantage of the stabilizer measurement with a PCO over that with a conventional qubit which is subject to the same amount of thermal and frequency noise. For $\chi_0 = K/10$, $\kappa = K/200$, $n_{th} = 10\%$, and $\kappa_\phi = K/4000$, the measurement infidelity and backaction for a scheme with a cat of size $\beta = 2.6$ in the PCO are $\epsilon_\ell = 11.45\%$ and $\epsilon_b = 0.04\%$, respectively, while, for the same relaxation rate $\gamma = K/200$, $n_{th} = 10\%$, and $\gamma_\phi = K/4000$, the measurement infidelity and backaction for scheme with a conventional qubit are $\epsilon_\ell = 4.2\%$ and $\epsilon_b = 0.5\%$, respectively. For the measurement with the PCO, $m = 9$ minimizes the total error in Eq. (20) with $\epsilon_{\text{optimal}}^{\text{PCO}} = 0.54\%$. On the other hand, for the measurement with the conventional qubit, $m = 3$ minimizes the total error $\epsilon_{\text{optimal}}^{\text{qubit}} = 2\%$. In this example, we find that the total error introduced in the encoded system during a measurement using a PCO with $\beta = 2.6$ is 3.7 times smaller than that during a measurement using a conventional qubit with the same amount of thermal and frequency noise. In recent cat code quantum error correction experiments, backaction during the stabilizer measurement (using a qubit ancilla) limited the improvement in the lifetime of the data cat [11,23]. A 3.7-fold decrease in the total error introduced during the measurement is sufficient to put the cat code well beyond the “break-even” point in quantum error correction.

We observe that the approach described here can be extended to measure the stabilizer of binomial [36] and pair-cat codes [37]. Moreover, the syndrome extraction technique can be adapted to perform a bias-preserving CNOT between two PCOs. Such a bias-preserving CNOT is unique to the system of stabilized cat qubits and promises to improve threshold requirements in quantum error-correcting codes [38].

### C. GKP code stabilizers

The GKP code is a bosonic error-correcting code which is designed to correct random displacement errors in the phase space [29,39]. The codewords are the simultaneous $+1$ eigenstates of the phase-space displacements $\hat{S}_q = \exp(2i\sqrt{\pi}\hat{q}) = D(i\sqrt{2\pi})$ and $\hat{S}_p = \exp(-2i\sqrt{\pi}\hat{p}) = D(\sqrt{2\pi})$. Here, $\hat{q}$ and $\hat{p}$ are the position and momentum operators, defined as $\hat{q}=(\hat{a}_s^\dagger+\hat{a}_s)/\sqrt{2}$ and $\hat{p}=i(\hat{a}_s^\dagger-\hat{a}_s)/\sqrt{2}$, respectively. Also, $D(i\sqrt{2\pi})$ and $D(\sqrt{2\pi})$ are the displacement operators, where $D(\alpha) = \exp(\alpha\hat{a}_s^\dagger - \alpha^*\hat{a}_s)$. The two ideal GKP codewords are uniform superpositions of eigenstates of $\hat{q}$ at even and odd integer multiples of $\sqrt{\pi}$,

respectively. These states are a sum of an infinite number of infinitely squeezed states and are unphysical (non-normalizable) because of their unbounded number of photons. More realistic codewords can be realized by replacing the infinitely squeezed state $|\hat{q}=0\rangle$ with a squeezed Gaussian state and replacing the uniform superposition over these states by an overall envelope function, such as a Gaussian, a binomial, etc., [29,40]. Recently, the GKP codewords have been realized in trapped-ion oscillators [41]. The GKP code provides protection against any low-rate errors which can be represented as small phase-space displacements of the oscillator given by $\exp(-iu\hat{q})$ and $\exp(-iv\hat{p})$ [39,42]. The displaced GKP states are also the eigenstates of the stabilizers $\hat{S}_q$ and $\hat{S}_p$ with eigenvalue $e^{i2\sqrt{\pi}u}$ and $e^{2i\sqrt{\pi}v}$, respectively. A measurement of the stabilizers yields the eigenvalues and, hence, uniquely determines the displacement errors $u$ and $v$. For the unique determination of displacement errors we require that $|u|, |v| < \sqrt{\pi}/2$ or that the displacement error is smaller than half the translational distance $(\sqrt{\pi})$ between the two codewords.

A simple approach to measure the eigenvalues $e^{2i\sqrt{\pi}u}$ and $e^{2i\sqrt{\pi}v}$ of $\hat{S}_q$ and $\hat{S}_p$ is based on an adaptive phase-estimation protocol (APE) [40,43,44]. This approach is based on the repetitive application of displacements to the storage oscillator which are conditioned on the state of the ancilla [40]. In this section, we present a fault-tolerant protocol for the APE of the stabilizers for GKP code using a stabilized cat in a PCO. We do not go into the rigorous details of APE for GKP codes, which can be found in Ref. [40]. Instead, we focus on implementing it with the stabilized cat ancilla. To achieve the controlled displacement required for APE, the storage oscillator is coupled to the PCO via a tunable single-photon exchange (or a beamsplitter) interaction, $\hat{H}=\hat{H}_{\text{PCO}}+[g(t)\hat{a}^\dagger\hat{a}_s+g^*(t)\hat{a}^\dagger\hat{a}_s]$ [45]. Such a tunable single-photon exchange coupling can be easily realized with the three- or four-wave mixing capability of the PCO and external drives of appropriate frequencies [46,47]. For small $|g|$, this Hamiltonian can be effectively written in the cat subspace as

$$ \hat{H}' = \hat{H}_{\text{PCO}} + \beta \left( \frac{p+p^{-1}}{2} \right) [g(t)\hat{a}_s + g^*(t)\hat{a}_s^\dagger]\hat{\sigma}_x \\ -i\beta \left( \frac{p-p^{-1}}{2} \right) [g(t)\hat{a}_s - g^*(t)\hat{a}_s^\dagger]\hat{\sigma}_y. \quad (25) $$

For large-amplitude $\beta$, the second term becomes negligibly small, and evolution under the above Hamiltonian implements a controlled displacement along the position or momentum quadrature depending on the phase chosen for the coupling $g$. In this limit, when the phase and amplitude of the coupling $g(t)$ are chosen so that $g^*(t) = g(t) = |g(t)|$ and $\beta \int_0^{T_1} |g(t)|dt = \sqrt{\pi}/2$, the unitary corresponding to the above Hamiltonian reduces to
$$ \hat{U}_1(T_1) = D\left(-i\sqrt{\frac{\pi}{2}}\right) \left\{ \left(\frac{\hat{\sigma}_x}{2} + 1\right) D(i\sqrt{2\pi}) + \left(\frac{1-\hat{\sigma}_x}{2}\right) \right\}, \quad (26) $$

which is the conditional displacement of the oscillator required for APE of $\hat{S}_q$ (see Fig. 5 in Ref. [40]). Similarly, when $g(t) = i|g(t)|$, $g^*(t) = -i|g(t)|$, and $\beta \int_0^{T_2} |g(t)|dt = \sqrt{\pi}/2$,

$$ \hat{U}_2(T_2) = D\left(-\sqrt{\frac{\pi}{2}}\right) \left\{ \left(\frac{\hat{\sigma}_x + 1}{2}\right) D(\sqrt{2\pi}) + \left(\frac{1-\hat{\sigma}_x}{2}\right) \right\}. \quad (27) $$

This equation implements the required conditional displacements for APE of $\hat{S}_p$.

The overall protocol for APE is shown in Figs. 7(a) and 7(b). For estimating $\hat{S}_q$, the protocol proceeds by the sequential application of the gates $\hat{U}_1(T_1)$, followed by a rotation of the PCO around the X axis by an angle $\phi$, and, finally, the measurement of the PCO. Similarly, for estimating $\hat{S}_p$, it proceeds by the sequential application of the gates $\hat{U}_2(T_2)$, followed by a rotation of the PCO around the X axis by an angle $\phi$, and, finally, the measurement of the PCO. The feedback phases $\phi$ and $\varphi$ are determined based on the measurement outcome in the previous round (Appendix J). As the number of rounds of phase estimation increases, the accuracy of the estimates for u and v also increases, and, therefore, the uncertainty in the estimate of the eigenvalues $\exp(2i\sqrt{\pi}u)$ and $\exp(2i\sqrt{\pi}v)$ decreases. The accuracy of the phase estimation protocol is evaluated using the Holevo phase variance $V_q$, $V_p$, which is defined as $V_{q,p} = s_{q,p}^{-2} - 1$ with $s_q = |\langle \hat{S}_q \rangle|$ and $s_p = |\langle \hat{S}_p \rangle|$ [40].

<figure><img src="image_9.png" /><figcaption>FIG. 7. (a),(b) show the overall protocol of estimating the eigenvalues of $\hat{S}_p$ and $\hat{S}_q$, respectively, with the PCO. It proceeds by the sequential application of the gates $\hat{U}_2(T_2)$ [or $\hat{U}_1(T_1)$] and the measurement of the PCO. In APE, the state of the PCO is rotated by an angle $\phi$ or $\varphi$ around the X axis of the Bloch sphere before each measurement. The angles $\phi$ and $\varphi$ are chosen based on its previous measurement record.</figcaption></figure>

For an ideal GKP state, $V_{q,p} = 0$, while, on the other hand, for large uncertainties in u, v, $V_{q,p} \to \infty$.

We numerically simulate one round of phase estimation for $\hat{S}_p$ [that is, $g(t) = i|g(t)|$], with the storage in an approximate GKP state $|\tilde{0}\rangle_{\text{GKP}}$:

$$ |\tilde{0}\rangle_{\text{GKP}} = N_0 \sum_{n=-1}^{1} \binom{2}{n+1} D(\sqrt{2\pi n}) \hat{S}_r |0\rangle. \quad (28) $$

In the above expression, $N_0$ is the normalization coefficient, $\hat{S}_r = \exp\{r(\hat{a}_s^2 - \hat{a}_s^{\dagger 2})/2\}$ is the squeezing operator with $r = 1.4$, and the overlap function is chosen to be the binomial coefficients $\binom{2}{n+1}$. The Holevo variance of this state is $V_{q,p}^0 = 1.25, 0.48$ (because we are starting with the approximate GKP state $|\tilde{0}\rangle_{\text{GKP}}$, the phase variance is not zero). The master equation used in the simulation is

$$ \dot{\hat{\rho}} = -i[\hat{H}, \hat{\rho}] + \kappa \mathcal{D}[\hat{a}]\hat{\rho}, \quad (29) $$

$$ \hat{H} = \hat{H}_{\text{PCO}} + ig(\hat{a}_s^\dagger \hat{a} - \hat{a}_s \hat{a}^\dagger). \quad (30) $$

The density matrices of the system are obtained at time $t = T = \sqrt{\pi}/(g\beta\sqrt{2})$. After this time, the PCO is rotated around the X axis by $\phi$, which is taken to be $\pi/2$ (Appendix J). After the projective measurement of the PCO states, the reduced density matrix for the storage oscillator is obtained $\hat{\rho}_{s,\pm}$, from which the Holevo variance is evaluated along the $\hat{q}$ and $\hat{p}$ quadratures:

$$ V'_q = p_+ V_q(\hat{\rho}_{s,+}) + p_- V_q(\hat{\rho}_{s,-}), \quad (31) $$

$$ V'_p = p_+ V_p(\hat{\rho}_{s,+}) + p_- V_p(\hat{\rho}_{s,-}). \quad (32) $$

A successful round of phase estimation for $\hat{S}_p$ (or $\hat{S}_q$) decreases the variance $V'_p$ (or $V'_q$). Figure 8 shows the percent change in the variances, $100 \times (V'_{q,p} - V_{q,p})/V_{q,p}^0$, for different sizes of the PCO cat state $\beta$ for $g = 0.02K$ and $\kappa = 0$. For comparison, we also simulate one round of ideal APE using a lossless two-level ancilla and estimate the resulting variances $V'_{q,p}$ (see Appendix L). The figure also shows the percent change in the variance, $100 \times (V'_{q,p} - V_{q,p})/V_{q,p}^0$ (dashed line). Since $g$ is small, the dynamics of the PCO is confined within $C$. For large $\beta$, as expected, phase estimation with PCO becomes increasingly accurate, and the decrease in the Holevo variance is the same as with the ideal case. However, for small $\beta$, nonideality due to the last term in Eq. (25) are introduced, and the magnitude of the decrease in variance becomes smaller.

Let us now consider the effect of the photon-loss channel of the PCO. If the PCO undergoes a bit flip during a round of phase estimation, the measurement outcome and, hence, the estimate for u and v is incorrect. This situation is
<figure><img src="image_10.png" /></figure>

FIG. 8. Percent change in the Holevo phase variances $V'_{q,p}(T)$ for different sizes of the PCO cat state $\beta$ and fixed $g = 0.02K$ for one round of phase estimation of $\hat{S}_p$. The Kerr nonlinearity of the PCO is fixed, and the two-photon drive strength is varied as $P = K\beta^2$ so that the cat states with amplitude $\beta$ are stabilized. The solid lines show the change in variance in the $\hat{p}$ (red) and $\hat{q}$ (blue) quadratures. The dashed lines are the corresponding variances when phase estimation is carried out with an ideal two-level system. Since $\hat{S}_p$ is being measured, the variance $V'_p$ decreases (that is, $V'_p - V_p^0 < 0$), while the variance $V'_q$ remains unchanged (that is, $V'_q - V_q^0 = 0$). As expected, for large $\beta$, the solid and dotted lines converge, and the APE protocol with the PCO becomes ideal.

equivalent to the introduction of small displacement errors in the GKP state which can be corrected by the repeated application of APE. More importantly, such errors do not increase the uncertainty in the phase variance. This fact can

be confirmed by numerically solving the master equation in Eq. (30) and evaluating the phase variance of the reduced density matrix of the storage oscillator at time $T$, $V_{q,p}^m$ (see Appendix K). The variance calculated in this way corresponds to the situation when the measurement results after the APE are discarded. If the observer (and environment) does not gain information about the system, the variance $V_{q,p}^m$ should not change. Indeed, we find that, as long as $\beta$ is moderately large (e.g., $\beta = 2$), then even for a large $\kappa$ (e.g., $\kappa T = 1$), $V_{q,p}^m - V_{q,p}^0$ is negligible (e.g., $< 10^{-5}$). This result shows that the interaction between the storage and PCO does not make the phase variance worse, which is the hallmark of fault tolerance. Contrast this case with the case when the phase estimation is carried out with a two-level system with relaxation noise rate $\gamma$ in time $T_{\text{ideal}}$ (Appendix L). We find that, for $\gamma T_{\text{ideal}} = 1$, $V_p^{m,\text{ideal}} - V_p^0$ is negligible but $V_q^{m,\text{ideal}} - V_q^0 = +9.82$. The increase in the variance of the $\hat{q}$ quadrature signifies that relaxation actually makes the phase variance (and, hence, the GKP state) worse. Clearly, unlike the PCO's error channel, the storage is not transparent to the relaxation error of the two-level system.

## VII. READING OUT THE ANCILLA CAT

Once the error syndrome is mapped to the PCO, its state $|C_\beta^\pm\rangle$ must be determined. Although the readout of the PCO must be fast (so as to be able to repeat the protocol many times), it does not have to be QND; that is, the readout can introduce phase flips (or other errors) in the cat ancilla, which is because the PCO-codeword interaction can be turned off while the PCO is being probed so that the ancilla errors do not propagate to the encoded system. Direct single-shot readout of cat states $|C_\beta^\pm\rangle$ is possible with another qubit. Such a high-fidelity ($> 99\%$) readout has been demonstrated in

<figure><img src="image_11.png" /></figure>

FIG. 9. The figure shows an overview of the ancilla cat's readout cycle. After mapping the error syndrome, the state in the PCO is either $|C_\beta^+\rangle$ or $|C_\beta^-\rangle$. These are first rotated around the X axis to the states ($|C_\beta^+\rangle \pm i|C_\beta^-\rangle)/\sqrt{2}$, respectively. The two-photon pump is then turned off, and free evolution under the Kerr nonlinearity rotates ($|C_\beta^+\rangle \pm i|C_\beta^-\rangle)/\sqrt{2}$ to $\sim |\pm\beta\rangle$, respectively. Following this rotation, the two-photon drive is turned on such that the cat subspace $C$ is again stabilized against rotations around the Y axis or Z axis. The next step is to switch on the single-photon exchange coupling between the PCO and a low-Q readout oscillator. This Q-switch operation displaces the readout oscillator conditioned on if the PCO is in a coherent state $|\beta\rangle$ or $|-\beta\rangle$. Finally, a homodyne detection of the field at the output of the readout reveals the state of the PCO, thereby extracting the error syndrome.
superconducting circuits using transmons [11,17]. Here, we discuss an alternate readout strategy which is outlined in Fig. 9 and is based on the measurement of the PCO along the X axis of the Bloch sphere and does not require additional nonlinearities in the system.

The states along the X axis are (approximately) coherent states and can be measured easily using standard homodyne detection of the field at the output of the PCO. However, the PCO is a (moderately) high-Q mode, and so a direct homodyne measure is slow. To overcome this limitation, we propose to Q switch the PCO via frequency conversion into a low-Q readout oscillator [45–47]. Because of the Q switch, the low-Q readout oscillator is displaced conditioned on the state of the PCO along the X axis. Therefore, a fast homodyne readout of the low-Q oscillator reveals the state of the PCO and thereby the error syndrome. In the following, we describe the process of rotation of cats from $|C_{\beta}^{\pm}\rangle$ to $|\pm\beta\rangle$ and the conditional displacement of the readout oscillator.

### A. Rotating the PCO cat states to coherent states

To rotate the pumped cat $|C_{\beta}^{\pm}\rangle$, first a single-photon drive is applied so that its Hamiltonian is $\hat{H} = \mathcal{E}(\hat{a}^{\dagger} + \hat{a}) - K\hat{a}^{\dagger 2}\hat{a}^2 + P(\hat{a}^{\dagger 2} + \hat{a}^2)$. The single-photon drive rotates the pumped cat around the X axis in time $T = \pi/8\mathcal{E}\beta$ from $|C_{\beta}^{\pm}\rangle$ to $(|C_{\beta}^{+}\rangle \pm i|C_{\beta}^{-}\rangle)/\sqrt{2}$ (which is a parityless cat), respectively (see second panel in Fig. 9) [10, 27, 48]. The state after time $T = \pi/8\mathcal{E}\beta$ is aligned along the $\pm Y$ axis of the Bloch sphere. A rotation around the Z axis would then align the states along the $\pm X$ axis, which is, however, directly in contradiction with the fact that any natural interaction of the PCO allows only rotations around the X axis. Therefore, to achieve such an operation, the two-photon pump is turned off and the states are allowed to evolve freely under the Kerr-nonlinear Hamiltonian $-K\hat{a}^{\dagger 2}\hat{a}^2 - K\hat{a}^{\dagger}\hat{a}$ for a time $T = \pi/2K$ (the last term is added just for a phase reference). During this evolution, the state $(|C_{\beta}^{+}\rangle \pm i|C_{\beta}^{-}\rangle)/\sqrt{2}$ rotates to the (near) coherent state $(|C_{\beta}^{+}\rangle \mp |C_{\beta}^{-}\rangle)/\sqrt{2} = |\mp\beta\rangle$ (see third panel in Fig. 9) [10, 49, 50]. Next, the two-photon pump is reapplied so that the cat subspace $C$ is again stabilized against phase flips. As a result, the PCO remains in the coherent states $|\pm\beta\rangle$ for a long time. Note that if there is a single-photon loss during the rotation around the X axis, then $|C_{\beta}^{\pm}\rangle$ can erroneously rotate to $(|C_{\beta}^{+}\rangle \mp i|C_{\beta}^{-}\rangle)/\sqrt{2}$, respectively. On the other hand, while the two-photon drive is turned off, the single-photon loss can induce phase errors (Appendix M). However, these errors lead only to a readout error and can be overcome by a majority vote.

### B. Q switching

After the rotation described above, the state of the PCO lies along the $+X$ or $-X$ axis of the Bloch sphere (i.e., in the

$C$ manifold). The PCO is coupled to an off-resonant low-Q readout resonator (RR). In the absence of any external drives, the coupling between the two is negligible because of their large detuning. A single-photon exchange coupling (or a beam-splitter coupling) can be turned on by the application of external drive(s) to compensate for the frequency difference between the PCO and the RR. A three- (or four-) wave mixing between the drive(s), the PCO, and the RR results in a resonant single-photon exchange between the latter two. Such a controllable coupling has been implemented experimentally and is referred to as the Q switch [45–47]. Once the Q switch is turned on, the single-photon exchange coupling between the PCO and the readout oscillator in the rotating frame is given by the Hamiltonian $\hat{H}_Q = g(\hat{a}^{\dagger}\hat{a}_r + \hat{a}\hat{a}_r^{\dagger})$. For small $g$, this interaction can be rewritten as

$$ \hat{H}_Q = g\beta \left( \frac{p+p^{-1}}{2} \right) (\hat{a}_r + \hat{a}_r^{\dagger}) \hat{\sigma}_x - ig\beta \left( \frac{p-p^{-1}}{2} \right) (\hat{a}_r - \hat{a}_r^{\dagger}) \hat{\sigma}_y. \quad (33) $$

Ignoring the term $\propto \hat{\sigma}_y$, which becomes negligibly small even for moderately large $\beta$, the result of the Q switch is to displace the readout oscillator conditioned on the state $(|C_{\alpha}^{+}\rangle \pm |C_{\alpha}^{-}\rangle)/\sqrt{2}$ of the PCO:

$$ \langle \hat{a}_r \rangle = \mp \frac{2g\beta}{\kappa_r} (1 - e^{-\kappa_r t/2}). \quad (34) $$

In the above expression, $\langle \hat{a}_r \rangle$ is the amplitude of the RR's field, and $\kappa_r$ is its linewidth. As a result, a homodyne detection of the readout oscillator measures the PCO in the X basis and, hence, extracts the error syndrome. At a steady state, $\langle \hat{a}_r \rangle = \langle \hat{a}_r \rangle_{\text{max}} = 2ig\beta/\kappa_r$ and the measurement rate of the homodyne signal from the readout oscillator is $R_{\text{ideal}} = 2\kappa_r|\langle \hat{a}_r \rangle_{\text{max}}|^2 = 8g^2\beta^2/\kappa_r$. At the same time, for the PCO dynamics to be confined in $C$, we require $g\langle \hat{a}_r \rangle_{\text{max}} \ll 4K\beta^2$, which implies $(g^2/\kappa_r) \ll 2K\beta$. Therefore, the measurement rate is limited by the energy gap between $C$ and $C_{\perp}$. Furthermore, as $\text{Im}[\langle \hat{a}_r \rangle]$ increases, the second term in Eq. (33) can cause rotations around the Y axis of the Bloch sphere, thereby reducing $\hat{\sigma}_x$ and the homodyne signal. However, the rate of these rotations $g\beta(p-p^{-1})\text{Im}[\langle \hat{a}_r \rangle]/2$ is exponentially suppressed compared to the measurement rate even for moderately large $\beta$ (see Appendix N for numerical simulations of the Q-switch operation).

## VIII. DISCUSSION

We introduce a protocol to fault-tolerantly measure error syndromes, which is applicable for a variety of quantum error-correcting codes such as qubit-based toric codes and various bosonic codes. The underlying principle of
achieving fault tolerance is to use a single ancilla with a strongly asymmetric error channel. Preserving noise bias while being coupled to the relevant degrees of freedom of the encoded system is a demanding task. Even elementary operations, such as readout along the relevant axis, can become challenging. However, we show that the parametrically driven nonlinear oscillator is an excellent device to resolve the apparent incompatibility between noise bias and efficient control. A natural question which arises now is if a qubit with a strongly biased noise channel can be used as a data qubit in a code instead of an ancilla for syndrome extraction. Unfortunately, even if the channel on an idle qubit is biased, implementing a gate operation which does not commute with the dominant noise leads to a complete depolarization of the channel [51–53]. In contrast, our proposal to use these qubits as ancillas relies on implementing just one kind of gate which commutes with the dominant noise. Using biased noise qubits to encode quantum information and perform universal operations requires new tools to be developed and will be a topic of future work [38].

Another possible realization of a cat qubit with a strongly biased noise channel is based on engineering two-photon dissipation in a parametrically pumped oscillator. The cat states are the steady states of this system, and, just like the PCO, small couplings with the environment lead only to bit flips. The two-photon dissipation is realized by coupling the cat oscillator to another dissipative nonlinear element and applying drives at appropriate frequencies [10,48,54]. Such a system has been implemented in superconducting circuits; however, a strong noise bias has not yet been observed [48]. It may also be realizable in trapped ion systems. For instance, engineered two-phonon dissipation and drive can be implemented in a motional mode of an ion interacting with a laser in a standing wave configuration [55]. To achieve a strong noise bias, any nonlinearity in the oscillator and environmental couplings must be much smaller than the Liouvillian gap, which depends on the strength of the engineered dissipation. However, in the realization described above, the cross-Kerr interaction between the dissipative cat and the nonlinear element is larger than the Liouvillian gap. In the superconducting implementation [48], heating in the nonlinear coupling element causes a large backaction on the dissipative cats which leads to phase flips, thereby making the noise channel unbiased. However, this limitation is not fundamental and might be overcome with alternate realizations. In contrast, the PCO is in itself nonlinear and does not require an external nonlinear element for its implementation. Therefore, its cross-Kerr interaction with spurious modes in the system can be suppressed below the energy gap $\omega_{gap}$, and the possibility of achieving a strong noise bias in this system is realistic.

The possible implementation of PCO is especially promising in superconducting circuits. For example, the Josephson parametric amplifier, which is a widely used tool

in superconducting circuits, realizes the Hamiltonian in Eq. (5) [27,56]. The PCO can also be implemented with a single junction or transmon embedded in a 3D oscillator (in fact, the PCO is essentially a slightly anharmonic transmon). The nonlinearity of the junction or transmon gives rise to the fourth-order Kerr nonlinearity. The two-photon drive can be realized by four-wave mixing with two microwave drives, one of which is red detuned $\omega_{PCO} - \delta$, while the other is blue detuned from the $\omega_{PCO} + \delta$. Both a Kerr constant of approximately 1–10 MHz and pump strengths of approximately 20–50 MHz are in range of current experimental systems. Hence, $\beta \sim 2–4$ is quite realistic. The couplings required for syndrome extraction can be realized in a controllable manner via the four-wave mixing capability of the Kerr nonlinearity. For example, based on current experiments [33,45], couplings (in Sec. VI) as large as 2 MHz could be implemented. It is important to note that the Josephson junction has a cosine potential and the Kerr term emerges from expanding the cosine to the fourth order. If $\beta$ is not too large, these higher-order terms merely cause a small amount of leakage, and as we see the backaction remains exponentially suppressed. However, if $\beta$ is too large, the higher-order terms dominate over the Kerr nonlinearity, and the scheme here breaks down. It is well known that the maximum number of photons beyond which the fourth-order approximation breaks down depends on the ratio of the Josephson energy $E_J$ to charging energy $E_C$, and in experiments it is necessary to design the PCO with large $E_J/E_C$ [57]. Finally, for successfully decoding syndrome measurement errors, for example, by majority voting, the bit-flip rate should be low enough. Therefore, for a given $\beta$, the lifetime of the anharmonic superconducting oscillator should be sufficiently high. Inversely, for a given lifetime, $\beta$ should not be so large that the syndrome measurement errors cannot be corrected.

The remarkable property of the stabilization realized with the PCO is that it is fully controllable via the two-photon drive. Once the drive is turned off, the oscillator can evolve freely under the Kerr nonlinearity and rotate from cats to coherent states. This rotation allows for subsequent readout of the PCO (and therefore extraction of the error syndrome) via Q switching. In summary, our results offer a realistic, hardware-efficient way for fault-tolerant error syndrome extraction in QEC.

## ACKNOWLEDGMENTS

Research was sponsored by the National Science Foundation (NSF) and by the Army Research Office (ARO) and was accomplished under Grants No. NSF-DMR-1609326, No. W911NF-18-1-0212 (ARO), and No. W911NF-14-1-0011 (ARO). The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Office (ARO) or the U.S. Government. The U.S. Government is
authorized to reproduce and distribute reprints for government purposes notwithstanding any copyright notation herein. S. P. thanks Steven Touzard and Yaxing Zhang of Yale University and Pavithran Iyer and Anirudh Krishna of University of Sherbrooke for useful discussions.

## APPENDIX A: PHOTON ANNIHILATION AND CREATION OPERATORS IN THE CAT SUBSPACE

Since coherent states are eigenstates of the photon annihilation operator, it is trivial to see that $\hat{a}|C_{\beta}^{\pm}\rangle = \beta p^{\pm 1}|C_{\beta}^{\pm}\rangle$, where $p = N_{\beta}^{+}/N_{\beta}^{-}$. Therefore, in the $C$ subspace, $\hat{a}_{C} = p\beta|C_{\beta}^{-}\rangle\langle C_{\beta}^{+}| + p^{-1}\beta|C_{\beta}^{+}\rangle\langle C_{\beta}^{-}|$. Here, $\hat{a}_{C}$ is the projection of $\hat{a}$ in $C$. Coherent states are not eigenstates of the photon creation operator. In fact, $\hat{a}^{\dagger}|\beta\rangle = \beta|\beta\rangle + D(\beta)|1\rangle$ and $\hat{a}^{\dagger}|-\beta\rangle = -\beta|-\beta\rangle + D(-\beta)|1\rangle$, where $|1\rangle$ is the Fock state with one photon. In writing these expressions, we are assuming $\beta$ is real for convenience. The above equation implies that the action of $\hat{a}^{\dagger}$ on coherent states $|\pm\beta\rangle$ or cat states $|C_{\beta}^{\pm}\rangle$ can cause leakage out of the code space. However, if the energy gap is large, this leakage is suppressed. Therefore, the dynamics can be restricted to $C$, in which $\hat{a}_{C}^{\dagger} = p^{-1}\beta|C_{\beta}^{-}\rangle\langle C_{\beta}^{+}| + p\beta|C_{\beta}^{+}\rangle\langle C_{\beta}^{-}|$. Here, $\hat{a}_{C}^{\dagger}$ is the projection of $\hat{a}^{\dagger}$ in $C$. In other words, if the PCO is subject to a perturbation Hamiltonian which is expressed in terms of photon annihilation and creation operators, then, as long as the Hamiltonian strength is smaller than the gap, the annihilation and creation operators can be replaced with their associated projections in the cat subspace ($\hat{a}_{C}$, $\hat{a}_{C}^{\dagger}$).

## APPENDIX B: MASTER EQUATION WITH SINGLE-PHOTON LOSS

The major source of noise in an oscillator is single-photon loss, which arises from the single-photon exchange coupling with a bath $\hat{H}_{PCO,b} = \sum_{k} g_{k}(\hat{a}\hat{b}_{k}^{\dagger}e^{i(\omega_{k}-\omega_{PCO})t} + \hat{a}^{\dagger}\hat{b}_{k}e^{-i(\omega_{k}-\omega_{PCO})t})$. In this equation, $\hat{b}_{k}$ are the bath modes with frequency $\omega_{k}$, and $\omega_{PCO}$ is the frequency of the PCO. From the previous discussion, it is clear that if the coupling to the bath is smaller than the energy gap $\omega_{gap}$ between the $C$, $C_{\perp}$ subspaces and if there are no thermal excitations in the bath to compensate for this energy gap, then the dynamics of the PCO is confined to the $C$ subspace. In this restricted subspace, the coupling between the PCO and bath becomes

$$ \hat{H}_{\text{PCO},b} = \beta \sum_{k} g_{k} (p^{-1} |C_{\beta}^{+}\rangle\langle C_{\beta}^{-}| + p |C_{\beta}^{-}\rangle\langle C_{\beta}^{+}|) \hat{b}_{k}^{\dagger} e^{i(\omega_{k} - \omega_{\text{PCO}})t} \\ + \beta \sum_{k} g_{k} (p^{-1} |C_{\beta}^{-}\rangle\langle C_{\beta}^{+}| + p |C_{\beta}^{+}\rangle\langle C_{\beta}^{-}|) \hat{b}_{k} e^{-i(\omega_{k} - \omega_{\text{PCO}})t} \quad (B1) $$

The effective two-level master equation corresponding to the system-bath coupling described above can be derived as [58]

$$ \dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa_{C}\beta^{2}\mathcal{D}[p^{-1}|C_{\beta}^{+}\rangle\langle C_{\beta}^{-}| + p|C_{\beta}^{-}\rangle\langle C_{\beta}^{+}|]\hat{\rho} \quad (B2) $$

$$ = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa_C \beta^2 \mathcal{D} \left[ \frac{p + p^{-1}}{2} \hat{\sigma}_x + \frac{p^{-1} - p}{2} i \hat{\sigma}_y \right] \hat{\rho}, \quad (B3) $$

where $\mathcal{D}[\hat{O}]\hat{\rho} = \hat{O}\hat{\rho}\hat{O}^{\dagger} - \frac{1}{2}\hat{O}^{\dagger}\hat{O}\hat{\rho} - \frac{1}{2}\hat{\rho}\hat{O}^{\dagger}\hat{O}$. In deriving this master equation, we assume a flat-spectral density (Markov approximation) around $\omega_{PCO}$.

We now provide numerical evidence to justify the analysis above by comparing the dynamics using (i) the effective two-level master equation derived in Eq. (B2), (ii) the standard bosonic master equation with $\dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa_{C}\mathcal{D}[\hat{a}]\hat{\rho}$, and (iii) the master equation of a PCO coupled with a finite-linewidth oscillator which emulates a general non-Markovian bath [59,60]. In case (iii), we assume that the PCO and the bath oscillator have the same frequency, so that the Hamiltonian of the system in the rotating-wave approximation is $\hat{H}_{\text{PCO,bc}} = \hat{H}_{\text{PCO}} + g(\hat{a}^{\dagger}\hat{a}_{bc} + \hat{a}\hat{a}_{bc}^{\dagger})$. The linewidth of the bath oscillator is $\kappa_{bc}$, and the system evolves according to the master equation $\dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO,bc}}, \hat{\rho}] + \kappa_{bc}\mathcal{D}[\hat{a}_{bc}]\hat{\rho}$. To emulate the bath, we limit ourselves to the weak coupling regime $g \ll \kappa_{bc}$, $4K|\beta|^{2}$. In this limit, the master equation for the PCO, obtained by adiabatically eliminating the bath oscillator, is of the form given in Eq. (B2) with $\kappa'_{C} = 4g^{2}/\kappa_{bc}$. Figure 10 shows numerical estimates for the probability of a bit-flip $\langle C_{\beta}^{-}|\hat{p}_{\text{PCO}}|C_{\beta}^{-}\rangle$ and phase-flip $\langle -|\hat{p}_{\text{PCO}}|-\rangle$ error when the PCO is initialized in the cat state $|C_{\beta}^{+}\rangle$ or the superposition state $|+\rangle$, respectively [here, $|\pm\rangle = (|C_{\beta}^{+}\rangle \pm |C_{\beta}^{-}\rangle)]/\sqrt{2}$, and $\hat{p}_{\text{PCO}}$ is the reduced density matrix of the PCO]. The magnitude of $\kappa_{C}$ is the same in (i) and (ii), while the parameters $g = 0.05K$ and $\kappa_{bc} = 2K$ in (iii) are chosen so that $\kappa'_{C} = \kappa_{C}$.

The three different cases (i), (ii), and (iii) are depicted as solid lines, dots, and triangles, respectively. The value of $\beta$ is increased from $\beta = 1$ in Fig. 10(a) to $\beta = \sqrt{2}$ in Fig. 10(b) and $\beta = 2$ in Fig. 10(c). As expected, since $4K\beta^{2}$ is large, all three cases give the same probability of bit- and phase-flip errors. The probability of a bit-flip error increases with $\beta$, whereas that of a phase-flip error decreases with $\beta$. For example, the probability of a phase-flip error at $t = 2/\kappa_{C}$ decreases from 0.018 in Fig. 10(a) to 0.0067 and $5 \times 10^{-7}$ in Figs. 10(b) and 10(c), respectively. Therefore, the numerical simulations confirm that the probability of a phase-flip error decreases exponentially with $\beta$.
<figure><img src="image_12.png" /><figcaption>FIG. 10. Comparison of dissipation predicted by (i) the effective two-level master equation (solid line), (ii) the common bosonic master equation (dots), and (iii) the master equation of a PCO coupled with a finite-linewidth oscillator to emulate a general non-Markovian bath (triangles). In all the cases, K is fixed and P is varied so that $\beta = 1$, $\beta = \sqrt{2}$, and $\beta = 2$ in (a), (b), and (c), respectively. For the dots, $\kappa_c = K/100$, and for the triangles, $g = 0.05K$ and $\kappa_{bc} = 2K$. The parameters are chosen such that $\kappa'_c = \kappa_c$. The probability of a bit-flip error is estimated by initializing the PCO to the state $|C_\beta^+\rangle$ and estimating $\langle C_\beta^-|\hat{\rho}_{\text{PCO}}|C_\beta^-\rangle$. The probability of a phase-flip error is estimated by initializing the PCO to the state $|+\rangle$ and estimating $\langle -|\hat{\rho}_{\text{PCO}}|-\rangle$. For clarity, (d), (e), and (f) show the logarithm of the phase error $\log[\langle-|\hat{\rho}_{\text{PCO}}|-\rangle]$ corresponding to (a), (b), and (c), respectively.</figcaption></figure>

## APPENDIX C: MASTER EQUATION WITH SINGLE-PHOTON GAIN

From the discussion in the previous section, it is clear that, while thermal photons at $\omega_{\text{PCO}}$ can cause only transitions within $C$, those at frequencies $\sim \omega_{\text{PCO}} - \omega_{\text{gap}}$

can cause excitations out of $C$. In other words, the two-level approximation is strictly valid when the thermal noise-spectral density is colored or non-Markovian such that thermal photons at $\omega_{\text{PCO}} - \omega_{\text{gap}}$ are negligible. In this case, the effective two-level master equation becomes

$$ \begin{aligned} \dot{\hat{\rho}} = & -i[\hat{H}_{\text{PCO}}, \hat{\rho}] \\ & + \kappa_c(\omega_{\text{PCO}})[1 + n_{\text{th}}(\omega_{\text{PCO}})]\beta^2 \mathcal{D}[p|C_{\beta}^{+}\rangle\langle C_{\beta}^{-}| + p^{-1}|C_{\beta}^{-}\rangle\langle C_{\beta}^{+}|]\hat{\rho} \\ & + \kappa_c(\omega_{\text{PCO}})n_{\text{th}}(\omega_{\text{PCO}})\beta^2 \mathcal{D}[p|C_{\beta}^{-}\rangle\langle C_{\beta}^{+}| + p^{-1}|C_{\beta}^{+}\rangle\langle C_{\beta}^{-}|]\hat{\rho}. \end{aligned} \quad (C1) $$

The above equation is derived under the assumption that the spectral density of the environment is smooth or flat around $\omega_{\text{PCO}}$ but falls off at $\omega_{\text{PCO}} - \omega_{\text{gap}}$. This analysis can be numerically confirmed by emulating such a bath with a finite-linewidth oscillator which is coupled to the PCO. To ensure that the thermal photons in the bath do not excite the $C_\perp$ subspace of the PCO, the linewidth of the bath oscillator $\kappa_{bc}$ is chosen to be smaller than $\omega_{\text{gap}}$. The dynamics of such a system is described by the master equation

$$ \dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO,bc}}, \hat{\rho}] + \kappa_{\text{bc}}(1 + n_{\text{bc}})\mathcal{D}[\hat{a}_{\text{bc}}]\hat{\rho} + \kappa_{\text{bc}}n_{\text{bc}}\mathcal{D}[\hat{a}_{\text{bc}}]\hat{\rho}, \quad (C2) $$

with $\hat{H}_{\text{PCO,bc}} = \hat{H}_{\text{PCO}} + g(\hat{a}^\dagger\hat{a}_{\text{bc}} + \hat{a}\hat{a}_{\text{bc}}^\dagger)$. When $g \ll \kappa_{\text{bc}} < \omega_{\text{gap}}$, the oscillator emulates a non-Markovian bath. In other words, adiabatic elimination of the bath oscillator gives Eq. (C1) with $\kappa'_c(\omega_{\text{PCO}}) = 4g^2/\kappa_{\text{bc}}$. Figure 11 compares the dynamics given by Eqs. (C1) and (C2) with $n_{\text{th}}(\omega_{\text{PCO}}) = n_{\text{bc}}$ and $\kappa_c(\omega_{\text{PCO}}) = \kappa'_c(\omega_{\text{PCO}}) = 4g^2/\kappa_{\text{bc}}$. The numerical estimates for the probability of a bit-flip $\langle C_\beta^-|\hat{\rho}_{\text{PCO}}|C_\beta^-\rangle$ and phase-flip $\langle -|\hat{\rho}_{\text{PCO}}|-\rangle$ error when the PCO is initialized in the cat state $|C_\beta^+\rangle$ or the superposition state $|+\rangle$, respectively, are shown. The bath oscillator is initialized to a thermal state with $n_{\text{bc}} = 0.1$. The coupling $g = 0.05K$ and $P = K$ ($\beta = 1$), while $\kappa_{\text{bc}} = 2 \times (4K\beta^2)$ in Fig. 11(a) and $\kappa_{\text{bc}} = 0.5 \times (4K\beta^2)$ in Fig. 11(b). As expected, the dynamics
<figure><img src="image_13.png" /><figcaption>FIG. 11. Comparison of dissipation predicted by (i) the effective two-level master equation in Eq. (C1) (solid line) and (ii) the master equation of a PCO coupled with a finite-linewidth oscillator given by Eq. (C2) with $n_{th} = 0.1$ (triangles). In both the cases, $P = K$ so that $\beta = 1$ and in (ii) $g = 0.05K$. The linewidth $\kappa_{bc}$ of the oscillator is $\kappa = 0.5 \times (4K\beta^2)$ in (a) and $\kappa = 2.0 \times (4K\beta^2)$ in (b). Note that $\kappa_C(\omega_c) = 4g^2/\kappa_{bc}$, so that $\kappa_C(\omega_c) = 0.005K$ in (a) and $\kappa_C(\omega_c) = 0.00125K$ in (b). The probability of a bit-flip error is estimated by initializing the PCO to the state $|C_{\beta}^{+}\rangle$ and estimating $\langle C_{\beta} | \hat{\rho}_{PCO} | C_{\beta}^{-} \rangle$. The probability of a phase-flip error is estimated by initializing the PCO to the state $|+\rangle$ and estimating $\langle - | \hat{\rho}_{PCO} | - \rangle$. For clarity, (c) and (d) show the logarithm of the phase error $\log[\langle - | \hat{\rho}_{PCO} | - \rangle]$ corresponding to (a) and (b), respectively.</figcaption></figure>

described by Eqs. (C1) and (C2) agree well (the solid lines and triangles overlap) for small $\kappa_{bc}$ [Fig. 11(b)], because the probability of excitations in the $C$ subspace is small. However, as $\kappa_{bc}$ increases [Fig. 11(a)], the excitations in $C_{\perp}$ become significant, and the effective two-level ME in Eq. (C1) is no longer accurate. Note that the timescale for stabilizer measurement using the PCO is typically in the range of $T = 1/K - 10/K$. Therefore, the relevant timescale for the plots in Figs. 11(a) and 11(b) are $\kappa_C T = 0.001 - 0.05$.

It is quite possible that spurious thermal excitations exist at the gap frequency or sudden nonperturbative effects cause excitations into the $C_{\perp}$ subspace. These excitations, although rare, can impede the fault tolerance of syndrome measurements. However, as we show in the next section, two-photon loss events bring the system back to $C$, thereby autonomously maintaining fault tolerance.

## APPENDIX D: MASTER EQUATION WITH PURE DEPHASING

In addition to the single-photon loss, gain, and two-photon loss, it is possible that the frequency of the PCO fluctuates because of couplings with the environment which could be of the form $\hat{H}_{PCO,b} = \sum g_{\phi,k} \hat{a}^{\dagger} \hat{a} \hat{b}_{k}^{\dagger} \hat{b}_{k}$.

In this expression, $\hat{b}_k$ are the bath modes. Following the discussions above, we find that if $g_{\phi,k} \beta$ is smaller than $\omega_{gap}$, then the master equation for this pure dephasing channel can be derived as

$$ \dot{\hat{\rho}} = -i[\hat{H}_{PCO}, \hat{\rho}] + \kappa_{\phi,c} \beta^4 \mathcal{D} \left[ \left( \frac{p^2 + p^{-2}}{2} \right) \hat{\bar{I}} - \left( \frac{p^{-2} - p^2}{2} \right) \hat{\bar{\sigma}}_z \right] \hat{\rho}. \quad (D1) $$

Note that $\hat{a}^{\dagger} \hat{a} | \pm \beta \rangle = \beta^2 | \pm \beta \rangle \pm \beta D(\pm \beta) | 1 \rangle$, so that the probability to go out of the $C$ subspace is $(g_{\phi,k} \beta / \omega_{gap})^2$. Therefore, for this probability to be small, $g_{\phi,k} \beta \ll \omega_{gap}$. Moreover, for $\beta \to 0$, the probability to go out of the cat subspace $C$ vanishes. This result is expected, because $\beta = 0$ corresponds to the case when the cat states reduce to the Fock states $|n=0\rangle$ and $|n=1\rangle$. In this case, dephasing does not take the system out of $C$, because Fock states are eigenstates of $\hat{a}^{\dagger} \hat{a}$.

We justify the above master equation by comparing the dynamics using (i) the effective two-level master equation derived in Eq. (D1) and (ii) the master equation of a PCO coupled with an oscillator which emulates a general non-Markovian bath, with the Hamiltonian $\hat{H}_{PCO,bc} = \hat{H}_{PCO} + g \hat{a}^{\dagger} \hat{a} (\hat{a}_{bc}^{\dagger} \hat{a}_{bc} - \langle \hat{a}_{bc}^{\dagger} \hat{a}_{bc} \rangle)$. Because of such an interaction, photon-number fluctuations in the bath oscillator cause fluctuations in the frequency of the PCO or, in other words, pure dephasing. To emulate this effect, we evolve the system according to the master equation

$$ \dot{\hat{\rho}} = -i[\hat{H}_{PCO,bc}, \hat{\rho}] + \kappa_{bc}(1 + n_{th})\mathcal{D}[\hat{a}_{bc}]\hat{\rho} + \kappa_{bc}n_{th}\mathcal{D}[\hat{a}_{bc}^{\dagger}]\hat{\rho}. \quad (D2) $$

The fluctuation in the number of photons in the bath oscillator becomes $n_{th} + n_{th}^2$. We limit the dynamics to the weak coupling limit $g \ll \kappa_{bc}$ (so that the bath oscillator indeed acts as a reservoir) and $g \ll 4K|\beta|^2$ so that the two-level approximation is valid. In this limit, we expect the master equation for the PCO, obtained by adiabatically eliminating the bath oscillator, to be of the form given in Eq. (D1) with

$$ \kappa'_{\phi,c} = 2g^2(n_{th} + n_{th}^2)/\kappa_{bc}. \quad (D3) $$

Figure 12 shows numerical estimates for the probability of a phase-flip $\langle - | \hat{\rho}_{PCO} | - \rangle$ error when the PCO is initialized in the superposition state $|+\rangle$ [here, $|\pm\rangle = (|C_{\beta}^{+}\rangle \pm |C_{\beta}^{-}\rangle)/\sqrt{2}$ and $\hat{\rho}_{PCO}$ is the reduced density matrix of the PCO]. In (ii), the parameters chosen are $g = 0.0025K$, $n_{th} = 1$, and $\kappa_{bc} = 0.05K$ so that $\kappa'_{C} = \kappa_{C} = 0.0005K$. The two different cases (i) and (ii) are depicted as solid lines and triangles, respectively. The value of $\beta$ is increased from $\beta = 0$ to $\beta = 1$ and $\beta = \sqrt{2}$. As expected, an increase in $\beta$ exponentially suppresses the phase-flip rate.
<figure><img src="image_14.png" /><figcaption>FIG. 12. Comparison of dephasing predicted by (i) the effective two-level master equation in Eq. (D1) (solid line) and (ii) the master equation of a PCO coupled with a finite-linewidth oscillator given by Eq. (D2) with $n_{th} = 1$ (triangles). In all the cases, K is fixed while P is varied so that $\beta$ changes from 0 to 1 and $\sqrt{2}$. The parameters are chosen as $g = 0.0025K$, $n_{th} = 1$, and $\kappa_{bc} = 0.05K$ so that $\kappa'_{\phi,C} = \kappa_{\phi,C} = 0.0005K$. The probability of a phase-flip error is estimated by initializing the PCO to the state $|+\rangle$ and estimating $\langle -|\hat{\rho}_{PCO}|-\rangle$. For example, the probability of phase-flip errors for $\beta = \sqrt{2}$ at $t = 1/\kappa_{\phi,C}$ is 0.0125. In practice, the stabilizer measurements typically take time $T = 1/K - 10/K$, and so the relevant timescales are $\kappa_{\phi,C}T = 0.0005 - 0.005 \ll 1$.</figcaption></figure>

## APPENDIX E: AUTONOMOUS CORRECTION OF OUT-OF-SUBSPACE EXCITATION WITH TWO-PHOTON DISSIPATION

This type of noise is present when photons are lost to the environment in pairs and is invariably introduced when two-photon driving is applied to the PCO [10,61,62]. The rate of two-photon loss is typically negligible, but it can engineered to be large by coupling the oscillator to a lossy mode and applying external drives at appropriate frequencies [10,48,54]. When the engineered two-photon dissipation is white (spectral density larger than the energy gap), then the master equation of the PCO is given by $\hat{\rho} = -i[\hat{H}_{PCO}, \hat{\rho}] + \kappa_{2ph}D[\hat{a}^2]$. Remarkably, the cat states are also the steady states in this case. Therefore, any state initialized within the cat subspace is preserved in the presence of two-photon dissipation. More importantly, as we show, the two-photon dissipation can bring spurious excitations in $C_{\perp}$ back into C while keeping the phase flips suppressed. This result can also be understood through quantum-Zeno dynamics [10,24,63–65] induced by the environment which constantly monitors the PCO with the two-photon process and projects it onto the C subspace.

The dissipative dynamics can be understood in the quantum-jump approach in which the oscillator undergoes a deterministic evolution governed by the non-Hermitian effective Hamiltonian $\hat{H} = \hat{H}_{PCO} - i\kappa_{2ph}\hat{a}^{\dagger}\hat{a}^2/2$ which is interrupted randomly by two-photon jump events. The cat states $|C_{\beta}^{\pm}\rangle$ are degenerate eigenstates of the non-Hermitian

Hamiltonian $\hat{H}|C_{\beta}^{\pm}\rangle = E|C_{\beta}^{\pm}\rangle$, where E is the complex energy $E = P^2/(K + i\kappa_{2ph}/2)$ and $\beta = \sqrt{P/(K + i\kappa_{2ph}/2)}$. Moreover, the cat states are also eigenstates of the two-photon jump operator $\hat{a}^2|C_{\beta}^{\pm}\rangle = \beta^2|C_{\beta}^{\pm}\rangle$. Therefore, the cat states $|C_{\beta}^{\pm}\rangle$ remain invariant to two-photon dissipation. Previously, we have defined the cat qubit with coherent state amplitude $\beta$, which is real. Therefore, as the two-photon dissipation is turned on, the phase and amplitude of the parametric drive must be changed nonadiabatically to $\phi = \tan^{-1}(\kappa_{2ph}/2K)$ and $P = \beta^2\sqrt{K^2 + \kappa_{2ph}^2/4}$. This change ensures that the cat-qubit states before and after the two-photon dissipation is turned on remain the same.

Now suppose there is an excitation out of C due to, for example, a photon-gain event. The cat states transform as $\hat{a}^{\dagger}|C_{\beta}^{\pm}\rangle = \beta|C_{\beta}^{\pm}\rangle + |\psi_{e,1}^{\pm}\rangle$. Now suppose a two-photon loss event occurs after a photon-gain event, in which case the states transform as $\hat{a}^2\hat{a}^{\dagger}|C_{\beta}^{\pm}\rangle = (\hat{a}^{\dagger}\hat{a}^2 + 2\hat{a})|C_{\beta}^{\pm}\rangle = (\beta^3 + 2\beta)|C_{\beta}^{\pm}\rangle + \beta^2|\psi_{e,1}^{\pm}\rangle$. In this case, the fraction of excitations in $C_{\perp}$ is $1/(\beta^2 + 2/\beta^2) < 1/\beta$, and we find that the two-photon loss event has decreased the out-of-subspace excitations. The two-photon loss channel, therefore, is actually desirable, because it autonomously corrects for out-of-subspace excitations in the PCO (of course, only as long as the rate of two-photon excitations is smaller than the gap between C and $C_{\perp}$). To confirm this correction, we simulate the dynamics in Eq. (C2) with an additional two-photon dissipation $\kappa_{2ph}D[\hat{a}^2]\hat{\rho}$, with $g = 0.05K$, $P = K$ ($\beta = 1$), $\kappa_{bc} = 8K$, and $n_{th} = 0.1$. Figure 13 shows the

<figure><img src="image_15.png" /><figcaption>FIG. 13. Probability of excitations out of C subspace, given by $1 - \langle C_{\beta}^{+}|\hat{\rho}|C_{\beta}^{+}\rangle - \langle C_{\beta}^{-}|\hat{\rho}|C_{\beta}^{-}\rangle$, obtained by simulating Eq. (C2) with $g = 0.05K$, $P = K$ ($\beta = 1$), $\kappa_{bc} = 8K$, $n_{th} = 0.1$, and an additional two-photon dissipation (rate $\kappa_{2ph}$). The blue lines and blue dots correspond to when the PCO is initialized in the cat state $|C_{\beta}^{+}\rangle$ with $\kappa_{2ph} = 0$ and $\kappa_{2ph} = 0.05K$, respectively. The red lines and red dots correspond to when the PCO is initialized in the superposition state $|+\rangle$ with $\kappa_{2ph} = 0$ and $\kappa_{2ph} = 0.05K$, respectively. In practice, the stabilizer measurements typically take time $T = 1/K - 10/K$, and so timescales such that $\kappa_{C}T = 0.005 - 0.05$ are relevant.</figcaption></figure>
probability of excitations in $C_⊥$ for $κ_{2ph} = 0$ (solid line) and $κ_{2ph} = 0.05K$ (dotted line), when the PCO is initialized in the cat state $|C_β^+⟩$ (blue) or the superposition state $|+⟩$ (red). As expected, the out-of-subspace excitations decrease with an increase in $κ_{2ph}$. Because of finite $κ_{2ph}/ω_{gap}$, the two-photon coupling with the environment can itself cause excitations out of $C$. Therefore, the autonomous correction of out-of-subspace excitation with two-photon dissipation is not perfect (red and blue dots saturate to approximately $3 \times 10^{-4}$ in Fig. 13). Note that a single-photon loss after a single-photon gain event also decreases the excitations in $C_⊥$, but it also introduces bit flips which, although they can be overcome by a majority vote, is less desirable.

## APPENDIX F: WHITE THERMAL NOISE AND PURE DEPHASING

In this section, we examine in more detail the dynamics of the PCO when the noise spectral density of its thermal and pure-dephasing environments is completely white (equivalently, very broad compared to the energy gap $ω_{gap}$). In particular, the aim is to understand the dynamics responsible for the backaction described in Secs. IV and V. The master equations in these two cases are

$$ \dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa(1 + n_{\text{th}})\mathcal{D}[\hat{a}] + \kappa n_{\text{th}}\mathcal{D}[\hat{a}^{\dagger}] \quad (\text{F1}) $$

and

$$ \dot{\hat{\rho}} = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \kappa_{\phi} \mathcal{D}[\hat{a}^{\dagger} \hat{a}]. \quad (\text{F2}) $$

The results in this section are best described in the $|±⟩$ eigenbasis of the PCO where $|±⟩ = (|C_β^+⟩ ± |C_β^-⟩)/\sqrt{2}$ and in the large $β$ limit. In this limit, $|±⟩ \sim D(±β)|0⟩$. As described using the quantum-jump approach in Secs. IV and V, the effect of the photon gain and pure dephasing events is to cause out-of-cat-subspace excitations at rate $\sim κn_{th}$ and $\sim κ_φβ^2$, respectively. $n$ jumps due to $\hat{a}^†$ or $\hat{a}^†\hat{a}$ cause excitation from $|±⟩$ to the displaced Fock state $D(±β)|n⟩$. Recall that if $n$ is not too large ($n \lesssim β^2$), the displaced Fock states $D(±β)|n⟩$ are also the eigenstates of the PCO with pair degeneracy. If the number of jumps is too large, however, the PCO transitions to highly excited states which can no longer be described as displaced Fock states [denoted by darker blue lines in Fig. 2(b)]. Also recall from Secs. IV and V that excitations to the states $D(±β)|n⟩$ which form a twofold degenerate subspace do not cause backaction during measurement. The important characteristic of the states $D(±β)|n⟩$ is that their $Q$ function is localized in the right and left half of the phase space. $Q(α) = ⟨α|\hat{ρ}|α⟩/π$ is the phase-space quasiprobability distribution function. On the other hand, highly excited PCO states [dark blue lines in Fig. 2(b)] are characterized with a $Q$ function which is delocalized over the entire phase space. Therefore, $Q_> = \int_{\text{Re}[α]>0} Q(α)(t)d^2α$ or $Q_< = \int_{\text{Re}[α]<0} Q(α)d^2α$ provides a qualitative estimate

of the backaction. Note that a single-photon loss event transfers the population from the $D(±β)|n⟩$ state to $D(±β)|n-1⟩$. Such events are possible during the evolution under Eq. (F1) (because of the term $\mathcal{D}[\hat{a}]$). In fact, the rate at which $D(±β)|n⟩$ is deexcited to $D(±β)|n-1⟩$ due to single-photon loss is $κ(1 + n_{th})$, while the rate at which $D(±β)|n⟩$ is excited to $D(±β)|n+1⟩$ due to photon gain is $κn_{th}$. As a result, if $n_{th} \ll 1$, $κ(1 + n_{th}) \gg κn_{th}$ and the transitions to highly excited states are autonomously suppressed. Such autonomous correction is not possible in Eq. (F2) because of the absence of dissipative terms like $\mathcal{D}[\hat{a}]$ or $\mathcal{D}[\hat{a}^2]$.

We now provide the results of numerical simulations to show the dependence of $Q_>,$< or, equivalently, the backaction on the size of the PCO cat $β$. Equation (F1) is simulated with the PCO state initialized to $|+⟩$ and $|-⟩$. The density matrix is obtained as a function of time, using which $[Q_<]|_+⟩$ and $[Q_>]|_−⟩$ are estimated. Here, $[Q_>]|_±⟩$ indicates the result when the PCO is initialized to the states $|+⟩$ and $|-⟩$, respectively. Figure 14(a) shows $Q_{error} = ([Q_<]|_+⟩ + [Q_>]|_−⟩)/2$ for $κ = K/200$, $n_{th} = 0.1$, $P = 4K$, $9K$, and $16K$ (i.e., $β = 2, 3$, and $4$, respectively). As expected, $Q_{error}$ and, hence, the backaction increase with time; however, the rate of increase is exponentially suppressed as $β$ increases.

This calculation is repeated for the pure-dephasing master equation, Eq. (F2) for $κ_φ = K/1000$. As shown by Fig. 14(b), $Q_{error}$ increases with time. For short times $Kt < 20$ or $κ_φt < 0.02$, $Q_{error}$ is suppressed as $β$ increases. However, at longer times, $Q_{error}$, in fact, starts to increase with $β$. This increase is because at short times fewer dephasing events occur and the excitations of the PCO excitations are confined to the eigenstates which are the displaced Fock states with $Q$ functions localized in the left or right half of the phase space. On the other hand, at longer times, several dephasing events are possible which excite the PCO to highly excited states with completely delocalized $Q$ functions. However, as we know, photon losses like single or two-photon loss autonomously reduce the population in these highly excited states. To confirm this reduction in leakage numerically, we repeat the simulation by adding single-photon loss $κD[\hat{a}]$ and two-photon loss $κ_{2ph}D[\hat{a}^2]$ to Eq. (F2). Figures 14(c) and 14(d) show the resulting $Q_{error}$ with $κ = K/100$ and $κ_{2ph} = K/100$, respectively. Indeed, we find that $Q_{error}$ is suppressed with $β$ even for longer times. The autonomous correction with two-photon dissipation is more efficient than single-photon dissipation, because the rate at which $D(±β)|n⟩$ is deexcited to $D(±β)|n-1⟩$ due to the former is $κ_{2ph}β^2$ compared to $κ$ due to the latter.

We note that, for the simulations in Figs. 4 and 6, $κ_φt$ is small. That is, only a few dephasing events occur during the measurement process, and the excitations in the PCO remain confined to the pairwise degenerate $D(±β)|n⟩$
<figure><img src="image_16.png" /></figure>

FIG. 14. The figure shows $Q_{\text{error}} = (\|Q_{<}\|_{+}) + (\|Q_{<}\|_{-})/2$ for the master equation $\hat{\rho} = -i[\hat{H}_{\text{PCO}}, \hat{\rho}] + \mathcal{L}[\hat{\rho}]$ with (a) $\mathcal{L}[\hat{\rho}] = \kappa(1 + n_{\text{th}})\mathcal{D}[\hat{a}] + \kappa n_{\text{th}}\mathcal{D}[\hat{a}^{\dagger}]$, (b) $\mathcal{L}[\hat{\rho}] = \kappa_{\phi}\mathcal{D}[\hat{a}^{\dagger}\hat{a}]$, (c) $\mathcal{L}[\hat{\rho}] = \kappa_{\phi}\mathcal{D}[\hat{a}^{\dagger}\hat{a}] + \kappa\mathcal{D}[\hat{a}]$, and (d) $\mathcal{L}[\hat{\rho}] = \kappa_{\phi}\mathcal{D}[\hat{a}^{\dagger}\hat{a}] + \kappa_{2\text{ph}}\mathcal{D}[\hat{a}^{2}]$. In (a), single-photon gain and loss restrict the PCO excitations to the pairwise degenerate displaced Fock states $D(\pm\beta)|n\rangle$. The $Q$ function for these states is localized to the right and left half of the phase space, respectively. Therefore, $Q_{\text{error}}$ increases with time; however, the rate of increase is exponentially suppressed with $\beta$. In (b), pure dephasing restricts the PCO excitations to the pairwise degenerate displaced Fock states $D(\pm\beta)|n\rangle$ only for short times. For longer times, highly excited PCO states with delocalized $Q$ functions are excited. As a result, at short times, the rate of increase in $Q_{\text{error}}$ is suppressed with $\beta$. At longer times, this rate increases rapidly with $\beta$. The addition of extra photon dissipation in (c),(d) decreases the population in the excited states, and, therefore, $Q_{\text{error}}$ decreases with an increase in $\beta$ at all times.

states. In this case, we find from Fig. 14(b) that $Q_{\text{error}}$ is suppressed with an increase in $\beta$ (even without additional dissipation), and, therefore, the backaction shown in Figs. 4 and 6 is also exponentially suppressed.

## APPENDIX G: FOUR-QUBIT STABILIZER $\hat{\sigma}_{x,1}\hat{\sigma}_{x,2}\hat{\sigma}_{x,3}\hat{\sigma}_{x,4}$ IN TORIC CODES

The extension of Sec. IVA makes it clear that it is also possible to measure the four-qubit stabilizer $\hat{S}_x = \hat{\sigma}_{x,1}\hat{\sigma}_{x,2}\hat{\sigma}_{x,3}\hat{\sigma}_{x,4}$. The required interaction Hamiltonian between the qubits and PCO is $\hat{H}_I = \chi(\hat{\sigma}_{x,1} + \hat{\sigma}_{x,2} + \hat{\sigma}_{x,3} + \hat{\sigma}_{x,4})(\hat{a}^\dagger + \hat{a})$. Such a coupling can be effectively implemented by the typical Jaynes-Cummings (JC) interaction given by $\hat{H}_I = \chi \sum_i (\hat{a}^\dagger \hat{\sigma}_{-i} + \hat{a} \hat{\sigma}_{+,i})$. For $\chi$ smaller than the energy gap $\omega_{\text{gap}}$, the PCO remains within $C$, and the JC Hamiltonian reduces to $\hat{H}_I = \chi\beta \sum_i [\hat{\sigma}_{x,i}(p + p^{-1})\hat{\sigma}_x/2 + \hat{\sigma}_{y,i}(p - p^{-1})\hat{\sigma}_y/2]$. For even a moderately large amplitude of the cat state in PCO (such as $\beta = 2$), the last term in the above equation $(\propto p - p^{-1})$ becomes exponentially small, and the desired interaction Hamiltonian for the measurement of $\hat{S}_x$ stabilizer is obtained.

## APPENDIX H: PHASE DIFFUSION DURING THE MEASUREMENT OF THE $\hat{S}_z$ STABILIZER

As discussed in the main text, the qubit-oscillator coupling $\propto \chi(t)(\hat{a}^\dagger + \hat{a})$ can cause a small virtual excitation of the states in $C_\perp$. As $\chi(t)$ is turned off, these virtual excitations quickly reduce, and the oscillator returns to the cat manifold carrying with itself an extra phase. This extra phase, which depends on $\chi(t)$, is different for different qubit states and, therefore, leads to some oscillator-qubit entanglement and, hence, phase diffusion.

To elaborate, consider the eigenspectrum of the PCO when the state of the qubits is $|1, 1, 1, 1\rangle$ shown in Fig. 15. The results in this section are best understood by working in the $|\pm\rangle$ eigenbasis of the PCO where $|\pm\rangle = (|C_\beta^+\rangle \pm |C_\beta^-\rangle)/\sqrt{2}$. The coupling between the qubits and PCO is $\chi(t)(\hat{\sigma}_{z,1} + \hat{\sigma}_{z,2} + \hat{\sigma}_{z,3} + \hat{\sigma}_{z,4})(\hat{a}^\dagger + \hat{a} - 2\beta)$. As a result, when the qubits state is $|1, 1, 1, 1\rangle$, the PCO experiences a single-photon drive of strength $4\chi(t)(\hat{a}^\dagger + \hat{a})$. This drive tilts the metapotential of the PCO as shown in Fig. 15(a). We refer to this as the zeroth-order effect. When $\chi(t)$ is small with respect to the energy gap $\omega_{\text{gap}}$, the single-photon drive lifts the degeneracy between the $|+\rangle$ and $|-\rangle$ states by
<figure><img src="image_17.png" /><figcaption>(a) 0th-order eigenspectrum of PCC when the state of qubits is $|1, 1, 1, 1\rangle$</figcaption></figure>

$$ 
\begin{align*}
\omega_{|+\rangle} &\sim \omega_g + 8\chi(t)\beta \\
\omega_{|-\rangle} &\sim \omega_g - 8\chi(t)\beta \\
\omega_{|+\rangle} - \omega_{|3\rangle} &\sim \omega_{\text{gap}} \\
\omega_{|-\rangle} - \omega_{|2\rangle} &\sim \omega_{\text{gap}}
\end{align*}
$$

<figure><img src="image_18.png" /><figcaption>(c) 0th-order eigenspectrum of PCC when the state of qubits is $|0, 0, 0, 0\rangle$</figcaption></figure>

<figure><img src="image_19.png" /></figure>

$$ 
\begin{align*}
\omega_{|+\rangle} &\sim \omega_g - 8\chi(t)\beta \\
\omega_{|-\rangle} &\sim \omega_g + 8\chi(t)\beta \\
\omega_{|+\rangle} - \omega_{|3\rangle} &\sim \omega_{\text{gap}} \\
\omega_{|-\rangle} - \omega_{|2\rangle} &\sim \omega_{\text{gap}}
\end{align*}
$$

<figure><img src="image_20.png" /><figcaption>(d) 1st-order eigenspectrum of PCC when the state of qubits is $|0, 0, 0, 0\rangle$</figcaption></figure>

FIG. 15. The figure illustrates the eigenspectrum of the PCO while it is interacting with qubits. The solid line represents the inverted-double-well structure of the metapotential, while the dotted lines represent the energy levels. Recall that $|2\rangle \sim D(-\beta)|n=1\rangle$ and $|3\rangle \sim D(\beta)|n=1\rangle$. Unlike the noninteracting case [Fig. 2(b)], the qubit-PCO coupling lifts the degeneracy between $|+\rangle$ and $|-\rangle$. In other words, the metapotential tilts to the left or right, depending on whether the qubit state is (a) $|1, 1, 1, 1\rangle$ or (c) $|0, 0, 0, 0\rangle$. This tilt is the leading-order effect of the interaction, and the energies of the states $|\pm\rangle$ are $\omega_{|\pm\rangle} = \omega_g \pm 8\chi(t)\beta$ in (a) and $\omega_{|\pm\rangle} = \omega_g \mp 8\chi(t)\beta$ in (c). Importantly, if the energy gap is large, then the detuning between $|+\rangle$, $|3\rangle$ and that between $|-\rangle$, $|2\rangle$ remains the same [$\omega_{|+\rangle} - \omega_{|3\rangle} \approx \omega_{|-\rangle} - \omega_{|2\rangle} \sim \omega_{\text{gap}}$, in both (a) and (c)]. As shown in Appendix B, the effect of $\hat{a}^\dagger$ is to couple $|+\rangle$ to $|3\rangle$ and $|-\rangle$ to $|2\rangle$. To first order, in (b), $|+\rangle = |+\rangle + [4\chi(t)/\omega_{\text{gap}}]|3\rangle$, $|-\rangle = |-\rangle + [4\chi(t)/\omega_{\text{gap}}]|2\rangle$, and $\omega_{|\pm\rangle} = \omega_g \pm 8\chi(t)\beta + [16\chi(t)^2/\omega_{\text{gap}}]$. On the other hand, in (d), $|+\rangle = |+\rangle - [4\chi(t)/\omega_{\text{gap}}]|3\rangle$, $|-\rangle = |-\rangle - [4\chi(t)/\omega_{\text{gap}}]|2\rangle$, and $\omega_{|\pm\rangle} = \omega_g \mp 8\chi(t)\beta + [16\chi(t)^2/\omega_{\text{gap}}]$.

16χ(t)β. This lifting of degeneracy arises because the single-photon drive couples the cat states $|C_\beta^+\rangle$ and $|C_\beta^-\rangle$, which is what is exploited to perform the stabilizer measurements. To zeroth order, the energies of the states $|\pm\rangle$ are $E_{|\pm\rangle} = E_g \pm 8\chi(t)\beta$, where $E_g$ is their energy when $\chi = 0$. Importantly, when $\omega_{\text{gap}}$ is large, the energy difference between $|+\rangle$, $|3\rangle$ and that between $|-\rangle$, $|2\rangle$ remains the same. That is, $E_{|+\rangle} - E_{|3\rangle} \approx E_{|-\rangle} - E_{|2\rangle} \sim \omega_{\text{gap}}$ or, in other words, the tilting of the metapotential is uniform. Note that this approximation is valid only when mixing with other states is negligible and breaks down with an increase in $\chi$.

Recall the results of Appendix B, in which we show that $\hat{a}^\dagger$ couples the states $|+/-\rangle$ and $|3/2\rangle$. Therefore, the first-order effect of the single-photon drive, illustrated in Fig. 15(b), is to mix these states, resulting in the time-dependent dressed states $|+\rangle = |+\rangle + [4\chi(t)/\omega_{\text{gap}}]|3\rangle$ and $|-\rangle = |-\rangle + [4\chi(t)/\omega_{\text{gap}}]|2\rangle$, with energies $E_{|\pm\rangle} = E_g \pm 8\chi(t)\beta + [16\chi(t)^2/\omega_{\text{gap}}]$. If the coupling strength $\chi(t)$ is tuned adiabatically, then the state of the PCO follows the instantaneous eigenstates $|\pm\rangle$. As a result, an initial state $|1, 1, 1, 1\rangle \otimes |C_\beta^+\rangle$ evolves after a time $T_z = \pi/(8\chi\beta)$ to $\exp(i\phi_{1,1,1,1})|1, 1, 1, 1\rangle \otimes |C_\beta^+\rangle$, where

$$ \phi_{1,1,1,1} = \int_0^{T_z} \frac{16\chi(t)^2}{\omega_{\text{gap}}} dt. \qquad (\text{H1}) $$

In other words, after the duration of the stabilizer measurement protocol, $T_z$, the state acquires an additional phase

$\phi_{1,1,1,1}$. Following a similar argument [illustrated by the eigenspectrum analysis in Figs. 15(c) and 15(d)], we find that $|0, 0, 0, 0\rangle \otimes |C_\beta^+\rangle$ evolves after a time $T_z = \pi/(8\chi\beta)$ to $\exp(i\phi_{0,0,0,0})|0, 0, 0, 0\rangle \otimes |C_\beta^+\rangle$, where

$$ \phi_{0,0,0,0} = \int_0^{T_z} \frac{16\chi(t)^2}{\omega_{\text{gap}}} dt. \qquad (\text{H2}) $$

Note that the phase is proportional to the square of the coupling in the first-order approximation and, hence, $\phi_{0,0,0,0} = \phi_{1,1,1,1}$. Since the coupling between the rest of the even-parity states $|0, 0, 1, 1\rangle$, $|1, 1, 0, 0\rangle$, etc., is zero, $\phi_{0,0,1,1} = \phi_{1,1,0,0} = \cdots = 0$. This difference in the phases corresponding to the states $|0, 0, 0, 0\rangle$, $|1, 1, 1, 1\rangle$ and other even-parity states $|0, 0, 1, 1\rangle$, $|1, 1, 0, 0\rangle$, etc., leads to phase diffusion when the qubits are initialized in a superposition state such as $|\psi_e\rangle$ in Eq. (17). That is, the overlap between the state of the qubits after time $T_z$ and $|\psi_e\rangle$ is not one. However, as long as the coupling is tuned adiabatically and for small $\chi/\omega_{\text{gap}}$, this phase diffusion is small. Although to leading order $\phi_{1,1,1,1} = \phi_{0,0,0,0}$, such is not the case, as $\chi$ increases because of coupling with other states in the Hilbert space of the PCO. Similarly, according to our first-order theoretical analysis, there should be no phase diffusion when the qubits are initialized in the odd-parity subspace. This result is because the phase is proportional to the square of the coupling, which is the same for all the odd-parity states $|1, 0, 0, 0\rangle$, $|1, 1, 1, 0\rangle$, etc., (under the
assumption that the $\chi$'s are equal). However, as $\chi$ increases, higher-order effects from other states in the PCO have to be taken into account, which also leads to phase diffusion in the odd-parity subspace.

We now compare our simple theoretical prediction with numerical results. The qubits are initialized in the even-parity state:

$$|\psi_e\rangle = \frac{1}{\sqrt{8}} \left( \sum_{i,j} \hat{\sigma}_{x,i} \hat{\sigma}_{x,j} + \hat{I} + \hat{\sigma}_{x,1} \hat{\sigma}_{x,2} \hat{\sigma}_{x,3} \hat{\sigma}_{x,4} \right) |0,0,0,0\rangle, \quad (H3)$$

and the PCO is initialized in the cat state $|C_{\beta}^{\pm}\rangle$. The evolution under the Hamiltonian $H = -K\hat{a}^{\dagger 2}\hat{a}^2 + P(\hat{a}^{\dagger 2} + \hat{a}^2) + \chi(t)\hat{S}_{z}^{\prime}(\hat{a} + \hat{a}^{\dagger} - 2\beta)$ is numerically simulated with $P = 2K$, $\chi(t) = (\chi_0/\sqrt{\pi}) \exp(-t^2/T_z^2)$, and $T_z = \pi/8\chi_0\beta$. Recall that $T_z$ is the duration for which the qubits and PCO must interact for measuring the stabilizer. The cutoffs for the Gaussian pulse are taken at $\pm 3T_z$. Figure 16(a) shows the probability of phase diffusion given by $E_e = 1 - \langle\psi_e|\hat{\rho}_q|\psi_e\rangle$ (solid red line) as a function of $\chi/K\beta^2$ (here, $\chi$ is the peak interaction strength $\chi = \chi_0/\sqrt{\pi}$). The blue dotted line shows the theoretically estimated $E_e$, using the formulas for phases derived in Eqs. (H1) and (H2). The phase diffusion is proportional to the square of the coupling; that is, $E_e \propto \chi^2$ for small $\chi$.

The analysis is repeated with the qubits initialized in the odd-parity state:

$$|\psi_o\rangle = \frac{1}{\sqrt{8}} \left( \sum_i \hat{\sigma}_{x,i} + \sum_{i,j,k} \hat{\sigma}_{x,i} \hat{\sigma}_{x,j} \hat{\sigma}_{x,k} \right) |0,0,0,0\rangle. \quad (H4)$$

Figure 16(a) shows the probability of phase diffusion given by $E_o = 1 - \langle\psi_o|\hat{\rho}_q|\psi_o\rangle$ (solid black line). The first-order perturbation theory predicts an absence of phase diffusion in this state. The green dotted line shows the theoretically estimated $E_e = 0$ as a reference. We find that the simple first-order theory agrees well with the numerical results for small $\chi$. However, as $\chi$ increases, the disagreement between the numerical estimates and theory increases, which is expected because the small $\chi$ approximation breaks down.

The Gaussian pulse shape chosen for the above example behaves well and ensures the adiabaticity condition that we have assumed in the theory. However, we can test our theory against another pulse shape, such as a sine pulse $\chi(t) = 0.5\chi_0\pi \sin(\pi t/T_z)$ with cutoffs at $t = 0$ and $t = T_z$. In this case, we expect nonadiabatic effects to emerge. We repeat the above analysis for this pulse with the results shown in Fig. 16(b). The solid lines are from numerical simulations, while the dotted ones are from the first-order theory assuming adiabaticity. In this case, again we see agreement between the theory and numerical results for small $\chi$. But the theoretical and numerical results deviate

<figure><img src="image_21.png" /><figcaption>FIG. 16. Dependence of phase diffusion in the state of the qubits as a function of the coupling strength. In (a), the time dependence of the interaction between the qubits and PCO is taken as Gaussian $\chi(t) = (\chi_0/\sqrt{\pi}) \exp(-t^2/T_z^2)$ with cutoffs at $\pm 3T_z$. In (b), the time dependence of the interaction between the qubits and PCO is $\chi(t) = 0.5\chi_0\pi \sin(\pi t/T_z)$ with cutoffs at 0 and $T_z$. $\chi'$ is the peak interaction strength so that in (a) $\chi' = \chi_0\sqrt{\pi}$ and in (b) $\chi' = \pi\chi_0/2$. The parameters are $P = 4K$ ($\beta = 2$) and $T_z = \pi/8\chi_0\beta$. The phase diffusion is suppressed when the excitations out of the $C$ subspace are negligible, that is, when $\chi'/K\beta^2$ is small. Both theoretical (dotted lines) and numerical (solid lines) results are shown. The agreement between the two is good for small $\chi'$. As $\chi$ increases, the first-order perturbation theory is not sufficient, and the effect of other states in the PCO must be included. Also in (b), the effect of nonadiabatic terms and higher-order effects becomes apparent at smaller $\chi'$ compared to (a). For small $\chi'$, the average phase diffusion decreases quadratically with $\chi'/K\beta^2$. For example, the phase diffusion is $< 10^{-4}$ when $\chi'/K\beta^2 < 0.045$.</figcaption></figure>

for larger $\chi$. The numerically obtained solid lines show some oscillations because of nonadiabatic effects. Moreover, deviations between the solid and dashed lines become more prominent for the sine pulse compared to that with a Gaussian pulse.

In summary, we expect phase diffusion in the qubit states because of interaction with other states in the Hilbert space of the PCO. This phase diffusion is proportional to $(\chi/\omega_{gap})^2$ (for small $\chi$) and can be suppressed by increasing the energy gap $\omega_{gap}$.

## APPENDIX I: PHASE DIFFUSION DURING THE MEASUREMENT OF $e^{i\pi\hat{a}_x^\dagger\hat{a}_x}$ STABILIZER

Following the discussion in the previous section, it is easy to see that the coupling between the storage oscillator and the PCO causes a small virtual excitation out of the cat subspace and leads to dressing of the $|\pm\rangle$ states. The Fock states comprising the storage cat $|n=0\rangle$, $|n=1\rangle$, $|n=2\rangle$... couple to the PCO with different strengths ($\propto n\chi$). If the coupling between the storage cat and PCO is tuned adiabatically, then after a time $T_p$ an initial state $|2n\rangle \otimes |C_{\beta}^{+}\rangle$ evolves to $\exp(i\phi_{2n})|2n\rangle \otimes |C_{\beta}^{+}\rangle$ and the state $|2n+1\rangle \otimes |C_{\beta}^{+}\rangle$ evolves to $\exp(i\phi_{2n+1})|2n+1\rangle \otimes |C_{\beta}^{-}\rangle$. Here, the phase dependent on storage-photon number $m$ is
<figure><img src="image_22.png" /><figcaption>FIG. 17. Dependence of phase diffusion in the state of the storage cat as a function of the coupling strength. In (a), the time dependence of the interaction between the storage and PCO is $\chi(t) = (\chi_0/\sqrt{\pi}) \exp(-t^2/T_p^2)$ with cutoffs at $\pm 3T_p$. In (b), the time dependence of the interaction is $\chi(t) = 0.5\chi_0\pi \sin(\pi t/T_p)$ with cutoffs at 0 and $T_p$. $\chi'$ is the peak interaction strength so that in (a) $\chi' = \chi_0\sqrt{\pi}$ and in (b) $\chi' = \pi\chi_0/2$. The parameters are $P = 4K$ ($\beta = 2$) and $T_p = \pi/4\chi_0\beta$. The phase diffusion is suppressed when the excitations out of the $C$ subspace are negligible, that is, when $\chi''K\beta^2$ is small. Both theoretical (dotted lines) and numerical (solid lines) results are shown. The agreement between the two is good for small $\chi'$ and when the adiabatic approximation is valid. Again, we find that for small $\chi'$ the average phase diffusion decreases quadratically with $\chi'/K\beta^2$. For example, in (a), the phase diffusion is $< 10^{-4}$ when $\chi'/K\beta^2 < 0.02$.</figcaption></figure>

$$ \phi_m = \int_0^{T_p} \frac{m^2 \chi(t)^2}{\omega_{\text{gap}}} dt. \qquad (II) $$

Recall that $T_p$ is the time required to map the stabilizer onto the PCO. This storage-photon-number-dependent phase leads to phase diffusion when the storage is in a super-position of Fock states such as a cat state. Full correction of phase diffusion requires the complete knowledge of the photon statistics of the storage, which defeats the purpose of error correction. However, correction of the mean phase is possible by applying a counterdrive to the PCO as shown in Eq. (24).

We again compare the simple theoretical prediction with numerical results. The evolution under the following Hamiltonian is numerically simulated:

$$ \hat{H} = -K\hat{a}^{\dagger 2}\hat{a}^2 + P(\hat{a}^{\dagger 2} + \hat{a}^2) + \chi(t)(\hat{a}_s^\dagger\hat{a}_s - \langle\hat{a}_s^\dagger\hat{a}_s\rangle)(\hat{a} + \hat{a}^\dagger - \langle\hat{a} + \hat{a}^\dagger\rangle), \quad (I2) $$

and the reduced density matrix of the storage $\hat{\rho}_s$ is obtained. Figure 17 shows the probability of phase diffusion when the storage is initialized in the even- and odd-parity states, $E_o = 1 - \langle\psi_o|\hat{\rho}_s|\psi_o\rangle$ and $E_e = 1 - \langle\psi_e|\hat{\rho}_s|\psi_e\rangle$. Here, $|\psi_o\rangle = |C_\alpha^-\rangle + i|C_{ia}^-\rangle$ and $|\psi_e\rangle = |C_\alpha^+\rangle + |C_{ia}^+\rangle$. Both theoretical (dotted lines) and numerical (solid) lines are shown. The theoretical results are based on phases estimated in Eq. (I1). Again, we find good agreement between the

theory and numerical simulations for small $\chi$ for both the Gaussian pulse $\chi(t) = (\chi_0/\sqrt{\pi}) \exp(-t^2/T_p^2)$ [with cutoffs at $\pm 3T_p$, Fig. 17(a)] and the sine pulse $\chi(t) = 0.5\chi_0\pi \sin(\pi t/T_p)$ [with cutoffs at 0 and $T_p$, Fig. 17(b)]. Here, $T_p = \pi/4\chi_0\beta$. Again, we find that the average phase diffusion is suppressed for small $\chi/K\beta^2$ and the PCO indeed measures the stabilizer $\langle\hat{P}\rangle$ without revealing any information about the underlying photon-number statistics.

## APPENDIX J: ESTIMATING THE FEEDBACK PHASES FOR PHASE ESTIMATION

To understand how the feedback phases $\phi$ and $\varphi$ are determined for the phase estimation protocol described in Sec. IV C, suppose that the storage is in the eigenstate of the stabilizer $\hat{S}_q$ with eigenvalue $\exp(2i\sqrt{\pi}u)$. In this case, the state of the PCO after the application of the gate $\hat{U}_1(T_1)$ is $i|C_\beta^-\rangle \sin(\sqrt{\pi}u) + |C_\beta^+\rangle \cos(\sqrt{\pi}u)$. If the PCO is further rotated around the X axis of the Bloch sphere by an angle $\phi/2$ (by application of a single-photon drive), its state becomes $i|C_\beta^-\rangle \sin(\sqrt{\pi}u + \phi) + |C_\beta^+\rangle \cos(\sqrt{\pi}u + \phi)$. The probability for the PCO to remain in the $|C_\beta^+\rangle$ state after a round of phase estimation is $P_\phi(+|u\rangle) = \cos^2(\sqrt{\pi}u + \phi/2)$. Therefore, in order to accurately predict $u$, the sensitivity of the probability distribution $\partial P_\phi(+|u\rangle)/\partial\phi$ must be maximized. This maximization is achieved in APE by choosing the feedback phase $\phi$ dependent on whether the PCO evolved to $|C_\beta^+\rangle$ or $|C_\beta^-\rangle$ in the previous round of phase estimation. A similar analysis applies for the APE of the eigenvalue of $\hat{S}_p$. In the simulations presented in the main text, the initial GKP state is approximately the eigenstate of the stabilizers with eigenvalues $u, v = 0$. Furthermore, only one round of phase estimation is carried out. Therefore, to maximize $\partial P_\phi(+|u\rangle)/\partial\phi$, we choose $\phi = \pi/2$.

## APPENDIX K: HOLEVO PHASE VARIANCE IN THE PRESENCE OF SINGLE-PHOTON LOSS IN THE PCO

In this case, the reduced density matrix of the storage $\hat{\rho}_s^m$ is obtained at time $T = \sqrt{\pi}/(g\beta\sqrt{2})$ by numerically solving the master equation in Eq. (30) (i.e., without performing any rotations and measurements of the PCO). The variance is evaluated as $V_{p,q}^m = s_{p,q}^{-2} - 1$, with $s_{p,q} = \text{Tr}[\hat{S}_{p,q}\hat{\rho}_s^m]$. Note that the variance evaluated this way is equivalent to throwing away the measurement result. Since the measurement results are discarded, no information about the storage oscillator is obtained, and the Holevo phase variance remains the same as that of the initial state $V_{q,p}^0$.
## APPENDIX L: ONE ROUND OF APE WITH A QUBIT

One round of phase estimation for $\hat{S}_p$ with an ideal two-level system is simulated using the master equation

$$ \dot{\hat{\rho}} = -i[\hat{H}, \hat{\rho}] + \gamma \mathcal{D}[\hat{\sigma}_{-}]\hat{\rho}, \quad \hat{H} = ig_q(\hat{a}_s^\dagger - \hat{a}_s)\hat{\sigma}_x. \quad (L1) $$

First, simulations are performed with $\gamma = 0$. The density matrix for the system is obtained at time $T_{ideal} = \sqrt{\pi/(g_q\beta)}$. After this time, the qubit is rotated around the X axis by $\phi = \pi/2$, which is followed by a projective measurement of the qubit along the Z axis. The reduced density matrix for the storage oscillator $\hat{\rho}_{s,\pm}$ is obtained, from which the Holevo variances $V_{q,p}^{ideal}$ are evaluated. Next, simulations are performed with $\gamma \neq 0$. In this case, the reduced density matrix of the storage is obtained at time $T_{ideal}$ (i.e., without performing any measurements on the ideal qubit). In this case, the variance is evaluated as $V_{p,q}^{m,ideal} = s_{p,q}^{-2} - 1$, with $s_{p,q} = \text{Tr}[\hat{S}_{p,q}\hat{\rho}_s]$.

## APPENDIX M: ERRORS DURING ROTATION UNDER KERR EVOLUTION

During free evolution under the Kerr term, single-photon loss can cause three effects: (a) shrinkage of the size of the coherent states (this effect is not debilitating, because the states can be reinflated simply by reapplying the pump), (b) bit flips, and (c) additional phase rotations (due to noncommutativity of the Kerr rotation and single-photon loss). Suppose a photon jump event happened at time $t_j$; then the state of the system is

$$ \begin{aligned} & e^{iK(T-t_j)\hat{a}^{\dagger 2}\hat{a}^2+iK(T-t_j)\hat{a}^{\dagger}\hat{a}}\hat{a}e^{iKt_j\hat{a}^{\dagger 2}\hat{a}^2+iKt_j\hat{a}^{\dagger}\hat{a}}(|C_{\beta}^{+}\rangle \pm i|C_{\beta}^{-}\rangle) \\ &= e^{2t_jK\hat{a}^{\dagger}\hat{a}}e^{iKT\hat{a}^{\dagger 2}\hat{a}^2+iKT\hat{a}^{\dagger}\hat{a}}\hat{a}(|C_{\beta}^{+}\rangle \pm i|C_{\beta}^{-}\rangle) \\ &= e^{2t_jK\hat{a}^{\dagger}\hat{a}}e^{iKT\hat{a}^{\dagger 2}\hat{a}^2}(|C_{\beta}^{+}\rangle \mp i|C_{\beta}^{-}\rangle) \\ &= e^{2t_jK\hat{a}^{\dagger}\hat{a}}(|C_{\beta}^{+}\rangle \mp |C_{\beta}^{-}\rangle) \\ &= |C_{\beta e^{i\theta}}^{+}\rangle \mp |C_{\beta e^{i\theta}}^{-}\rangle, \quad \theta = 2t_jK. \end{aligned} \quad (M1) $$

Unless $\theta = n\pi$, the resulting states lie outside the C subspace. If the single-photon loss takes place in the beginning of the protocol (i.e., $\theta = 0$), then the readout merely gives an incorrect measurement result, which can be recovered while repeating the entire protocol a few times and taking a majority vote over the outcomes. If $\theta = \pi$, i.e., the photon loss takes place at the end of the protocol, then we recover the correct state. This result is trivial, because at the end of the protocol the two states are aligned along the X axis and are invariant under the single-photon loss channel. On the other hand, if the photon loss happens at $t_j \neq 0, \pi/2K$, then we end up in a state outside the C [10]. The next step of Q switching and homodyne measurement reveals if this error happened, in the event of which, the

PCO can be reinitialized. Moreover, the reinitialization step can also be supplemented with the quantum-Zeno effect of the two-photon loss channel described in Sec. VII E. In the presence of the two-photon pump, the two-photon (or single-photon) loss channel “refocuses” any excitations in $C_{\perp}$ to the cat manifold.

## APPENDIX N: EVOLUTION DURING Q-SWITCH OPERATION

Once the Q switch is turned on, the single-photon exchange coupling between the PCO and the readout oscillator in the rotating frame is given by the Hamiltonian $\hat{H}_Q = g(\hat{a}^\dagger\hat{a}_r + \hat{a}\hat{a}_r^\dagger)$. For small $g$, this interaction can be rewritten as

$$ \hat{H}_Q = g\beta \left(\frac{p+p^{-1}}{2}\right) (\hat{a}_r + \hat{a}_r^\dagger)\hat{\sigma}_x \\ - ig\beta \left(\frac{p-p^{-1}}{2}\right) (\hat{a}_r - \hat{a}_r^\dagger)\hat{\sigma}_y. \quad (N1) $$

Ignoring the term $\propto \hat{\sigma}_y$, which becomes negligibly small even for moderately large $\beta$, the result of the Q switch is to displace the readout oscillator conditioned on the state $((|C_{\alpha}^{+}\rangle \pm |C_{\alpha}^{-}\rangle))/\sqrt{2}$ of the PCO. If the state of the PCO is $((|C_{\alpha}^{+}\rangle \pm |C_{\alpha}^{-}\rangle))/\sqrt{2}$, then the field in the readout evolves as

$$ \langle \hat{a}_r \rangle = \mp \frac{2gi\beta}{\kappa_r} (1 - e^{-\kappa_r t/2}). \quad (N2) $$

To numerically confirm the above analysis, we simulate the master equation $\dot{\hat{\rho}} = -i[\hat{H}, \hat{\rho}] + \kappa_r \mathcal{D}[\hat{a}_r]\hat{\rho}$, where $\hat{H} = \hat{H}_{PCO} + g(\hat{a}^\dagger\hat{a}_r + \hat{a}\hat{a}_r^\dagger)$. The readout resonator is initialized in a vacuum, and the state of the PCO is along the +X axis $[+\rangle = ((|C_{\beta}^{+}\rangle + |C_{\beta}^{-}\rangle))/2$ or the -X axis $[-\rangle = ((|C_{\beta}^{+}\rangle - |C_{\beta}^{-}\rangle))/2$. Figures 18(a) and 18(b) show the evolution of $\langle \hat{a}_r \rangle$ for $\beta = 1, \sqrt{2}, 2, P = K\beta^2, \kappa_r = K/20$, and $g = \kappa_r/(2\beta)$. The value for $g$ is chosen so that $\langle \hat{a}_r \rangle_{max} = 2g\beta/\kappa_r = 1$ and $R_{ideal}$ remains the same irrespective of $\beta$.

<figure><img src="image_23.png" /><figcaption>FIG. 18. Evolution of the I quadrature $[i(\hat{a}_r^\dagger - \hat{a}_r)/2]$ of the field in the readout oscillator when the state of the PCO is (a) $((|C_{\beta}^{+}\rangle - |C_{\beta}^{-}\rangle))/\sqrt{2}$ and (b) $((|C_{\beta}^{+}\rangle + |C_{\beta}^{-}\rangle))/\sqrt{2}$, for $\beta = 1, \sqrt{2}, 2$. Clearly, the displacement of the readout resonator field is conditioned on the state of the PCO.</figcaption></figure>
The timescale for the evolution is taken to be $10/\kappa_r$. For $\beta = \sqrt{2}$, 2 the numerically obtained $\langle \hat{a}_r \rangle$ is in excellent agreement with Eq. (N2). This agreement shows that, indeed, for large $\beta$ the effect of the second term in Eq. (N1) is negligible. For small $\beta$, the second term in Eq. (N1) is not negligible. Therefore, coupling with the readout resonator rotates the PCO state around the $Y$ axis, which leads to a decrease in $\text{Im}[\langle \hat{a}_r \rangle]$ [Figs. 18(a) and 18(b)].

[1] J. Preskill, *Sufficient Condition on Noise Correlations for Scalable Quantum Computing*, Quantum Inf. Comput. **13**, 181 (2013).

[2] P. W. Shor, *Scheme for Reducing Decoherence in Quantum Computer Memory*, Phys. Rev. A **52**, R2493 (1995).

[3] A. M. Steane, *Error Correcting Codes in Quantum Theory*, Phys. Rev. Lett. **77**, 793 (1996).

[4] A. Y. Kitaev, *Fault-Tolerant Quantum Computation by Anyons*, Ann. Phys. (Amsterdam) **303**, 2 (2003).

[5] D. Gottesman, *Stabilizer Codes and Quantum Error Correction*, arXiv:quant-ph/9705052.

[6] M. A. Nielsen and I. Chuang, *Quantum Computation and Quantum Information* (Cambridge University, Cambridge, England, 2002).

[7] P. W. Shor, in *Proceedings of the 37th Annual Symposium on Foundations of Computer Science, 1996* (IEEE, New York, 1996), pp. 56–65.

[8] R. Raussendorf and J. Harrington, *Fault-Tolerant Quantum Computation with High Threshold in Two Dimensions*, Phys. Rev. Lett. **98**, 190504 (2007).

[9] Z. Leghtas, G. Kirchmair, B. Vlastakis, R. J. Schoelkopf, M. H. Devoret, and M. Mirrahimi, *Hardware-Efficient Autonomous Quantum Memory Protection*, Phys. Rev. Lett. **111**, 120501 (2013).

[10] M. Mirrahimi, Z. Leghtas, V. V. Albert, S. Touzard, R. J. Schoelkopf, L. Jiang, and M. H. Devoret, *Dynamically Protected Cat-Qubits: A New Paradigm for Universal Quantum Computation*, New J. Phys. **16**, 045014 (2014).

[11] N. Ofek, A. Petrenko, R. Heeres, P. Reinhold, Z. Leghtas, B. Vlastakis, Y. Liu, L. Frunzio, S. Girvin, L. Jiang et al., *Extending the Lifetime of a Quantum Bit with Error Correction in Superconducting Circuits*, Nature (London) **536**, 441 (2016).

[12] L. G. Lutterbach and L. Davidovich, *Method for Direct Measurement of the Wigner Function in Cavity QED and Ion Traps*, Phys. Rev. Lett. **78**, 2547 (1997).

[13] P. Bertet, A. Auffeves, P. Maioli, S. Osnaghi, T. Meunier, M. Brune, J.-M. Raimond, and S. Haroche, *Direct Measurement of the Wigner Function of a One-Photon Fock State in a Cavity*, Phys. Rev. Lett. **89**, 200402 (2002).

[14] M. Müller, K. Hammerer, Y. Zhou, C. F. Roos, and P. Zoller, *Simulating Open Quantum Systems: From Many-Body Interactions to Stabilizer Pumping*, New J. Phys. **13**, 085007 (2011).

[15] J. T. Barreiro, M. Müller, P. Schindler, D. Nigg, T. Monz, M. Chwalla, M. Hennrich, C. F. Roos, P. Zoller, and R. Blatt, *An Open-System Quantum Simulator with Trapped Ions*, Nature (London) **470**, 486 (2011).

[16] S. E. Nigg and S. M. Girvin, *Stabilizer Quantum Error Correction Toolbox for Superconducting Qubits*, Phys. Rev. Lett. **110**, 243604 (2013).

[17] L. Sun, A. Petrenko, Z. Leghtas, B. Vlastakis, G. Kirchmair, K. Sliwa, A. Narla, M. Hatridge, S. Shankar, J. Blumoff et al., *Tracking Photon Jumps with Repeated Quantum Non-Demolition Parity Measurements*, Nature (London) **511**, 444 (2014).

[18] A. M. Steane, *Active Stabilization*, Quantum Computation, and Quantum State Synthesis, Phys. Rev. Lett. **78**, 2252 (1997).

[19] E. Knill, *Scalable Quantum Computing in the Presence of Large Detected-Error Rates*, Phys. Rev. A **71**, 042322 (2005).

[20] D. S. Wang, A. G. Fowler, A. M. Stephens, and L. C. L. Hollenberg, *Threshold Error Rates for the Toric and Surface Codes*, Quantum Inf. Comput. **10**, 456 (2010).

[21] R. Chao and B. W. Reichardt, *Quantum Error Correction with Only Two Extra Qubits*, Phys. Rev. Lett. **121**, 050502 (2018).

[22] B. W. Reichardt, *Fault-Tolerant Quantum Error Correction for Steane's Seven-Qubit Color Code with Few or No Extra Qubits*, arXiv:1804.06995.

[23] S. Rosenblum, P. Reinhold, M. Mirrahimi, L. Jiang, L. Frunzio, and R. Schoelkopf, *Fault-Tolerant Detection of a Quantum Error*, Science **361**, 266 (2018).

[24] J. Cohen, W. C. Smith, M. H. Devoret, and M. Mirrahimi, *Degeneracy-Preserving Quantum Nondemolition Measurement of Parity-Type Observables for Cat Qubits*, Phys. Rev. Lett. **119**, 060503 (2017).

[25] E. Kapit, *Error-Transparent Quantum Gates for Small Logical Qubit Architectures*, Phys. Rev. Lett. **120**, 050503 (2018).

[26] A. Sarlette and M. Mirrahimi, *Loss-Tolerant Parity Measurement for Distant Quantum Bits*, Phys. Rev. A **95**, 032329 (2017).

[27] S. Puri, S. Boutin, and A. Blais, *Engineering the Quantum States of Light in a Kerr-Nonlinear Resonator by Two-Photon Driving*, npj Quantum Inf. **3**, 18 (2017).

[28] H. Goto, *Universal Quantum Computation with a Nonlinear Oscillator Network*, Phys. Rev. A **93**, 050301(R) (2016).

[29] D. Gottesman, A. Kitaev, and J. Preskill, *Encoding a Qubit in an Oscillator*, Phys. Rev. A **64**, 012310 (2001).

[30] S. Puri, C. K. Andersen, A. L. Grimsmo, and A. Blais, *Quantum Annealing with All-to-All Connected Nonlinear Oscillators*, Nat. Commun. **8**, 15785 (2017).

[31] V. Peano, M. Marthaler, and M. I. Dykman, *Sharp Tunneling Peaks in a Parametric Oscillator: Quantum Resonances Missing in the Rotating Wave Approximation*, Phys. Rev. Lett. **109**, 090401 (2012).

[32] D. F. Walls and G. J. Milburn, *Quantum Optics* (Springer Science & Business, New York, 2007).

[33] S. Touzard, A. Kou, N. E. Frattini, V. V. Sivak, S. Puri, A. Grimm, L. Frunzio, S. Shankar, and M. H. Devoret, *Gated Conditional Displacement Readout of Superconducting Qubits*, Phys. Rev. Lett. **122**, 080502 (2019).

[34] J. Johansson, P. Nation, and F. Nori, *Qutip: An Open-Source Python Framework for the Dynamics of Open Quantum Systems*, Comput. Phys. Commun. **183**, 1760 (2012).
[35] E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, *Topological Quantum Memory*, J. Math. Phys. (N.Y.) **43**, 4452 (2002).

[36] M. H. Michael, M. Silveri, R. T. Brierley, V. V. Albert, J. Salmilehto, L. Jiang, and S. M. Girvin, *New Class of Quantum Error-Correcting Codes for a Bosonic Mode*, Phys. Rev. X **6**, 031006 (2016).

[37] V. V. Albert, S. O. Mundhada, A. Grimm, S. Touzard, M. H. Devoret, and L. Jiang, *Pair-Cat Codes: Autonomous Error-Correction with Low-Order Nonlinearity*, Quantum Sci. Technol. **4**, 035007 (2019).

[38] S. Puri, L. St-Jean, J. A. Gross, A. Grimm, N. Frattini, P. S. Iyer, A. Krishna, S. Touzard, L. Jiang, A. Blais et al., *Bias-Preserving Gates with Stabilized Cat Qubits*, arXiv: 1905.00450.

[39] V. V. Albert, K. Noh, K. Duivenvoorden, D. J. Young, R. T. Brierley, P. Reinhold, C. Vuillot, L. Li, C. Shen, S. Girvin et al., *Performance and Structure of Single-Mode Bosonic Codes*, Phys. Rev. A **97**, 032346 (2018).

[40] B. M. Terhal and D. Weigand, *Encoding a Qubit into a Cavity Mode in Circuit QED Using Phase Estimation*, Phys. Rev. A **93**, 012315 (2016).

[41] C. Flühmann, T. L. Nguyen, M. Marinelli, V. Negnevitsky, K. Mehta, and J. Home, *Encoding a Qubit in a Trapped-Ion Mechanical Oscillator*, Nature (London) **566**, 513 (2019).

[42] K. Noh, V. V. Albert, and L. Jiang, *Quantum Capacity Bounds of Gaussian Thermal Loss Channels and Achievable Rates with Gottesman-Kitaev-Preskill Codes*, IEEE Trans. Inf. Theory **65**, 2563 (2018).

[43] D. W. Berry, B. L. Higgins, S. D. Bartlett, M. W. Mitchell, G. J. Pryde, and H. M. Wiseman, *How to Perform the Most Accurate Possible Phase Measurements*, Phys. Rev. A **80**, 052114 (2009).

[44] D. W. Berry, H. M. Wiseman, and J. K. Breslin, *Optimal Input States and Feedback for Interferometric Phase Estimation*, Phys. Rev. A **63**, 053804 (2001).

[45] Y. Y. Gao, B. J. Lester, Y. Zhang, C. Wang, S. Rosenblum, L. Frunzio, L. Jiang, S. M. Girvin, and R. J. Schoelkopf, *Programmable Interference between Two Microwave Quantum Memories*, Phys. Rev. X **8**, 021073 (2018).

[46] E. Flurin, N. Roch, J.-D. Pillet, F. Mallet, and B. Huard, *Superconducting Quantum Node for Entanglement and Storage of Microwave Radiation*, Phys. Rev. Lett. **114**, 090503 (2015).

[47] W. Pfaff, C. J. Axline, L. D. Burkhart, U. Vool, P. Reinhold, L. Frunzio, L. Jiang, M. H. Devoret, and R. J. Schoelkopf, *Controlled Release of Multiphoton Quantum States from a Microwave Cavity Memory*, Nat. Phys. **13**, 882 (2017).

[48] S. Touzard, A. Grimm, Z. Leghtas, S. O. Mundhada, P. Reinhold, C. Axline, M. Reagor, K. Chou, J. Blumoff, K. M. Sliwa et al., *Coherent Oscillations inside a Quantum Manifold Stabilized by Dissipation*, Phys. Rev. X **8**, 021005 (2018).

[49] B. Yurke and D. Stoler, *Generating Quantum Mechanical Superpositions of Macroscopically Distinguishable States via Amplitude Dispersion*, Phys. Rev. Lett. **57**, 13 (1986).

[50] G. Kirchmair, B. Vlastakis, Z. Leghtas, S. E. Nigg, H. Paik, E. Ginossar, M. Mirrahimi, L. Frunzio, S. M. Girvin, and R. J. Schoelkopf, *Observation of Quantum State Collapse and Revival due to the Single-Photon Kerr Effect*, Nature (London) **495**, 205 (2013).

[51] P. Aliferis and J. Preskill, *Fault-Tolerant Quantum Computation against Biased Noise*, Phys. Rev. A **78**, 052331 (2008).

[52] P. Aliferis, F. Brito, D. P. DiVincenzo, J. Preskill, M. Steffen, and B. M. Terhal, *Fault-Tolerant Computing with Biased-Noise Superconducting Qubits: A Case Study*, New J. Phys. **11**, 013061 (2009).

[53] D. K. Tuckett, S. D. Bartlett, and S. T. Flammia, *Ultrahigh Error Threshold for Surface Codes with Biased Noise*, Phys. Rev. Lett. **120**, 050505 (2018).

[54] Z. Leghtas, S. Touzard, I. M. Pop, A. Kou, B. Vlastakis, A. Petrenko, K. M. Sliwa, A. Narla, S. Shankar, M. J. Hatridge et al., *Confining the State of Light to a Quantum Manifold by Engineered Two-Photon Loss*, Science **347**, 853 (2015).

[55] J. F. Poyatos, J. I. Cirac, and P. Zoller, *Quantum Reservoir Engineering with Laser Cooled Trapped Ions*, Phys. Rev. Lett. **77**, 4728 (1996).

[56] W. Wustmann and V. Shumeiko, *Parametric Resonance in Tunable Superconducting Cavities*, Phys. Rev. B **87**, 184501 (2013).

[57] C. Eichler and A. Wallraff, *Controlling the Dynamic Range of a Josephson Parametric Amplifier*, EPJ Quantum Techno. **1**, 2 (2014).

[58] H. J. Carmichael, *Statistical Methods in Quantum Optics 2: Non-Classical Fields* (Springer Science & Business, New York, 2009).

[59] A. Imamoglu, *Stochastic Wave-Function Approach to Non-Markovian Systems*, Phys. Rev. A **50**, 3650 (1994).

[60] S. Xue, M. R. James, A. Shabani, V. Ugrinovskii, and I. R. Petersen, in *Proceedings of the 2015 IEEE 54th Annual Conference on Decision and Control (CDC)* (IEEE, New York, 2015), pp. 7096–7100.

[61] M. Wolinsky and H. J. Carmichael, *Quantum Noise in the Parametric Oscillator: From Squeezed States to Coherent-State Superpositions*, Phys. Rev. Lett. **60**, 1836 (1988).

[62] L. Gilles, B. M. Garraway, and P. L. Knight, *Generation of Nonclassical Light by Dissipative Two-Photon Processes*, Phys. Rev. A **49**, 2785 (1994).

[63] P. Facchi and S. Pascazio, *Quantum Zeno Subspaces*, Phys. Rev. Lett. **89**, 080401 (2002).

[64] J.-M. Raimond, C. Sayrin, S. Gleyzes, I. Dotsenko, M. Brune, S. Haroche, P. Facchi, and S. Pascazio, *Phase Space Tweezers for Tailoring Cavity Fields by Quantum Zeno Dynamics*, Phys. Rev. Lett. **105**, 213601 (2010).

[65] J. Cohen, *Autonomous Quantum Error Correction with Superconducting Qubits*, Ph.D. thesis, PSL Research University, 2017.