EnergyEfficient Quantum Computing
Abstract
In the near future, a major challenge in quantum computing is to scale up robust qubit prototypes to practical problem sizes and to implement comprehensive error correction for computational precision. Due to inevitable quantum uncertainties in resonant control pulses, increasing the precision of quantum gates comes with the expense of increased energy consumption. Consequently, the power dissipated in the vicinity of the processor in a wellworking largescale quantum computer seems unacceptably large in typical systems requiring low operation temperatures. Here, we introduce a method for qubit driving and show that it serves to decrease the singlequbit gate error without increasing the average power dissipated per gate. Previously, singlequbit gate error induced by a bosonic drive mode has been considered to be inversely proportional to the energy of the control pulse, but we circumvent this bound by reusing and correcting itinerant control pulses. Thus our work suggests that heat dissipation does not pose a fundamental limitation, but a necessary practical challenge in future implementations of largescale quantum computers.
pacs:
I Introduction
Quantum bits, or qubits Preskill (1998), have been realized using, for example, superconducting circuits Nakamura et al. (1999); Barends et al. (2014); Kelly et al. (2015), quantum dots Bonadeo et al. (1998); Veldhorst et al. (2015), trapped ions Sackett et al. (2000); Debnath et al. (2016), single dopants in silicon Pla et al. (2012), and nitrogen vacancy centres Togan et al. (2010). The state of a qubit is affected by various sources of error such as finite qubit lifetime, measurement imperfections, nonideal initialization, and imprecise external control. Provided that these errors are below a certain threshold, they can be corrected with quantum error correction codes Terhal (2015); Fowler et al. (2012); Kelly et al. (2015) which encode the information of a logical qubit into an ensemble of physical qubits. Surface codes Fowler et al. (2012), error correction codes with the highest known thresholds, may require thousands of physical qubits for each faulttolerant logical qubit. Controlling such a large ensemble of qubits consumes a great amount of power, rendering heat management at the qubit register an important challenge.
The power consumption of a quantum processor can be decreased by implementing more accurate physical qubits, thus leading to smaller ensembles forming the logical qubits. However, it is known that gate errors also arise from the quantummechanical uncertainties in the control pulse Ozawa (2002); GeaBanacloche (2002); GeaBanacloche and Ozawa (2005, 2006); GeaBanacloche and Miller (2008); Karasawa et al. (2009); Igeta et al. (2013). In the case of a resonant disposable control pulse, this type of error is inversely proportional to the pulse energy, and hence poses a tradeoff in the power management of the quantum computer. Even in the absence of all other types of error, this result implies such a high level of dissipated power at the chip temperature that it challenges the commercially available cryogenic equipment, as we estimate in Appendix A for a typical superconducting quantum computer running a surface code to factorize a 2000bit integer.
In this work, we derive the greatest lower bound for the gate error within the resonant Jaynes–Cummings model Jaynes and Cummings (1963); Shore and Knight (1993). The inevitable error originates from the quantum nature of the driving mode and becomes dominant in the regime of low driving powers. In contrast to previous work GeaBanacloche and Ozawa (2005, 2006); Igeta et al. (2013), our constructive derivation does not need to assume any particular state of the system and is applicable to qubit rotations of arbitrary angles. In addition to the lower bound itself, our method naturally finds the bosonic quantum states of the pulse that reach the bound. We explicitly show that singlequbit rotations are optimally realized by applying a certain amount of squeezing to coherent states.
The optimal states do not alone solve the abovementioned heat dissipation problem, but we additionally find that backactioninduced correlations between the control pulse and the controlled qubit can be transferred to auxiliary qubits (see also Refs. Layden et al. (2016); Slosser et al. (1989); Åberg (2014)). Thus we propose a control protocol where multiple gates are generated with a single control pulse which is frequently refreshed using auxiliary qubits. Whereas previous studies suggest that it is not possible to save energy by reusing control pulses without sacrificing the minimum gate fidelity GeaBanacloche and Ozawa (2006), our method exhibits orders of magnitude smaller energy consumption with no drop in the average gate fidelity.
This paper is organized as follows. In Sec. II, we briefly summarize the formalism used to describe qubit rotations and discuss gate errors in the semiclassical model. In Sec. III, we derive the quantum limit of gate error. The refreshing protocol is constructed and studied in Sec. IV and the key results are summarized and discussed further in Sec. V.
Ii Semiclassical model
Let us first review the semiclassical formalism of singlequbit control and the resulting gate errors. The state of a qubit can be represented as a Bloch vector constrained inside a unit sphere, see Fig. 1. Singlequbit logic gates , realized using, e.g., microwave pulses, rotate the Bloch vector by about the axis . Assuming that the control pulse is a classical waveform in resonance with the qubit transition energy , the system may be described in the rotating frame using a semiclassical interaction Hamiltonian of the form Nakahara and Ohmi (2008)
(1) 
where and denote the ground and excited states of the qubit, respectively, represents the classical amplitude and phase of the control field, is the coupling constant including the pulse envelope, and is the reduced Planck constant. The gate is implemented by choosing the interaction time and the pulse envelope such that they satisfy . For example, setting and along the axis, the temporal evolution operator becomes , where is the Pauli operator. Thus, up to a redundant global phase factor, the interaction implements a perfect NOT gate .
We assess gate errors by utilizing the state transformation error
(2) 
where the initial qubit state is given by and is the desired gate. In general, the qubit state is unknown during the computation, and therefore we choose not to restrict our analysis to any specific state. Instead, we study the average of a given error measure over a uniform state distribution on the Bloch sphere, generally given by
(3) 
Semiclassically, a source of gate error arises from uncertainties in the phase and the photon number , which are, for small phase fluctuations, fundamentally bounded by quantum mechanics through the minimal uncertainty relation Pegg and Barnett (1989) . Thus we consider a control pulse with an average of photons and minimal uncertainties and , where is a free squeezing parameter. These uncertainties carry on to the temporal evolution operator , and we find from Eq. (3) that the average gate error becomes inversely proportional to the photon number. For the gate for example, we obtain the average gate error in the limit . Interestingly, the error is minimized with a nonzero squeezing parameter , a result also obtained in the full quantum treatment in Sec. III.2. An alternative qubitindependent error quantity is the maximum gate error given by , which obeys a similar dependence Igeta et al. (2013); GeaBanacloche (2002).
Iii Quantum limit of gate error
Let us proceed to the full quantum treatment, where the gate operation arises from the quantummechanical interaction between the qubit and a single bosonic mode referred to as the drive. Utilization of such quantum drive Salmilehto et al. (2014) allows us to account for the changes in its state arising from the interaction with the qubit. In practice, qubits are also driven by propagating photons described by a continuum of modes, but such arrangements do not save energy in comparison to a wellcontrolled single mode. Hence our description below is expected to yield a fundamental lower bound for the energy needed for controlling a single qubit at a given fidelity.
In contrast to the semiclassical model, the evolution of the qubit is not unitary. After the interaction, the qubit state is extracted by taking a partial trace over the drive degrees of freedom as
(4) 
where and denote the arbitrary initial density operator and the evolution operator of the qubit–drive system, respectively. The error, or infidelity, between the target and the resulting qubit state is here defined as
(5) 
which can be regarded as a generalization of Eq. (2).
iii.1 Gate error in the Jaynes–Cummings model
The dynamics of the qubit–drive system is generally described by the Jaynes–Cummings Model Jaynes and Cummings (1963); Shore and Knight (1993), which includes the rotatingwave approximation. Assuming resonant interaction, the system is governed by the interaction Hamiltonian
(6) 
where is the bosonic annihilation operator of the drive mode. Without loss of generality, we assume an onoff envelope such that for and otherwise. Most features of the semiclassical model are reobtained if and the drive is in the coherent state , where is the th Fock state. For example, taking the expectation value of in the state yields the semiclassical Hamiltonian in Eq. (1). Thus the coherent state approximately induces a gate if the timing condition is satisfied.
If the initial state of the joint system is separable, , where and denote the initial qubit and drive states, respectively, the gate error of Eq. (5) induced by the Jaynes–Cummings interaction can be written in the general form
(7) 
Here, denotes either the transformation error of a particular qubit state, the average gate error [Eq. (3)], or the maximum gate error . The information about the desired gate and chosen interaction time is contained in the corresponding operator which is denoted either by , , or , respectively. An analytical expression for and can be found for any gate, whereas an expression for exists for at least rotations , where the rotation axis is restricted to the plane of the Bloch sphere. See Appendix B for derivations and detailed expressions.
iii.2 Minimization of gate error
State  

Coherent,  (110%)  (210%)  0  (100.5%)  0  
Squeezed,  (*)  (200%)  (*)  
S. cat,  (*)  (*)  N/A 
We solve the drive states that minimize the average or maximum gate error for a given interaction time and a desired rotation . To this end, it is sufficient to consider only pure states Nielsen and Chuang (2000), and hence we may employ the forms given by Eq. (7). The errorminimizing states are the eigenstates of operators that correspond to the largest eigenvalue ,
(8) 
By definition, the optimal states provide a fundamental lower bound for the error .
We solve this eigenvalue equation numerically. Examples of fidelityoptimal solutions are shown in Fig. 2a using the Wigner pseudoprobability function Dodonov (2002). The numerically obtained states can be accurately described using the squeezed coherent states , where and are the displacement and squeezing operators, respectively Dodonov (2002). Importantly, the numerical solutions possess the correct amplitude and phase to satisfy the timing condition and to set the desired direction of the rotation axis, without imposing them explicitly. Furthermore, the average errors, as well as the optimal squeezing parameters, are equal to those obtained in the semiclassical approach in Sec. II.
In the specific case of rotations, a sum of two eigenvectors, i.e., the squeezed cat state Govia et al. (2014); Dodonov (2002); Vlastakis et al. (2013)
(9) 
where the positive constant ensures normalization, is a state that minimizes both the average and the maximum error simultaneously (see Appendix B). Comparison of errors produced by such a state and a coherent state is presented in Fig. 2b.
The numerical approach for solving the eigenstates of has the disadvantage of truncating the infinitedimensional state vector to a finite vector of length , which might distort or exclude some of the possible solutions. However, the obtained Gaussianlike solutions are not affected by changes in the cutoff for . Raising the cutoff reveals more energetic solutions, but these correspond to pulses that implement the chosen gate after an integer number of unnecessary rotations.
Generally for gates, we find solutions with errors that vanish as in the limit , as shown in Appendix C. The lower bounds together with errors induced by nonsqueezed coherent states are shown in Table 1. Other gates, such as the PauliZ gate and the Hadamard gate, can be constructed as sequences of gates. Recently, it was shown that squeezing also improves the fidelity of the phase gate in the dispersive regime Puri and Blais (2016).
Iv Driverefreshing protocol
All of the fundamental lower bounds derived above are inversely proportional to the average photon number. Intuitively, a drive with a large photon number should be capable of inducing multiple gates without changing substantially, thus decreasing the required amount of energy per gate for nearly equal error level. We show below that reusing a drive effectively decreases the energy consumption well below the lower bound of average gate error for disposable pulses. Furthermore, the drive can be corrected between successive gates such that the consumption drops without essential decrease of the average gate fidelity.
In our protocol, an itinerant control drive cyclically interacts with a register of resonant qubits and ancillary qubits, see Fig. 3. A cycle begins with the drive, initially in a suitable squeezed coherent state, applying a chosen gate operation with minimal error on a register qubit. Consequently, the drive state changes due to the quantum backaction. To undo this, the drive is set to sequentially interact with corrective ancilla qubits, initialized in a superposition of ground and excited states, for a time corresponding to a rotation. As a result, the purity, energy, and phase of the drive are restored in successive interactions (see Appendix D). At the end of the cycle, the ancilla qubits are reset and the refreshed drive is usable for another highfidelity gate.
With increasing number of ancilla qubits, the execution time of a full cycle increases and thus one itinerant pulse applies a gate on the register less frequently. To compensate for this, one could add another drive pulse for each ancilla in the array, and synchronize their travel times such that each qubit would interact with one of the pulses at a given time. Such a system would apply as many gates on the register per cycle as there are itinerant pulses in circulation. However, we restrict our analysis to a single pulse.
The refreshing by the ancillary interactions is understood by considering the path traversed by the Bloch vector of the ancillary qubit, as illustrated in Fig. 4. A drive lacking energy rotates the vector with smaller angular frequency, leaving the ancilla slightly biased towards the ground state and gaining energy in the process. Similarly, excessive energy in the drive is transferred to the ancilla due to rotating it closer to the excited state.
The Hilbert space of this system is formally a composite space of the Fock space of the drive and the twolevel spaces of the register and ancilla qubits,
(10) 
The drive only interacts with one qubit at a time and therefore each interaction can be calculated in the subspace of the relevant qubit and the drive, assuming the qubits are not correlated. After the interaction, the drive state is extracted by tracing over the associated qubit space. Namely, the th iteration of the drive state is given by
(11) 
where acts in the subspace of the drive and the th qubit in the protocol sequences described in the following sections.
iv.1 Implementation with ideally prepared ancilla
Consider first the case where the ancilla qubits are perfectly reset during each cycle, and the gate we wish to apply on each register qubit is . The protocol is executed with the following steps:

The drive state is initialized to the minimizing state .

A new register qubit is initialized in a random pure state, chosen uniformly from the Bloch sphere.

The drive interacts with the register qubit for interaction time [Eq. (11)].

The ancilla qubits are initialized to .

The drive interacts with an ancilla qubit for interaction time . Repeat for all ancillas.
For gates other than , the phases of the drive and ancillas, as well as the interaction time in step (iii), but not step (v), would be shifted accordingly.
We numerically simulate the evolution of the drive and evaluate the average error of the gate for a register qubit after each cycle. During the protocol, the average error will increase from its initial lowerbound value at varying rates depending on the randomized states of the register qubits. We find that after many cycles, the drive reaches a steady state that generates the desired gates with a predictable average error. With 1–3 ancillas per cycle, the average error saturates after a hundred cycles; with ten or more ancillas, the saturation takes less than ten cycles. If no corrective ancillas are used, the average error eventually reaches .
Figure 5 shows how the eventual error level depends on the number of photons and ancillas. The average gate error approaches its theoretical lower bound, in the limit of many driverefreshing ancilla qubits. For smaller rotation angles, qualitatively similar results are obtained with more slowly accumulating error. Thus a single itinerant drive pulse supplied with ideal ancilla states can generate an infinite number of highfidelity gates.
iv.2 Register in an entangled state
In the previous section, the qubits in the register were assumed to be essentially uncorrelated to justify the partial tracing over each qubit after the respective interaction. Here we demonstrate the beneficial performance of our method in the case where the register qubits are maximally entangled. We initialize the register of qubits in the Greenberger–Horne–Zeilinger (GHZ) state . The control protocol is physically the same as in the previous section: the drive interacts with only one qubit at a time to implement a singlequbit gate and is refreshed by ideally prepared ancillas between each such gate. The target operation on the register is thus . Due to the entangled register, the temporal evolution operators must be calculated in the Hilbert space or for interactions between the drive and a register qubit, or drive and the th ancilla, respectively. No partial trace over any register qubit is taken. After the drive has interacted with every register qubit once, the state of the register has transformed into and the total transformation error is computed as
(12) 
We divide this error by the number of qubits to obtain the effective error per gate, .
Results of a simulation for an gate with the initial drive state are shown in Fig. 6. A behaviour similar to Fig. 5 is observed: with enough ancillary corrections between the register gates, the error produced by an itinerant drive can be reduced to the level given by individual pulses. The figure also suggests that even without corrections, reusing a drive of certain energy is more beneficial in practice than dividing the same amount of photons into individual, weaker disposable pulses. Thus we conclude that regardless of the state of the register, refreshment of a drive pulse likely serves to improve the tradeoff between gate error and required energy.
The above case of entangled qubits also provides a way to compare our results to the previous work by GeaBanacloche and Ozawa GeaBanacloche and Ozawa (2006), where they studied a register in a GHZ state that was operated by a drive of photons on average. They showed that the maximum error of the gate in this system scales as per qubit. This scaling was used to argue that a pulse of average photon number cannot outperform individual pulses of average photons, although their performance was not compared explicitly. The key differences here are that Ref. GeaBanacloche and Ozawa (2006) does not consider the possibility of using ancillary qubits, and that it employs a definition of error which also accounts for the infidelity of the drive state. Our results suggest that even though the errors due to both reused and disposable pulses of equal total energy increase almost linearly with , the prefactor of the former is much smaller and can be greatly improved by the refreshing protocol.
iv.3 Full protocol
The total energy consumption of the protocol can be meaningfully estimated only if the method and energy cost of the ancilla preparation is specified. To this end, we propose to prepare the ancillas by a circulating corrector pulse shown in Fig. 3. In the full protocol, the ancilla qubits are first prepared in their ground state and then controlled by the corrector pulse from cycle to cycle. With opposite phase and half the interaction time compared with the drive, the corrector pulse applies an gate on the ancilla before and after a gate introduced by the drive pulse. For simplicity, we assume that the state of the register is separable. The full protocol is given by the following steps:

The drive state is initialized to , the corrector pulse to and all ancillas to the ground state.

A new register qubit is initialized in a random pure state.

The drive interacts with the register qubit with interaction time [Eq. (11)].

An ancilla qubit interacts sequentially with the corrector, the drive, and the corrector again, with interaction times , , and , respectively. Repeat for all other ancillas.
In addition to computing the drive state after each interaction, the state of the interacting qubit is also extracted for subsequent use by a partial trace over the drive degrees of freedom. This is justified if the ancilla qubits do not become strongly correlated during the evolution. This approximation is more accurate the closer the control pulses are to classical pulses which do not induce entanglement.
Since all ancilla qubits are prepared to the ground state, the energy consumption fully arises from the drive and corrector pulses, both of which have the initial average energy . Thus, the average energy consumption per register gate is , where is the number of elapsed cycles, or equally gates generated. In the case where the driverefreshing protocol is not used, , we have .
Results from multiple simulations are averaged and shown in Fig. 7. In contrast to the ideal case, the system accumulates error over repeated cycles and the average gate error does not saturate. Nevertheless, we find that with a sufficient number of ancillary qubit interactions between the register gates, the average error remains nearly constant for a large number of successive gates. The protocol can be stopped before the error reaches a desired threshold. This shows that the total energy cost per register gate is effectively reduced to orders of magnitude below the lower bound for disposable pulses. In fact, Fig. 7 suggests that the gate error may be, in theory, reduced indefinitely without increasing the power consumption by using more energetic pulses.
V Discussion
In this work, we derived the greatest lower bound for the error of a singlequbit gate implemented with a single resonant control mode of certain mean energy. In contrast to previous work, our method for obtaining the bound is not restricted to any particular gate or state of the qubit–drive system. The method can also be used to find the quantum state of the drive mode that minimizes the average gate error, or alternatively the transformation error for a chosen initial qubit state. Specifically, we found that the lower bounds for rotations about axes in the plane are achieved by squeezing the quantum state of a coherent drive pulse by an amount that depends on the target gate. Together with the recent result that squeezing also significantly improves the phase gate in the dispersive regime Puri and Blais (2016), our results suggest that squeezing may generally yield useful improvements in different control schemes. This calls for experimental studies on outperforming the widelyused coherent state.
Importantly, our results also impose a lower bound on the energy consumption of individually driven qubits. Delivering the required power to the qubit level, possibly through a series of attenuators, implies heat management challenges that must be addressed in future largescale quantum computers. As a solution, we introduced a concrete protocol where an itinerant control pulse is used to generate multiple gates and is refreshed between them to avoid loss of gate fidelity. The refreshing process may also prove useful in correcting the phase and amplitude errors of a noisy control pulse.
Our protocol can possibly be realized in some form with future lowloss microwave components such as photon routers Pechal et al. (2016); Hoi et al. (2011), circulators, and nanoelectromechanical systems Zhou et al. (2013). Technical limitations in the quality of these devices will set in practice the tradeoff between the achievable gate fidelity and the dissipated power. In the future, our work can be extended to error bounds for 2qubit gates, state preservation, pulse amplification, and propagating control pulses composed of a continuum of bosonic modes.
Acknowledgements.
We thank Paolo Solinas and Benjamin Huard for useful discussions. This work was supported by the European Research Council under Starting Independent Researcher Grant No. 278117 (SINGLEOUT) and under Consolidator Grant No. 681311 (QUESS). We also acknowledge funding from the Academy of Finland through its Centres of Excellence Program (grant nos 251748 and 284621) and grant (no. 286215) and from the Finnish Cultural Foundation.Appendix a Estimated Energy Consumption of a Surface Code
We estimate the power required by a superconductorbased quantum computer solving a 2000bit factorization problem, stabilized by a surface code. For this particular computation, the needed number of physical qubits has been estimated by Fowler Fowler et al. (2012) to be . We assume that the physical qubits are controlled with typical coherent microwave pulses and that gates are completed in equal time and with lower power than gates. The average power needed during one surface code cycle is calculated by counting the frequency of measurements, , , and CNOT operations, and by taking a durationweighted average of the corresponding powers. The operation times depend on implementation. Using operation times achieved in Ref. Kelly et al. (2015), ns, ns, and ns, for rotations, controlled phase gates, and measurements, respectively, and assuming that our code executes as many operations in parallel as possible, the average power per physical qubit is approximately where the ’s denote the average drive powers for the the abovementioned operations. For simplicity, we neglect the twoqubit gates and measurements and use .
Typical powers at the chip are of the order of W, after being generated in the room temperature and attenuated by tens of decibels on their way to roughly 10mK base temperature. Using only dB of attenuation at the base temperature, the total power dissipation here becomes mW. Such power level is much higher than the typical cooling power of W in stateoftheart dilution refrigerators at 10 mK.
Note that using an open transmission line is expected to consume more power than required in the singlemode case considered in Sec. III. The average energy density in a transmission line is given by , where is the capacitance per unit length and is the root mean square of the voltage. In a time interval , a propagating drive pulse advances a distance , effectively transporting a power of , where is the photon wavelength. In comparison, consider a resonator which is used to apply to the qubit for an equal operation time. The resonator requires a power , and with a typical qubit frequency of GHz, the ratio between the powers is . Thus qubit control using propagating photons in a transmission line seems to lead to orders of magnitude higher power consumption than our singlemode case. However, a more comprehensive study employing the quantization of the transmission line is required to reach accurate estimates. We leave such study for future research.
Finally, let us consider the lower bound for the power to drive the qubits using disposable pulses. The minimum amount of photons (see Sec. III.2) to produce the gate error used by Fowler in Ref. Fowler et al. (2012) is photons at the qubit level. With GHz, the corresponding powers are W and W. This suggests that the lower bound for our example problem size is at the border where current refrigeration equipment fail to deliver the required cooling power, and hence significant increments in the problem size or nonideal implementation of the suggested driving techniques call for inventive solutions to the emerging heat management problem.
A way to avoid the attenuation at the base temperature would be to generate the control pulses at the chip level. To our knowledge, however, no present chiplevel photon source is capable of producing pulses that are accurate and intense enough to induce quantum gates of high fidelity. Furthermore, the operation efficiency of such devices needs to be sufficiently high to be a considerable alternative. Typically microwave sources internally dissipate much more power than their maximum output.
Appendix B Optimization of the Gate Error
b.1 Gate error for a given initial qubit state
Assuming the qubit–drive system is initially in a pure state, , Eq. (5) reduces to
(13) 
where is the desired gate, is the interaction time, is the temporal evolution operator, and are the photon number states. We represent the basis of the qubit space using vectors and , and explicitly write
(14)  
(15) 
In this basis, , and is given by
(16) 
with the shorthand notations , , and . Using the expressions above, the matrix element in Eq. (13) can be structured as
(17) 
where
The error is thus given by
(18) 
b.2 Average gate error
Using Eq. (3), the average error and its corresponding operator can be structured in a similar manner. Defining the matrix elements of the operator as
(21)  
the average error also assumes the form of Eq. (7).
As shown in Ref. Bowdrey et al. (2002), the average error integrated over the Bloch sphere is equal to the arithmetic mean of the error of six socalled axial states. This provides an alternative expression for the operator , namely,
(22)  
b.3 Maximum gate error
We can optimize the maximum error if there exists an initial qubit state which produces the highest error regardless of the drive state, i.e., . Specifically for gates , computing the gradients of with respect to and shows that the maximum point is virtually independent of the drive state, and that the maximum error is obtained with and , or equivalently , where is the angle between the horizontal rotation axis and the axis. Due to symmetry, the initial drive state that optimizes is an eigenvector of
(23) 
which corresponds to the mean error of these two states.
The elements of the commutator turn out to decrease as . Thus it follows that the eigenvectors of , i.e., the squeezed cat states given by Eq. (9), simultaneously minimize both and in the limit .
Appendix C Approximate Gate Error
This section shows how the gate error can be analytically approximated for a specific gate. As an example, we choose for the gate . Using , it is straightforward to evaluate the integrals in Eq. (21), and hence the average error [Eq. (7)] becomes
(24)  
The error is then obtained by inserting the coefficients of the desired drive state: coherent, squeezed cat, or some other state. We choose a squeezed cat state
(25) 
where is an unknown squeezing parameter and the amplitude satisfying is real. In the high energy limit, the occupation numbers in a squeezed state obey the normal distribution
(26) 
with mean and standard deviation . The amplitudes of a squeezed cat state , are obtained by allowing either even (or odd) states to be occupied, such that
(27) 
if is even (odd) and otherwise.
Insertion of these coefficients into Eq. (24) yields
(28) 
where
(29) 
and
(30) 
The sums can be computed by a change of variables and treating the infinite sum as an integral , which justified in the limit , where the functions are rather smooth and have support on a region much wider than unity. Approximating the result to the lowest order in eventually yields
(31) 
This expression is minimized with the choice of the squeezing parameter , independently of . Thus we have .
Approximate average errors for gates , , and implemented by different drive states, such as the coherent state, can be computed in a similar fashion. This approach also works with the maximum error for rotations of . Expressions obtained this way are listed in Table 1.
Appendix D Finding the Stabilizing Ancilla State
To build our protocol, we first search for initial states of the ancillas and the drive, such that each ancilla–drive interaction would steer the drive towards a stable state. For the protocol to work, the following conditions must be satisfied:

In the vicinity of the stable state, the drive is able to induce highfidelity gates on a register qubit.

An ancilla–drive interaction increases the purity of the drive state, defined here as Nielsen and Chuang (2000) . Interactions with register qubits in randomized states tend to decrease the purity of a drive, rendering it less useful for subsequent gates. Thus increasing the purity effectively transfers entropy from the drive to the ancilla qubits.

An ancilla–drive interaction steers the amplitude, or equally energy, of the drive towards its steady state value. This is needed since we want to generate gates with a fixed interaction time.

The interaction steers the relative phase of the drive towards its initial value.
Condition (i) suggests that the most promising candidates for the initial drive state are the coherent state and its squeezed variant . We study condition (ii) by computing the change in purity
(32) 
where is given by Eq. (11). Figure 8 shows that the purity of the drive state increases if the ancilla is initialized close to the state . The figure also implies that the protocol works even if there is some error when preparing the ancilla in this state.
Furthermore, changes in photon occupation,
(33) 
with different initial energies of the drive shows in Fig. 9 that this ancilla state also enforces negative feedback on the average photon number, satisfying condition (iii). Our study of the Wigner representation of the drive state after successive ancilla interactions shows that condition (iv) is also satisfied.
For a protocol generating only gates, the squeezed cat state was also tested as an initial drive state. Unfortunately, in this case conditions (ii) and (iii) do not hold for any choice of the ancilla state since the cat state does not rotate the Bloch vector of the ancilla in a specific direction, which is essential for the feedback mechanism depicted in Fig. 4.
References
 Preskill (1998) J. Preskill, “Reliable quantum computers,” Proc. R. Soc. Lond. A 454, 385–410 (1998).
 Nakamura et al. (1999) Y. Nakamura, Y. A. Pashkin, and J. S. Tsai, “Coherent control of macroscopic quantum states in a singleCooperpair box,” Nature 398, 786–788 (1999).
 Barends et al. (2014) R. Barends, J. Kelly, A. Megrant, A. Veitia, D. Sank, E. Jeffrey, T. C. White, J. Mutus, A. G. Fowler, B. Campbell, Y. Chen, Z. Chen, B. Chiaro, A. Dunsworth, C. Neill, P. O’Malley, P. Roushan, A. Vainsencher, J. Wenner, A. N. Korotkov, A. N. Cleland, and J. M. Martinis, “Superconducting quantum circuits at the surface code threshold for fault tolerance,” Nature 508, 500–503 (2014).
 Kelly et al. (2015) J. Kelly, R. Barends, A. G. Fowler, A. Megrant, E. Jeffrey, T. C. White, D. Sank, J. Y. Mutus, B. Campbell, Yu Chen, Z. Chen, B. Chiaro, A. Dunsworth, I.C. Hoi, C. Neill, P. J. J. O’Malley, C. Quintana, P. Roushan, A. Vainsencher, J. Wenner, A. N. Cleland, and J. M. Martinis, “State preservation by repetitive error detection in a superconducting quantum circuit,” Nature 519, 66–69 (2015).
 Bonadeo et al. (1998) N. H. Bonadeo, J. Erland, D. Gammon, D. Park, D. S. Katzer, and D. G. Steel, “Coherent optical control of the quantum state of a single quantum dot,” Science 282, 1473–1476 (1998).
 Veldhorst et al. (2015) M. Veldhorst, C. H. Yang, J. C. C. Hwang, W. Huang, J. P. Dehollain, J. T. Muhonen, S. Simmons, A. Laucht, F. E. Hudson, K. M. Itoh, A. Morello, and A. S. Dzurak, “A twoqubit logic gate in silicon,” Nature 526, 410–414 (2015).
 Sackett et al. (2000) C. A. Sackett, D. Kielpinski, B. E. King, C. Langer, V. Meyer, C. J. Myatt, M. Rowe, Q. A. Turchette, W. M. Itano, D. J. Wineland, and C. Monroe, “Experimental entanglement of four particles,” Nature 404, 256–259 (2000).
 Debnath et al. (2016) S. Debnath, N. M. Linke, C. Figgatt, K. A. Landsman, K. Wright, and C. Monroe, “Demonstration of a small programmable quantum computer with atomic qubits,” Nature 536, 63–66 (2016).
 Pla et al. (2012) J. J. Pla, K. Y. Tan, J. P. Dehollain, W. H. Lim, J. J. L. Morton, D. N. Jamieson, A. S. Dzurak, and A. Morello, “A singleatom electron spin qubit in silicon,” Nature 489, 541–545 (2012).
 Togan et al. (2010) E. Togan, Y. Chu, A. S. Trifonov, L. Jiang, J. Maze, L. Childress, M. V. G. Dutt, A. S. Sorensen, P. R. Hemmer, A. S. Zibrov, and M. D. Lukin, ‘‘Quantum entanglement between an optical photon and a solidstate spin qubit,” Nature 466, 730–734 (2010).
 Terhal (2015) B. M. Terhal, “Quantum error correction for quantum memories,” Rev. Mod. Phys. 87, 307–346 (2015).
 Fowler et al. (2012) A. G. Fowler, M. Mariantoni, J. M. Martinis, and A. N. Cleland, “Surface codes: Towards practical largescale quantum computation,” Phys. Rev. A 86, 032324 (2012).
 Ozawa (2002) M. Ozawa, “Conservative quantum computing,” Phys. Rev. Lett. 89, 057902 (2002).
 GeaBanacloche (2002) J. GeaBanacloche, “Minimum energy requirements for quantum computation,” Phys. Rev. Lett. 89, 217901 (2002).
 GeaBanacloche and Ozawa (2005) J. GeaBanacloche and M. Ozawa, “Constraints for quantum logic arising from conservation laws and field fluctuations,” J. Opt. B 7, S326 (2005).
 GeaBanacloche and Ozawa (2006) J. GeaBanacloche and M. Ozawa, “Minimumenergy pulses for quantum logic cannot be shared,” Phys. Rev. A 74, 060301 (2006).
 GeaBanacloche and Miller (2008) J. GeaBanacloche and M. Miller, “Quantum logic with quantized control fields beyond the 1/n limit: Mathematically possible, physically unlikely,” Phys. Rev. A 78, 032331 (2008).
 Karasawa et al. (2009) T. Karasawa, J. GeaBanacloche, and M. Ozawa, “Gate fidelity of arbitrary singlequbit gates constrained by conservation laws,” J. Phys. A 42, 225303 (2009).
 Igeta et al. (2013) K. Igeta, N. Imoto, and M. Koashi, “Fundamental limit to qubit control with coherent field,” Phys. Rev. A 87, 022321 (2013).
 Jaynes and Cummings (1963) E. T. Jaynes and F. W. Cummings, “Comparison of quantum and semiclassical radiation theories with application to the beam maser,” Proc. IEEE 51, 89–109 (1963).
 Shore and Knight (1993) B. W. Shore and P. L. Knight, “The Jaynes–Cummings model,” J. Mod. Opt. 40, 1195–1238 (1993).
 Layden et al. (2016) D. Layden, E. MartínMartínez, and A. Kempf, ‘‘Universal scheme for indirect quantum control,” Phys. Rev. A 93, 040301 (2016).
 Slosser et al. (1989) J. J. Slosser, P. Meystre, and S. L. Braunstein, “Harmonic oscillator driven by a quantum current,” Phys. Rev. Lett. 63, 934–937 (1989).
 Åberg (2014) J. Åberg, “Catalytic coherence,” Phys. Rev. Lett. 113, 150402 (2014).
 Nakahara and Ohmi (2008) M. Nakahara and T. Ohmi, Quantum Computing: From Linear Algebra To Physical Realizations (CRC Press, New York, 2008).
 Pegg and Barnett (1989) D. T. Pegg and S. M. Barnett, “Phase properties of the quantized singlemode electromagnetic field,” Phys. Rev. A 39, 1665–1675 (1989).
 Salmilehto et al. (2014) J. Salmilehto, P. Solinas, and M. Möttönen, “Quantum driving and work,” Phys. Rev. E 89, 052128 (2014).
 Nielsen and Chuang (2000) M. Nielsen and I. Chuang, Quantum Computation And Quantum Information (Cambridge University Press, Cambridge, 2000).
 Dodonov (2002) V V Dodonov, “‘Nonclassical’ states in quantum optics: a ‘squeezed’ review of the first 75 years,” J. Opt. B 4, R1 (2002).
 Govia et al. (2014) L. C. G. Govia, E. J. Pritchett, and F. K. Wilhelm, ‘‘Generating nonclassical states from classical radiation by subtraction measurements,” New J. Phys. 16, 045011 (2014).
 Vlastakis et al. (2013) B. Vlastakis, G. Kirchmair, Z. Leghtas, S. E. Nigg, L. Frunzio, S. M. Girvin, M. Mirrahimi, M. H. Devoret, and R. J. Schoelkopf, “Deterministically encoding quantum information using 100photon Schrödinger cat states,” Science 342, 607–610 (2013).
 Puri and Blais (2016) S. Puri and A. Blais, “Highfidelity resonatorinduced phase gate with singlemode squeezing,” Phys. Rev. Lett. 116, 180501 (2016).
 Pechal et al. (2016) M. Pechal, J.C. Besse, M. Mondal, M. Oppliger, S. Gasparinetti, and A. Wallraff, “Superconducting switch for fast onchip routing of quantum microwave fields,” Phys. Rev. Applied 6, 024009 (2016).
 Hoi et al. (2011) I.C. Hoi, C. M. Wilson, G. Johansson, T. Palomaki, B. Peropadre, and P. Delsing, “Demonstration of a singlephoton router in the microwave regime,” Phys. Rev. Lett. 107, 073601 (2011).
 Zhou et al. (2013) X. Zhou, F. Hocke, A. Schliesser, A. Marx, H. Huebl, R. Gross, and T. J. Kippenberg, “Slowing, advancing and switching of microwave signals using circuit nanoelectromechanics,” Nature Phys 9, 179–184 (2013).
 Bowdrey et al. (2002) M. D. Bowdrey, D. K. L. Oi, A. J. Short, K. Banaszek, and J. A. Jones, “Fidelity of single qubit maps,” Physics Letters A 294, 258 – 260 (2002).