The nonequilibrium cost of accurate information processing

Accurate information processing is crucial both in technology and in nature. To achieve it, any information processing system needs an initial supply of resources away from thermal equilibrium. Here we establish a fundamental limit on the accuracy achievable with a given amount of nonequilibrium resources. The limit applies to arbitrary information processing tasks and arbitrary information processing systems subject to the laws of quantum mechanics. It is easily computable and is expressed in terms of an entropic quantity, which we name the reverse entropy, associated to a time reversal of the information processing task under consideration. The limit is achievable for all deterministic classical computations and for all their quantum extensions. As an application, we establish the optimal tradeoff between nonequilibrium and accuracy for the fundamental tasks of storing, transmitting, cloning, and erasing information. Our results set a target for the design of new devices approaching the ultimate efficiency limit, and provide a framework for demonstrating thermodynamical advantages of quantum devices over their classical counterparts.

Accurate information processing is crucial both in technology and in nature. To achieve it, any information processing system needs an initial supply of resources away from thermal equilibrium. Here we establish a fundamental limit on the accuracy achievable with a given amount of nonequilibrium resources. The limit applies to arbitrary information processing tasks and arbitrary information processing systems subject to the laws of quantum mechanics. It is easily computable and is expressed in terms of an entropic quantity, which we name the reverse entropy, associated to a time reversal of the information processing task under consideration. The limit is achievable for all deterministic classical computations and for all their quantum extensions. As an application, we establish the optimal tradeoff between nonequilibrium and accuracy for the fundamental tasks of storing, transmitting, cloning, and erasing information. Our results set a target for the design of new devices approaching the ultimate efficiency limit, and provide a framework for demonstrating thermodynamical advantages of quantum devices over their classical counterparts.
Many processes in nature depend on accurate processing of information. For example, the development of complex organisms relies on the accurate replication of the information contained in their DNA, which takes place with an error rate estimated to be less than one basis per billion 1 .
At the fundamental level, information is stored into patterns that stand out from the thermal fluctuations of the surrounding environment 2,3 . In order to achieve deviations from thermal equilibrium, any information-processing machine needs an initial supply of systems in a non-thermal state 4,5 . For example, an ideal copy machine for classical data requires at least a clean bit for every bit it copies [6][7][8] . For a general information-processing task, a fundamental question is: what is the minimum amount of nonequilibrium needed to achieve a target level of accuracy? This question is especially prominent at the quantum scale, where many tasks cannot be achieved perfectly even in principle, as illustrated by the no-cloning theorem 9,10 .
In recent years, there has been a growing interest in the interplay between quantum information and thermodynamics [11][12][13] , motivated both by fundamental questions [14][15][16][17][18] and by the experimental realisation of new quantum devices [19][20][21] . Research in this area led to the development of resource-theoretic frameworks that can be used to study thermodynamics beyond the macroscopic limit [22][23][24][25][26][27][28][29][30] . These frameworks have been applied to characterise thermodynamically allowed state transitions, to evaluate the work cost of logical operations 31,32 and to study information erasure and work extraction in the quantum regime [33][34][35] . From a different perspective, relations between accuracy and entropy production have been investigated in the field of stochastic thermodynamics [36][37][38][39][40] , referring to specific physical models such as classical Markovian systems in nonequilibrium steady states.
Here, we establish a fundamental tradeoff between accuracy and nonequilibrium, valid at the quantum scale and applicable to arbitrary information-processing tasks. The main result is a limit on the accuracy, expressed in terms of an entropic quantity, which we call the reverse entropy, associated with a time reversal of the informationprocessing task under consideration. The limit is attainable in a broad class of tasks, including all deterministic classical computations and all quantum extensions thereof. For the task of erasing quantum information, our limit provides, as a byproduct, the ultimate accuracy achievable with a given amount of work. For the tasks of storage, transmission, and cloning of quantum information, our results reveal a thermodynamic advantage of quantum setups over all classical setups that measure the input and generate their output based only on the measurement outcomes. In the cases of storage and transmission, we show that quantum machines can break the ultimate classical limit on the amount of work required to achieve a desired level of accuracy. This result enables the demonstration of work-efficient quantum memories and quantum communication systems outperforming all possible classical setups.

Results
The nonequilibrium cost of accuracy At the most basic level, the goal of information processing is to set up a desired relation between an input and an output. For example, a deterministic classical computation amounts to transforming a bit string x into another bit string f(x), where f is a given function. In the quantum domain, information-processing tasks are often associated with ideal state transformations ρ x 7 !ρ 0 x , in which an input state described by a density operator ρ x has to be converted into a target output state described by another density operator ρ 0 x , where x is a parameter in some given set X.
Since every realistic machine is subject to imperfections, the physical realisations of an ideal information-processing task can have varying levels of accuracy. Operationally, the accuracy can be quantified by performing a test on the output of the machine and by assigning a score to the outcomes of the measurement. The resulting measure of accuracy is given by the expectation value of a suitable observable O x , used to assess the closeness of the output to the target state ρ 0 x . In the worst case over all possible inputs, the accuracy achieved in a given task T has the expression F T ðMÞ = min x Tr½O x Mðρ x Þ, where M is the quantum channel (completely positive trace-preserving map) describing the action of the machine. Here, the dependence of the input states ρ x and output observables O x on the parameter x is fully general, and includes in particular cases where multiple observables are tested for the same input state. The range of values for the function F T depends on the choice of observables O x : for example, if all the observables O x are projectors, the range of F T will be included in the interval [0, 1].
Accurate information processing generally requires an initial supply of systems away from equilibrium. The amount of nonequilibrium required to implement a given task can be rigorously quantified in a resource-theoretic framework where Gibbs states are regarded as freely available, and the only operations that can be performed free of cost are those that transform Gibbs states into Gibbs states 28,32 . These operations, known as Gibbs preserving, are the largest class of processes that maintain the condition of thermal equilibrium. The initial nonequilibrium resources can be represented in a canonical form by introducing an information battery 31,32 , consisting of an array of qubits with degenerate energy levels. The battery starts off with some qubits in a pure state (hereafter called the clean qubits), while all the remaining qubits are in the maximally mixed state. To implement the desired information-processing task, the machine will operate jointly on the input system and on the information battery, as illustrated in Fig. 1.
The number of clean qubits required by a machine is an important measure of efficiency, hereafter called the nonequilibrium cost. For a given quantum channel M, the minimum nonequilibrium cost of any machine implementing channel M (or some approximation thereof) has been evaluated in refs. 31, 32. Many information-processing tasks, Fig. 1 | The nonequilibrium cost of accuracy. A source generates a set of input states for an information-processing machine. The machine uses an information battery (a supply of qubits initialised in a fixed pure state) and thermal fluctuations (a reservoir in the Gibbs state) to transform the input state ρ x into an approximation of the ideal target states ρ 0 x . Finally, the similarity between the output and the target states is assessed by a measurement. The number of pure qubits consumed by the machine is the nonequilibrium cost that needs to be paid in order to achieve the desired level of accuracy. however, are not uniquely associated with a specific quantum channel: for example, most state transitions ρ7 !ρ 0 can be implemented by infinitely many different quantum channels, which generally have different costs. When a task can be implemented perfectly by more than one quantum channel, the existing results do not identify, in general, the minimum nonequilibrium cost that has to be paid for a desired level of accuracy. Furthermore, there also exist informationprocessing tasks, such as quantum cloning 9,10 , that cannot be perfectly achieved by any quantum channel. In these scenarios, it is important to establish a direct relation between the accuracy achieved in the given task and the minimum cost that has to be paid for that level of accuracy. Such a relation would provide a direct bridge between thermodynamics and abstract information processing, establishing a fundamental efficiency limit valid for all machines allowed by quantum mechanics.
In this paper, we build concepts and methods for determining the nonequilibrium cost of accuracy in a way that depends only on the information-processing task under consideration, and not on a specific quantum channel. Let us denote by cðM,Π A Þ the nonequilibrium cost required for implementing a given channel M on input states in the subspace specified by a projector Π A . We then define the nonequilibrium cost for achieving accuracy F in a task T as c T ðFÞ : = minfcðM,Π A Þ | F T ðMÞ ≥ Fg. Note that the the specification of the input subspace is included in the task T . In the following we focus on tasks where the input subspace is invariant under time evolution, namely [Π A , H A ] = 0, where H A is the Hamiltonian of the input system. Our main goal will be to evaluate c T ðFÞ, the nonequilibrium cost of accuracy.
In Methods, we provide an exact expression for c T ðFÞ. The expression involves a semidefinite programme, which can be solved numerically for low-dimensional systems, thus providing the exact tradeoff between nonequilibrium and accuracy. Still, brute-force optimisation is intractable for high-dimensional systems. For this reason, it is crucial to have a computable bound that can be applied in a broader range of situations. The central result of the paper is a universal bound, valid for all quantum systems and to all informationprocessing tasks: the bound reads where κ T : = À log F T rev max is an entropic quantity, hereafter called the reverse entropy, and F T rev max is the maximum accuracy allowed by quantum mechanics to a time-reversed information-processing task T rev , precisely defined in the following section (see Supplementary Note 1 for the derivation of Eq. (1)). Note that the reverse entropy is a monotonically decreasing function of F T rev max , and becomes zero when the time-reversed task can be implemented with unit accuracy.
Eq. (1) can be equivalently formulated as a limit on the accuracy attainable with a given budget of nonequilibrium resources: for a given number of clean qubits c, the maximum achievable accuracy in the task T , denoted by F T ðcÞ : = maxfF T ðMÞ | cðM,Π A Þ ≤ cg, satisfies the bound This bound represents an in-principle limit on the performance of every information-processing machine. The bounds (1) and (2) are achievable in a number of tasks, and have a number of implications that will be discussed in the following sections.

Time-reversed tasks and reverse entropy
Here, we discuss the notion of time reversal of an informationprocessing task. Let us start from the simplest scenario, involving transformations of a fully degenerate system into itself. For a state transformation task ρ x 7 !ρ 0 x , we consider without loss of generality an accuracy measure for which the observables O x are positive operators, proportional to quantum states. We then define a time-reversed task T rev , where the role of the input states ρ x and of the output observables O x are exchanged. The accuracy of a generic channel M in the execution of the time-reversed task is specified by the reverse accuracy F T rev ðMÞ : = min x Tr½ρ x MðO x Þ. Maximising over all possible channels, we obtain F T rev max and define κ T = À log F T rev max . For systems with nontrivial energy spectrum, we define the timereversed task in terms of a time reversal of quantum operations introduced by Crooks 41 and recently generalised in ref. 42 (this timereversal operation is also related to Petz's recovery map) [43][44][45] . In the Gibbs preserving context, this time-reversal exchanges states with observables, mapping Gibbs states into trivial observables (described by the identity matrix) and vice-versa. More generally, the timereversal maps the states ρ x into the observables e where Γ A and Γ B are the Gibbs states of the input and output systems, respectively. The reverse accuracy of a channel M is then defined as In the Methods section, we show that the reverse entropy can be equivalently written as B is an operator acting on the tensor product of the input and output systems, ρ T x is the transpose of the density matrix ρ x with respect to the energy eigenbasis, and H min ðA|BÞ ω T ,p : = À log minfTr½Λ B | ðI A Λ B Þ ≥ ω T ,p g is the conditional min-entropy [43][44][45] .
Crucially, the reverse entropy depends only on the task under consideration, and not on a specific quantum channel used to implement the task. In fact, the reverse entropy is well-defined even for tasks that cannot be perfectly achieved by any quantum channel, as in the case of ideal quantum cloning, and even for tasks that are not formulated in terms of state transitions (see Methods).
To gain a better understanding of the reverse entropy, it is useful to evaluate it in some special cases. Consider the case of a classical deterministic computation, corresponding to the evaluation of a function y = f(x). In this case the reverse entropy is where D max ðp k qÞ = max y pðyÞ=qðyÞ is the max Rényi divergence between two probability distributions p(y) and q(y) 46 , g B (y) is Gibbs distribution for the output system, and p f (y) is the probability distribution of the random variable y = f(x), when x is sampled from the Gibbs distribution (see Supplementary Note 2 for the derivation). Eq. (4) shows that the reverse entropy of a classical computation is a measure of how much the computation transforms thermal fluctuations into states that deviate from thermal equilibrium.
In the quantum case, however, physical limits to the execution of the time-reversed task can arise even without any deviation from thermal equilibrium. Consider for example the transposition task ρ x 7 !ρ T x [47][48][49][50][51][52] , where x parametrises all the possible pure states of a quantum system. This transformation does not generate any deviation from equilibrium as it maps Gibbs states into Gibbs states. On the other hand, in the fully degenerate case the time-reversed task is still transposition, and perfect transposition is forbidden by the laws of quantum mechanics [47][48][49][50][51][52] . The maximum fidelity of an approximate transposition is F trans = 2/(d + 1) for d-dimensional quantum systems, and therefore κ trans = log½ðd + 1Þ=2.

Condition for achieving the limit
The appeal of the bounds (1) and (2) is that they are general and easy to use. But are they attainable? To discuss their attainability, it is important to first identify the parameter range in which these bounds are meaningful. First of all, the bound (1) is only meaningful when the desired accuracy does not exceed the maximum accuracy F max allowed by the laws of physics for the task T . Similarly, the bound (2) is only meaningful if the initial amount of nonequilibrium resources does not go below the smallest nonequilibrium cost of an arbitrary process acting on the given input subspace, hereafter denoted by c min . By maximising the accuracy over all quantum channels with minimum cost c min , we then obtain a minimum value F min below which reducing the accuracy does not result in any reduction of the nonequilibrium cost.
We now provide a criterion that guarantees the attainability of the bounds (1) and (2) in the full interval ½F min ,F max . Since the two bounds are equivalent to one another, we will focus on bound (1). The condition for attainability in the full interval ½F min ,F max is attainability at the maximum value F max . As we will see in the rest of the paper, this condition is satisfied by a number of information-processing tasks, notably including all classical computations and all quantum extensions thereof. (1) is attainable for a value of the accuracy F 0 , then it is attainable for every value of the accuracy in the interval ½F min ,F 0 , with F min = 2 c min Àκ T . In particular, if the bound is attainable for the maximum accuracy F max , then it is attainable for every value of the accuracy in the interval ½F min ,F max .
In Supplementary Note 3, we prove the theorem by explicitly constructing a family of channels that achieve the bound (1).
By evaluating the nonequilibrium cost of specific quantum channels, one can prove the attainability of the bound (1) for a variety of different tasks. For example, the bound (1) is attainable for every deterministic classical computation. Moreover, it is achievable for every quantum extension of a classical computation: on Supplementary Note 4 we show that for every value of the accuracy, the nonequilibrium cost is the same for the original classical computation and for its quantum extension, and therefore the achievability condition holds in both cases.
The nonequilibrium cost c T ðFÞ provides a fundamental lower bound to the amount of work that has to be invested in order to achieve accuracy F. Indeed, the minimum work cost of a specific channel M, denoted by W ðM,Π A Þ can be quantified by the minimum number of clean qubits needed to implement the process in a scheme like the one in Fig. 1, with the only difference that Gibbs preserving operations are replaced by thermal operations, that is, operations resulting from a joint energy-preserving evolution of the system together with auxiliary systems in the Gibbs state 24,25 . Since thermal operations are a proper subset of the Gibbs preserving operations 28 , the restriction to thermal operations generally results into a larger number of clean qubits, and the work cost is lower bounded as W ðM,Π A Þ ≥ kTðln 2Þ cðM,Π A Þ, where k is the Boltzmann constant and T is the temperature. By minimising both sides over all channels that achieve accuracy F, we then get the bound W T ðFÞ ≥ kTðln 2Þ c T ðFÞ, where W T ðFÞ : = minfW ðM,Π A Þ | F T ðMÞ ≥ Fg is the minimum work cost that has to be paid in order to reach accuracy F.
The achievability of this bound is generally nontrivial, except for operations on fully degenerate classical systems, wherein the sets of thermal operations and Gibbs preserving maps coincide due to Birkhoff's theorem 53 . Another example is the task of erasing quantum states, corresponding to the state transformation ρ x 7 !|0i 0 h |, where ρ x is an arbitrary state and |0i is the ground state. In Supplementary Note 4, we show that the bound W erase ðFÞ ≥ kT ln 2 c erase ðFÞ holds with the equality sign, and the minimum work cost of approximate erasure is given by where ΔA is the difference between the free energy of the ground state and the free energy of the Gibbs state, and the equality holds for every value of F in the interval ½F min ,F max , with F min = e ÀΔA=ðkTÞ and F max = 1.

Nonequilibrium cost of classical cloning
Copying is the quintessential example of an information-processing task taking place in nature, its accurate implementation being crucial for processes such as DNA replication. In the following, we will refer to the copying of classical information as classical cloning. In abstract terms, the classical cloning task is to transform N identical copies of a pure state picked from an orthonormal basis into N0 ≥ N copies of the same state. Classically, this corresponds to the transformation |xi x h | N 7 !|xi x h | N0 , where x labels the vectors of an orthonormal basis. The reverse entropy can be computed from Eq. (4), which gives where ΔN : = N 0 À N the number of extra copies, and ΔA max is the maximum difference between the free energy of a single-copy pure state and the free energy of the single-copy Gibbs state. Physically, κ C clon coincides with the maximum amount of work needed to generate ΔN copies of a pure state from the thermal state 25 .
Since cloning is a special case of a deterministic classical computation, the bound (1) is attainable, and the minimum nonequilibrium cost of classical cloning is This result generalises seminal results by Landauer and Bennett on the thermodynamics of classical cloning 7,54,55 , extending them from the ideal scenario to realistic settings where the copying process is approximate. For systems with fully degenerate energy levels, one also has the equality W C clon ðFÞ = kT ðln 2Þ c C clon ðFÞ, which provides the minimum amount of work needed to replicate classical information with a target level of accuracy.

Nonequilibrium cost of quantum cloning
We now consider the task of approximately cloning quantum information 56 . The accuracy of quantum cloning is important both for foundational and practical reasons, as it is linked to the no signalling The optimal accuracy-nonequilibrium tradeoff is depicted for N ! N0 cloning machines with N = 1 and N0 = 2,3,4. The fidelities for copying classical (red region) and quantum data (blue region) are limited by the same boundary curve, except that the fidelity for the task of copying quantum data cannot reach to 1 due to the no-cloning theorem.
principle 57 , to quantum cryptography 56 , quantum metrology 58 , and a variety of other quantum information tasks 59 .
Here, we consider arbitrary cloning tasks where the set of singlecopy states includes all energy eigenstates. This includes in particular the task of universal quantum cloning [60][61][62] , where the input states are arbitrary pure states. The reverse entropy of universal quantum cloning is at least as large as the reverse entropy of classical cloning: the bound κ Q clon ≥ κ C clon follows immediately from Eq. (3), by restricting the optimisation to probability distributions that are concentrated on the eigenstates of the energy.
In Supplementary Note 5, we show that (i) the bound (1) is attainable for universal quantum cloning, and (ii) κ Q clon = κ C clon . These results imply that classical and quantum cloning exhibit exactly the same tradeoff between accuracy and nonequilibrium: for every value of the accuracy, the minimum nonequilibrium cost of information replication is given by Eq. (7) both in the classical and in the quantum case. An illustration of this fact is provided in Fig. 2. In terms of accuracy/nonequilibrium tradeoff, the only difference between classical and quantum cloning is that the classical tradeoff curve goes all the way up to unit fidelity, while the quantum tradeoff curve stops at a maximum fidelity, which is strictly smaller than 1 due to the no-cloning theorem 9,10 .
Considering the differences between quantum and classical cloning, the fact that these two tasks share the same tradeoff curve is quite striking. An insight into this phenomenon comes from connection between the nonequilibrium cost and the time-reversed task of cloning. For fully degenerate systems, the time-reversed task is to transform N 0 copies of a state into N ≤ N 0 copies of the same state, and in both cases it can be realised by discarding N 0 À N systems. The reverse accuracy of this task is the same for both classical and quantum systems, and so is the reverse entropy. In the nondegenerate case, the analysis is more complex, but the conclusion remains the same.
Although classical and quantum cloning share the same tradeoff curve, in the following we will show that they exhibit a fundamental difference in the way the tradeoff is achieved: to achieve the fundamental limit, cloning machines must use genuinely quantum strategies.

Limit on the accuracy of classical machines
Classical copy machines scan the input copies and produce replicas based on this information. Similarly, a classical machine for a general task can be modelled as a machine that measures the input and produces an output based on the measurement result. When this approach is used at the quantum scale, it leads to a special class of quantum machines, known as entanglement breaking 63 .
Here, we show that entanglement breaking machines satisfy a stricter bound. In fact, this stricter bound applies not only to entanglement breaking machines, but also to a broader class of machines, called entanglement binding 64 . An entanglement binding channel is a quantum channel that degrades every entangled state to a bound (a.k.a. PPT) entangled state 65,66 . In Methods, we show that the minimum nonequilibrium cost over all entanglement binding machines, denoted by c eb T ðFÞ, must satisfy the inequality where κ T is the reverse entropy of the state transformation task ρ x ! ρ 0 x , and κ T * is the reverse entropy of the transposed task T * , corresponding to the state transformation ρ x 7 !ðρ 0 x Þ T . This bound can be used to demonstrate that a thermodynamic advantage of general quantum machines over all entanglement binding machines, including in particular all classical machines.

Quantum advantage in cloning
For quantum cloning, it turns out that no entanglement binding machine can achieve the optimal accuracy/nonequilibrium tradeoff. The reason for this is that the reverse entropy of the transpose task is strictly larger than the reverse entropy of the direct task, namely κ clon * >κ clon . In Supplementary Note 6, we prove the inequality where ΔE is the difference between the maximum and minimum energy, and, Inserting this inequality into Eq. (8), we conclude that every entanglement binding machine necessarily requires a larger number of clean qubits compared to the optimal quantum machine. When the energy levels are fully degenerate, we show that the bounds (8) and (9) are exact equalities. With this result at hand, we can compare the exact performance of entanglement binding machines and general quantum machines, showing that the latter achieve a higher accuracy for every given amount of nonequilibrium resources. The comparison is presented in Fig. 3.
Our result shows that entanglement binding machines are thermodynamically inefficient for the task of information replication. Achieving the ultimate efficiency limit requires machines that are able to preserve free (i.e., non-bound) entanglement. This observation fits with the known fact that classical machines cannot achieve the maximum copying accuracy allowed by quantum mechanics 61,62,67 . Here, we have shown that not only classical machines are limited in their accuracy, but also that, to achieve such limited accuracy, they require a higher amount of nonequilibrium resources. Interestingly, the thermodynamic advantage of general quantum machines vanishes in the asymptotic limit N 0 ! 1, in which the optimal quantum cloning can be reproduced by state estimation [68][69][70] .

Thermodynamic benchmark for quantum memories and quantum communication
Quantum machines that preserve free entanglement also offer an advantage in the storage and transmission of quantum states, corresponding to the ideal state transformation ρ x ↦ ρ x where x parametrises the states of interest. In theory, a noiseless quantum machine can achieve perfect accuracy at zero work cost. In practice, however, the transmission is always subject to errors and inefficiencies, resulting into nonunit fidelity and/or nonzero work. For this reason, realistic experiments that aim to demonstrate genuine quantum transmission or storage need criteria to demonstrate superior performance with  respect to all classical setups. A popular approach is to demonstrate an experimental fidelity larger than the maximum fidelity achievable by classical schemes [71][72][73] . In the qubit case, the maximum classical fidelity is F eb max = 2=3 74 , and is often used as a benchmark for quantum communication experiments [75][76][77] . Here, we provide a different benchmark, in terms of the nonequilibrium cost needed to achieve a target fidelity F. In Supplementary Note 7, we show that the minimum nonequilibrium cost over all entanglement binding machines for the storage/transmission of qubit states is Eq. (10) is valid for every qubit Hamiltonian and for every value of F in the interval ½F eb min ,F eb max , with F eb max = 2=3 and F eb min = ðe ΔE kT + 1Þ=ð2e ΔE kT + 1Þ. The minimum cost c eb store=store ðFÞ can be achieved by state estimation, and therefore can be regarded as the classical limit on the nonequilibrium cost.
For every F>F min , the minimum nonequilibrium cost (10) is strictly larger than zero for every nondegenerate Hamiltonian. Since the nonequilibrium cost is a lower bound to the work cost, Eq. (10) implies that every entanglement binding machine with fidelity F requires at least kTðln 2Þ c eb store=transmit ðFÞ work. This value can be used as a benchmark to certify genuine quantum information processing: every realistic setup that achieves fidelity F with less than kT ln F + e ΔE kT ð2F À 1Þ 2 =ð1 À FÞ h i work will necessarily exhibit a performance that cannot be achieved by any classical setup. Notably, the presence of a thermodynamic constraint (either on the nonequilibrium or on the work) provides a way to certify a quantum advantage even for noisy implementations of quantum memories and quantum communication systems with fidelity below the classical fidelity threshold F max = 2=3. A generalisation of these results for higher dimensional systems is provided in Supplementary Note 7.

Discussion
An important feature of our bound (1) is that it applies also to state transformations that are forbidden by quantum mechanics, such as ideal quantum cloning or ideal quantum transposition. For state transformations that can be exactly implemented, instead, it is interesting to compare our bound with related results in the literature.
For exact implementations, the choice of accuracy measure is less important, and one can use any measure for which Eq. (1) yields a useful bound on the work cost. For example, consider the problem of generating a state ρ from the equilibrium state. By choosing a suitable measure of accuracy (see Methods for the details), we find that the nonequilibrium cost for the state transition Γ ↦ ρ is equal to D max ðρ k ΓÞ, where D max ðρ k σÞ : = lim α!1 D α ðρ k σÞ is the max relative entropy, Dðρ k σÞ : = log Tr½ρ α σ 1Àα =ðα À 1Þ ,α ≥ 0 being the the Rényi relative entropies. In this case, the nonequilibrium cost coincides (up to a proportionality constant kT ln 2) with the minimal amount of work needed to generate the state ρ without errors 25 . Similarly, one can consider the task of extracting work from the state ρ, corresponding to the state transition ρ ↦ Γ. Ref. 25 showed that the maximum extractable work is D min ðhρi k ΓÞ kT ln 2, where D min ðρ k σÞ : = D 0 ðρ k σÞ is the min relative entropy as per Datta's definition 78 and 〈ρ〉 is the timeaverage of ρ. This value can also be retrieved from our bound with a suitable choice of accuracy measure (see Supplementary Note 8 for the details). Smooth versions of these entropic quantities naturally arise by smoothing the task, that is, by considering small deviation from the input/output states that specify the desired state transformation (see Methods).
Our bound can also be applied to the task of information erasure with the assistance of a quantum memory 33 . There, a machine has access to a system S and to a quantum memory Q, and the goal is to reset system S to a pure state η S , without altering the local state of the memory. When the initial states of system SQ are drawn from a timeinvariant subspace, our bound (1) implies that the work cost satisfies the inequality W =ðkT ln 2Þ ≥ D max ðη S γ Q k Γ SQ Þ À D max ð e Γ SQ k Γ SQ Þ, where e Γ SQ is the quantum state obtained by projecting the Gibbs state onto the input subspace, and γ Q = Tr S ½ e Γ SQ is the marginal state of the memory. The bound is tight, and, for degenerate Hamiltonians, it matches the upper bound from ref. 33 up to logarithmic corrections in the error parameters (see Supplementary Note 9).
Another interesting issue is to determine when a given state transition ρ7 !ρ 0 can be implemented without investing work. For states that are diagonal in the energy basis, a necessary and sufficient condition was derived in ref. 26, adopting a framework where catalysts are allowed. In this setting, ref. 26 showed that the state transition ρ7 !ρ 0 can be implemented catalytically without work cost if and only if These conditions can be compared with our bound (1). In Methods, we show that, with a suitable choice of figure of merit, Eq. (1) implies the lower bound W =ðkT ln 2Þ ≥ D max ðρ 0 k Γ B Þ À D max ðρ k Γ A Þ for the perfect execution of the state transition ρ7 !ρ 0 . Hence, the work cost for the state transition ρ7 !ρ 0 satisfies the bound W =ðkT ln 2Þ ≥ D max ðρ 0 k Γ B Þ À D max ðρ k Γ A Þ, and the r.h.s. is nonpositive only if D max ðρ 0 k Γ B Þ ≤ D max ðρ k Γ A Þ. The last condition is a special case of Eq. (11), corresponding to α → ∞. Notably, this condition and Eq. (11) are equivalent when the input and output states have well-defined energy, including in particular the case where the Hamiltonians of systems A and B are fully degenerate. Further discussion on the relation between quantum relative entropies and the cost of accuracy is provided in Supplementary Note 10.
While the applications discussed in the paper focussed on oneshot tasks, our results also apply to the asymptotic scenario where the task is to implement the transformation ρ n x 7 !ρ 0n x in the large n limit. In Methods we consider the amount of nonequilibrium per copy required by this transformation, allowing for small deviations in the input and output states. This setting leads to the definition of a smooth reverse entropy of a task, whose value per copy is denoted by κ T ,iid and is shown to satisfy the bound where Sðρ k σÞ : = Tr½ρðlog ρ À log σÞ is the quantum relative entropy.
In the special case where the state transformation ρ x ! ρ 0 x can be implemented perfectly, and where ðρ x Þ x2X is the set of all possible quantum states of the input system, the r.h.s. of Eq. (12) (times kT ln 2) coincides with the thermodynamic capacity introduced by Faist, Berta, and Brandão in ref. 79. In this setting, the results of ref. 79 imply that the thermodynamic capacity coincides with the amount of work per copy needed to implement the transformation ρ x ! ρ 0 x . Since the amount of work cannot be smaller than the nonequilibrium cost, this result implies that our fundamental accuracy/nonequilibrium tradeoff is asymptotically achievable for all information-processing tasks allowed by quantum mechanics.
In a different setting and with different techniques, questions related to the thermodynamical cost of physical processes have been studied in the field of stochastic thermodynamics 36 . Most of the works in this area focus on the properties of nonequilibrium steady states of classical systems with Markovian dynamics. An important result is a tradeoff relation between the relative standard deviation of the outputs associated with the currents in the nonequilibrium steady state and the overall entropy production [37][38][39][40] . This relation, called a thermodynamic uncertainty relation, is often interpreted as a tradeoff between the precision of a process and its thermodynamical cost. A difference with our work is that the notion of precision used in stochastic thermodynamics is not directly related to general information-processing tasks. Another difference is that thermodynamic uncertainty relations do not always hold for systems outside the nonequilibrium steady state 39 , whereas our accuracy/nonequilibrium tradeoff applies universally to all quantum systems. An interesting avenue of future research is to integrate the informationtheoretic methods developed in this paper with those of stochastic thermodynamics, seeking for concrete physical models that approach the ultimate efficiency limits.

General performance tests
The performance of a machine in a given information-processing task can be operationally quantified by the probability to pass a test 73,80,81 . In the one-shot scenario, a general test T consists in preparing states of a composite system AR, consisting of the input of the machine and an additional reference system. The machine is requested to act locally on system A, while the reference system undergoes the identity process, or some other (generally noisy) process R x implemented by the party that performs the test. Finally, the reference system and the output of the machine undergo a joint measurement, described by a suitable observable. The measurement outcomes are regarded as the score assigned to the machine. The test T is then described by the possible triples ðρ x ,R x ,O x Þ x2X , consisting of an input state, a process on the reference system, and an output observable. In the worst case over all possible triples, one gets the accuracy F T ðMÞ : = min x Tr½O x ðM R x Þðρ x Þ, where M is the map describing the machine's action. Note that the dependence of the state ρ x , transformation R x , and measurement O x can be arbitrary, and that the parameter x can also be a vector x = (x 1 , …, x n ). For example, the input state ρ x could depend only on the subset of the entries of the vector x, while the output observable O x could depend on all the entries, thus describing the situation where multiple observables are tested for the same input state.
Performance tests provide a more general way to define information-processing tasks. Rather than specifying a desired state transformation ρ x 7 !ρ 0 x , one can directly specify a test that assigns a score to the machine. The test can be expressed in a compact way in the Choi representation 82 . In this representation, the test is described by a set of operators ðΩ x Þ x2X , called the performance operators 81 , acting on the product of the input and output Hilbert spaces. The accuracy of the test has the simple expression F T ðMÞ = min x Tr½M Ω x , where M : = ðI A MÞð|I A I A |Þ, |I A : = P i |ii |ii is the Choi operator of channel M, and I A is the identity on system A. In the following we will take each operator Ω x to be positive semidefinite without loss of generality.

Exact expression for the nonequilibrium cost
In Supplementary Note 1, we show that the nonequilibrium cost of a general task T can be evaluated with the expression c T ðFÞ = max p c T ,p ðFÞ, where the minimum is over all probability distributions p = ðp x Þ x2X and c T ,p ðFÞ = log max with Here, the maximisation runs over all Hermitian operators X A (Y B ) acting on system A (B) and over all real numbers z. For every fixed probability distribution p, the evaluation of c T ,p ðFÞ is a semidefinite programme 83 , and can be solved numerically for lowdimensional systems. A simpler optimisation problem arises by setting X A = 0, which provides the lower bound (see Supplementary Note 1 for the derivation).

Time-reversed tasks and reverse entropy
For a given task T , implemented by operations with input A and output B, we define a time-reversed task T rev , implemented by operations with input B and output A. For example, consider the case where the direct task is to transform pure states into pure states, according to a given mapping ρ x 7 !ρ 0 x , on a quantum system with fully degenerate energy levels, and the accuracy of the implementation measured by the fidelity F T ðMÞ = min x Tr½ρ 0 x Mðρ x Þ. In this case, the time-reversed task is to implement the transformation ρ 0 x 7 !ρ x , using some channel M with input B and output A. The accuracy is then given by the reverse fidelity F T rev ðMÞ = min x Tr½ρ x Mðρ 0 x Þ. More generally, we define the time-reversed task T rev in terms of a time reversal for quantum operations 41,42 , related to Petz's recovery map [43][44][45]  . The reverse accuracy then becomes F T rev ðMÞ : = min x Tr½ e O x Mðe ρ x Þ. For a general information-processing task with performance operators ðΩ x Þ x2X , we define the time-reversed task T rev with performance operators ðΩ rev x Þ x2X defined by where the second equality follows from the operational interpretation of the min-entropy 45 . Taking the logarithm on both sides of the equality, we then obtain the relation κ T : = À log F T rev max = max p H min ðA|BÞ ω p , corresponding to Eq. (3) in the main text. The bound (1) then follows from the relation c T ðFÞ = max p c T ,p and from Eq. (14).

Bounds on the reverse entropy
When the test T consists in the preparation of a set of states ðρ x Þ x2X of system A and in the measurement of a set of observables ðO x Þ x2X on system B, the reverse entropy can be lower bounded as with the equality holding when |X| = 1 (see Supplementary Note 10 for the proof and for a discussion on the relation between the nonequilibrium cost of a state transformation task ρ x 7 !ρ 0 x ,8x 2 X and the nonequilibrium cost of the individual state transitions ρ x 7 !ρ 0 x for a fixed value of x).
A possible choice of observable is O x = P x , where P x is the projector on the support of the target state ρ 0 x . In this case, the bound (18) becomes An where |ψ x is the normalised eigenvector corresponding to the maximum eigenvalue of Γ . With this choice, the bound (18) becomes κ ≥ max with the equality when |X| = 1. Combining this bound with Eq. (1), we obtain the following Proposition 1. If there exists a quantum channel M such that Mðρ x Þ = ρ 0 x for every x ∈ X, then its nonequilibrium cost satisfies the bound cðMÞ ≥ max x D max ðρ 0 x k Γ B Þ À D max ðρ x k Γ A Þ. The proposition follows from Eq. (1) and from the fact that the channel M has accuracy F ðMÞ = min x Tr½Mðρ x ÞO x = 1.

Smooth reverse entropy
For an information-processing task T with operators ðΩ x Þ x2X , one can consider an approximate version, described by another task T 0 with operators ðΩ 0 x Þ x2X 0 that are close to ðΩ x Þ x2X with respect to a suitable notion of distance. One can then define the worst (best) case smooth reverse entropy of the task κ T ,ϵ as the maximum (minimum) of κ T 0 over all tasks T 0 that are within distance ϵ from the given task. The choice between the worst case and the best case irreversibility depends on the problem at hand. A best case irreversibility corresponds to introducing an error tolerance in the task, thus discarding low-probability events that would result in a higher cost 25,33 . Instead, a worst case irreversibility can be used to model noisy scenarios, where the input states may not be the ones in the ideal informationprocessing task. An example of this situation is the experimental implementation of quantum cloning, where the input states may not be exactly pure.
Smoothing is particularly useful in the asymptotic scenario. Consider the test T n that consists in preparing a multi-copy input state ρ n x and measuring the observable P x,n , where P x,n is the projector on the support of the target state ρ 0 n x . A natural approximation is to allow, for every x ∈ X, all inputs ρ y,n that are ϵ-close to ρ n x , and all outputs ρ 0 x that are ϵ-close to ρ 0n x . Choosing κ T n ,ϵ to be the worst case smooth reverse entropy of the task T n , Eq. (19) gives the bound κ T n ,ϵ ≥ max x k Γ B Þ À Sðρ x k Γ A Þ. The quantity on the r.h.s. coincides with the thermodynamic capacity introduced by Faist, Berta, and Brandão in ref. 79, where it was shown that the thermodynamic capacity coincides with the amount of work per copy needed to implement the transformation ρ x ! ρ 0 x . Combining this result with our bounds, we obtain that the fundamental accuracy/nonequilibrium in Eq. (1) is asymptotically achievable for all transformations allowed by quantum mechanics.

Limit for entanglement binding channels
Entanglement binding channels generally satisfy a more stringent limit than (1). The derivation of this strengthened limit is as follows: first, the definition of an entanglement binding channel P implies that the map P PT defined by P PT ðρÞ : = ½PðρÞ T is a valid quantum channel. Now, the nonequilibrium cost of the channels P and P PT is given by D max ðPðΠ A Γ A Π A k Γ B ÞÞ and D max ðP PT ðΠ A Γ A Π A k Γ B ÞÞ (cf. Supplementary Note 1). Since the max relative entropy satisfies the relation D max ðρ k σÞ = D max ðρ T k σ T Þ for every pair of states ρ and σ, the costs of P and P PT are equal.
The second step is to note that the accuracy of the channel P for the task specified by the performance operators (Ω x ) is equal to the accuracy of the channel P PT for the task specified by the performance operators ðΩ T B x Þ, where T B denotes the partial transpose over system B. Applying the bound (1) to channel P PT , we then obtain the relation where κ T * is the reverse entropy of the transpose task T * , with performance operators ðΩ T B x Þ. Since entanglement binding channel is subject to both bounds (1) and (20), Eq. (8) holds.