{'fraction_non_alphanumeric': 0.03965779743348075, 'fraction_numerical': 0.013436767442422485, 'mean_word_length': 4.111419924649496, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Protected gates for superconducting qubits

We analyze the accuracy of quantum phase gates acting on"zero-pi qubits"in superconducting circuits, where the gates are protected against thermal and Hamiltonian noise by continuous-variable quantum error-correcting codes. The gates are executed by turning on and off a tunable Josephson coupling between an LC oscillator and a qubit or pair of quits; assuming perfect qubits, we show that the gate errors are exponentially small when the oscillator's impedance sqrt{L/C} is large compared to hbar/4e^2 ~ 1 kilo-ohm. The protected gates are not computationally universal by themselves, but a scheme for universal fault-tolerant quantum computation can be constructed by combining them with unprotected noisy operations. We validate our analytic arguments with numerical simulations.


I. INTRODUCTION
Building a scalable quantum computer is a formidable challenge because quantum systems decohere readily and because their interactions are hard to control accurately, yet we hope to succeed someday by prudently applying the principles of quantum error correction and faulttolerant quantum computing. In the standard "software" approach to quantum fault-tolerance [1], the deficiencies of noisy quantum hardware (if not too noisy) are overcome through clever circuit design, while in the alternative "topological" approach [2], the hardware itself is intrinsically resistant to decoherence. Both approaches exploit the idea that logical qubits can be stored and processed reliably when suitably encoded in a quantum system with many degrees of freedom; perhaps both approaches will be employed together in future quantum computing systems.
The best known version of the topological approach is based on nonabelian anyons, with quantum information stored in the fusion spaces of the anyons and processed by braiding the anyons, but it is important to search for other ways to realize quantum hardware such that intrinsic robustness results from how the information is physically encoded. One intriguing possibility is to use superconducting circuits for this purpose. Specifically, several authors [3][4][5] have proposed designs for a superconducting "0-π qubit," a circuit containing Josephson junctions. The circuit's energy is a function of the superconducting phase difference θ between the two leads of the circuit, and there are two nearly degenerate ground states, localized near θ = 0 and θ = π respectively. The splitting of this degeneracy is exponentially small as a function of extensive system parameters, and stable with respect to weak local perturbations. Thus the 0-π qubit should be highly resistant to decoherence arising from local noise.
For reliable quantum computing we need not just very stable qubits, but also the ability to apply very accurate nontrivial quantum gates to the qubits. A method for achieving protected single-qubit and two-qubit phase gates acting on 0-π qubits, exploiting the error-correcting properties of a continuous-variable quantum code [6], was suggested in [5], and it was claimed that the gate errors can be exponentially small as a function of extensive system parameters. In this paper we further develop and explore the ideas behind this protected gate.
Protected phase gates are executed by turning on and off a tunable Josephson coupling between an LC oscillator and a qubit or pair of qubits. Assuming the qubits are perfect, we show, using analytic arguments validated by numerical simulations, that the gate errors are exponentially small when the oscillator's impedance L/C is large compared to /4e 2 ≈ 1 kΩ, where L is the inductance and C is the capacitance of the oscillator. The gates are robust against small deformations of the device Hamiltonian and against small thermal fluctuations of the oscillator. The very large inductance in the superconducting oscillator, which is crucial for the high gate accuracy, may be quite challenging to achieve in practice, but the potential rewards are correspondingly substantial.
The internal structure of the 0-π qubit is not relevant to our analysis, but for completeness we nevertheless explain in Sec. II the idea behind the qubit design proposed in [5], which also requires a large inductance in a superconducting circuit. We describe how a protected phase gate is executed in Sec. III, and in Sec. IV we outline our strategy for estimating the gate accuracy. We review the properties of continuous-variable quantum error-correcting codes in Sec. V, and explain in Sec. VI how the code provides protection against imperfect timing in the pulse that executes the gate. We analyze contributions to the gate error due to diabatic transitions and squeezing in Sec. VII and Sec. VIII, then compare our predictions with numerical simulations in Sec. IX. We discuss robustness with respect to thermal effects in Sec. X and with respect to Hamiltonian perturbations in Sec. XI. In Sec. XII we explain how to obtain a complete scheme for universal fault-tolerant quantum computation by augmenting the protected phase gates with measurements and unprotected noisy phase gates. Sec. XIII contains our conclusions, and some further details are contained in Appendices.

II. THE 0-π QUBIT
For most of this paper we may treat the 0-π qubit as a black box, disregarding its internal structure. But here we will briefly explain the concept underlying the proposal in [5].
We consider a two-lead superconducting circuit, whose energy E(θ) is a function of the phase difference θ between the two leads. Here θ is a periodic variable with period 2π, but for a suitably constructed circuit, E(θ) will actually be very nearly a function with period π, apart from exponentially small corrections. This function has minima at θ = 0 and θ = π, separated by a high barrier, so that there are two well localized states centered at θ = 0 and θ = π respectively, which we may take to be the basis states |0 and |1 of an encoded qubit, as shown in Fig. 1. The high tunneling barrier suppresses bit flip errors, but the key feature of the qubit is that the π periodicity, and hence the degeneracy of the two states, is robust against generic local perturbations, so that dephasing of coherent superpositions of |0 and |1 is also highly suppressed. The energy E(θ) of a superconducting circuit is a periodic function with period π of the phase difference θ between its two leads, aside from exponentially small corrections. The two basis states {|0 , |1 } of the qubit, localized near the minima of the energy at θ = 0 and θ = π respectively, are nearly degenerate.
To understand the qubit's properties, first consider the four-lead circuit shown in Fig. 2. This circuit has two identical rungs, connected by a large capacitance C 1 . Each rung consists of a Josephson junction, with Josephson energy J and intrinsic capacitance C, connected in series with a inductance L, chosen such that L/C is large compared to the natural unit of impedance /(2e) 2 ≈ 1.03 kΩ, and hence much larger than its "geometric" value 4π/c ≈ 377 Ω (where c is the speed of light), the impedance of free space. Achieving such a "superinductance" may be an engineering challenge, but we take it for granted here that it is possible. The properties of a single rung, which can operate as an adiabatic switch when J varies, is discussed in more detail in Appendix A.
We denote the value of the superconducting phase on the circuit's four leads as θ 1 , θ 2 , θ 3 , θ 4 as shown, and C J; FIG. 2: Two-rung superconducting circuit underlying the 0-π qubit. If L/C is large, C1 is large compared to C, and JC is not too large, then the circuit's energy is a function of the combination of phases (θ2 + θ4) − (θ1 + θ3), aside from corrections that are exponentially small in L/C. the phase on either side of the capacitor connecting the rungs by ϕ 1 , ϕ 2 . Then the phase ϕ + = (ϕ 1 + ϕ 2 ) /2 is insensitive to the value of the capacitance C 1 , which we assume is much larger than C. Therefore the sum ϕ + is a "light" variable with large fluctuations (assuming JC is not too large), while in contrast the difference ϕ − = ϕ 1 −ϕ 2 , which does feel the effect of the large capacitance C 1 , is a well localized "heavy" variable. We assume that phase slips through the inductors are suppressed, so that we may regard ϕ ± as real variables rather than periodic phase variables with period 2π. A circuit with capacitance C conv and inductance L conv has Hamiltonian where q is the charge on the capacitor and Φ is the magnetic flux linking the circuit. We use the subscript "conv" to indicate that capacitance and inductance are expressed here in conventional units, while we will find it more convenient to use rationalized units such that so that where Q = q/2e is charge expressed in units of the Cooper pair charge 2e, and ϕ = (2e/ )Φ is the superconducting phase, such that ϕ = 2π corresponds to the quantum h/2e of magnetic flux. Then [ϕ, Q] = i, and is dimensionless. The ground state of the Hamiltonian Eq. (3), with energy E 0 = 1/2 √ LC, has Gaussian wave function ψ(ϕ) such that |ψ(ϕ)| 2 ∝ e −ϕ 2 /2 ϕ 2 , where and hence cos ϕ = e − ϕ 2 /2 = exp − 1 4 For L/C 1, the ground state wave function is very broad and the wiggles of the cosine nearly average out aside from an exponentially small correction.
The effective capacitance controlling the phase ϕ + is C eff = 2C and the effective inductance is L eff = L/2. Therefore, in the circuit's ground state we have The dependence of the Josephson energy on the strongly fluctuating light variable ϕ + is proportional to which is negligible when L/C is large. We therefore need only consider the dynamics of the well localized heavy variable φ − , which locks to the value determined by the phases on the leads, so that the energy stored in the circuit is where f (θ) is a periodic function with period 2π. Now, to devise a qubit, we twist the upper rung relative to the lower one and connect the leads as shown in Fig. 3, thus identifying θ 2 with θ 4 and θ 1 with θ 3 . In addition, we add another large capacitance to ensure that tunneling events changing θ 2 − θ 1 by π are heavily suppressed. The energy of the resulting circuit is where the ellipsis represents exponentially small corrections. Thus the energy is very nearly a periodic function with period π of the phase difference θ 2 − θ 1 , with two nearly degenerate minima as in Fig. 1. This robust degeneracy derives from the "superinducting" properties of each rung, i.e., the large value of L/C. One way to achieve a superinductor, suggested in [5], is to construct a long chain of N Josephson junctions, each with Josephson couplingJ and capacitancē C. Then the inductance of the chain is linear in N , and the capacitance is proportional to 1/N , so L/C ∝ N , The circuit for the 0-π qubit is obtained from the circuit in Fig. 2 by twisting one of the rungs and connecting the leads, thus identifying θ2 with θ4 and θ1 with θ3. In addition, another large capacitance is added to further suppress tunneling events that change θ2 − θ1 by π. and the breaking of the degeneracy is exponentially small in the chain length. This suppression arises because the correction terms in Eq. (12) that break the π-periodicity are associated with quantum tunneling from one end to the other in the two-rung ladder. We also requireJC to be large, to suppress phase slips due to tunneling across the chain, thus ensuring that ϕ + can be regarded as a real variable rather than a periodic variable with period 2π. An impedance L/C ≈ 20 has been achieved using long chains of devices [7][8][9]. Another possibility for achieving large L/C is to use a long wire, thick enough to suppress phase slips, built from an amorphous superconductor with a large kinetic inductance. Whatever method is used, reaching, say, L/C of order 100 may be quite challenging, but in this paper we take it for granted that a robust 0-π qubit can be realized. In fact, our scheme for implementing accurate quantum gates will also be based on superinducting circuits. We will need to be able to measure the qubit, in either the standard {|0 , |1 } basis (measurement of the Pauli operator Z) or in the dual basis {|0 ± |1 } (measurement of the Pauli operator X). In principle the Z measurement could be performed by connecting the two leads of the qubit with a Josephson junction, while inserting 1/4 of a flux quantum through the loop; then the current through the junction is proportional to sin (θ 2 − θ 1 − π/2), with sign dependent on whether θ 2 − θ 1 is 0 or π.
For measuring X, we envision "breaking" the connection between θ 1 and θ 3 and then measuring the charge conjugate to the phase difference θ 1 − θ 3 . The energy of the circuit is f (θ 1 + θ 3 − 2θ 2 ), so that if θ 1 advances adiabatically by 2π with θ 3 fixed, then θ 2 advances by π; if X = 1 the wave function is invariant and if X = −1 the wave function changes sign. Correspondingly, the dual charge is either an even or odd multiple of 1/2. In practice, the X and Z measurements are bound to be noisy, but the limitations on measurement accuracy can be overcome by repeating the measurements or by using appropriate coding schemes, as we describe in Sec. XII.

III. PHASE GATE
Following [5], we will explain how to execute with high fidelity the single-qubit phase gate exp i π 4 Z and the two-qubit phase gate exp i π 4 Z ⊗ Z . These gates are not sufficient by themselves for universal quantum computation, but we will discuss in Sec. XII how they can be used as part of a universal fault-tolerant scheme.
First, for contrast, consider an example of an unprotected single-qubit gate implementation. As shown in Fig. 4 we could close a switch that couples the qubit for time t to a Josephson junction with Josephson coupling J, in effect turning on a term J cos θ = JZ in the Hamiltonian, where θ ∈ {0, π} is the phase difference across the qubit. After time t the unitary transformation exp(−itJZ) has been applied. Thus by choosing the time t appropriately we can rotate the qubit about the z axis by any desired angle. However, this gate is sensitive to errors in the pulse that closes and opens the switch, and to other fluctuations in the circuit parameters. The protected single-qubit phase gate is executed as shown in Fig. 5 by coupling the qubit to a "superinductive" LC circuit via a switch that pulses on and off. The switch is actually a tunable Josephson junction, which can be realized, as in Fig. 6, by a loop containing two identical junctions, each with Josephson coupling J, linked by the magnetic flux (η/2π)Φ 0 , where Φ 0 = h/2e is the flux quantum. The Josephson energy of this tunable junction is where θ is the phase difference between the two leads on the loop. Thus the switch is "on" for η = 0 and "off" for η = π. The "off" setting can be fairly soft -it is good enough for J eff to be comparable to 1/L rather than strictly zero -while in the "on" position we require J eff C to be large. The inductance L and capacitance C of the circuit are unrelated to the inductance and capacitance for the 0-π qubit discussed in Sec. II, though we will again demand that L/C 1. From now on we will assume the 0-π qubit is perfect, and will focus on realizing the robust phase gate under this assumption.
Using the same normalization conventions as in Sec. II, the Hamiltonian for the circuit can be expressed as where now J(t) is the time-dependent effective Josephson coupling of the tunable junction, θ is the phase difference across the qubit, and ϕ is the phase difference across the inductor. We assume that phase slips through the circuit are strongly suppressed, so that ϕ can be regarded as a real variable rather than a periodic phase variable -when ϕ winds by 2π the flux linking the LC circuit increases by one flux quantum. Depending on whether the state of the qubit is |0 or |1 , the phase θ is either 0 or π; hence, the Hamiltonian can be expressed as with the ∓ sign conditioned on the qubit's state. Suppose for now that the initial state |ψ in of the oscillator is its ground state, a Gaussian wave function with ϕ 2 = 1 2 L/C and Q 2 = 1 2 C/L. (Other harmonic oscillator energy eigenstates will be considered in Sec. X.) Because L/C 1, the wave function is broad in ϕ space and narrow in Q space. Hence when the switch pulses on, the contribution to the expectation of the energy arising from the cosine potential is highly suppressed by the factor Correspondingly, the energy is very insensitive to the state of the qubit, which determines the sign of the cosine potential. This suppression factor determines the characteristic scale of the error in the phase gate. Schematically, the tunable Josephson coupling J(t) has the form shown in Fig. 7 -it starts at zero, ramps on smoothly, maintains the value J 0 for a time t ≈ L/π, and then ramps off smoothly. The characteristic time τ J for the coupling to ramp on and off is subject to some constraints which we will specify shortly. With J 0 at its steady state value, phase slips (tunneling events between successive minima of the cosine potential) are suppressed by the WKB factor We assume that √ J 0 C is large enough so that phase slips can be safely neglected. In addition, we assume that J(t) ramps up slowly enough to prepare adiabatically the ground state in each local minimum of the cosine potential, yet quickly enough to prevent the state from collapsing to just a few local minima with the smallest values of ϕ 2 /2L. Thus, as J(t) turns on, the initial state of the oscillator evolves to become a "grid state" as shown in Fig. 8, a superposition of narrowly peaked functions governed by a broad envelope function. The width of the broad envelope is ϕ 2 ≈ 1 2 L/C 1 as for the oscillator's initial state, while the width of each narrow peak is (ϕ − ϕ 0 ) 2 ≈ 1 FIG. 8: (Color online) Coupling the qubit to the oscillator prepares a grid state in ϕ space, a superposition of narrowly peaked functions governed by a broad envelope function. The peaks occur where ϕ is an even multiple of π if the qubit's state is |0 , and where ϕ is an odd multiple of π if the qubit's state is |1 . ground state supported near the local minimum of the cosine potential.
If the state of the 0-π qubit is |0 and the coefficient of the cosine in Eq. (15) is negative, then the narrow peaks occur where ϕ is an even multiple of π. We denote this grid state of the oscillator as |0 C ; the subscript stands for "code," since as we will explain latter this state can be regarded as a basis state for a quantum error-correcting code. If the state of the qubit is |1 and the coefficient of the cosine is positive, then the narrow peaks occur where ϕ is an odd multiple of π; in that case we denote the grid state as |1 C . Thus, if the initial state of the 0-π qubit is a|0 + b|1 , then when J(t) turns on the joint state of the qubit and oscillator evolves according to A diabatic transition that excites the oscillator in the cosine well is most likely to occur while J(t)C is approxi-mately one and the frequency of oscillations in the well is approximately 1/C. Landau-Zener theory therefore indicates that the probability P diab of such a transition scales like where τ J is the characteristic time for J(t) to ramp on. (We will discuss this error in more detail in Sec. VII.) Since diabatic effects also contribute to the error in the phase gate, we require τ J C. Indeed, the diabatic error is comparable to the intrinsic error in Eq. (16) for that is, when the ramping time is of order the period of the LC oscillator. During this ramping time, the envelope function of the Gaussian grid state is squeezed somewhat in ϕ space (and correspondingly spreads somewhat in Q space), but stays broad enough for the intrinsic error to remain heavily suppressed. In Sec. VIII we argue that the error arising from squeezing scales like hence it too is comparable to the intrinsic error for τ J ∼ √ LC.
After the Gaussian grid state has been prepared, the Josephson coupling J(t) maintains its steady-state value J 0 for a time t ≡ Lt/π, wheret is a rescaled time variable. While the coupling is on, each narrowly peaked function is stabilized by the strongly confining cosine potential, but the state is subjected to the Gaussian operation e −itϕ 2 /2L = e −itϕ 2 /2π due to the harmonic potential ϕ 2 /2L, which alters the relative phases of the peaks. As t increases the oscillator states |0 C and |1 C evolve, but whent reaches 1, each returns to its initial value, apart from a state-dependent geometric phase. For the grid state |0 C , the peaks in ϕ space occur at ϕ = 2πn where n is an integer, and the Gaussian operation acts trivially. But for the grid state |1 C , the peaks occur at ϕ = 2π(n + 1 2 ), and the operation therefore modifies the phase of the state by the factor −i.
Hence the joint state of the qubit and oscillator becomes To complete the execution of the phase gate, the tunable coupling J(t) ramps down from J 0 to zero, again with a characteristic time scale τ J subject to the constraints specified above. As the coupling turns off, the state |0 C of the oscillator evolves to |ψ fin 0 and the state |1 C evolves to |ψ fin 1 ; the final joint state of the qubit and oscillator is Thus, a perfect phase gate exp i π 4 Z has been applied to the qubit if |ψ fin 0 = |ψ fin 1 . If on the other hand | ψ fin 1 |ψ fin 0 | < 1, then the qubit and oscillator are entangled in the final state, compromising the gate fidelity. Even if | ψ fin 1 |ψ fin 0 | = 1 so there is no entanglement, the gate may be imperfect because the phase of ψ fin 1 |ψ fin 0 deviates from zero. We will argue that under appropriate conditions ψ fin 1 |ψ fin 0 ≈ 1 to extremely high accuracy so that the phase gate is nearly perfect. Note that we need not require the final state of the oscillator to match the initial state |ψ in ; noise terms in the Hamiltonian may excite the oscillator, but the phase gate is still highly reliable as long as the oscillator's final state depends only very weakly on the state of the 0-π qubit, i.e., on whether the sign of J(t) is positive or negative. Indeed, the oscillator serves as a reservoir that absorbs the entropy introduced by noise. If not too badly damaged, the oscillator can be reused a few times for the execution of additional protected gates. Eventually, though, it will become too highly excited, and will need to be cooled before being employed again.
A gate error may arise if the coupling between qubit and oscillator remains on for too long or too short a time, i.e., ift = 1 + ε rather thant = 1. But we will see that such timing errors do not much compromise the performance of the gate when ε is small; specifically, the gate error is exp − 1 4 L/C × O(1) provided |ε| < 2π (L/C) −3/4 . Slightly overrotating or underrotating contributes to the damage suffered by the oscillator, but without much enhancing the sensitivity of the oscillator's final state to the qubit's state, and hence without much reducing the fidelity of the gate. We study the consequences of overrotation/underrotation in Sec. VI, and confirm our findings using numerical simulations in Sec. IX. We also argue, in Sec. X and Sec. XI, that the phase gate is robust against a sufficiently small nonzero temperature and against small perturbations in the Hamiltonian.
The two-qubit phase gate exp(i π 4 Z ⊗Z) is executed using a similar procedure, but where now two qubits connected in series are coupled to the LC oscillator. The total phase difference across the pair of qubits is either 0 for the states |0 ⊗|0 and |1 ⊗|1 , in which case the oscillator evolves to the final |ψ fin 0 , or π for the states |0 ⊗|1 and |1 ⊗ |0 , in which case the oscillator evolves to the final state |ψ fin 1 . Again, the gate is executed perfectly if |ψ fin 0 = |ψ fin 1 . Let us summarize the sufficient conditions for the phase gate to be well protected. Just as for the realization of the 0-π qubit itself, the execution of the protected phase gate relies on the construction of a "superinducting" circuit with L/C 1. This is a daunting engineering challenge as we have already noted at the end of Sec. II. To ensure high gate accuracy, we also assume that the steady state value J 0 of the Josephson coupling between the 0-π qubit and the oscillator satisfies √ J 0 C 1 and that the characteristic time scale τ J for the coupling to ramp on and off is O( √ LC); thus τ J is also small compared to the time L/π needed to execute the gate. Under these conditions, the error in the phase gate scales as exp −O L/C , and is stable with respect to small fluctuations in the implementation of the gate.

IV. SKETCH OF THE ERROR ESTIMATE
A noisy quantum gate realizes a quantum operation N actual , and a useful way to quantify the error in the gate is to specify the deviation N actual − N ideal from the ideal gate N ideal in the "diamond norm" [10]. As explained in Appendix B, for the protected phase gate this diamond norm distance (assuming there are no bit flips) is where |ψ fin 0,1 denotes the final state of the oscillator when |0 , |1 is the state of the 0-π qubit, as in Eq. (25). Thus we assess the gate accuracy by estimating the deviation of ψ fin 0 |ψ fin 1 from 1. To perform this estimate we track how the oscillator states |ψ 0 (t) and |ψ 1 (t) are related through three stages of evolution: In the first stage J(t) ramps on and the grid states are prepared -the initial state |ψ in evolves to |ψ begin 0 if the 0-π qubit's state is |0 and to |ψ begin = |ψ fin 0 . Consider the first (or third) stage of the evolution, where the coupling J(t) ramps on (or off) in a time of order τ J . If τ J is not too large compared to the period 2π √ LC of the oscillator, then the harmonic potential term ϕ 2 /2L may be treated perturbatively during this evolution stage. Hence, in first approximation the Hamiltonian is one of depending on whether the state of the 0-π qubit is |0 or |1 . This Hamiltonian commutes with the operator e −2πiQ , which translates ϕ by 2π; therefore e −2πiQ and the Hamiltonian can be simultaneously diagonalized. We may express the eigenvalue of this translation operator as is the conserved Bloch momentum, and [Q] denotes the nearest integer to Q; thus [Q] labels the distinct bands in the Hamiltonian's spectrum.
A diabatic transition between bands may be excited while J(t) varies, changing the value of [Q] by an integer, most likely ±1. If such transitions occur with nonnegligible probability, the final state of the oscillator will contain, in addition to a primary peak supported near Q = 0, also secondary peaks supported near Q = ±1; the phases of the secondary peaks depend on whether the Hamiltonian is H 0 or H 1 , and therefore diabatic transitions contribute to the gate error. The probability of a diabatic transition cannot be computed precisely, but as we will explain in Sec. VII it can be analyzed semiquantitatively, and is very small if τ J is sufficiently large.
For the purpose of discussing this diabatic error and other contributions to the deviation of ψ fin 1 |ψ fin 0 from 1, we will find it useful to consider the operator Here Π Q even projects onto values of Q such that the nearest integer value [Q] is even and Π Q odd projects onto values of Q such that [Q] is odd. We denote this operator asX because it can be regarded as the error-corrected Pauli operator σ X acting on a qubit encoded in the Hilbert space of the oscillator, as we explain in Sec. V. (Note thatX 2 = I.) Another (related) important property is that, since e ∓iϕ translates Q by ±1,X anticommutes with cos ϕ:X Our argument showing that |ψ fin 1 ≈ |ψ fin 0 has two main elements. On the one hand we use approximate symmetries and properties of grid states to see that |ψ 1 (t) ≈ X|ψ 0 (t) at each stage of the oscillator's evolution, so that in particular |ψ fin 1 ≈X|ψ fin 0 . On the other hand we argue that if the time scale τ J for J(t) to turn on and off is suitably chosen, then the oscillator's final state is mostly supported near Q = 0, so that in particular X|ψ fin 0 ≈ |ψ fin 0 . We note that the approximate Hamiltonians H 0 and H 1 in Eq. (28) are related by By integrating the Schrödinger equation using the Hamiltonian H 0 or H 1 during the first stage of evolution while J(t) ramps on, we obtain the unitary time evolution operators U 0 , U 1 , which are related by Thus the initial oscillator state |ψ in evolves to one of the states and therefore ψ begin We conclude that if the initial state is almost fully supported on even values of [Q] (for example, the oscillator ground state, a Gaussian in Q-space with width much less than 1/2), then |ψ begin 1 is very close toX|ψ begin 0 . So far we have ignored the effects of the quadratic term ϕ 2 /2L in the potential. This term can cause the wave function to broaden in Q-space and be squeezed in ϕ space, but we argue in Sec. VIII that this squeezing is a relatively small effect, so that the conclusion |ψ begin 1 ≈X|ψ begin 0 still holds accurately. Specifically, the contribution to the gate error due to squeezing scales as in Eq. (21), and hence becomes comparable to the other sources of error when we choose τ J ∼ √ LC. During the second stage of the evolution, while J(t) = J 0 is held constant, distinct peaks in the grid state acquire relative phases, and the condition |ψ 1 (t) = X|ψ 0 (t) becomes badly violated. However, after a time t ≈ L/π, the initial states |ψ begin 0 and |ψ begin 1 are restored, aside from the state dependent phase −i, and hence |ψ end 1 =X|ψ end 0 apart from a small error. Equivalently, the beginning states are very nearlyX eigenstates with eigenvalues ±1, and this property is preserved by the ending states TheX eigenvalues of these states are highly stable with respect to timing errors in the gate, in which the coupling is left on for too short or too long a time, because these states are approximate codewords of a quantum code, well protected against logical phase errors. We study the errors resulting from imperfect timing in detail in Sec. VI, because they can be calculated explicitly and are the dominant errors in some parameter regimes.
In the third stage of the evolution, as in the first stage, it is a good first approximation to ignore the harmonic ϕ 2 /2L term in the potential as the coupling J(t) ramps off. Using this approximation, the time evolution operators V 0,1 obtained by integrating the Schrödinger equation during the third stage when the state of the 0-π qubit is |0 , |1 , are related by hence the final oscillator states are and we conclude that Again, this conclusion is not modified much when the ϕ 2 /2L term is properly taken into account, so we may infer that the condition |ψ 0 (t) ≈X|ψ 1 (t) is well preserved during the final stage of evolution.
We have now seen that |ψ fin 1 ≈X|ψ fin 0 , and it remains to show thatX|ψ fin 0 ≈ |ψ fin 0 . This condition will be well satisfied provided that the final state |ψ fin 0 of the oscillator, like the initial state |ψ in , is almost fully supported in the interval Q ∈ [− 1 2 , 1 2 ]. Logical errors may occur because of diabatic transitions between bands, which may change Q by an odd integer, or because of spreading in Q space, which may enhance the tails of the wave function outside [− 1 2 , 1 2 ]. However, if diabatic transitions are rare and spreading is modest, as we expect if τ J lies in the appropriate range, then the gate will be highly accurate.
That our criterion for achieving |ψ fin 1 ≈ |ψ fin 0 involves the operatorX, which has a sharp discontinuity at Q = 1 2 + integer, is really an artifact of an insufficiently careful treatment of diabatic transitions. The transitions occur with enhanced probability for Q close to 1 2 +integer, replacing the sharp edge in Q space by a rounded step with width of order C/τ J , as we will explain in Sec. VII.

V. ENCODING A QUBIT IN AN OSCILLATOR
A continuous-variable quantum error-correcting code [6] underlies the robustness of the protected phase gate. The theory of quantum codes is not really essential for understanding our estimate of the gate accuracy, but this theory provides motivation for our construction of the protected gate, as well a convenient language for explaining how it works. Therefore, we will now review some of the relevant features of a code first described in [6].
In the version of the code we will use, a twodimensional encoded qubit is embedded in the infinitedimensional Hilbert space of a harmonic oscillator with position ϕ and conjugate momentum Q satisfying [ϕ, Q] = i. The code space can be specified as the simultaneous eigenspace with eigenvalue 1 of the two commuting operators One sees thatX andZ commute with the stabilizer generators M X and M Z , and hence preserve the code space; furthermore they anticommute with one another, as the logical Pauli operators should. The (unnormalizable) state |0 C ideal is the uniqueZ eigenstate with eigenvalue 1 in the code space. The con-ditionZ = 1 requires the variable ϕ to be an integer multiple of 2π, and the condition M X = 1 requires the codeword to be invariant under translation of ϕ by 2π. Hence |0 C ideal is represented in ϕ space as the uniform superposition of delta functions Similarly, the X = ±1 eigenstates |± C ideal , invariant under translation of Q by 2, are represented in Q space as See Fig. 9. Weak noise may displace ϕ slightly, but the codewords |0 C ideal and |1 C ideal remain perfectly distinguishable, and the error is correctable, as long as the value of ϕ shifts by less than π/2 in either direction. Similarly, a shift in Q by less than 1/2 is correctable. In principle we could diagnose the error by measuring M Z to determine the value of ϕ modulo π, and M X to determine the value of Q modulo 1, then perform active error correction by applying the minimal shifts in ϕ and Q that return the damaged code state to the code space. (In our protected phase gate, however, the error correction will be passive rather than active.) The unnormalizable ideal codewords, with infinite ϕ and Q , are unphysical. But if we coherently apply Gaussian distributed small shifts in ϕ and Q to the ideal codewords, we obtain the normalizable approximate codewords shown in Fig. 10. The wave function in ϕ space is a superposition of narrow Gaussians, each of width ∆ π/2 (i.e., (δϕ) 2 = 1 2 ∆ 2 , where δϕ denotes the deviation from the center of the narrow Gaussian), governed by a broad Gaussian envelope with width κ −1 2 (i.e., ϕ 2 = 1 2 κ −2 ). The Fourier dual wave function in Q space is a superposition of narrow Gaussians each of width κ (i.e., (δQ) 2 = 1 2 κ 2 , where δQ denotes the deviation from the center of the narrow Gaussian), governed by a broad Gaussian envelope with width ∆ −1 (i.e., Q 2 = 1 2 ∆ −2 ). If ∆ and κ are sufficiently small, these approximate codewords retain good error correction properties. However, there is now an intrinsic error arising from the tails of the narrow Gaussians, with the probability of a logicalZ error (a shift in ϕ by more than π/2) suppressed by e −π 2 /4∆ 2 , and the probability of a logicalX error (a shift in Q by more than 1/2) suppressed by e −1/4κ 2 .
Note that in Sec. IV we used the notationX = (−1) [Q] for the logical X operator, where [Q] denotes the nearest integer to the real variable Q. The operator (−1) [Q] acts in the same way as e −iπQ on ideal codewords for which Q is an integer. By expressing the logical operator as X = (−1) [Q] we are implicitly correcting phase errors that displace Q. That is, a Q eigenstate is decoded by shifting Q to the nearest integer value, and the eigenvalue ofX is determined by this ideal shifted value of Q, rather than the actual value of Q prior to the shift.
The first step in the execution of the protected phase gate described in Sec. III is the preparation of just such approximate codewords. If the state of the 0-π qubit is |0 , then the approximateZ = 1 eigenstate |0 C is prepared, and if the state of the 0-π qubit is |1 , then the approximateZ = −1 eigenstate |1 C is prepared. The narrowly peaked functions have width ∆ 2 = (J 0 C) −1/2 in ϕ space (though, because the potential is a cosine rather than harmonic, the tail of the peaked function decays more slowly than the tail of a Gaussian), and width κ 2 = (L/C) −1/2 in Q space. Hence the intrinsic logicalX error of the approximate codewords, which is central to our estimate of the error in the phase gate, is suppressed by the factor exp − 1 4 L/C .
After the approximate codeword is prepared, the Gaussian unitary operator e −itϕ 2 /2L = e −itϕ 2 /2π is applied (wheret = πt/L is a rescaled time variable). This unitary operator rotates the code space, transforming the stabilizer generator M X = e −2πiQ according to is also a stabilizer generator, we see that the state returns to the code space at (rescaled) timet = 1, but during its excursion the codeword acquires a Berry phase, and thus a nontrivial logical operation is applied. Specifically, the logical operatorX is transformed according tō whileZ remains invariant; hence the logical operation acting on the code space is exp i π 4Z . An error in the logical gate arises if the coupling remains on for too long or too short a time (i.e. ift is not precisely 1). However, this error is correctable with high probability if the timing error is small. We will study the consequences of overrotation/underrotation in Sec. VI.

VI. IMPERFECT GRID STATES
Now we will analyze the intrinsic phase errors in approximate codewords of the continuous variable code, and in particular how the phase error is affected by errors in the timing of the pulse that executes the phase gate.
In Sec. V we considered approximate codewords that can be described as "Gaussian grid states" -the codeword is a superposition of narrow Gaussian peaks governed by a broad Gaussian envelope. The Fourier transform of such a wave function is also a Gaussian grid state, so that both logical bit flip errors and logical phase errors are suppressed.
But it actually suffices for the approximate codeword to be a superposition of narrow functions with a broad envelope; neither the peak nor the envelope needs to be Gaussian. Even a non-Gaussian grid is mapped to a conjugate non-Gaussian grid by the Fourier transform, so there is good protection against bothX andZ errors. A Gaussian grid state could result from coherently applying Gaussian-distributed ϕ and Q shifts to an ideal codeword, assuming large shifts are suppressed. But we can also get a reasonable approximate codeword by applying more general small errors to the ideal codeword, with a distribution that is not necessarily Gaussian. What is important is that large shifts in both ϕ and Q are improbable, not the detailed form of the distribution. This observation will be useful when we consider in Sec. X the execution of the protected phase gate in the case where the initial state of the harmonic oscillator is an excited state rather than the ground state. In that case, the envelope of the approximate codeword in ϕ space is not strictly Gaussian, but rather Gaussian modulated by a Hermite polynomial, and its Fourier transform is also Gaussian modulated by a Hermite polynomial. Thus, in Q space, the narrow functions peaked at integer values of Q are also oscillator excited states. These functions have highly suppressed tails, ensuring that encoded phase errors are rare. In any event, considering more general kinds of grid states helps to clarify conceptually why the phase gate is robust.

A. Bit-flip and phase errors
Let f denote a narrow function in ϕ space, andF denote a broad envelope function in ϕ space. We express the approximate codewords as The function f is normalized so that and if the overlap between peaks centered at distinct integer multiples of π can be neglected, then |0 C and |1 C are normalized provided 2π n even The intrinsic bit-flip error of the approximate codeword |0 C arises from the probability that ϕ lies closer to an odd multiple of π than to an even multiple, which can be estimated as the intrinsic error in |1 C can be estimated similarly. Thus logical bit-flip errors are highly suppressed if f (ϕ) is a narrow, rapidly decaying function supported near zero. The approximate codewords in the conjugate basis are where π n |F (πn)| 2 ≈ 1.
We show in Appendix C that these codewords can be expressed as The intrinsic phase error of the approximate codeword |+ C arises from the probability that Q lies closer to an odd integer than an even integer, which can be estimated as the intrinsic error in |− C is estimated similarly. Thus logical phase errors are highly suppressed if F (Q) is a narrow, rapidly decaying function supported near zero. We see that for a good approximate codeword, the particular form of the narrow function f (ϕ) and the broad functionF (ϕ) is not so important. Instead, what matters is that the same narrow function f appears at each of the periodically spaced peaks (apart from the slow modulation in the normalization, governed by F ). Then when we Fourier transform, constructive interference occurs for values of Q that are reciprocally related to the spacing (e.g., even integer values of Q if the spacing in ϕ space is π), since for such Q values the various peaks in ϕ space add together with a common phase.

B. Gate error estimate
As explained in Sec. IV, the error in the protected phase gate can be expressed as where |ψ fin 0,1 denotes the final state of the oscillator (modulo the state dependent phase −i applied by the gate) when the state of the 0-π qubit is |0 , |1 . Under conditions enumerated in Sec. IV, this quantity can be well approximated by the modulus of where |ψ end 0,1 denotes the state of the oscillator as the coupling J(t) between oscillator and qubit starts to turn off, andX = Π Q even − Π Q odd denotes the error-corrected logical operator.
Let us suppose that the states |ψ begin 0,1 prepared when the coupling J(t) turns on are the approximate codewords |0 C , |1 C depicted in Eq. (47), where f (ϕ) is a narrow rapidly decreasing function andF (ϕ) is a broad envelope function. The coupling remains on for time t = (1 + ε) L π , where ε is the fractional error in the timing of the gate. Then as explained in Appendix C, the states |ψ end 0,1 have the same form as |0 C , |1 C , but withF (ϕ) replaced by the functioñ We define states note that |ψ end 0,1 are normalized, since each is obtained by applying a unitary time evolution operator to the normalized state |ψ in of the oscillator, but they are not necessarily orthogonal and hence the states |ψ end ± are not necessarily normalized. We may write which, using Eq. (29), has real part Re ψ end 1 |X|ψ end Therefore, using Eq. (57) we may estimate the real part of the gate error as in Eq. (55): To estimate the imaginary part we note that As in Eq. (53), we express and therefore obtain Thus Im η ε is dominated by overlaps between sharply peaked functions {F ε (Q − m)} centered at neighboring values of m; we show in Appendix C that where Odd[G(Q)] ≡ 1 2 (G(Q) − G(−Q)) denotes the odd part of the function G(Q).

C. Gaussian case
The gate error estimate in Eq. (62) and Eq. (66) is expressed in terms of the narrow function F ε (Q), whose Fourier transformF ε (ϕ) is the broad envelope function that governs the grid state of the oscillator. To be concrete, let us now suppose that this function is Gaussian, the relevant case where the oscillator's initial state |ψ in is the ground state.
The normalized ground state wave function is where Therefore, for ε = 0 the probability of an intrinsic phase error in the grid state is using the leading asymptotic approximation to the error function.
To find the probability of a phase error for ε = 0, we evaluate where Thus From Eq. (62), our estimate of the real part of the gate error becomes For ε small compared to πκ 2 , we may expand so that Re η ε ≈ exp ε 2 4π 2 κ 6 Re η ε=0 ; the overrotation of the gate has little effect on the real part of the gate error for ε 2πκ 3 . On the other hand, when ε is large compared to πκ 2 , we havē To see that these results are reasonable, note that Thus, crudely speaking, overrotation by ε shifts Q by We expect this shift to have a small effect if the amount of the shift is small compared to the width Q 2 1/2 = κ 2 /2 of the narrow peaks in Q-space, i.e. for ε πκ 2 . On the other hand, for ε ≈ πκ, the shift in Q is O(1), and we expect the error probability to be large.
To estimate the imaginary part of the gate error, we note that and from Eq. (66) we obtain where The integral I(α) can be expressed in terms of Gamma functions with imaginary arguments, but for our purposes it will suffice to observe some of its properties. For small α it has the power series expansion for large α it has the asymptotic expansion The ratio of the imaginary and real parts is expanding to linear order in α. Thus the imaginary part of the error is smaller than the real part when ε is sufficiently small, but dominates by a factor of order κ −1 for ε ∼ πκ 3 . The error |η ε | is bounded above by e −1/4κ 2 × O(1) for all ε, and hence by e −1/4κ 2 × O(1) for ε < 2πκ 3 . In Fig. 11 and 12, we plot the gate error estimate |η ε | as a function of ε for κ −2 = 40 and κ −2 = 80. Recall that, in the case where the LC circuit is initially in its ground state, we can identify κ −2 with L/C.

VII. DIABATIC ERROR
As explained in Sec. IV, the protected phase gate is very accurate if the final state vector of the oscillator depends only very weakly on the state of the 0π qubit: |ψ fin 1 ≈ |ψ fin 0 . Our argument establishing high gate accuracy has two elements -we show that |ψ 1 (t) ≈X|ψ 0 (t) at each stage of the oscillator's evolution, and also thatX|ψ fin 0 ≈ |ψ fin 0 . In Sec. VI we have seen that the condition |ψ 1 (t) ≈X|ψ 0 (t) is stable with respect to imperfections in the timing of the pulse that executes the gate. Now we will consider rare diabatic transitions, occurring as the coupling J(t) ramps on and off, that contribute to the deviation ofX|ψ fin 0 from |ψ fin 0 While the coupling J(t) turns on or off, the harmonic ϕ 2 /2L term in the potential can be treated perturbatively, where in first approximation the Hamiltonian is given by Eq. (28); we will consider the consequences of the harmonic term in Sec. VIII. This Hamiltonian commutes with the operator e −2πiQ , which translates ϕ by 2π; therefore e −2πiQ and the Hamiltonian can be simultaneously diagonalized. We express the eigenvalue of this translation operator as e −2πiq , where q = Q − [Q] ∈ [− 1 2 , 1 2 ] is the conserved Bloch momentum, and the integer [Q] labels the distinct bands in the Hamiltonian's spectrum.
A diabatic transition between bands may be excited while J(t) varies, changing the value of [Q] by an integer, typically ±1. If such transitions occur with nonnegligible probability, the final state of the oscillator will contain, in addition to a primary peak supported near Q = 0 (wherē X = 1), also secondary peaks supported near Q = ±1 (whereX = −1). We will discuss the probability of a transition between bands while J(t) ramps on; a similar analysis applies to transitions occurring as J(t) ramps down.
The probability of a diabatic transition can be computed most reliably for q close to ± 1 2 , since in that case the splitting between the lowest band and the first excited band is small when J(t) is small, and the continuous variable system can be well approximated by a two-level system. For example when J = 0, the state in the lowest band with Bloch momentum q slightly less than 1 2 has charge Q = q, while the state in the first excited band has Q = q − 1. Hence the splitting between bands is Since e ∓iϕ translates Q by ±1, the perturbation J(t) cos ϕ has matrix elements q − 1|J(t) cos ϕ|q = J(t) 2 = q|J(t) cos ϕ|q − 1 , (89) and the effective two-level Hamiltonian is where σ Z,X are Pauli matrices. The energy eigenstates are σ Z eigenstates for J(t) → 0 and σ X eigenstates for J(t) → ∞.

The time-dependent Schrödinger equation for this effective Hamiltonian can be solved exactly if J(t) increases exponentially with time, as
we show in Appendix E that if the initial state as t → −∞ is the ground state, then the probability that the final state is excited as t → ∞ is where the second equality holds when the argument of the tanh is large and positive. We recall that if the initial state of the oscillator is the ground state or a low-lying excited state, then the probability distribution for q decays as hence expanding in δ = 1 2 − q we find Therefore, if the most likely diabatic transitions occur for q ≈ 1 2 , where the two-level approximation is reasonable; we conclude in that case that the probability of a diabatic transition is suppressed by the factor exp(− 1 4 L/C). If on the other hand τ eff J < 1 π √ LC, then the most likely diabatic transitions occur for q far from ± 1 2 and the two-level approximation cannot be justified.
If J(t) does not ramp on exponentially, then the exact solution in Appendix E does not apply directly. To estimate roughly the probability of a diabatic transition for more general pulse shapes, we note that the transition typically occurs when σ Z and σ X in the effective Hamiltonian have comparable coefficients, so that If J(t) turns on like an error function with width τ J , then asymptotically for t/τ J → −∞, and we have In the two-level approximation, which applies for |Q| ≈ 1 2 , the probability of a jump from the lowest band (|Q| < 1 2 ) to the first excited band (|Q| > 1 2 ) matches the probability of a jump from the first excited band to the lowest band. Therefore, neglecting transitions to other bands and the higher-order probability of multiple transitions, and also ignoring other sources of error aside from diabatic jumps, we infer from Eq. (92) that the probability ofX = 1 (i.e., |Q| < 1 2 ) in the final state of the oscillator can be expressed as a factor of two has been included to take into account that the transition could occur during either the rampingup phase or the ramping-down phase. Because of the enhanced probability of a transition for |Q| ≈ 1 2 , the Q in integral has support extending beyond the range [− 1 2 , 1 2 ]; the tanh function smooths out the sharp edges at Q = ± 1 2 , replacing them by rounded steps with width of order C/τ eff J .

VIII. SQUEEZING ERROR
In Sec. IV we discussed how the state of the oscillator evolves as the coupling J(t) ramps on and off. There we used the idea that, because the oscillator's period is long compared to the time scale τ J for the coupling to turn on and off, we may as a first approximation ignore the ϕ 2 /2L term in the potential as in Eq. (28). Under that assumption we concluded that where |ψ in is the oscillator's initial state, and |ψ begin 0,1 denotes the state just after the coupling turns on, where |0 , |1 is the state of the 0-π qubit. The second equality follows if the initial state of the oscillator has negligible support outside the interval Q ∈ [− 1 2 , 1 2 ]. How is this conclusion affected when the quadratic term ϕ 2 /2L is included? If the coupling turns on slowly enough, this term can cause some squeezing of the wave function in ϕ space and correspondingly some spreading in Q space. To model crudely the effect of the spreading, consider first turning on J(t) using H 0 or H 1 in Eq. (28), then applying the operator e −iαϕ (which shifts Q by an amount α that does not depend on the state of the 0π qubit). Denoting the time evolution operator as J(t) turns on by U 0 or U 1 =XU 0X as in Sec. IV, we then have and therefore ψ begin Now we note that How much spreading in Q space should be expected? To make a crude estimate of how the harmonic term affects the distribution in Q space, we note that and choose β ≈ τ J /2L where τ J is the time scale for the coupling to turn on; using ϕ 2 = 1 2 L/C in the Gaussian ground state we infer Q is shifted by an amount of order Assuming τ J ∼ √ LC in order to suppress the diabatic error, we find that squeezing enhances the gate error by a factor that is, it contributes a subleading correction to the logarithm of the gate error. More realistically, treating the harmonic term as a perturbative correction to the zeroth-order Hamiltonian which has ϕ → ϕ + 2π periodicity, the dynamics is governed by the effective Hamiltonian where q ∈ [− 1 2 , 1 2 ] is the Bloch momentum and J,C (q) is the energy of the lowest band. Expanding this band energy to quadratic order, we have The effective capacitance C eff is approximately C for J small, but for JC ≈ 1, the band curvature begins to flatten rapidly; correspondingly C eff increases sharply, as does the oscillator's period 2π √ LC eff . The oscillator evolves adiabatically for J small, but its evolution freezes when its period becomes comparable to τ J , the characteristic time scale for the variation of the Hamiltonian. Therefore, the squeezing error is determined by the wave function's width in q-space at the time when the oscillator freezes; hence, where we obtain the last equality by choosing τ J ∼ √ LC to suppress the diabatic error. Thus the contribution to the gate error due to squeezing is comparable to the other sources of error. We can use a similar argument to conclude that the squeezing error arising as the coupling J(t) turns off is also of the same order.

IX. SIMULATIONS
We have compared the predictions from Sec. VI and IV to numerical simulations of the single-qubit phase gate exp(i π 4 Z). We solved the time-dependent Schrödinger equation for the Hamiltonians H 0,1 in Eq. (15), assuming the oscillator starts in the ground state (excited states will be considered in Sec. X). These simulations were done in MATLAB using the fourth-order split-operator method, which is based on the identity We assume that the coupling ∓J(t) cos ϕ between the oscillator and the 0-π qubit turns on with an errorfunction profile, and that the coupling turns off after the time delay τ ≈ L/π according to the time-reversed function J(τ −t); the time scale τ J for turning the coupling on and off and the time delay τ were chosen to optimize the gate accuracy. Then we varied the time delay τ = τ 0 (1 + ε), where τ 0 is the optimal value, to study the effect of overrotation/underrotation on the gate accuracy. Fig. 13 shows the results for a series of simulations with L/C = 80, √ J 0 C = 8 and τ J = √ LC, plotted together with the analytic prediction Eq. (86) arising from the overrotation error alone. For small ε, the gate error is substantially larger than the analytic prediction |η ε | ≈ 5 × 10 −10 , but roughly compatible with our expectations for the scale of the error due to diabatic transitions and squeezing, the dominant errors in this regime, when we choose τ J ≈ √ LC. For larger values of ε the overrotation error dominates and the numerical results agree well with the analytic prediction.
The simulations verify that the protected phase gate is much more robust than an unprotected gate. For an unprotected gate, executed by coupling the 0-π qubit to a Josephson junction as described in Sec. III, achieving a gate error less 10 −4 in the diamond norm requires pulse timing accuracy of order 10 −4 . In contrast, for a protected gate with the parameters specified above, 4% accuracy in the pulse timing suffices for achieving a gate error less than 10 −4 . When the pulse timing accuracy is better than 1%, the gate error is below 4 × 10 −8 .

X. NONZERO TEMPERATURE
Our estimate of the intrinsic gate error in Eq. (62) and Eq. (66) applies to any grid-like state of the form Eq. (53). In Eq. (75) and Eq. (82) we treated the specific case of a Gaussian grid state, which is what arises during the execution of the protected phase gate in the case where the initial state |ψ in of the harmonic oscillator is the ground state. Let us now consider the case where the initial state is excited, as occurs with nonzero probability at any nonzero temperature. To keep things simple, we will ignore the effects of overrotation, setting ε = 0. In that case, Im η ε = 0 because F ε (Q) is real, so we only need to worry about the real part of the gate error. In this section we also neglect the corrections due to diabatic transitions and squeezing.
When the coupling to the 0-π qubit is turned off, the harmonic oscillator Hamiltonian is and its ground state |ψ 0 obeys Our estimate diamond norm deviation from the ideal gate becomes Numerically, we have, e.g., |η(0)| ≈ 1.6 × 10 −5 for L/C = 40 and |η(0)| ≈ 5.2 × 10 −10 for L/C = 80. The oscillator's nth excited state is where which becomes in the Q representation. Therefore, the nth harmonic oscillator excited state can be expressed in Q space as where in the second line we have retained only the leading power of Q in the prefactor of the exponential. To estimate the probability of a logical phase error, we assume that this leading power dominates, and we also use the leading term in the asymptotic expansion Thus, for example, the intrinsic gate error for the first excited (n = 1) state is enhanced relative to the ground state by the factor 1 2 L/C. This approximation is applicable when n is not too large, so that the leading power of Q dominates the prefactor of the exponential in the tail of the wave function at |Q| > 1/2; in particular we require that or n L/C.
The energy of the nth oscillator state is E n = n/ √ LC; therefore, in the thermal ensemble with inverse temperature β, the probability that the oscillator is in the nth state is Thus, if the oscillator is in a thermal state, while the intrinsic phase error probability for the nth state is enhanced by the factor (L/C) n/2 /2 n n!, it is also suppressed by the Boltzmann factor e −nβ/ √ LC . Summing up the error probabilities for all oscillator states, with the appropriate Boltzmann weights, we find the real part of η (and in the case we are considering there is no imaginary part) is essentially the probability of a logical phase error in the grid state, and hence to compute the gate error we need only compute this logical error probability for the thermal ensemble. Thus, the error at finite temperature is comparable to the zerotemperature error, provided that If, for example, β/ √ LC ≈ 3, then compared to the zerotemperature case, thermal effects enhance the phase error probability by the factor 2.6 for L/C = 40 and 7.0 for L/C = 80. We expect, then, that the protected phase gate remains reasonably robust provided the temperature is smaller than or comparable to the frequency of the superinductive LC circuit.
Numerical results, plotted in Fig. 14, show that the gate performance remains robust for excited eigenstates. In addition to the enhancement of the intrinsic phase error predicted by Eq. (125), there is also a contribution to the gate error arising from diabatic transitions and squeezing, which becomes less important for more highly excited eigenstates.
Up until now we have addressed how the accuracy of the phase gate is affected if, due to thermal fluctuations, the initial state of the LC oscillator is not the ground state, but we have not considered thermally excited transitions that might occur while the qubit and oscillator are coupled during the execution of the gate. A thermally activated transition between bands, like a diabatic transition, could flip the value ofX = (−1) [Q] and cause the gate to fail. But as in Sec. VII, the relevant band gap is of order 1/C, so such transitions are suppressed by a Boltzmann factor On the other hand, spontaneous decay of the oscillator during the execution of the gate is not likely to flip the value of X, and hence has little impact on the gate accuracy.

XI. PERTURBATIVE STABILITY
Aside from its stability with respect to pulse timing errors and thermal effects, we also expect the protected phase gate to be robust against small deformations in the Hamiltonian of the LC oscillator and of the switch coupling the oscillator to the qubit. Suppose for example that the oscillator's potential energy V includes a small anharmonic term so that Over time t, the effect of the anharmonic term on the charge Q is thus the charge spreads by an amount δQ ≈ 4λt ϕ 6 1/2 = 4λt Comparing to the contribution in Eq. (80) to δQ arising from overrotating the gate, and choosing t ≈ L/π, we see that the effect of the anharmonic term is roughly comparable to the effect of an overrotation error where α ≡ λL L/C is a dimensionless parameter characterizing the strength of the anharmonic correction. For L/C = 80 and √ J 0 C = 8 as in Sec. IX, numerical results plotted in Fig. 15 confirm that the gate accuracy is not much affected by the anharmonic term for α 10 −3 , as expected. In these simulations, we assumed that the initial state of the oscillator is the ground state of the unperturbed oscillator Hamiltonian, which for α small has a large overlap with the ground state of the perturbed Hamiltonian. The Josephson coupling between the 0-π qubit and the oscillator is a periodic function of ϕ with period 2π, but need not be a pure cosine potential. If we include a next-to-leading harmonic correction, the time-dependent Hamiltonian has the form where f (t) varies between 0 and 1 as the coupling turns on or off, and β is a dimensionless parameter characterizing the strength of the perturbation. (Note that shifting ϕ by π changes the sign of cos ϕ but not the sign of cos 2ϕ.) For √ J 0 C 1 and β 1, we expect the wave function to be well localized near even or odd integer multiples of π in ϕ space (depending on whether the Hamiltonian is H 0 or H 1 ) while the coupling is turned on; hence it should be a good approximation to expand the potential in a power series about these local minima, and therefore the perturbation is roughly equivalent to rescaling J 0 according to The precise value of J 0 does not strongly influence the phase error probability, as long as it is large enough to allow discrete peaks to form in ϕ space (i.e., to strongly suppress phase slips); it instead determines the probability of an intrinsic bit flip error, as in Eq. (50). Numerical simulations confirm that the phase gate accuracy is insensitive to the perturbation in Eq. (136) when β is small. For L/C = 80 and √ J 0 C = 8, we find that the effect on the gate error is negligible for |β| 0.05.

XII. UNIVERSALITY
We have focused so far on performing the single-qubit gate exp(i π 4 Z) and the two-qubit gate exp(i π 4 Z ⊗ Z); in principle these can be executed with very high fidelity by coupling a 0-π qubit or a pair of such qubits to a superinductive LC circuit. But unfortunately these gates are not adequate by themselves for universal quantum computing.
One way to obtain a universal gate set is to augment these gates by the following operations [5]: (1) Preparation of the single-qubit states |0 and |+ (the Z = 1 and X = 1 eigenstates). (2) Measurement of the singlequbit Pauli operators Z and X. (3) The single-qubit gate exp(i π 8 Z). (In fact (1) need not be regarded as independent of (2), since repeated noncommuting measurements can be used to achieve the state preparation, but we list these operations separately for clarity and completeness.) The operation exp(i π 8 Z) could be executed by coupling the 0-π qubit to a Josephson junction for a specified time, as in Fig. 4. This unprotected gate might be fairly noisy. However, if all the other operations in the universal set were perfect, then scalable quantum computing would be possible provided the noisy exp(i π 8 Z) gate meets the loose fidelity criterion F > .93 [11]. Therefore if the gates exp(i π 4 Z) and exp(i π 4 Z ⊗ Z) are well protected, it follows that highly reliable universal quantum computation can be achieved provided that the measurements, like these gates, have a very low error rate.
In practice, the measurements are likely to be noisy. However, if they can be performed nondestructively (with only a very low probability of changing the eigenvalue of measured operator), then they can be repeated multiple times to improve reliability.
We note that the cphase gate, the two-qubit gate, diagonal in the computational basis, with eigenvalues {1, 1, 1, −1}, can be constructed from protected gates using the decomposition (up to an overall phase). One way to perform a nondestructive measurement of Z is to use the property we may apply cphase to the target qubit (the one to be measured) and an ancilla qubit prepared in the state |+ , then perform X measurement on the ancilla qubit.
If the cphase gate is not likely to induce a bit flip on the target qubit, this procedure can be repeated many times, then the measurement result determined by a majority vote of the outcomes. If we are limited to using our protected gates, we cannot use the same trick to amplify an X measurement. Perhaps the charge measurement described in Sec. II, though the outcome is noisy, can be done fault tolerantly, meaning that measurement procedure is not likely to flip the eigenvalue of X. In that case, amplification by repetition and majority voting will work. Otherwise, there are alternative ways to boost the measurement accuracy, using repetition coding.
For example, Ref. [12][13][14] describes a scheme for universal fault-tolerant quantum computing built from the cphase gate, |+ preparation, X measurement, and, in addition, preparation of the single-qubit states which can be achieved by applying exp(i π 4 Z) or exp(i π 8 Z) to |+ . The main point of [12][13][14] is that this scheme works effectively when the noise in the cphase gate is highly biased, i.e., when Z errors are much more common than X errors. The point we wish to emphasize here is that the scheme remains effective when the X measurement error rate is much higher than the cphase gate error rate.
The crucial element of the construction in [12,13] is a "teleported" encoded cnot gate acting on blocks of a repetition code, shown in Fig. 16. (In [14] this construction is extended to Bacon-Shor codes.) The probability of a logical error in the cnot gate can be bounded above as [12] ε CNOT ≤ 4 n where ε g is the probability of a dephasing error and ε g is the probability of a bit flip error in the cphase gate, and ε m is the error probability in a |+ preparation or an X measurement. Here n is the length of the repetition code, and we assume that each measurement is repeated n times; the prefactor of 4 arises because the cnot gadget contains four measurements decoded by majority vote, any of which might fail, and the factor 3nε g + 2ε m is an upper bound on the probability of error for each bit in each decoded block, neglecting the bit flip errors.
(The second inequality is obtained from the Stirling approximation.) The term 7n 2 ε g is an upper bound on the probability that one or more cphase gates in the cnot gadget have bit flip errors.
Just to illustrate the robustness of the cnot gadget with respect to measurement and preparation errors (assuming bit flips are highly suppressed), note that for ε m = .01, ε g = 10 −5 , and ε g = 10 −9 , by choosing n = 11 we find ε CNOT < 10 −6 . The analysis in [12] then shows that, by applying the state distillation ideas from [11], scalable quantum computing can achieved by augmenting the CNOT gadget with |−i and |e −iπ/4 preparations having the relatively high error rate ε m . This example indicates one possible way in which noisy measurements can be tolerated if appropriate gates are highly reliable.

XIII. CONCLUSIONS
A "0-π qubit," is a two-lead superconducting device whose energy is minimized when the superconducting phase difference between the leads is either 0 or π. This qubit, if properly designed, can be very robust with respect to weak local noise [3][4][5]. In this paper, we have taken it for granted that near-perfect 0-π qubits are attainable, and have asked whether quantum information encoded in such qubits can be processed fault tolerantly. Our conclusion, fleshing out a suggestion in [5], is that highly accurate nontrivial quantum gates can be executed by coupling one or two qubits to a superconducting LC oscillator with very large inductance. In principle the gate error becomes exponentially small when L/C is large compared to /4e 2 ≈ 1.03 kΩ, where L is the inductance and C is the capacitance of the oscillator.
We have estimated the gate accuracy using both analytic arguments and numerical simulations. The analytic arguments use approximations, in particular for the analysis of errors due to diabatic transitions and squeezing, that are validated by the simulations. The point of the simulations is not necessarily to capture fully the behavior of realistic devices, but rather to verify that the analytic arguments are on solid ground. The analysis applies to any sufficiently robust 0-π qubit, regardless of its internal structure.
The protected gates are the single-qubit phase gate exp i π 4 Z and the two-qubit phase gate exp i π 4 Z ⊗ Z . In both cases, the oscillator starts out in a low-lying energy state; then turning on a tunable Josephson coupling between the qubit(s) and the oscillator prepares a state of the oscillator protected by a continuous variable quantum error-correcting code. The coupling is kept on for a specified time, during which the code state acquires a nontrivial Berry phase, inducing a nontrivial encoded operation, with error probability exponentially small in L/C. Then the coupling turns off, returning the oscillator to a low-lying state slightly different from the initial one.
The ramping of the coupling on and off takes place over a time scale τ J = O( √ LC), chosen to achieve an optimal compromise between errors due to diabatic transitions (which favor large τ J ) and errors due to squeezing (which favor small τ J ). The gates are robust against generic small errors in the Hamiltonian and thermal effects, due to the good error-correcting properties of the quantum code. Entropy due to noise is mostly absorbed by the oscillator, inflicting little damage on the 0-π qubit. These protected phase gates are not a universal gate set by themselves, but a universal fault-tolerant scheme can be built from the protected gates together with singlequbit measurements and noisy unprotected phase gates.
We do not know whether a very robust 0-π qubit, and/or the superinductive LC circuit needed for protected phase gates, will prove to be feasible in superconducting devices. We hope that other settings will be found in which highly reliable quantum gates can be re-alized by using tunable couplings between qubits and oscillators.
units such that = 1 and express the capacitance and inductance in rationalized units such that C −1 and L −1 have dimensions of energy (or inverse time). Specifically, where the subscript "conv" refers to conventional units. We can also relate the parameters J, C to the commonly used charging energy E C and Josephson energy E J : In the main text of the paper we have studied this same Hamiltonian, where θ = 0 or π and J pulses on and off during the execution of a quantum gate. But here we focus on the case where J is time independent.
In the d.c. regime, the whole device behaves like an effective Josephson element -its ground state energy E(θ) depends on the phase difference θ between the leads. The effective Josephson energy can be characterized by We will see that this number varies by orders of magnitude when the circuit parameters change in a much narrower range. Suppose that C and L are fixed, while J may vary from very small to very large values. In the limit J → 0, we may treat the Josephson energy as a small perturbation of the LC oscillator, obtaining where J eff = J cos ϕ , = Je − ϕ 2 /2 = J exp − 1 4 L/C .
(A6) In the opposite limit J → ∞, the dynamical phase is locked: ϕ ≡ θ (mod 2π), and therefore If L is large, the effective Josephson coupling is suppressed in both limits, but the suppression is exponential only in the limit J → 0. We say that the circuit is superinducting if the dimensionless characteristic impedance is large, or equivalently if the impedance in conventional units is large compared to the superconducting impedance quantum R Q = /(2e) 2 ≈ 1.03 kΩ. Reaching this superinducting regime is a significant engineering challenge, quite hard to achieve using geometric inductance (except perhaps by constructing a coil with a very large number of turns). Indeed, the inductance of a loop of wire is accompanied by a parasitic capacitance such that L conv /C conv ∼ 4π/c ≈ 377 Ω (where c is the speed of light). This is the impedance of the free space, smaller than R Q by the factor 16πα where α = e 2 / c ≈ 1/137 is the fine structure constant. One possible way to realize a superinductor is to build a long chain of Josephson junctions [7][8][9]. Another is to use a long wire, thick enough to suppress phase slips, built from a material with large kinetic inductance.
In the case where L/C 1, we can compute the ground state energy of the Hamiltonian Eq. (A1) semianalytically. First we note that in the limit L → ∞ the problem reduces to particle moving in a periodic potential: This approximate Hamiltonian H preserves the quasimomentum q = Q mod 1, and therefore can be solved using Bloch wave functions. In the lowest Bloch band, the energy can be expressed as a function of the quasimomentum q ∈ − 1 2 , 1 2 in two different limits: where In the case JC 1, the system stays near a minimum of the cosine potential at ϕ = 2πn and occasionally tunnels to an adjacent minimum through the potential barrier. In Eq. (A11), ω is the angular frequency for small oscillations about the potential minimum, and λ is the amplitude tunneling amplitude.
To compute λ we recall the semiclassical analysis [15] for a particle of mass m tunneling through a symmetric double-well potential V (x) with minima at x = a, b, which yields where (A13) here ω = V (a)/m and ∆x = (V (a) m) −1/4 is the width of the ground state localized around the potential minimum. We obtain Eq. (A10) using m = C and V ( ϕ) = J(1 − cos ϕ).
Defining the effective capacitance C eff by we obtain from Eq. (A10,A11) the asymptotic values The numerically computed value of C eff as a function of JC is plotted in Fig. 18. Now we return to the original Hamiltonian H in Eq. (A1). For small but nonzero L −1 . the quasimomentum q, though not exactly conserved, is a slow variable which can be treated using the adiabatic approximation. We obtain the effective Hamiltonian This problem is similar to the one we have just solved, Eq. (A8); now the variable q is periodic (defined modulo 1), and the parameter θ plays the role of quasimomentum.
If L/C eff 1, i.e. JC ln(L/C), the ground state energy is given by the formula E(θ) = −J eff cos θ + const, where J eff is twice the tunneling amplitude. This expression is analogous to Eq. (A10), except that now we consider tunneling through the periodic "potential" ε(q) from an integer value of q to an adjacent integer value. From Eq. (A12) we find where The parameters µ and ν are numbers of order 1: As JC increases from zero to infinity, µ changes from 1/4 = 0.25 to 2/π 2 ≈ 0.2026, and ν changes from 1/ √ π ≈ 0.564 to 4/π 3/2 ≈ 0.718. For Eq. (A17) to apply we also need that J not be too small: JC (L/C) −1/4 . For smaller J, the adiabatic approximation breaks down near the point q = ±1/2 where two branches of the parabola ε(q) = q 2 /(2C) meet each other. However, the exponential factor e −S is still correct and coincides with cos ϕ from Eq. (A6).
To summarize, we have calculated the effective Josephson coupling in three different regimes, finding

JC
(L/C) −1/4 : (L/C) −1/4 JC ln(L/C) : JC ln(L/C) : The numerical results for L/C = 40, together with plots of Eqs. (A20-A22), are shown in Figure 19. The protected phase gate is executed by coupling the qubit to an oscillator for a prescribed time interval. We assume that the initial state of qubit and oscillator is a product state |ψ ⊗ |ψ in , where |ψ = a|0 + ib|1 is the initial (normalized) state of the qubit and |ψ init is the initial state of the oscillator. After the coupling between qubit and oscillator is switched off, the joint state of qubit and oscillator becomes where ψ 0 |ψ 0 = ψ 1 |ψ 1 = 1. We assume that there are no bit flip errors, but there may be a phase error. If the gate is ideal, then ψ 0 |ψ 1 = 1, and the gate rotates the phase of |1 by the angle −π/2 relative to the phase of |0 . We wish to quantify the error, using some appropriate measure of the deviation of ψ 0 |ψ 1 from 1.

Fidelity
One way to quantify the error is to use the fidelity of the actual state with the ideal state. Tracing out the oscillator, we obtain the final density operator for the qubit where and C = | ψ 0 |ψ 1 | is real and nonnegative. The fidelity F with the ideal state |ψ ideal = a|0 + b|1 is Thus the "infidelity" (the deviation of F from 1) is maximal when |a| 2 = |b| 2 = 1/2, and we conclude that Denoting δ = 1 − C, we have assuming δ, φ 1.
of a noisy gate N from the corresponding ideal gate U in the "diamond norm" [10]. The advantage of the diamond norm is that it quantifies the damage inflicted by an operation that acts on a subsystem that might be entangled with a complementary subsystem, e.g., a noisy gate acting on a qubit or pair of qubits that is entangled with the rest of the qubits in a quantum computer. The diamond norm E is defined as the L 1 norm of the extended operator E ⊗ I; that is If E acts on a Hilbert space H of dimension d, then I denotes the identity operator acting on another Hilbert space H of dimension d, and σ is a state on H ⊗ H .
For the operation defined by Eq. (B15), the two-qubit state σ that maximizes the L 1 distance between (N ⊗ I)(σ) and σ is a maximally entangled pure state, which we may choose to be |φ + = 1 √ 2 (|00 + |11 ). Letting N act on the first qubit, we obtain an ensemble of two pure states, 1 √ 2 e −iφ/2 |00 + e iφ/2 |11 , prob = 1 2 (1 + C), and the density operator can be expressed as a 2 × 2 matrix acting on the span of |00 and |11 : N ⊗ I(|φ + φ + |) = Evidently, extending E to E ⊗ I does not increase its maximal L 1 norm; hence the noisy gate's deviation from the ideal gate in the diamond norm coincides with the maximal trace distance deviation of the density operator ρ from the ideal density operator ρ ideal .
The accuracy of the two-qubit phase gate can be analyzed in the same way. Now the final state of the oscillator depends on the total phase difference across a pair of 0-π qubits; it is |ψ 0 for the two-qubit states |00 and |11 , and |ψ 1 for the two-qubit states |01 and |10 . The eigenvalues of ρ ideal − ρ become doubly degenerate, and hence the diamond norm deviation from the ideal gate is twice as large as for the single-qubit phase gate.
Both the fidelity and the diamond norm are useful measures of the gate error. The significant difference is that the diamond norm deviation (≈ (1 − C) 2 + φ 2 ) is linear in φ (for φ small and C ≈ 1), while the infidelity is quadratic in φ. The threshold theorem establishes a sufficient condition for scalable quantum computing, expressed as an upper bound on the diamond norm, and it applies under the pessimistic assumption that phase errors accumulate linearly with the circuit size. But if the phase errors are actually random, we might expect them to add in quadrature, and in that case the infidelity may be a more appropriate way to quantify the gate error. and if the overlap between peaks centered at distinct integer multiples of π can be neglected, then |0 C and |1 C are normalized provided 2π n even |F (πn)| 2 ≈ 1, 2π n odd |F (πn)| 2 ≈ 1. (C3) The approximate codewords in the conjugate basis are (πn)T (πn) dϕ f (ϕ)|ϕ , where π n |F (πn)| 2 ≈ 1.
To express these states in the Q basis we use where F (Q) = 1 √ 2π dϕ e −iQϕF (ϕ), The codewords |+ C and |− C can now be expressed as Here F is a narrow function centered at zero in Q space, so that |+ C has support near even integer values of Q, and |− C has support near odd integer values of Q. Becausef (Q) is slowly varying, it is nearly constant within each peak, and the codewords can be well approximated as

Phase gate overrotation
We wish to study the performance of the encoded phase gate, which rotates the relative phase of |0 C and |1 C by −π/2. For ideal codewords, this gate is achieved by applying the unitary operator e −iϕ 2 /2π , which has the value 1 when ϕ is an even multiple of π, and has the value −i when ϕ is an odd multiple of π. Loosely speaking, this operation arises from the harmonic potential of the superinductor, turned on for a specified time interval. An error could occur because the timing is not precisely correct, so that e −iϕ 2 (1+ε)/2π is applied instead, where ε 1. In ϕ space, each narrow peak in the approximate codeword is stabilized by the cosine potential, but when the phase gate is overrotated, the relative phases of the peaks are modified, with the peak localized near ϕ = nπ acquiring the phase e −iεπn 2 /2 . Thus, instead of Eq. (C8), the approximateX eigenstates become Therefore, as in Eq. (53), the approximate codewords |± C ε can be expressed as where F ε (Q) = 1 √ 2π dϕ e −iQϕF ε (ϕ). (C19) 3. Imaginary part of overrotation error As explained in Sec. VI B, the imaginary part of the gate error due to overrotation is estimated as Im η ε = Im ψ end − |X|ψ end To obtain the first equality we suppose that the integral is dominated by the overlaps of peaked functions {F (Q − m)} centered at neighboring integer values of m, and approximate the slowly varying functionf (Q) by a constant in each integral. We obtain the second equality by shifting the integration variable in each integral, and the third equality by using the normalization condition 2 m even |f (m)| 2 ≈ 1 ≈ 2 n odd |f (n)| 2 , while noting that the integral of the even part of F (Q + 1 2 ) * F (Q − 1 2 ) cancels between the integrals over [−1, 0] and [0, 1]. (Odd[G(Q)] ≡ 1 2 (G(Q) − G(−Q)) denotes the odd part of the function G(Q), and c.c. denotes the complex con-jugate.) Finally, because the integrand decays rapidly we make a negligible error by extending the upper limit of integration from 1 to infinity. Thus we conclude that Im η ε ≈ 4 Im ∞ 0 dQ Odd F (Q + 1 2 ) * F (Q − 1 2 ) .

(C23)
Appendix D: Poisson summation formula To derive Eq. (C9), we note that is a periodic function of Q with period two, and therefore has a Fourier series expansion A more general formula is also sometimes useful: m F (Q − 2m)e iπ(Q−2m)α = π 2 n e −iπQnF (π (n + α)).
We may obtain Eq. (D6) from Eq. (D5) by observing that multiplying F (Q) by e iπQα is equivalent to shifting the argument of its Fourier transformF (ϕ) by πα.
Assuming u > 0, the solution |ψ (0) (t) that starts out in the ground state obeys the initial conditionsc 0 → 1 and