<<

Fundamental energy requirement of reversible quantum operations

Giulio Chiribella,1, 2 Yuxiang Yang,3 and Renato Renner3 1Department of , The University of Hong Kong, Pokfulam Road, Hong Kong 2Department of , University of Oxford, Parks Road, Oxford, UK 3Institute for Theoretical , ETH Z¨urich,8093 Z¨urich,Switzerland Landauer’s principle asserts that any computation has an unavoidable energy cost that grows proportionally to its degree of logical irreversibility. But even a logically reversible operation, when run on a physical processor that operates on different energy levels, requires energy. Here we quantify this energy requirement, providing upper and lower bounds that coincide up to a constant factor. We derive these bounds from a general quantum resource-theoretic argument, which implies that the√ initial resource requirement for implementing a unitary operation within an error  grows like 1/  times the amount of resource generated by the operation. Applying these results to quantum circuits, we find that their energy requirement can, by an appropriate design, be made independent of their time complexity.

Introduction. Landauer’s tenet “ is physi- battery is large enough. Determining the corresponding cal” [1] is a powerful reminder that all information pro- energy requirement is exactly the topic of this work. cessing systems are necessarily subject to the laws of Previous approaches to quantify the energy require- physics. These laws impose certain fundamental limi- ment are based on the Wigner-Araki-Yanase (WAY) the- tations. For example, the laws of quantum theory imply orem [10, 11], which states that any conservation law lim- that perfect universally programmable quantum proces- its the accuracy with which quantities that do not com- sors cannot exist [2]. Refinements of no-go results like mute with the conserved quantity can be measured. The this showed that they can be phrased as tradeoffs be- theorem implies a bound on the variance of the energy in tween the accuracy with which the tasks can be carried the initial state of the battery required to implement an out and the amount of resources available for their im- operation [12–17]. However, the variance does not in gen- plementation. For example, the refinement of the above- eral provide a good bound on the size of the battery, nor mentioned no-programming theorem asserts that the size on the average energy that needs to be initially stored in of an approximate universally programmable quantum it. As a simple example, consider a system with d equally processor grows proportionally to log(1/) where  quan- spaced energy levels {E0,...,Ed−1}. A pure state in the tifies the tolerated error [3–5]. superposition of energy eigenstates corresponding to E p p 0 Here we consider the fundamental energy requirement and Ed−1 with amplitudes 1 − 1/d and 1/d, respec- for implementing quantum operations. Such requirement tively, has average energy (measured relative to E0 = 0) consists of at least two different contributions, which are less than E1 and large energy variance that grows as d. consequences of the second law of thermodynamics and of On the other hand, even if the variance is fixed the energy energy conservation in , respectively. can still take an arbitrarily large value. The fact that the second law of thermodynamics has im- Here we instead take a general resource-theoretic ap- plications for the energy cost of computation is known proach. Let M be a function that quantifies the value of as Landauer’s principle [1]. It asserts that any physical the different possible states of a system with respect to a device that carries out a logically irreversible operation resource. For example, M(ρ) may be the average energy dissipates a certain minimum amount of energy as heat, of the system when it is in state ρ. Furthermore, for a re- and that this amount is proportional to the degree of irre- versible operation G on the system, we denote by M(G) versibility (which may be quantified in terms of entropic the maximum increase of the function M when evaluated quantities, see [6–9]). on an input state and on the corresponding output state

arXiv:1908.10884v3 [quant-ph] 28 May 2021 In this work we are concerned with the second funda- produced by G. Hence, in the case where the considered mental contribution to the energy bill. This contribution resource is energy, M(G) quantifies by how much the can be regarded as a consequence of energy conserva- system’s energy can grow when executing G. Assume tion, when applied to coherent transitions across states now that we want to implement G up to a precision  of different energy. If a process is executed on a system (which we quantify in terms of the worst-case infidelity, with non-degenerate energy levels then energy must be defined below). The implementation should consist of temporarily borrowed from a battery. For general quan- a device that can merely carry out free operations, i.e., tum processes, this borrowing may occur in a superpo- operations that cannot generate the resource. Such an sition, i.e., the system’s quantum state may consist of implementation must necessarily use a battery, as illus- one branch in which energy has flown from the battery trated in Fig. 1. Then the following general assertion can and another one in which energy has flown into the bat- be made. tery. To ensure that this does not to decoherence, the corresponding energy states of the battery must be Theorem 1. If the resource measure M is monotonous, indistinguishable. This, in turn, is only possible if the additive, and regular (see later for definitions) then every 2

a given Hamiltonian HS, kH k √ hH i ≥ √S − O( ) . (2) B 8  This bound is tight up to a constant factor. More pre- cisely, assuming that the system has equally spaced en- ergy levels, we show by an explicit construction, de- scribed in the third section below, that π kH k hH i ≤ √ S . (3) B 2  Taking together these two bounds, we have thus estab- lished that the fundamental energy√ requirement for op- erating on S grows as kHSk/ . Note that if the sys- tem’s Hamiltonian is fully degenerate, i.e., kH k = 0 FIG. 1. Implementing a reversible gate using a bat- S tery. This figure describes a scheme that approximates a then energy conversation does not imply an energy re- generic quantum gate G that may not preserve a generic type quirement. Besides the average energy, we show that of resource, e.g., energy, on a system. The scheme works by the energy√ spread of the battery is lower bounded by using a battery system that undergoes a free unitary UG to- kHSk/ , and the tightness of the bound can again be gether with the system. With the resource supplied by the achieved with the construction that led to (3). battery, G is approximated on the system. Finally, we determine how the energy requirement of a quantum circuit depends on its complexity. Previ- ous works considered implementations of quantum cir- approximation of a reversible operation G within error  cuits where each gate is powered by an independent bat- using a free device UG connected to a battery in state β tery [12, 14] (see Fig. 2(a)). The energy requirement must satisfy then obviously grows linearly with the number of non- conservative gates, making complex computations ener- † 2 M(G) + M(G ) √ getically demanding. In contrast, we show that the en- M(β) ≥ √ − c − O( ) , 32KS  ergy requirement of quantum circuits is independent of their complexity. For this we consider an implementation where c and KS are constants that merely depend on M that uses a single battery to power all gates in the circuit and the system on which G acts. (see Fig. 2(b)). It turns out that energy can be recycled from one gate to the next, and that the energy require- This theorem, whose proof we will sketch in the first ment for a sequence of gates is exactly equal to the energy section below, yields in particular a lower bound on the requirement of the overall gate resulting from their com- energy requirement for implementing a reversible opera- position. Hence, the energy requirement depends only on tion G. Specifically, in the second section, we show that the size of the computational register, but not on the time the average energy content hHBi of the battery supplying complexity of the computation. For quantum computa- energy to the processor must be at least tions with classical inputs and outputs, such as Shor’s al- 2 gorithm, we further show that our implementation is ex- ((λmax − λmin)(∆GHS)) √ hHBi ≥ √ − O( ) , (1) act and the energy requirement is just the energy needed 32  kHSk to write down the output of the computation. This may be regarded as the quantum analogue of a classical result where kH k is the operator norm of the system’s Hamil- S by Fredkin and Toffoli [18], who studied the fundamen- tonian, λ (λ ) denotes the maximal (minimal) max min tal energy constraints that the classical laws of physics eigenvalue, and ∆ H = G†H G − H is the change G S S S impose on computation. of the system’s Hamiltonian induced by the action of the gate G. We have assumed, without loss of generality, that Lower bound on general resource requirement. In this the minimum energy is zero for both the system and the section we spell out the assumptions underlying Theo- battery, and thus kHSk is equal to the maximum energy rem 1 and describe the main proof idea. (The full proof of the system. The bound (1) states that the average is provided in Appendix A.) For this we take a resource- energy of the battery should be above the ground state theoretic viewpoint, i.e., we start from a given set of free energy by an amount determined by the energy change operations that is closed under composition [20]. Let UG operator ∆GHS, the system’s energy scale kHSk, and the be such a free operation that acts on both a system S error . and a battery B, which is initialised in state β. The re- While the bound (1) depends on the particular opera- sulting operation on S is then described by the quantum tion G, by maximising over all such reversible operations channnel h i we obtain a bound on the energy requirement of a uni- E (·) = Tr U (· ⊗ β)U † , (4) versal quantum processor operating on a system S with G B G G 3

(a)

FIG. 3. Approximating m uses of a gate and its in- (b) verse. If a unitary gate G can be implemented with small error, then the battery can be reused 2m times, approximately implementing m uses of the gates G and G†. As a conse- FIG. 2. Multiple and single battery implementations quence, the state of the battery should be able to provide m of quantum computation. Two different setups of energy- times the maximum resource generation of G and G† up to a preserving quantum computation are compared. Fig. 2(a) correction. depicts the multiple battery implementation that has often been considered in previous work [12–16, 19], where each sin- gle gate of the circuit is equipped with an individual battery erations and partial trace. that is discarded after the gate is implemented. In contrast, in this work we consider the single battery implementation as 2. Additivity on product states. M(ρ ⊗ σ) = M(ρ) + illustrated in Fig. 2(b), where a single battery provides energy M(σ). for the whole circuit and is reused after the implementation of each individual gate. 3. Regularity. There exists a constant c ∈ and, for any system S, a Lipschitz constant KS ≥ 0, such that |M(ρ) − M(σ)| ≤ KS kρ − σk1 + c for any where β is the initial state of the battery and TrB denotes states ρ and σ of system S, and such that KS is the partial trace over the battery’s Hilbert space. subadditive, i.e., KAB ≤ KA + KB for any systems To quantify how well the operation EG approximates a A and B. desired gate G we use the worst-case fidelity Fwc between the output of G and EG for any input, which may also With these definitions in place, we can now proceed be correlated to an external reference system R. That is, to the proof of Theorem 1. Let VG(·) := UG(· ⊗ β) with † explicitly, UG(·) = UG · UG be the defined in (4), but before tracing out the battery B. Using techniques from Fwc := inf inf Tr [(EG ⊗ IR)(Ψ) (G ⊗ IR)(Ψ)] , R |Ψi∈H ⊗H [23–25] we show (see Appendix A) that the channel VG is S R 0 0 (5) close to G ⊗ β , where β is a suitable battery state [26]. Due to its additivity property, it is useful to measure this † with Ψ := |ΨihΨ|, G(·) = G · G , and IR denoting the closeness in terms of the norm k · k [22] identity map on L(HR), the space of linear operators 0 √ kVG − G ⊗ β k ≤ 2  . (6) on HR. We say that an implementation has error  if F = 1 − . The use of this error measure is justified wc But this means that approximately there is no entan- by the fact that the resource requirements, in the case of glement between the system and the battery after the energy as discussed in the introduction, can be bounded evolution, and the battery ends up in a state close to β0. tightly in terms of  (up to a constant). We also note that Conversely, the state β0 may be used to approximately the fidelity is easy to evaluate and widely used to quantify † † the quality of gates in quantum computation. Moreover, implement the inverse gate G , using the gate UG, i.e., it may be related to other measures of distance, e.g., −1 0 √ kG ⊗ β − VGk ≤ 2  , (7) the diamond norm√ [21] (see [22] for a definition)√ via the inequalities 1 − F ≤ 1 kE − Gk ≤ 1 − F . In wc 2 G  wc with V0 (·) := U −1(· ⊗ β0). Appendix D, we show that the dependence of the energy G G √ According to (6) and (7) we may thus implement the requirement on the diamond norm also scales as 1/ , gate G† after gate G, thereby returning the ancilla ap- up to a factor that may however depend on the system’s proximately to its initial state. Repeating this procedure . m (for any m ∈ ) times, i.e., composing m implemen- Theorem 1 is a general resource-theoretic statement, N tations of G and of G† in alternating order as illustrated which merely depends on general properties of the mea- in Fig. 3, we still approximate each of them within an er- sure M used to quantify resourcefulness. Specifically, for √ ror bounded by 4m . Note that the circuit in the lower any given system, M is a function of the density operator half of the figure increases the resource value M by virtue of that system such that the following holds: of G and G†. To approximate this increase of resource, 1. Monotonicity. M is non-increasing under free op- the circuit in the upper half of the picture must use the 4 battery, because all the other operations in the circuit on the initial that the battery must provide, are free and therefore resource non-generating. Hence, where dS is the dimension of the system on which G acts, the amount of resource generated by m uses of G and and C(G) is the amount of coherence generated by the G†, i.e., m times M(G) + M(G†), must be matched by gate G. For gates like the generalized Hadamard gate this the battery. Evaluating this amount to the bound quantity can be as large as log dS. Therefore, the mini- stated in Theorem 1. mum amount of coherence required to√ operate a universal Lower bound on energy requirement. To obtain (1) quantum processor scales like log dS/ . we apply Theorem 1 to the resource theory where the We have shown that the√ requirement for energy and free operations are energy-preserving channels [27, 28]. coherence both follow an 1/  scaling. The same scaling For any system, the resource function M is defined by characterises also the standard deviation of the energy, M(ρ) = Tr[Hρ], where H is the system’s Hamiltonian as observed in previous works [12–17]. (with the minimum energy set to zero) and ρ is the sys- Attaining the bound. We now show that the bound (2) tem’s density operator. This resource function is additive can be attained with a suitable choice of battery state on product states and it is non-increasing under energy and interaction between the system and the battery. In preserving channels and partial trace. Moreover, the in- this part, we assume that the system has equally spaced equality | Tr(ρ − σ)H| ≤ kρ − σk1 · kHk shows that the energy levels, which is the case, for example, if it consists function M is Lipschitz continuous with Lipschitz con- of n identical individual . We denote the spacing stant KS = kHk, equal to the energy scale of the sys- by ~ω. tem under consideration, and c = 0. Finally, we note The implementation uses a battery with equally spaced that M(G) = max hψ|G†H G|ψi − hψ|H |ψi = |ψi∈HS S S energy levels with spacing ~ω, ranging from 0 to kHBk = † † λmax(∆GHS) and M(G ) = max|ψi∈HS hψ|GHSG |ψi − RkHSk, where R is an integer, assumed to be larger than hψ|HS|ψi = −λmin(∆GHS), where λmax (λmin) denotes 2 for later convenience. At the beginning, the battery is the maximal (minimal) eigenvalue. Inserting all this into initialized in a superposition of energy eigenstates with Theorem 1, we immediately obtain the desired bound (1) sine-shaped amplitudes [33] on the average energy content hHBi = Tr[HBβ] of the r (R−1)kHSk   battery B required to implement G. 2 X (EB − kHSk + ~ω)π |βi = sin |EBi , In a similar way we can also derive a lower bound on L ~ωL EB=kHSk the required total capacity kHBk of the battery. For this we first apply Theorem 1 to the resource function (11) 0 M (ρ) := Tr ρ(kHk · I − H) to obtain the bound where the summation runs in steps of ~ω, and L = 2 (R − 2)kHSk/(~ω) + 2. Note that the lowest and highest ((λmax − λmin)(∆GHS)) √ kHBk − hHBi ≥ √ − O( ) . energy levels are unoccupied. This allows the battery to 32  kHSk both supply and absorb energy from the system. (8) For the interaction between the system and the bat- Taking the worst case G, which satisfies λ (∆ H ) = tery we adopt a construction from Refs. [34–36], suitably max G S adapted to unitary gates on finite-dimensional systems. −λmin(∆GHS) = kHSk, and combining this with bound (1), we find a bound on the maximum energy (or Denote by ES,x the energy of |ψxi. For a given value E of the capacity) of the battery, the total energy, and for every x satisfying the condition kH k √ E − kHBk ≤ ES,x ≤ E (12) kH k ≥ √S − O( ) . (9) B 4  we define the eigenstates

This and (2) are lower bounds on the energy require- |x, Ei := |ψxi ⊗ |E − ES,xi . (13) ment of a universal processor, able to implement arbi- Then, we denote by E the set of values of the total trary gates on system S with error  or less. While (2) ok energy such that condition (12) is satisfied for every x = quantifies the energy requirement in terms of the aver- 1, . . . , d , or equivalently, the set of values E satisfying age energy that a battery must contain, (9) refers to the S the condition kH k ≤ E ≤ kH k. For every E ∈ E , battery’s total capacity. S B ok define the partial isometry Theorem 1 also provides bounds on other types of re- sources, such as coherence [29–32]. A exam- dS−1 (E) X ple is the relative of coherence [29] C(ρ) := UG := hψx|G|ψyi |x, Eihy, E| , (14) S(ρdiag) − S(ρ), with S denoting the von Neumann en- x,y=0 tropy and ρdiag the diagonal part of ρ in the energy which acts as the unitary gate G in the eigenspace with eigenbasis. Here the theorem yields the bound (see Ap- total energy E. To make the computation reversible on pendix B) the whole system SB, we set UG to be the unitary gate † 2 X (E) X C(G) + C(G ) U := U + P , (15) C(β) ≥ √ − O(1). (10) G G E 32  log dS E∈Eok ∈Eok 5

(1) (1) where PE is the projector on the subspace with total HS and energy gap kHS k = ~ω, and uses a single bat- energy E. (1) tery of capacity CB = RnkHS k, where R is an integer In Appendix C we show that the worst case fidelity of depending on the desired level of accuracy. For an ele- the above implementation is lower bounded as mentary gate G acting on a subset of k qubits, we let the battery and the k qubits interact through the energy- π(λ − λ )(∆ H )2  kH k max min G S S preserving gate UG in (15). The energy subspaces on Fwc ≥ 1 − 1 + O , 4hHBi hHBi which the gate UG acts non-trivially correspond to the (16) (k) (1) energy values Eok = {E | k kHS k ≤ E ≤ kHBk}. Now, consider the total energy of the n qubits and the battery. and therefore the energy requirement is upper bounded For every two gates G1 and G2, one has the property as U U P (n) = U P (n) , (19) π(λ − λ )(∆ H )  kH k G1 G2 ok G1G2 ok hH i ≤ max √min G S 1 + O S . B 4  hH i B where P (n) is the projector on the eigenspaces of the to- (17) ok (n) tal energy in Eok . The above relation means that the In the worst case over all possible gates, one has (λmax − local interactions of the battery with subsets of qubits λmin)(∆GHS) = 2kHSk, matching the lower bound (2) are enough to generate every global interaction between up to a constant factor of 4π. the battery and all the qubits involved in the computa- The error  depends on the parameter R that char- tion. Hence, the computation can be realized by prepar- (1) acterizes the battery state (11). Observing that the en- ing the battery in the state (11), with kHSk = nkHS k. N ergy of the sine state is hHBi = RkHSk/2, we√ obtain For a computation consisting of N gates (Gi)i=1, the en- the dependency R ≈ π(λmax−λmin)(∆GHS)/(2 kHSk). ergy requirement does not depend on N, but only on the Therefore, the battery capacity of this implementation√ is unitary G = GN ··· G2G1 that describes the overall com- kHBk = RkHSk ≈ π(λmax − λmin)(∆GHS)/(2 ). Tak- putation. Since the gate G acts on at most n qubits, the ing the worst-case G, the capacity of the battery is ap- energy requirement for implementing√ any computation proximately with accuracy  is at most πn~ω/(2 ). It is worth noting that, if the computation is only re- πkH k kH k ≈ √ S , (18) quired to work on a subset of input states, the energy B  requirement can be lower. For example, suppose that a computation has classical input and classical output, as matching the lower bound (9) up to a constant of 4π. in Shor’s algorithm and in many other quantum algo- rithms. In this case, every computation can be imple- Energy-efficient quantum computation. We established mented exactly by setting the battery in the initial state the minimum energy requirement of one single quantum with energy n ω, and then using the interaction (15) for operation. But what about a computation that consists ~ every gate (see Appendix E). of many individual steps? One way to implement the computation is to assign an individual battery to each Conclusions. We derived a bound on the resources that gate and to replace the gate by its conservative approxi- are required to approximately implement a reversible mation. However, this approach leads to a heavy energy quantum operation. We found that, for a general class toll. If each gate is powered by an individual battery of of resources, which include energy√ as a special case, the energy hHBi, then bound (2) implies that the error can- resource requirement grows as 1/ , where  is the ap- 2 not decrease faster than 1/hHBi . The error (infidelity) is proximation error (Theorem 1). Furthermore, in the case a lower bound on the trace distance, which in the worst where the resource is energy, the bound is attainable case increases linearly with the number of gates. The within a constant factor, provided that the target sys- 2 linear increase implies that at most O(hHBi ) gates can tem has equally spaced energy levels. A typical example be combined together with tolerable error. For a circuit for such a situation is a quantum processor acting on n of N non-conservative gates, this means that the energy√ identical qubits. For a computation, this minimum en- of each individual battery should grow at least as N, ergy requirement is, remarkably, achievable even if the with a total energy requirement scaling at least as N 3/2. computation is carried out by a complex quantum cir- In other words, the energy requirement depends on the cuit with many individual unitary gates. In this case, number of non-conservative gates, just as in traditional we showed that the battery state can be recycled from models of dissipative computation. one computational step to the next, making the energy We now show that, in fact, quantum computation can requirement independent of how the computation is de- be implemented with an amount of energy that is in- composed. dependent of the circuit depth. To do so, we propose Our bound on the energy requirement is unrelated to a scheme of computation where energy is recycled from the second law of thermodynamics: it follows from the one computational step to the next. The computation is conservation of energy, and it is present even if the evo- performed on n identical qubits, each with Hamiltonian lution is entirely reversible. Nonetheless, our energy re- 6 quirement can be compared quantitatively with the ther- 2. Subadditivity on product states. M(ρ⊗σ) ≤ M(ρ)+ modynamical work requirement associated to Landauer’s M(σ). principle, which is present when the evolution is irre- versible. Landauer’s principle sets the work cost of eras- Under these properties, we prove a more general result on the resource requirement, which reduces to Theorem 1 ing information from a single to KBT , where KB is Boltzmann’s constant and T is the system’s temperature. (which we prove as Corollary 3) when Property 2 is sub- For superconducting qubits, assuming an operation tem- stituted by additivity. perature of the order of 1K, the Landauer’s cost is of the Theorem 2. Every approximation of the gate G within order of 10−23J. Our bounds (2) and (3), on the other error  using a free gate UG and a battery in the state β hand, introduce a new energy requirement that depends must satisfy the inequality on the Hamiltonian of the qubit system and the desired † √ 2 implementation accuracy. For transmon superconduct- M(β) ≥ mM m G ⊗ G − 8 KSm − c (A1) ing qubits, the energy gap between |0i and |1i is around ∗ the order of 10 GHz [37, 38], implying an energy require- for every m ∈ N , where M m(U) is the regularised re- −24 − 1 ment of ∼ 10 × 2 J. The energy requirement is thus source generation [39, 40] of m uses of a quantum gate comparable to the energy cost predicted by Landauer’s U acting on a system S. Explicitly, M m(U) is defined as principle. 1 ⊗m   Like Landauer’s principle, our results must be under- M m(U) := max M U (ρm) − M(ρm) , (A2) stood as fundamental limitations imposed by the laws ρm m of physics. At least for today’s few-qubit devices, which where U(·) := U(·)U † and the maximum is taken over all require large cooling and control machinery external to m-partite states. the actual quantum processors, the fundamental energy requirement as given by (2) and (3) merely represents a We remark that Eq. (A1) is the general formula that minor part of the overall energy consumption. However, can be used to further derive resource inequalities with as quantum technology is being developed further, the simpler forms: M can scale differently, e. g. M = O(1) energy required, e.g., for cooling, will most likely scale m m or M = O(m), for different resource theories. One less than linearly with the number of qubits, and its con- m can then optimise over all m ∈ ∗ to get the scaling of tribution to the overall energy bill thus become less dom- N the resource requirement with respect to the error, which inant. Analogously to how the fundamental bounds of depends on the resource theory under consideration. classical thermodynamics have helped us optimising en- gines, a theory of the thermodynamics of computation The proof of Theorem 2 is based on the can guide the optimisation of computations with respect following Lemma, in which we use the nota- to their energy consumption. The bounds presented here tion Fwc(C, D) := infR inf|Ψi∈HS⊗HR F ((C ⊗ may be regarded as a contribution to such a theory. IR)(|ΨihΨ|), (D ⊗ IR)(|ΨihΨ|)).

Lemma 1. Let G be a gate acting on system S, UG a gate acting on system SB, β be a state of system B, let VG ACKNOWLEDGMENTS be the channel from S to SB defined by VG(ρ) := UG(ρ ⊗ † β)UG, and let EG be the channel from S to S defined by 0 This work is supported by the National Natural EG(ρ) := TrB[VG(ρ)]. Then, there exists a state β of 0 p Science Foundation of China through grant 11675136, system B, such that kVG − G ⊗ β k ≤ 2 1 − F (EG, G). the Hong Kong Grant Council through grant 17326616, the Foundational Questions Institute through Proof. Let βe be a purification of β with purifying system grant FQXi-RFP3-1325, the Croucher Foundation, the E. Then, the channel VeG(·) := (UG ⊗ IE)(· ⊗ βe), is a Swiss National Science Foundation via the National Stinespring dilation of the channel EG [41]. Center for Competence in Research “QSIT” as well The Uhlmann’s theorem for gates [23, 42] guarantees as via project No. 200020 165843 and project No. that there exist a Stinespring dilation of the gate G, say 200021 188541, and the ETH Pauli Center for Theoret- G ⊗ βe0 for some pure state βe0, such that the fidelity be- ical Studies. We thank Daniel Ebler for designing the 0 tween VeG and G ⊗ βe is equal to the fidelity between EG figures. and G, namely

0 Fwc(G ⊗ βe , VeG) = Fwc(G, EG). (A3) Appendix A: Proof of Theorem 1. Tracing out E, we obtain

0 We assume that the resource function M satisfies Fwc(G ⊗ β , VG) ≥ Fwc(G, EG) , (A4) monotonicity and regularity (Properties 1 and 3 in the 0 main text). In addition, additivity (Property 2 in the where VG(·) := UG(· ⊗ β). Since VG and G ⊗ β are ex- main text) can be relaxed to: tensions of the original channels, the converse inequality 7

0 also holds, namely Fwc(G ⊗ β , VG) ≥ Fwc(G, EG). Hence, where M m(U) is defined by Eq. (A2). the inequality is in fact an equality. Then, the Fuchs-Van de Graph inequality [43] yields When M is additive on product states, i. e. M(ρ⊗σ) = the relation M(ρ) + M(σ), the general bound (A1) can be simplified by finding an m-independent lower bound on M m. 0 p kVG − G ⊗ β k ≤ 2 1 − Fwc(G, EG) . (A5) Corollary 3 (Theorem 1 in the main text). When M is additive, the resource requirement in the battery becomes

0 † 2 Corollary 1. Let VG be the channel from S to SB defined (M(G) + M(G )) √ 0 † 0 0 † M(β) ≥ √ − c − 2KS  , (A10) by VG(ρ) := U (ρ ⊗ β )UG. Then, one has kVG − G ⊗ 32KS  p G βk ≤ 2 1 − F (EG, G). † where M(G) := maxρ M(GρG )−M(ρ) is the amount of Proof. The inequality follows from the unitary invari- resource generated by the gate G. ance of the diamond norm:

0 † 0 † For additive M the function M m is monotonically in- kVG − G ⊗ βk = kUG ◦ VG ◦ G − UG ◦ (G ⊗ β) ◦ Gk creasing with m. Since M(G) = M 1(G), it is obviously = kG ⊗ β − VGk upper bounded by M m(G). p (2m) ≤ 2 1 − Fwc(G, EG) . (A6) Proof. Let us consider a product form input ρin = (ρ ⊗ σ)⊗m to the circuit. Since M satisfies additivity, we have

† Corollary 2. Let CG be the multipartite channel cor- M m G ⊗ G responding to the circuit in Fig. 3 of the main text. 1 Then, one has the bound kC − (G ⊗ G−1)⊗m ⊗ βk ≤ ≥ M (G(ρ) ⊗ G−1(σ))⊗m − M((ρ ⊗ σ)⊗m) G  m 4mp1 − F (G, E ). wc G = (M (G(ρ)) − M(ρ)) + M G−1(σ) − M(σ) (A11) Proof. Follows from the unitary invariance and triangle inequality of the diamond norm, combined the bounds in for every m ∈ N∗. Choosing ρ and σ to be the maximal Lemma 1 and Corollary 1. resource generating inputs for G and G−1 respectively, we have Proof of Theorem 2. Consider the input state ρin := (2m) (2m) † † ρin ⊗ β, where ρin is an arbitrary input state on 2m M m G ⊗ G ≥ M(G) + M(G ). (A12) identical copies of the system. Let ρout be the output state resulting from the approximate circuit in Fig. 3 of Substituting into Eq. (A1), we get the main text. Using the monotonicity of the function †  √ 2 M, we obtain the relation M(β) ≥ m M(G) + M(G ) − 8 KSm − c. (A13)

M(TrB[ρout]) ≤ M(ρout) ≤ M(ρin) . (A7) Finally, we obtain the lower bound (A10) on the amount By Property 2 (subadditivity), we have M(ρ ) ≤ M(β)+ of resource in the battery by maximising the bound over in ∗  (2m) all possible m ∈ N. The optimal choice m ∈ N satisfies M ρ . Then, we have the bound ∗ † √ in |m − (M(G) + M(G ))/16 KS| ≤ 1/2. Substituting into Eq. (A13) we get (A10).  (2m) M(β) ≥M(TrB[ρout]) − M ρin . (A8) We conclude by mentioning a further extension of The- orem 2 that takes into account the possibility of applying Now, we apply Property 3 (regularity) to the ideal out- the gate G on part of a composite system: put and to its approximation,√ whose difference has trace norm at most 4m  from the actual output state ρout, Corollary 4. Every approximation of the gate G within due to Corollary 2. Noticing that the Lipschitz constant error  using a free gate UG and a battery in the state β ⊗m for the system (S ⊗ S) is upper bounded by 2mKS, must satisfy the inequality the bound (A8) becomes †  √ 2 M(β) ≥ mM m G ⊗ IR ⊗ G ⊗ IR − 8 KSRm − c  −1⊗m  (2m)  (2m) M(β) ≥ M G ⊗ G ρin − M ρin (A14) √ 2 − 8 KSm − c (A9) for every m ∈ N∗ where R is a reference system.

∗ (2m) which holds for any m ∈ N and for any input state ρin . Proof. The result follows from the application of Theo- Maximising over all inputs fixing m, we have rem 2 to the gate G ⊗ IR, observing that, by definition, the diamond norm and the worst-case fidelity are invari- † √ 2 M(β) ≥ mM m G ⊗ G − 8 KSm − c, ant under addition of a reference system. 8

Appendix B: Application to the resource theory of Using the above Proposition and Theorem 1 of the coherence main text, we obtain a lower bound on the initial coher- ence in the battery: The resource of quantum coherence [29–31, 44–46] can be characterised operationally in terms of different sets 2 C(G) + C(G†) of free operations, such as strictly incoherent operations C(β) ≥ √ − 2. (B6) [44], maximally incoherent operations [47, 48], dephasing 32  log dS covariant operations [31, 45, 46], phase covariant opera- tions [31], and physically incoherent operations [45, 46]. Gates like the generalized Hadamard gate have coherence These operations are defined relative to a fixed generation up to log d . Therefore, the minimum amount {|ii}, and preserve the set of incoherent states, of the S of required coherence in a quantum processor is lower form ρ = P p |iihi|. For composite systems, it is un- i i bounded as derstood that the fixed basis of the composite system is the product of the fixed bases for the components. For the purpose of our bound, the choice of the set of log dS C(|βihβ|) ≥ √ − 2 . (B7) free operations is not critical. As a measure of resource, 8  we consider the relative entropy of coherence [29]

C(ρ) := S(ρdiag) − S(ρ) , (B1)

S denoting the von Neumann entropy of quantum states Appendix C: Lower bound on the accuracy and ρdiag being the diagonal part of ρ in the energy ba- sis. This measure of coherence satisfies the Properties 1 (Monotonicity) and 2 (Additivity on product states). It In the following we will determine the lower bound also satisfies Property 3, as shown by the following (16) on Fwc. Notice that Fwc can be rewritten as Fwc =

infR inf|Ψi∈HS⊗HR FΨ, where Proposition 1. The function C : L(Cd) → R ,C(ρ) = S(ρdiag) − S(ρ) satisfies the inequality |C(ρ) − C(σ)| ≤ FΨ := Tr [(EG ⊗ IR)(Ψ) (G ⊗ IR)(Ψ)] . (C1) log d kρ − σk1 + 2.

Proof. For any two states ρ and σ in a d-dimensional To evaluate the this fidelity, we observe that the gate UG, Hilbert space, the difference of their is bounded (ok) by the Fannes-Audenaert inequality [49, 50] defined in Eq. (15), can be expressed as UG = UG + (ok) (ok) P⊥ , where P⊥ is the projector on the eigenstates of log d the total energy outside the set E , and U (ok) is the |S(ρ) − S(σ)| ≤ kρ − σk1 + h2(kρ − σk1/2). (B2) ok G 2 partial isometry where h2(p) := −p log p − (1 − p) log(1 − p) is the binary entropy, upper bounded by one for any p. For our pur- (ok) X (xy) UG := Gxy |ψxihψy| ⊗ S (C2) pose, it is enough to use the relaxed version of the above x,y inequality: (xy) X S := |E − ES,xihE − ES,y| , (C3)

log d E∈Eok |S(ρ) − S(σ)| ≤ kρ − σk + 1. (B3) 2 1 Now, let us consider the difference of the relative en- where we used the shorthand Axy = hψx|A|ψyi for a tropies of coherence (B1) between ρ and σ. We have generic operator A ∈ L(HS). Observe that the battery state (11) is defined so that the joint state of the sys- tem and the battery has full support in energy subspaces |C(ρ) − C(σ)| ≤ |S(ρ) − S(σ)| + |S(ρdiag) − S(σdiag)|. (B4) with E ∈ Eok. Substituting (C2) into (C1), one has the expression Applying Eq. (B3) to both terms on the right hand side of the above inequality and noticing that kρdiag − σdiagk1 ≤ dS−1 kρ − σk (monotonicity of trace distance under data pro- X † † 1 FΨ = Cxyzt(ρG )xyGyxGzt(Gρ)tz, (C4) cessing), we have x,y,z,t=0

|C(ρ) − C(σ)| ≤ log d · kρ − σk1 + 2. (B5) where ρ is the marginal state ρ = TrR[|ΨihΨ|] and † Therefore, we have K = log d and c = 2. Cxyzt = hβ| SztSxy |βi. 9

The quantity Cxyzt can be explicitly evaluated as the following quantity:

(R−1)kHSk−x   dS−1 X 2 (k − z + t − 2kHSk + 1)π 1 X ∗ C = sin (Cxyzt − 1)Gxy|ψxihψy|Ψ|ψtihψz|G . xyzt 2 zt L L x,y,z,t=0 k=kHSk+y 1 (k + x − y − 2kH k + 1)π  (D3) × sin S L The quantity 1 − Cxyzt can be upper bounded as   (L − x − y − 1) cos (x−y−z+t)π L 2 2    = π (dS − 1) kHSk L 1 − Cxyzt ≤ 2 1 + O ∀ x, y, z, t, 2hHBi hHBi  (x+y+1)π   (2kHSk−t+z)π  sin L cos L (D4) + L sin π  L since x, y, z, t ∈ {0, . . . , dS − 1}. Substituting into 2 2    (x − y − z + t) π kHSk Eq. (D3), the diamond norm error  can be upper =1 − 2 1 + O , 8hHBi hHBi bounded as (C5) 2 2    π (dS − 1) kHSk †  ≤ 2 1 + O max kGΨG k1 where the last step follows from the definition of L. In- 2hHBi hHBi Ψ 2 2    serting the above expression into Eq. (C4) and rearrang- π (dS − 1) kHSk ing the different terms, we obtain = 2 1 + O . (D5) 2hHBi hHBi 2    π Var(∆GHS) kHSk Finally, we have FΨ = 1 − 2 1 + O , (C6) 4hHBi hHBi π(d − 1)  kH k √S S where Var(∆GHS) denotes the variance of the operator hHBi ≤ 1 + O . (D6) 2 hHBi ∆GHS on the state |Ψi. Noting that Var(∆GHS) ≤ 2 ((λmax − λmin)(∆GHS)/2) , Eq. (C6) implies the follow- In summary, we derived both upper and lower bounds ing bound on the worst-case fidelity on hHBi in terms of the diamond norm error. Since the two bounds have matching scaling, we conclude that  2    √ π (λmax − λmin) (∆GHS) kHSk the energy requirement scales as 1/ , independently of Fwc ≥ 1 − 1 + O . 4hHBi hHBi whether one measures the error in terms of the worst-case (C7) infidelity or in terms of the diamond norm error.

Appendix D: Energy requirement in terms of the Appendix E: Perfect implementation of quantum diamond norm error computation

Here√ we show that the energy requirement still scales Here we consider a generic quantum algorithm that as 1/ , when the error  is measured by the diamond starts by preparing an energy eigenstate state |ψxi and norm error [22] instead of 1 − Fwc. ends by measuring the energy eigenbasis. The overall On one hand, since the diamond norm error up- action of the algorithm can be described by a unitary gate per bounds the worst-case infidelity via the inequality G. We observe that the input-output relation induced √ 1 1 − Fwc ≤ 2 kEG − Gk, we have 1 − Fwc ≤ 2 when the by gate G can be reproduced without errors using the diamond norm error is at most . The proof of the lower interaction (15). For an initial state |ψxi of the system, bound [cf. Eq. (2)] goes through and we get one prepares the battery in the state |E − ES,xi, so that the joint state is kHSk √ hHBi ≥ √ − O( ) . (D1) 8 2 |x, Ei = |ψxi ⊗ |E − ES,xi, (E1)

On the other hand, the output state of the construction where the total energy E ∈ Eok. Then the initial state (15) can be expressed as of the system and the battery can be expressed as |x, Ei. The effect of the interaction (15) can be expressed as dS−1 P X ∗ UG|x, Ei = y gy,x|y, Ei, where gx,y = hψy|G|ψxi is the EG ⊗ IR(Ψ) = CxyztGxy|ψxihψy|Ψ|ψtihψz|Gzt matrix element of G. The system ends up in the state x,y,z,t=0 P 2 y |gy,x| |ψyihψy|. Therefore, when measuring in the (D2) energy eigenbasis in the end, the of getting 2 where Cxyzt is given by Eq. (C5). The diamond norm the outcome y is exactly |gy,x| , which is the same as the error can be obtained by taking the worst case over Ψ of original algorithm G. 10

[1] R. Landauer, Irreversibility and heat generation in the [22] The diamond norm is defined as the maximum trace dis- process, IBM journal of Research and Devel- tance between the outputs of the two channels, maxi- opment 5, 183 (1961). mized over all input states and over all possible reference [2] M. A. Nielsen and I. Chuang, Quantum computa- systems [21]. tion, . Cambridge University Press, [23] D. Kretschmann, D. Schlingemann, and R. F. Werner, Cambridge (2000). The information-disturbance tradeoff and the continuity [3] D. P´erez-Garc´ıa,Optimality of programmable quantum of stinespring’s representation, IEEE transactions on In- measurements, Physical Review A 73, 052315 (2006). formation Theory 54, 1708 (2008). [4] A. M. Kubicki, C. Palazuelos, and D. P´erez-Garc´ıa, [24] G. Chiribella, G. M. D’Ariano, P. Perinotti, D. Schlinge- Resource quantification for the no-programing theorem, mann, and R. Werner, A short impossibility proof of 122, 080505 (2019). quantum bit commitment, Physics Letters A 377, 1076 [5] Y. Yang, R. Renner, and G. Chiribella, Optimal universal (2013). programming of unitary gates, Physical Review Letters [25] G. Gutoski, A. Rosmanis, and J. Sikora, Fidelity of quan- 125, 210501 (2020). tum strategies with applications to cryptography, arXiv [6] T. Sagawa and M. Ueda, Minimal energy cost for thermo- arXiv:1704.04033 (2017). dynamic information processing: measurement and in- [26] Similar techniques have been used in Refs. [17, 51]. formation erasure, Physical Review Letters 102, 250602 [27] G. Chiribella and Y. Yang, Optimal quantum operations (2009). at zero energy cost, Physical Review A 96, 022327 (2017). [7] D. Reeb and M. M. Wolf, An improved landauer principle [28] C. Sparaciari, J. Oppenheim, and T. Fritz, Resource the- with finite-size corrections, New Journal of Physics 16, ory for work and heat, Physical Review A 96, 052112 103011 (2014). (2017). [8] P. Faist, F. Dupuis, J. Oppenheim, and R. Renner, The [29] T. Baumgratz, M. Cramer, and M. Plenio, Quantifying minimal work cost of information processing, coherence, Physical Review Letters 113, 140401 (2014). Communications 6 (2015). [30] A. Winter and D. Yang, Operational resource theory of [9] P. Faist and R. Renner, Fundamental work cost of quan- coherence, Physical Review Letters 116, 120404 (2016). tum processes, Physical Review X 8, 021011 (2018). [31] I. Marvian and R. W. Spekkens, How to quantify coher- [10] E. Wigner, Die messung quantenmechanischer opera- ence: Distinguishing speakable and unspeakable notions, toren, Zeitschrift f¨urPhysik A Hadrons and Nuclei 133, Physical Review A 94, 052324 (2016). 101 (1952). [32] A. Streltsov, G. Adesso, and M. B. Plenio, Colloquium: [11] H. Araki and M. M. Yanase, Measurement of quantum Quantum coherence as a resource, Reviews of Modern mechanical operators, Physical Review 120, 622 (1960). Physics 89, 041003 (2017). [12] M. Ozawa, Conservative , Physical [33] V. Buˇzek,R. Derka, and S. Massar, Optimal quantum Review Letters 89, 057902 (2002). clocks, Physical Review Letters 82, 2207 (1999). [13] M. Ozawa, for quantum instru- [34] P. Skrzypczyk, A. J. Short, and S. Popescu, Ex- ments and computing, International Journal of Quantum tracting work from quantum systems, arXiv preprint Information 1, 569 (2003). arXiv:1302.2811 (2013). [14] J. Gea-Banacloche and M. Ozawa, Minimum-energy [35]J. Aberg,˚ Catalytic coherence, Physical Review Letters pulses for quantum logic cannot be shared, Physical Re- 113, 150402 (2014). view A 74, 060301 (2006). [36] M. Navascu´esand S. Popescu, How energy conservation [15] T. Karasawa and M. Ozawa, Conservation-law-induced limits our measurements, Physical Review Letters 112, quantum limits for physical realizations of the quantum 140502 (2014). not gate, Physical Review A 75, 032324 (2007). [37] J. Koch, M. Y. Terri, J. Gambetta, A. A. Houck, [16] T. Karasawa, J. Gea-Banacloche, and M. Ozawa, Gate fi- D. Schuster, J. Majer, A. Blais, M. H. Devoret, S. M. delity of arbitrary single-qubit gates constrained by con- Girvin, and R. J. Schoelkopf, Charge-insensitive qubit servation laws, Journal of Physics A: Mathematical and design derived from the cooper pair box, Physical Re- Theoretical 42, 225303 (2009). view A 76, 042319 (2007). [17] H. Tajima, N. Shiraishi, and K. Saito, Uncertainty rela- [38] M. Kjaergaard, M. E. Schwartz, J. Braum¨uller, tions in implementation of unitary operations, Physical P. Krantz, J. I.-J. Wang, S. Gustavsson, and W. D. Review Letters 121, 110403 (2018). Oliver, Superconducting qubits: Current state of play, [18] E. Fredkin and T. Toffoli, Conservative logic, Interna- Annual Review of Condensed Physics 11, 369 tional Journal of Theoretical Physics 21, 219 (1982). (2020). [19] J. Ikonen, J. Salmilehto, and M. M¨ott¨onen, Energy- [39] Z.-W. Liu and A. Winter, Resource theories of quan- efficient quantum computing, npj Quantum Information tum channels and the universal role of resource erasure, 3, 17 (2017). arXiv:1904.04201 (2019). [20] B. Coecke, T. Fritz, and R. W. Spekkens, A mathematical [40] Y. Liu and X. Yuan, Operational resource theory of quan- theory of resources, Information and Computation 250, tum channels, arXiv:1904.02680 (2019). 59 (2016). [41] V. Paulsen, Completely bounded maps and operator alge- [21] A. Y. Kitaev, Quantum computations: algorithms and bras, Vol. 78 (Cambridge University Press, 2002). error correction, Russian Mathematical Surveys 52, 1191 [42] A. Uhlmann, The “transition probability” in the state (1997). space of a*-algebra, Reports on 9, 273 (1976). 11

[43] C. A. Fuchs and J. Van De Graaf, Cryptographic dis- [48] M. G. D´ıaz,K. Fang, X. Wang, M. Rosati, M. Skotin- tinguishability measures for quantum-mechanical states, iotis, J. Calsamiglia, and A. Winter, Using and reusing IEEE Transactions on 45, 1216 coherence to realize quantum processes, Quantum 2, 100 (1999). (2018). [44] B. Yadin, J. Ma, D. Girolami, M. Gu, and V. Vedral, [49] M. Fannes, A continuity property of the entropy density Quantum processes which do not use coherence, Physical for spin lattice systems, Communications in Mathemati- Review X 6, 041028 (2016). cal Physics 31, 291 (1973). [45] E. Chitambar and G. Gour, Critical examination of in- [50] K. M. Audenaert, A sharp continuity estimate for the von coherent operations and a physically consistent resource neumann entropy, Journal of Physics A: Mathematical theory of quantum coherence, Physical Review Letters and Theoretical 40, 8127 (2007). 117, 030401 (2016). [51] D. Kretschmann, D. W. Kribs, and R. W. Spekkens, [46] E. Chitambar and G. Gour, Comparison of incoherent Complementarity of private and correctable subsystems operations and measures of coherence, Physical Review in quantum cryptography and error correction, Physical A 94, 052336 (2016). Review A 78, 032330 (2008). [47] J. Aberg, Quantifying superposition, arXiv preprint quant-ph/0612146 (2006).