Fundamental work cost of quantum processes

Information-theoretic approaches provide a promising avenue for extending the laws of thermodynamics to the nanoscale. Here, we provide a general fundamental lower limit, valid for systems with an arbitrary Hamiltonian and in contact with any thermodynamic bath, on the work cost for the implementation of any logical process. This limit is given by a new information measure---the coherent relative entropy---which accounts for the Gibbs weight of each microstate. The coherent relative entropy enjoys a collection of natural properties justifying its interpretation as a measure of information, and can be understood as a generalization of a quantum relative entropy difference. As an application, we show that the standard first and second laws of thermodynamics emerge from our microscopic picture in the macroscopic limit. Finally, our results have an impact on understanding the role of the observer in thermodynamics: Our approach may be applied at any level of knowledge---for instance at the microscopic, mesoscopic or macroscopic scales---thus providing a formulation of thermodynamics that is inherently relative to the observer. We obtain a precise criterion for when the laws of thermodynamics can be applied, thus making a step forward in determining the exact extent of the universality of thermodynamics and enabling a systematic treatment of Maxwell-demon-like situations.


I. INTRODUCTION
Thermodynamics enjoys an extraordinary universalityapplying to heat engines, chemical reactions, electromagnetic radiation, and even to black holes. Thus, we are naturally led to further apply it to small-scale quantum systems. In such a context, the information content of a system plays a key role: Landauer's principle states that logically irreversible information processing incurs an unavoidable thermodynamic cost [ ]. Landauer's principle has generated a new line of research in which information and thermodynamic entropy are treated on an equal footing [ ], in turn providing a resolution to the paradox of Maxwell's demon [ ]. In the context of statistical mechanics, a significant effort has also been made to elucidate the role of the second law [ -]. Statistical mechanics has further provided important contributions to understanding the interplay between information and thermodynamics [ -], with works studying the energy requirements of information processing [ -]. This has also led to an improved understanding of nanoengines and information-driven thermodynamic devices [ -], paving the way for experimental demonstrations [ -].
When studying the thermodynamics of small-scale quantum systems, it is particularly relevant to define the thermodynamic framework precisely. A customary approach, the resource theory approach, is to investigate the state transformations that are possible after imposing a restriction on the types of elementary physical operations that are allowed. Such frameworks have enabled us to understand general conditions under which it is possible to transform one state into another [ -] and to study erasure and work extraction in the single-shot regime [ -]. Such results have been extended to the case where quantum side information is available [ , ], to situations with multiple thermodynamic reservoirs [ -], and to the case of a finite * phfaist@caltech.edu † renner@phys.ethz.ch bath size [ -]. The role of coherence and catalysis has been underscored [ -], the effect of correlations studied [ -], and the efficiency of nanoengines investigated [ , -]. Fully quantum fluctuation relations [ ] and a second-law equality [ ] have been derived, and further connections to the recoverability of quantum information have been exhibited [ ]. Furthermore, fully quantum state transformations were characterized [ , ]. We refer to ref.
[ ] for a more comprehensive review covering these approaches to quantum information thermodynamics. Our main result is a fundamental limit to the work cost of any logical process implemented on a system with any Hamiltonian and in contact with any type of thermodynamic reservoir. It accounts for the necessary changes in the energy level populations in the system, as well as for the thermodynamic cost of resetting any information that needs to be discarded by the logical process. It is valid for a single instance of the process and ignores unlikely events, thus capturing statistical fluctuations of the work cost.
Our thermodynamic framework is specified by imposing a restriction on the operations which can be carried out, along with introducing a battery system allowing us to invest resources to overcome this restriction. The restriction we consider here is to impose that the allowed operations must be Gibbs-preserving maps, that is, mappings for which the thermal state is a fixed point. This framework is a natural generalization of the setup in ref.
[ ] and has close ties to resource theory approaches [ , , ]. Gibbs-preserving maps are the most generous set of physical evolutions that can be allowed for free, in the sense that if any non-Gibbs-preserving map is allowed for free, arbitrary work can be extracted, rendering the framework trivial. Since in most existing thermodynamic frameworks the allowed free operations preserve the thermal state, our bound still holds in other standard settings such as the framework of thermal operations [ , ]. (However, if one considers catalytical processes, more general transformations can be carried out, and hence additional care has to be taken in order to apply our framework, e.g., by including the catalyst explicitly as part of the process [ , , , ].) As a battery system, we consider an information battery, that is, a memory register of qubits that are all individually either in a pure state or in a maximally mixed state. The pure qubits are a resource that can be invested in order to implement logical processes that are not Gibbs preserving.
Our main result is expressed in terms of a new purely information-theoretic quantity, the coherent relative entropy. The coherent relative entropy observes several natural properties, such as a data processing inequality, invariance under isometries, and a chain rule, justifying its interpretation as an entropy measure. It is a generalization of both the min-and max-relative entropy as well as the conditional min-and max-entropy. In the asymptotic limit of many independent repetitions of the process (the i.i.d. limit), the coherent relative entropy converges to the difference of the usual quantum relative entropy of the input state and the output state relative to the Gibbs state. Our quantity hence adds structure to the collection of entropy measures forming the smooth entropy framework [ -].
In fact, our result may be phrased in purely informationtheoretic terms, abstracting out physical notions such as energy or temperature in an operator Γ, which may be interpreted as assigning abstract "weights" to individual quantum states. In the case of a system in contact with a heat bath, these weights are simply the Gibbs weights, where at inverse temperature β, the value e −β E is assigned to each energy level of energy E. Our main result then quantifies how many pure qubits need to be invested, or how many pure qubits may be distilled, while carrying out a specific logical process given as a completely positive, trace-preserving map, subject to the restriction that the implementation must globally preserve the joint Γ operator of the system and the battery. In this picture, the coherent relative entropy intuitively measures the amount of information "forgotten" by the logical process, conditioned on the output of the process, and counted relative to the "weights" encoded in the Γ operator.
Our framework can be applied to the macroscopic limit, to study transitions between thermodynamic states of a large system. (For instance, an isolated gas in a box that is in a microcanonical state may undergo a process that brings the gas to another microcanonical state of different energy and volume.) Remarkably, it turns out that the work cost of any mapping relating two thermodynamic states, as given by the coherent relative entropy, is equal to the difference of a potential evaluated on the input and the output state, regardless of the details of the logical process. For an isolated system, we show that this potential is precisely the thermodynamic entropy. By coupling the system to another system that plays the role of a piston, i.e., that is capable of reversibly furnishing work to the system, we recover the standard second law of thermodynamics relating the entropy change of the system to the dissipated heat.
Our framework naturally treats thermodynamics as a subjective theory, where a system can be described from the viewpoint of different observers. One may thus account for varying levels of knowledge about a quantum system. This feature allows us to systematically analyze Maxwell-demon-like situations. Furthermore, we find a criterion that certifies that the laws of thermodynamics hold in a coarse-grained picture. For instance, this criterion is not fulfilled in the case of Maxwell's demon, signaling that a naive application of the laws of thermodynamics to the gas may be disrupted by the presence of the demon. We hence obtain a precise notion of when the laws of thermodynamics can be applied, contributing to the long-standing open question of the exact extent of the universality of thermodynamics.
The results presented in this paper have been, to a large extent, reported in the recent Ph.D. thesis of one of the authors [ ].
The remainder of the paper is structured as follows. In Section II, we present the general setup in which our results are derived. In Section III, we explain our main result, the work cost of any process in contact with any type of reservoir (Section III A); we then provide a collection of properties of our new entropy measure (Section III B), a study of a special class of states whose properties make them suitable "battery states" for storing extracted work (Section III C), a discussion of how the macroscopic laws of thermodynamics emerge from our microscopic considerations (Section III D), and an analysis of how to relate the views of different observers in our framework (Section III E). Section IV concludes with a discussion and an outlook.

II. A FRAMEWORK OF RESTRICTED OPERATIONS
Consider a system S described by a Hamiltonian H S . In the framework of Gibbs-preserving maps, an operation Φ(·) is forbidden if it does not satisfy Φ(e −β H S /Z ) = e −β H S /Z , where β is a given fixed inverse temperature and Z = tr[e −β H S ]. In other words, Φ(·) is forbidden if it does not preserve the thermal state. Now, observe that the condition on Φ(·) depends on β and H S only via the thermal state, so we can rewrite the condition in a more general, but abstract, way as follows: An operation Φ(·) is forbidden if it does not preserve some given fixed operator Γ, that is, if it does not satisfy Φ(Γ) = Γ. We trivially recover Gibbspreserving maps by setting Γ = e −β H S . For technical reasons and for convenience, we choose to loosen the condition on Φ from being trace preserving to being trace nonincreasing; correspondingly, we only require that Φ(Γ) Γ, instead of demanding strict equality. By enlarging the class of allowed operations, we can only obtain a more general bound. The advantage of this abstract version of the Gibbs-preserving-maps model is that our framework and its corresponding results may be potentially applied to any setting where a restriction of the form Φ(Γ) Γ applies, for any given Γ which does not necessarily have to be related to a Gibbs state. The way Γ should be defined is determined by which restriction of the form Φ(Γ) Γ makes sense to require in the particular setting considered. Finally, it proves convenient to consider non-normalized Γ operators (this becomes especially relevant if we consider different input and output systems). For instance, in the case of a system with Hamiltonian H in contact with a heat bath at inverse temperature β, the trace of Γ = e −β H actually encodes the canonical partition function of the system.
Our framework is defined in its full generality as follows. To each system S corresponds an operator Γ S , which may be any positive semidefinite operator. We then define as free operations those completely positive, trace-nonincreasing maps Φ A→B , mapping operators on a system A to operators on another system B, which satisfy ( ) One may think of the Γ operator as assigning to each state in a certain basis a "weight" characterizing how "useless" it is. As a convention, if Γ S has eigenvalues equal to zero, then the corresponding eigenstates are considered to be impossible to preparethese states will never be observed. In the following, a map obeying ( ) will be referred to as a Γ-sub-preserving map.
As mentioned above, in the case of a system S with Hamiltonian H S in contact with a single heat bath at inverse temperature β, we essentially recover the usual model of Gibbs-preserving maps by setting Γ = e −β H S . In the case of multiple conserved charges such as a Hamiltonian H S , number operator N S , etc., we recover the relevant Gibbs-preserving maps model by setting Γ = e −β (H S −µ N S +...) , with the corresponding chemical potentials, as expected; furthermore, the physical charges do not have to commute [ , ].
Our framework is designed to be as tolerant as possible (to the extent that our allowed operations are ultimately a set of quantum channels), so as to result in the strongest possible fundamental limit. We start with this observation in the case of thermodynamics with a single heat bath: If we allow any physical evolution for free that does not preserve the thermal state, then we may create an arbitrary number of copies of a nonequilibrium quantum state for free; however, this renders our theory trivial since usual thermodynamical models allow us to extract work from many copies of a nonequilibrium state. Accordingly, quantum thermodynamics models that can be written as a set of allowed physical maps (such as thermal operations) necessarily have the Gibbs state as fixed point, ensuring that our fundamental limit applies for those models as well. We note that models in which catalysis is permitted allow for more general state transformations [ , , , ], exploiting the fact that, for a forbidden transition σ → ρ, there might exist some state ζ such that σ ⊗ ζ → ρ ⊗ ζ (where ζ may be chosen suitably depending on σ and ρ). In order to apply our framework in such a context, we can consider the catalyst explicitly. For instance, in the context of catalytic thermal operations [ ], after the catalyst has been included in the picture, the physical evolution that is applied is a thermal operation and thus has to be Gibbs preserving. Ultimately, the correct choice of framework depends on the underlying physical model: For instance, in a macroscopic isolated gas, the whole system evolves according to an energy-preserving unitary, and under suitable independence assumptions, the evolution of an individual particle is well modeled by a thermal operation; however, other situations might warrant the inclusion of a catalyst, for instance, in a paranoid adversarial setting in which an eavesdropper may manipulate a thermodynamic system. In the first case, our ultimate limits apply straightforwardly, whereas in the second, one would need to include the catalyst explicitly.
Work storage systems are often modeled explicitly but are mostly equivalent in terms of how they account for work [ , , , , , ]. Among these, the information battery is easily generalized to our abstract setting. An information battery is a register A of n qubits whose Γ operator is Γ A = 1 A . (If Γ A = e −β H A for an inverse temperature β and a Hamiltonian H A , the requirement that Γ A = 1 A is fulfilled by choosing the completely degenerate Hamiltonian H A = 0.) The register starts in a state where λ 1 qubits are maximally mixed and n − λ 1 qubits are in a pure state. In the final state, we require that λ 2 qubits are maximally mixed and n − λ 2 are in a pure state. The difference λ = λ 1 − λ 2 is the number of pure qubits extracted or "distilled." In this way, we may invest a number of pure qubits in order to enable a process that is not a free operation, or we may try to extract pure qubits from a process that is already a free operation.
Depending on the physical setup, the λ pure battery qubits can themselves be converted explicitly to some physical resource, such as mechanical work. In the case where we have access to a single heat bath at temperature T , a pure qubit can be reversibly converted to and from kT ln 2 work using a Szilárd engine [ ], where k is Boltzmann's constant; thus, a process from which we can extract λ pure qubits is a process from which we can extract λ · kT ln(2) work using the heat bath. More generally, we may replace the information battery entirely by other battery models, such as corresponding generalizations to our framework of the work bit (the "wit") [ ], or the "weight system" [ , ]. These work storage models are known to be equivalent [ ]; the equivalence persists in our framework, with a suitable generalization of the "extracted resource" λ. In the presence of several physical conserved charges, and corresponding thermodynamic baths, the number λ of pure qubits extracted acts as a common currency that allows us to convert between the different resources. Hence, a number λ of extracted pure qubits may be stored in different forms of physical batteries, corresponding to different forms of work, such as chemical work [ , ]. Hence, the quantity λ should be thought of as a dimensionless value, expressed in number of qubits, characterizing the "extracted resource value" of the logical process independently of which type of battery is actually used in the implementation, in the same spirit as the free entropy of ref.
[ ], and bearing some similarity to currencies in general resource theories [ , ].
The main question we address may thus be reduced to the following form ( Fig. ). Given operators Γ X , Γ X 0, an input state σ X , and a logical process E X →X (that is, a trace-nonincreasing, completely positive map), the task is to find the maximum number of qubits that can be extracted, or the minimum number of qubits that need to be invested, in order to implement the logical process on the given input state. Note that we require the correlations between the input and the output to match those specified by E X →X , a condition that is not equivalent to just requiring that the given input state σ X is transformed into the given output state E X →X (σ X ). Equivalently, we require that the implementation acts as the process (E X →X ⊗ id R X ) on a purified state |σ X R X of the input, where id R X denotes the identity process on R X .
Finally, we ignore improbable events with total probability ϵ, which is necessary in order to obtain meaningful physical results [ ]. Indeed, in textbook thermodynamics when calculating the work cost of compressing an ideal gas, for instance, one ignores the exceedingly unlikely event where all gas particles conspire to hit against the piston at much greater force than on average, a situation that would require more work for the compression but that happens with overwhelmingly negligible probability. For our purposes, we may optimize the zero-error work cost over states that are ϵ-approximations of the required state [ ], which is a standard approach in quantum information and cryptography [ , ]. battery battery battery battery Gibbspreserving operation Figure . Implementation of a logical process E (any quantum process) using thermodynamic operations. The process acts on X and has output on X , and is implemented by acting on the system and the battery with a joint Gibbs-preserving operation. The battery starts with a depletion state λ 1 and finishes with a depletion state λ 2 . The overall extracted work is given by the difference λ 1 − λ 2 .
At this point, it is useful to introduce the notion of the process matrix associated with the pair (E X →X , σ X ) of the logical process and input state. First, we define a reference system R X of the same dimension as X and choose some fixed bases {|k X } and {|k R X } of X and R X . Then, we define the process matrix of the pair (E X →X , σ X ) as the bipartite quantum state ρ X R X = (E X →X ⊗ id R X )(|σ σ | X :R X ), where |σ X :R X = σ 1/2 X ( |k X ⊗ |k R X ). The process matrix corresponds to the Choi matrix of E X →X , yet it is "weighted" by the input state σ X in the sense that the reference state is σ X R X instead of a maximally entangled state. The process matrix is in one-to-one correspondence with the pair (E X →X , σ X ) except for the part of E X →X that acts outside the support of σ X ; i.e., the specification of ρ X R X uniquely determines σ X as well as the logical process E X →X on the support of σ X . The reduced states σ X and σ R X of |σ X R X are related by a partial transpose, σ R X = σ T X . Intuitively, the reference system R X may be thought of as a "mirror system" which "remembers" what the input state to the process was.
As a further remark, one might be worried that the relaxation of the set of allowed operations from Γ-preserving and tracepreserving maps to Γ-sub-preserving and trace-nonincreasing maps is too drastic. Indeed, while yielding a valid bound, the relaxed set of operations is unphysical and we might thus obtain a looser bound than necessary. In fact, this is not the case. Rather, trace-nonincreasing, Γ-sub-preserving processes are a technical convenience, which allows for more flexibility in the characterization of what the process effectively does in the situations of interest to us while ignoring other irrelevant situations; yet, ultimately, we show that an equivalent implementation can be carried out as a single trace-preserving, Γ-preserving map. For instance, consider a box separated into two equal-volume compartments, one of which contains a single-particle gas (a setup known as a Szilárd engine [ ]). The particle may be in one of two states, |L , |R , representing the particle being located in either the left or right compartment. If the particle is located in the left compartment, then work can be extracted by attaching a piston to the separator and letting the gas expand in contact with a heat bath. Yet, if we know the particle to be initially in the left compartment, it makes no difference what the process would have done had the particle been in the right compartment-that situation is irrelevant. Hence, we may define the corresponding "effective process" as the trace-nonincreasing map, which maps |L to the maximally mixed state (allowing us to extract work) and which maps |R to the zero vector. Evidently, the full actual physical implementation is a trace-preserving process, yet it is convenient to represent the "relevant part" of this process using a trace-nonincreasing map. Crucially, both mappings have the same process matrix, given that the input state is |L . This picture is justified on a formal level: We show that any tracenonincreasing, Γ-sub-preserving mapΦ can be dilated in the following way. There exists a trace-preserving, Γ-preserving map over an additional ancilla whose process matrix is as close to a given ρ X R X as the process matrix ofΦ combined with a transition on the ancilla between two eigenstates of the Γ operator (Proposition in the Appendix).

A. Fundamental work cost of a process
Consider two systems X and X with corresponding operators Γ X and Γ X , respectively, as described above and as imposed by the appropriate thermodynamic bath [ , , , ]. We consider any input state σ X as well as any logical process E X →X , i.e., any completely positive, trace-preserving map. With a reference system R X of the same dimension as X , which purifies the input state as |σ X R X , the logical process and the input state jointly define the process matrix ρ X R Our main result is phrased in terms of the coherent relative entropy, defined aŝ where the optimization ranges over completely positive, tracenonincreasing maps T X →X . The notation '≈ ϵ ' signifies proximity of the quantum states in terms of the purified distance, a distance measure derived from the fidelity of the quantum states related to the ability to distinguish the two states by a measurement [ , , ], which is closely related to the quantum angle, Bures distance and infidelity distance measures [ , ]. The definition ( ) is independent of which purification |σ X R X is chosen on R X , noting that ρ X R X also depends on this choice. Furthermore, we use the shorthandD At this point, we may formulate our main contribution: Main Result. The optimal implementation of the process E X →X on the input state σ X , with free operations acting jointly on the system X and an information battery, can extract a number λ optimal of pure qubits given by the coherent relative entropy, If λ optimal < 0, then the implementation needs to invest at least −λ optimal pure qubits.
The resources required to carry out the process, counted in terms of λ optimal pure qubits, may be converted into physical work. For instance, if we have access to a heat bath at temperature T , we may convert each pure qubit into kT ln(2) work and vice versa, and thus the work extracted by an optimal implementation of the process is In fact, it is not necessary to implement the process using the information battery at all, and the resources may be directly supplied by a variety of other battery models. The work can even be supplied by a macroscopic pistonlike system, as we will see later.
Here, we provide the main technical ingredients to understand the idea of the proof of our main result, while deferring details to Appendix B and Appendix C.
A central step in our proof is a characterization of how much battery charge needs to be invested in order to implement exactly any completely positive, trace-nonincreasing map T X →X . Such maps are those over which we optimize in ( ) to define the coherent relative entropy. The work yield, or negative work cost, of performing T X →X with Γ-sub-preserving processes using an information battery is given by "how Γ-sub-preserving" the process is: Proposition I. Let T X →X be a completely positive, tracenonincreasing map and let y ∈ R. Then, the following are equivalent: For a large enough battery A (with Γ A = 1 A ) and for any λ 1 , λ 2 0 such that λ 1 − λ 2 y, there exists a tracenonincreasing, Γ-sub-preserving map Φ X A→X A satisfying for all ω X , where 2 −λ 1 2 λ denotes a uniform mixed state of rank 2 λ on system A.
Proposition I shows that if there is an allowed operation in our framework which implements a given completely positive, tracenonincreasing map T exactly while charging the battery by an amount λ, then the mapping must necessarily satisfy T (Γ) 2 −λ Γ. Conversely, for any trace-nonincreasing map T satisfying T (Γ) 2 −λ Γ for some value λ, there exists an operation in our framework acting on the system and a battery system which implements T while charging the battery by some value λ. This operation is a trace-nonincreasing, Γ-sub-preserving map acting on the system and the battery. From this operation, we can then construct a fully Γ-preserving, trace-preserving map that implements T , as argued at the end of the previous section.
Our main result then exploits Proposition I in order to answer the original question, that is, to find the optimal battery charge extraction when implementing approximately a logical process E on an input state σ . In effect, one needs to optimize the implementation cost over all maps T whose process matrix is ϵ-close to the required process matrix. This optimization corresponds precisely to the one carried out in the definition of the coherent relative entropy in ( ). (If σ X is full rank and if ϵ = 0, then necessarily T = E; in general, however, a better candidate T may be found.)

B. The coherent relative entropy and its properties
The coherent relative entropyD ϵ X →X (ρ X R X Γ X , Γ X ) defined in ( ) intuitively measures the amount of information discarded during the process, relative to the weights represented in Γ X and Γ X . It ignores unlikely events of total probability ϵ, a parameter that can be chosen freely. Its interpretation as a measure of information is justified by the collection of properties it satisfies, which are natural for such measures, and since it reproduces known results in special cases. We provide an overview of the properties of this quantity here, and refer to Appendix C for the technical details.
a. Elementary properties. The coherent relative entropy obeys some trivial bounds. Specifically, These bounds have a natural interpretation in the context of a single heat bath at inverse temperature β = 1/(kT ). The extracted work may never exceed an amount corresponding to starting in the highest energy level of the system and finishing in the Gibbs state; similarly, it may never be less than the amount corresponding to starting in the Gibbs state and finishing in the highest excited energy level. (A correction is added to account for additional work that can be extracted by exploiting the ϵ accuracy tolerance.) Under scaling of the Γ operators, the coherent relative entropy simply acquires a constant shift: For any a, b > 0, In the case of a single heat bath at inverse temperature β = 1/(kT ), this property simply corresponds to the fact that if the Hamiltonians of the input and output systems are translated by some constant energy shifts, then the difference in the shifts should simply be accounted for in the work cost. Indeed, if H X → H X + ∆E X and H X → H X + ∆E X , then Γ X → e −β ∆E X Γ X , Γ X → e −β ∆E X Γ X and the optimal extracted work of a process, given by kT ln(2) times the coherent relative entropy, has to be adjusted according to ( ) by kT ln(2) log 2 (e −β ∆E X /e −β ∆E X ) = ∆E X − ∆E X . b. Recovering known entropy measures. In special cases we recover known results in single-shot quantum thermodynamics, reproducing existing entropy measures from the smooth entropy framework [ , ].
In the case of a system described by a trivial Hamiltonian, the work cost of erasing a state to a pure state is given by the max-entropy [ ], a measure that characterizes data compression or information reconciliation [ ]; similarly, preparing a state from a pure state allows us to extract an amount of work given by the min-entropy of the state, a measure that characterizes the amount of uniform randomness that can be extracted from the state. These results turn out to be special cases of considering the work cost of any arbitrary quantum process for systems with a trivial Hamiltonian [ ], which is given by the conditional max-entropy of the discarded information conditioned on the output of the process: where |ρ EX R X is a purification of ρ X R X and whereĤ ϵ max (E|X ) andĤ ϵ min (E|R X ) are the smooth conditional max-entropy and min-entropy which were introduced in ref.
[ ], and are also known as the alternative conditional max-entropy and minentropy [ ]. A precise meaning of the approximation in ( ) is provided in Appendix C.
We recover more known results with an arbitrary Hamiltonian in contact with a heat bath by considering state formation and work extraction of a quantum state [ , ]. It is known that the work that can be extracted from a quantum state, or that is required to form a quantum state, is given by the minrelative entropy and the max-relative entropy, respectively; these single-shot relative entropies were introduced in ref.
[ ] and are related to hypothesis testing [ -]. We show that if the input or output system is trivial, then matching the previously known results. We note that a trivial system as output or input of a process is equivalent to mapping to or from a pure, zero-energy eigenstate; this is because the coherent relative entropy is insensitive to energy eigenstates (or more generally, eigenstates of the Γ operator) that have no overlap with the corresponding input or output state. c. Data processing inequality and chain rule. The coherent relative entropy satisfies a data processing inequality: If an additional channel is applied to the output, mapping the Gibbs weights to other Gibbs weights, then the coherent relative entropy may only increase. In other words, for any channel Intuitively, this holds because the final state after the application of F X →X is less valuable as it is closer to the Gibbs state, and hence more work can be extracted by the optimal process realizing the total operation X → X . The coherent relative entropy also obeys a natural chain rule: The work extracted during two consecutive processes may only be less than an optimal implementation of the total effective process. We refer to Appendix C for a technically precise formulation.
d. Asymptotic equipartition. An important property of the coherent relative entropy is its asymptotic behavior in the limit of many independent copies of the process (known as the i.i.d. limit). In this regime, the coherent relative entropy converges to the difference in the quantum relative entropies of the input state to the output state, which is consistent with previous results in quantum thermodynamics [ , ]: recalling that σ X is the input state of the process and ρ X the resulting output state, and where ϵ is small and either kept constant or taken to zero slower than exponentially in n. Crucially, the average work cost of performing a process in the i.i.d. regime with Gibbs-preserving operations does not depend on the details of the process, but only on the input and output states, as was already the case for systems described by a trivial Hamiltonian [ ].
e. Miscellaneous properties. We show a collection of further properties, including the following: The coherent relative entropy is equal to zero for a pure process matrix, which corresponds to an identity mapping, for any input state and for ϵ = 0; the smooth coherent relative entropy can be bounded in both directions as differences of known entropy measures; the coherent relative entropy does not depend on the details of the process if the input state is of the form Γ X /tr(Γ X ) (e.g., a Gibbs state), and it reduces, in this case, to a difference of input and output relative entropies and hence only depends on the output of the process.

C. Battery states and robustness to smoothing
Previous work has already shown the equivalence of several battery models known in the literature [ ], notably the information battery, the work bit ("wit") [ , ], and the "weight" system [ , ]. Our framework allows us to make this equivalence manifest, by singling out a class of states on any system for which the system can act as a battery. These states exhibit the property that they are reversibly interconvertible (as in ref. [ ])-the resources invested in a transition from one battery state to another can be recovered entirely and deterministically by carrying out the reverse transition.
For any system W with a corresponding Γ W , we consider as battery states those states of the form where P is a projector such that [P, Γ W ] = 0. In the presence of a single heat bath at inverse temperature β, this class of states includes, for instance, individual energy eigenstates or also maximally mixed states on a subspace of an energy eigenspace. We define the value of a particular battery state τ (P) as Λ(τ (P)) = − log 2 tr(P Γ W ) . ( ) We require the system W to start in such a battery state τ (P) and to end in another such state τ (P ) corresponding to another projector P with [P , Γ W ] = 0. The following proposition asserts that the system W can act as a battery enabling exactly the same state transitions on another system S as an information battery with charge difference λ 1 − λ 2 = Λ(τ (P )) − Λ(τ (P)) (see Appendix B for proofs): Proposition II. Let T X →X be a completely positive, tracenonincreasing map, and let y ∈ R. Then, statements (a) and (b) in Proposition I are further equivalent to the following: (c) For any quantum system W with corresponding Γ W , and for any projectors P, P satisfying [P, The information battery, the wit as well as the weight system are themselves special cases of this general battery system. Indeed, the states 2 −λ i 1 2 λ i of the information battery can be cast in the form ( ), with P = 1 2 λ i since Γ = 1 for the information battery; the corresponding value of the state is indeed Λ(τ (P)) = −λ i . Similarly, in the case of the wit and of the weight system, and in the presence of a single heat bath at inverse temperature β such that Γ W = e −β H W , the relevant states are energy eigenstates |E W , whose value is precisely their energy, up to a factor β: Λ(τ (|E E| W )) = βE. The equivalence of these models is thereby manifest.
As can be expected, the battery states of the general form τ (P) are reversibly interconvertible, implying that for any process that maps τ (P) to τ (P ) on a system, the coherent relative entropy is equal to the difference Λ(τ (P)) − Λ(τ (P )).
This general formulation enables us to prove an interesting property of these battery states-they are robust to small imperfections. Indeed, when implementing a process on a system S using a battery W , it makes no difference whether one optimizes over ϵ-approximations of the overall process on the joint system S ⊗W , or over ϵ-approximations on S only with no imperfections on the battery state (as the smooth coherent relative entropy is defined above). More precisely, we prove that the smooth coherent relative entropy is exactly the optimal difference in the charge state of the battery while capturing all implementations that include slight imperfections on the battery for any battery system: , ( ) where the optimization ranges over all battery systems W with corresponding Γ W , over all battery states corresponding to projectors P W , P W with [P W , Γ W ] = [P W , Γ W ] = 0, and over all free operations Φ XW →X W which are an ϵ-approximation of a joint process XW → X W , with a resulting process matrix on the system of interest given by ρ X R X and which induces a transition on the battery from τ (P W ) to τ (P W ) (see Appendix D).

D. Emergence of macroscopic thermodynamics
We now apply our general framework to the case of macroscopic systems, and recover the standard laws of thermodynamics as emergent from our model. On one hand, the goal of this section is to show that our framework behaves as expected in the macroscopic limit, further justifying it as a model for thermodynamics. On the other hand, the arguments presented here reinforce the picture of the macroscopic laws of thermodynamics as emergent from microscopic dynamics, in line with common knowledge and existing literature [ , , -], by providing an alternative explanation of this emergence based on Γ-subpreserving maps. (In fact, this emergence may be understood as defining the order relation in refs. [ , , -] as the ordering induced by transformation by Γ-sub-preserving maps).
a. The general mechanism. The macroscopic theory of thermodynamics is recovered when it is possible to single out a class of states that obey a reversible interconversion property. More precisely, suppose there are a class of states {τ z 1 ,z 2 , ...,z m } specified by m parameters z 1 , . . . , z m , and suppose there exists a potential Λ(z 1 , . . . , z m ) such that for any pair of states τ z 1 , ...,z m X and τ z 1 , ...,z m X from this class, we have, for any process matrix ρ X R X mapping one state to the other, The ln(2) factor merely serves to change the units of the coherent relative entropy from bits, which is standard in information theory, to nats, which will prove convenient to recover the standard laws of thermodynamics. We call the function Λ(z 1 , . . . , z m ) the natural thermodynamic potential corresponding to the physics encoded in the Γ operators. In other words, the two states τ z 1 , ...,z m and τ z 1 , ...,z m may be reversibly interconverted, as any work invested when going in one direction may be recovered when returning to the initial state, and this is irrespective of which precise logical process is effectively carried out during the transition. An obvious choice of states with this property are states of the same form as the battery states introduced above, which motivates recycling the same symbols τ and Λ. (We have set ϵ = 0 in ( ) because smoothing such battery-type states has no significant effect.) Suppose that the parameters are sufficiently well approximated by continuous values. This would typically be the case for a large system such as a macroscopic gas. Consider an infinitesimal change of a state (z 1 , . . . , z m ) → (z 1 + dz 1 , . . . , z m + dz m ). If there is a free operation that can perform this transition, then necessarily, the coherent relative entropy is positive; hence, Λ(z 1 + dz 1 , . . . , z m + dz m ) Λ(z 1 , . . . , z m ). Conversely, if the coherent relative entropy is positive, then there necessarily exists a free operation implementing the said transition. We deduce that the infinitesimal transition z → z + dz is possible with a free operation if and only if dΛ 0 .
( ) This condition expresses the macroscopic second law of thermodynamics, as we will see below.
We may define the generalized chemical potentials where the notation (∂ f /∂x) y,z denotes the partial derivative with respect to x of a function f , as y and z are kept constant. We may then write the differential of Λ as The generalized potentials µ i are often directly related to physical properties of the system in question, such as temperature, pressure, or chemical potential. Under external constraints on the variables z 1 , z 2 , . . . , z m , we may ask what the "most useless thermodynamic state" compatible with those conditions is. The answer is given by minimizing the potential Λ subject to those constraints-this is a variational principle. For instance, if two systems with natural thermodynamic potentials Λ 1 (z 1 , . . . , z m ) and Λ 2 (z 1 , . . . , z m ) are put into contact under the constraints that for all i, z i + z i must be kept constant (such as for extensive variables in thermodynamics), then we may write dz i = −dz i and minimize Λ = Λ 1 + Λ 2 by requiring that and we see that the minimum is attained when µ i = µ i . If the system is undergoing suitable thermalizing dynamics, then its evolution will naturally converge towards that point. b. The textbook thermodynamic gas. We proceed to recover the usual laws of thermodynamics in this fashion for a macroscopic isolated gas S composed of many particles ( Fig. ). The Hamiltonian of the gas is denoted by H (V ) , where the volume V occupied by the gas is a classical parameter of the Hamiltonian that determines, for instance, the width of a confining potential. We assume, for simplicity, that the number N of particles constituting the gas is kept at a fixed value throughout, restricting our considerations to the corresponding subspace.
Let us first consider the case of an isolated gas at fixed parameters E, V . In order to apply our framework, we must identify the Γ operator, which encodes the relevant restrictions imposed by the physics of our system. Recall that our restriction is meant Figure . Macroscopic thermodynamics emerges from our framework when singling out a set of states that can be parametrized by continuous parameters to a good approximation and can be reversibly interconverted into one another. We consider the case of a textbook thermodynamic gas confined in a box, with a piston capable of furnishing work. In this setting, we recover the usual second law of thermodynamics, dS δQ/T , relating the change in entropy, the dissipated heat, and the temperature.
to explicitly forbid certain types of processes, without worrying whether a nonforbidden operation is achievable. Here, we assume that at fixed E, V , the system is isolated and hence evolves unitarily. In particular, the projector P E,V S onto the eigenspace of H (V ) corresponding to energy E is preserved. Hence, the Γ operator characterizing the gas alone for fixed E, V can be taken as ( ) This is compatible with standard considerations in statistical mechanics, which identify the state of the gas in such conditions as the maximally mixed state in the subspace projected onto by P E,V S (the microcanonical state), which we denote by τ E,V S = P E,V S /tr(P E,V S ). Indeed, at fixed E, V on the control system, an allowed transformation may not change this state. Now, we would like to account for changes in E, V . It is convenient to introduce a physical control system C, which plays the following roles: It stores the information about all the controlled external parameters of the state in which the gas was prepared-here, the parameters are E, V ; furthermore, it provides the necessary physical constraints on the gas and physical resources necessary for transformations, taking on the role of a battery. In our case, the control system includes a piston that confines the gas to a volume V and is capable of furnishing the energy required to change the state of the gas. For concreteness, we imagine that the piston is balanced by a weight, causing the piston to exert a force f on the gas. The force f may be tuned by varying the weight. The states of the control system are |e, x C , where e is the energy stored in the control system and x the position of the piston. The energy e is the potential energy of the weight, and it must be equal to e = E tot − E as enforced by total energy conservation, where E tot is the fixed total energy of the joint CS system. Furthermore, x determines the volume of the gas as V = A · x, where A is the surface of the piston. If the control system were isolated and not coupled to the gas, then the nonforbidden operations on the control system would be those preserving the operator Γ 0 C = e,x e,x |e, x e, x | C , where e,x encodes the relevant physics of the control system: It decreases as either e increases or x increases, meaning that a state |e, x C cannot be brought to the state |e , x C with e > e or |e, x C with x > x. In other words, we do not forbid reducing the weight charge or lowering it. The coupling between the control system and the gas can be enforced with a Γ operator of the form ( ) If the control system is the state |e, x C , then any allowed operation must preserve the operator Γ E,V S for the corresponding E = E tot − e and V = Ax. Furthermore ( ) accounts for the physics of the control system itself with the coefficient e,x .
The states τ e, are of the form ( ); hence, they are reversibly interconvertable as per ( ) and they are a valid class of states for our macroscopic description. The corresponding natural thermodynamic potential is given as per ( ), is the microcanonical partition function, and hence Λ S (E, V ) is, up to Boltzmann's constant k and a minus sign, the quantity S(E, V ) = k ln Ω S (E, V ), which is known as the thermodynamic entropy of the gas: As the gas is macroscopic, we assume that the parameters E, V are well approximated by continuous variables. It is useful to define the conjugate variables to e, x and E, V via the differentials of Λ C and Λ S : with the coupling inducing the relations dE = −de and dV = A dx. The force f exerted by the piston onto the gas is given by , and hence f = −ν x /ν e . The thermodynamic work provided by the piston is the mechanical work performed by the weight, Any operation mapping two states τ e,x CS → τ e+de,x +dx CS which obeys our global restriction, i.e. which preserves the operator ( ), must obey ( ) or, equivalently, dΛ S −dΛ C ; hence, where we have defined the change in energy of the gas that is not due to thermodynamic work as heat: The temperature of the gas is defined as T gas = (∂S/∂E) −1 = −(kµ E ) −1 as in standard textbooks, as the conjugate variable corresponding to entropy. The control system also acts as a heat bath, so we define its temperature T as the temperature of a gas that it would be "in equilibrium" with, in the sense that our variational principle is achieved. The potential Λ CS attains its minimum under the constraints dE = −de and implying that µ E = ν e and hence T = −(kν e ) −1 . We may now write ( ) in its more traditional form, Our control system is in fact another example of a battery system. Indeed, it can convert another form of a useful resource, mechanical work, into the equivalent of pure qubits for enabling processes on the system, while still working under the relevant global constraints such as conservation of energy.
The thermodynamic gas illustrates a situation in which the macroscopic second law of thermodynamics is recovered as emergent. Note that the argument can also be applied to a system with different relevant physical quantities, such as magnetic field and magnetization of a medium.

E. Observers in thermodynamics
In standard thermodynamics, one describes systems from the macroscopic point of view. This point of view is usually assumed only implicitly, to the point that notions such as thermal equilibrium or the thermodynamic entropy function are often thought of as objective properties of the system. Yet, a closer look reveals that they can be thought of as observer-dependent quantities, which can be extended to observers with different amounts of knowledge about the system [ , , ]. This observation is at the core of a modern understanding of Maxwell's demon.
The present section begins with a brief motivation, reviewing a variant of Maxwell's demon. Then, we show that our framework is well suited for describing different observers and that it provides a natural notion of coarse-graining. Indeed, the framework itself, thanks to the abstraction provided by the Γ operator, is scale agnostic and can be applied consistently from any level of knowledge about the system. More precisely, we show how to relate two descriptions from the viewpoints of two observers, where one observer sees a coarse-grained version of another observer's knowledge. The coarse-graining is given by any completely positive, trace-preserving map. We define a sense in which we can carry out the reverse transformation, where one recovers the fine-grained information, given the coarse-grained information, with the help of a recovery map. This allows us to relate the laws of thermodynamics in either observer's picture, where by the "laws of thermodynamics" in an observer's picture, we mean that the evolution of the system is governed in their picture by Γ-sub-preserving maps. This provides a precise criterion that can guarantee, in a given setting, that the laws of thermodynamics hold in the coarse-grained picture or, intuitively, that "no Maxwell-demon-type cheating" is happening. Namely, if the fine-grained picture has no more information than what can be recovered from the coarse-grained picture, then our framework may be applied consistently from either a.

b.
Figure . Maxwell's demon concentrates all particles on one side of the box by opening the trap door at appropriate times. a. A macroscopic observer describing only the gas sees its entropy decrease, in apparent violation of the macroscopic observer's idea of the second law of thermodynamics. b. The demon observes no entropy change, as the state of the gas is conditioned on his knowledge. By modeling his memory as an explicit system, originally in a pure state, we may understand his actions as simply correlating his memory with the state of the gas. In doing so, a macroscopic observer may be induced into witnessing a violation of a macroscopic second law. If the demon wishes to operate cyclically, he needs to reset his memory register back to a pure state, which costs work according to Landauer's principle [ , ]; any work he might have extracted using his scheme is paid back at this point. picture, with both observers agreeing on the class of possible processes.
Consider the variant of Maxwell's demon depicted in Fig. . A gas is enclosed in a box separated into two equal volume compartments, which communicate only through a small trap door controlled by a demon. The demon is able to observe individual particles and activates the trap door at appropriate times, letting a single particle through each time, in order to concentrate all particles on one side of the box. From a macroscopic perspective, and looking only at the gas, one observes an apparent entropy decrease as the gas now occupies a smaller volume. However, from a microscopic perspective, the demon is essentially transferring entropy from the gas into a memory register, which is initially in a pure state [ , ]. Consider in more detail the following process: The demon performs a series of gates using the gas degrees of freedom as controls and his memory qubits as targets, which "replicates" the information about the gas particles into his memory. Since this process is unitary, it preserves the joint entropy of the memory and the gas. The result is a classically correlated state between the memory register and the gas. So, what is the entropy of the gas? It is now clear that the answer depends on the observer. The macroscopic observer sees the gas with its usual macroscopic thermodynamic entropy, while the demon has engineered a state where the gas has zero entropy conditioned on the side information stored in his memory-he knows all there is to know about the gas. Conceptually, the thermodynamic reason for this difference is that the demon is able to extract work from the gas, whereas the macroscopic observer is not. Indeed, the demon can exploit the side information stored in his memory to design a perfect trap-door opening schedule which, when executed, concentrates all the particles on one side of the box. (This process can itself be thought of as gates acting in the other direction.) With all particles concentrated Bob Alice Figure . Observers in thermodynamics. Alice has access to microscopic degrees of freedom of a gas, while Bob can only observe its coarse macroscopic properties, such as its temperature T , volume V and pressure p. Alice describes the evolution of the gas using Gibbspreserving maps, with a Gibbs state Γ A A on the full state space of the many particles of the gas. On the other hand, Bob describes the gas using his own knowledge-for instance, the macroscopic variables T , V , pwhich in full generality we can represent as a quantum state in a state space H B which is obtained by applying a given mapping F A→B A→B (·) on Alice's state. (For instance, this map may trace out the inaccessible microscopic information.) States of the gas described by Bob may be transformed to Alice's picture by applying a suitable recovery map, such as the Petz map [ , -]. Then, Alice's Γ A A -preserving maps appear to Bob as on one side of the box, the demon can now extract work by replacing the separator by a piston and letting the gas expand isothermally. (Of course, the memory register is still littered with all the information about the gas; resetting the register costs work according to Landauer's principle, which is where the demon pays back his extracted work if he wishes to operate cyclically [ , ].) The above example shows that a fully general framework of thermodynamics should be universally applicable from the point of view of any observer, accounting for any level of knowledge one might possess about a system. One also expects that if an observer sees a violation of their laws of thermodynamics, while knowing that in a finer-grained picture the corresponding laws are obeyed, then they may attribute this effect to lack of knowledge about microscopic degrees of freedom which the observed process exploits. In the following, we show that our framework displays these desired properties.
Consider two observers, Alice and Bob, who have distinct degrees of knowledge about a system. We assume that the system's microscopic state space H A , which Alice has access to, is transformed by a completely positive, trace-preserving map F A→B A→B to a state space H B which is used by Bob to describe the situation ( Fig. ). For instance, Alice might have access to individual position and momenta of all the particles of a gas, while Bob only has access to partial information given by macroscopic physical quantities such as temperature, pressure, volume, etc. More generally, if the microscopic system can be embedded in a bipartite system H K ⊗ H N that stores, respectively, the macroscopic information (available to both Bob and Alice) and the microscopic information (available to Alice only), then Bob's observations can be related to Alice's simply by tracing out the H N system.
Suppose that Alice observes some microscopic dynamics happening within H A and that this evolution is Γ-preserving with a particular operator Γ A A . How does this evolution appear to Bob? It turns out that for Bob, these maps are also Γ-preserving maps, but they are relative to his Γ operator, which is simply given , that is, by transforming Alice's Γ operator into Bob's picture. Conversely, a map that appears as Γ Bpreserving to Bob is observed by Alice as being Γ A -preserving.
In order to give a precise meaning to the above statements, it is necessary to specify how a state described by Bob can be translated back to Alice's picture. Indeed, there can be several possible states for Alice that are compatible with Bob's state. We describe this "recovery process" using a recovery map, which gives, in a sense, the "best guess" of what the state on H A could be, given only knowledge of Bob's state on H B . More precisely, we define the state transformation from Bob's picture to Alice's picture as the application of a completely positive, trace-preserving map . This ensures that the completely useless state in Bob's picture is mapped back to the completely useless state in Alice's picture. An example of a suitable recovery map is the Petz recovery map [ , -], defined as is the adjoint of the superoperator F A→B A→B . The Petz recovery map is completely positive and trace preserving, and satisfies R B→A

Hence, given a trace-nonincreasing mapping E A
A in Alice's picture, we define Bob's description of the mapping as the composed map of transforming into Alice's picture, applying the map, and transforming back to Bob's picture: Conversely, if we are given a tracenonincreasing mapping E B B in Bob's picture, then this map is described in Alice's picture as the composed map of transforming to Bob's picture, applying the map, and transforming back: More generally, these claims hold as well for any trace-nonincreasing, completely positive maps F A→B does not have to be full rank.
The above provides a general criterion that is able to guarantee that the laws of thermodynamics in the coarse-grained picture are valid: If the state of the system in Alice's picture is one that can be recovered from Bob using a fixed recovery map, then Alice's free operations correspond to free operations in Bob's picture, and hence Alice's laws of thermodynamics indeed translate to Bob's idea of what the laws of thermodynamics are.
A simple example is the relation of the microcanonical to the canonical ensemble. (This is also known as Gibbs-rescaling, an essential tool to relate thermal operations to noisy operations [ , , ].) If Alice describes unitary dynamics within an energy eigenspace of the joint system and a large heat bath, then Bob describes the dynamics of the system alone as Gibbs-preserving maps. Consider a system S and a heat bath R, with respective Hamiltonians H S and H R and total Hamiltonian H S R = H S +H R . Suppose that Alice has microscopic access to the heat bath and hence describes the situation using the state space A = S ⊗ R. Assume that the global state and evolution are constrained to unitaries within a subspace of fixed total energy E. This evolution is, in particular, S R is the projector onto the eigenspace of H S R corresponding to the energy E. On the other hand, Bob only has access to the system B = S. The mapping F A→B , which relates Alice's point of view to Bob's, simply traces out the heat bath R. Bob then describes the operator Γ is the degeneracy of the energy eigenspace of the heat bath corresponding to the energy E R , and where the vectors {|E S , k S } are the energy eigenstates on S with a possible degeneracy index k. Following standard arguments in statistical mechanics, and as argued in ref.
[ ], we have, in typical situations and under mild assumptions, (E − E S ) ∝ e −β E S , and we hence recover in ( ) the standard canonical form of the thermal state. In other words, Bob describes the dynamics on S as maps that preserve the Gibbs state. The above reasoning can be seen as a rule for transforming one observer's picture into another; it remains important to analyze the situation in the picture that accurately describes the state of knowledge of the input state of the agent carrying out the operations. The pictures are equivalent when Alice's state of knowledge of A is no more than what B can recover using the recovery map, i.e., when her input state is exactly of the form is the state of the system in Bob's picture. However, not all actions that Alice can perform using Γ A A -subpreserving maps must induce a Γ B B -sub-preserving effective map on B. Indeed, if Alice's input state is more refined, i.e., if she has more fine-grained information about the microscopic initial state than what Bob can infer, then her actions might appear to Bob as violating his idea of the second law of thermodynamics. In this case, Alice may indeed perform Γ A A -sub-preserving operations that result in an effective mapping on B that is not Γ B B -sub-preserving. Enter Maxwell's demon.
Our framework hence allows us to systematically analyze a variety of settings inspired by Maxwell's demon. Returning to our example depicted in Fig. , we identify Alice as possessing a microscopic description of the gas and the demon, and Bob as the macroscopic observer. The demon, as described by Alice, can perform Gibbs-preserving operations on the joint system of the gas S and the demon's memory register M, which, for simplicity, we choose to have a completely degenerate Hamiltonian H M = 0 and thus Γ M = 1 M . Bob, on the other hand, describes the gas alone using standard thermodynamic variables, say, the energy E, the volume V , and the number of particles N . To relate both points of view, we write the gas system (including a possible control system to fix macroscopic thermodynamic variables) as a bipartite sys- projects onto the subspace of the microscopic system corresponding to fixed E, V , N , and where the partition function is Then, Bob's picture is obtained from Alice's by disregarding the memory register as well as the microscopic information, which corresponds to the mapping F A→B where we have defined the operator Importantly, the recovery map applied to any state of the form |E, V , N K gives i.e., Bob assigns a standard thermal state to all systems that he cannot otherwise access. From Alice's perspective (the demon's), the memory register M starts in a pure state |0 M , in order to store the future results from observations of the gas. On the other hand, Bob has no way to infer this state from his macroscopic information. Because of this, Alice can design processes that are perfectly Γ-sub-preserving from her perspective but which can trick Bob into thinking he is observing a violation of the second law (as described in Fig. ). Consider, for concreteness, the following procedure: Alice performs a unitary process mapping the state |E, where we assume that the system M has just the right dimension to store all the entropy resulting from mapping a state τ E,V , N N to the state τ E,V /2, N N of lower rank (we assume, for simplicity, that the rank of τ E,V /2, N N divides that of τ E,V , N N , and thus Ω(E, V , N ) = d M Ω(E, V /2, N )). Alice's process is fully Γ preserving because it is unitary and commutes with Γ A K N M . However, from Bob's perspective, the gas changed its state from |E, V , N K to |E, V /2, N K , in a blatant violation of his idea of the second law of thermodynamics! Of course, a clever Bob would be led to infer that there exists some system (M) that has interacted with the gas and absorbed the surplus entropy. The point is, however, that Bob can still very well apply his laws of thermodynamics (in the form of the restriction imposed by Γ-sub-preserving maps) as long as Alice does not "actively mess with him." In other words, any observer can consistently apply the laws of thermodynamics (in the form of our framework) from their perspective, using the restriction of Γ-sub-preserving maps for appropriately chosen Γ operators as long as this restriction indeed holds. A Γ-sub-preserving restriction inferred from coarse-graining a finer Γ-sub-preserving restriction fails exactly when the finer-grained observer actively makes use of their privileged microscopic access.
A further example illustrating the necessity of treating thermodynamics as an observer-dependent framework, where our framework could be applied, is provided by Jaynes' beautiful treatment of the Gibbs paradox [ ].

IV. DISCUSSION
One might think that thermodynamics, as a physical theory in essence, would require physical concepts, such as energy or number of particles, to be built into the theory, as is done in usual textbooks. Our results align with the opposite view, where thermodynamics is a generic framework itself, agnostic of any physical quantities such as "energy," which can be applied to different physical situations, in the same spirit as previously proposed approaches [ , , , -]. The physical properties of the system, such as energy, temperature, or number of particles, are accounted for in our framework only through the abstract Γ operator.
Our results provide an additional step in understanding the core ingredients of thermodynamics and hence the extent of its universality. Our approach reveals the following picture: Given any situation where the system obeys some physical laws that imply the restriction that the evolution must preserve (or subpreserve) a certain operator Γ, then purity may be invested to lift the restriction on any process, as quantified by the coherent relative entropy; depending on how Γ is defined, one may express this abstract resource in terms of a physical resource such as mechanical work. Furthermore, if the states of interest of our system form a class of states that happen to be reversibly interconvertible, the macroscopic laws of thermodynamics emerge, along with the relevant thermodynamic potential. In a coarsegrained picture, the thermodynamic laws apply as long as our thermodynamic coarse-graining criterion is fulfilled, namely, if the fine-grained state is not more informative than what can be recovered from the coarse-grained information.
The notion of macroscopic limit considered here is more general than assuming that the state of the system is a product state ρ ⊗n , where each particle or subsystem is independent and identically distributed (i.i.d.). While typical thermodynamic systems are indeed close to an i.i.d. state (for instance, the Gibbs state of many noninteracting particles is an i.i.d. state), we only rely on a notion of "thermodynamic states," defined by their ability to be interconverted reversibly and with certainty. Thermodynamic states may include arbitrary interaction between the particles, or, in fact, may even be defined on a small system of a few particles. More precisely, our notion of thermodynamic states coincides with our definition of battery states and corresponds to a state of the form P ΓP/tr(P Γ) for a projector P that commutes with Γ. These states can be reversibly interconverted in our framework, and usual statistical mechanical states are precisely of this form. The thermodynamic states may be used as reference charge states of a battery system, in the sense that they enable the same processes.
The core of the framework is the Γ-sub-preserving restriction imposed on the free operations. The Γ operator encodes all the relevant physics of the system considered. The restriction may be due to any physical reason-for instance, by assuming that the evolution is modeled by thermal operations on the microscopic level, or by otherwise justifying or assuming that the spontaneous dynamics are thermalizing in an appropriate sense. Furthermore, Γ-sub-preservation may come about in any situation where one or several conserved physical quantities are being exchanged with a corresponding thermodynamic bath, in a natural generalization of thermal operations [ , , ].
Our framework is not limited to usual thermodynamics: By considering the Γ operator as an abstract entity, all considerations in our framework are of a purely quantum information theoretic nature and make no explicit reference to any physical quantity. For instance, one can consider purity as a resource and impose that operations sub-preserve the identity operator; our framework applies by taking Γ = 1; in this way, one can recover the max-entropy as the number of pure qubits required to perform data compression of a given state. We might further expect connections with single-shot notions of conditional mutual information [ , -], which in the i.i.d. case can also be expressed as a difference of quantum relative entropies. Our approach is also promising for calculating remainder terms in recovery of quantum information [ , , -]. Furthermore, being a Γ-sub-preserving map is a semidefinite constraint, and thus optimization problems over free operations may often be formulated as semidefinite programs, which exhibit a rich structure and can be solved efficiently.
Although the goal of our paper is to derive a fundamental limitation on operations in quantum thermodynamics, one can also ask the question of whether this limit can be achieved within a physically well-motivated set of operations. Because our bound is given by an optimization over Gibbs-preserving maps, it is clear that there is one such map that will attain that bound (or get arbitrarily close). However, it is not clear under which conditions our bound can be approximately attained in a more practical or realistic regime such as thermal operations (possibly combined with additional resources), as is the case for a system described by a fully degenerate Hamiltonian [ ] or for classical systems [ ].
The question of achievability is related to coherence in the context of thermodynamic transformations, an issue of significant recent interest [ -]. In particular, thermal operations do not allow the generation of a coherent superposition of energy levels, while this is allowed to some extent by Gibbs-preserving maps, which are hence not necessarily covariant under time translation [ ]. Our approach suggests a possible interpretation for why this is the case: With Γ-sub-preserving operations, one requires no assumption that the system in question is isolatedfor instance, Γ could be the reduced state on one party of a joint Gibbs state of a strongly interacting bipartite system. Indeed, the example in ref.
[ ] can be explained in this way [ , Section . . ]. Still, the question of whether Gibbs-preserving maps may be implemented approximately using a more practical framework, such as thermal operations (perhaps under certain conditions), remains an open question. We note, though, that the coherence resources required in order to implement a process can be determined using the techniques of ref.
[ ]. These general tools might thus clarify the precise coherence requirements of implementing Gibbs-preserving maps with covariant operations. In a similar vein, one could study the effect of catalysis in our framework [ , , ], presumably in the context of state transitions rather than logical processes. A closer study of this type of situation is expected to reveal connections with smoothed, generalized, free energies [ ] and the notion of approximate majorization [ ]. Furthermore, we expect tight connections with recent results that provide a complete set of entropic conditions for fully quantum state transformations under either general Gibbs-preserving maps or time-covariant Gibbs-preserving maps [ ]. As a condition on state transformations, it automatically provides an upper bound to the amount of work one can extract when implementing a specific process, which, in particular, implements a specific state transformation. Furthermore, the way the covariance constraint is enforced in ref.
[ ] provides a promising approach for including the covariance constraint in our framework as well and tightening our fundamental bound in the context of operations which are restricted to be time covariant. Finally, the conditions of ref.
[ ] may be used to prove the achievability of state transformations with a covariant mapping; one could expect a suitable generalization of both frameworks to simultaneously handle possible symmetry constraints and logical processes as well as state transformations, and a tolerance against unlikely events using ϵ-approximations.
Finally, our framework can describe a system at any degree of coarse-graining, including intermediate scales between the microscopic and macroscopic regimes. We can consider, for instance, a small-scale classical memory element that stores information using many electrons or many spins (such as everyday hard drives): The electrons may need to be treated thermodynamically, but not the system as a whole, since we have control over the information-bearing degrees of freedom on a relatively small scale. Other such examples include Maxwell-demon-type scenarios, which our framework allows to treat systematically. Our framework is also suitable for describing agents who possess a quantum memory containing quantum side information about the system in question. In other words, we provide a selfcontained framework of thermodynamics, which allows us to make the dependence on the observer explicit, underscoring the idea that thermodynamics is a theory that is relative to the observer [ ].

ACKNOWLEDGMENTS
We are grateful to Mario Berta, Fernando Brandão, Frédéric Dupuis, Lea Krämer Gabriel, David Jennings, and Jonathan Oppenheim for discussions. We acknowledge contributions from the Swiss National Science Foundation (SNSF) via the NCCR SIT as well as Project No. _ . PhF acknowledges support from the SNSF through the Early PostDoc.Mobility Fellowship No. P EZP _ hosted by the Institute for uantum Information and Matter (I IM) at Caltech, as well as from the National Science Foundation.

APPENDICES
The appendices are structured as follows. Appendix A offers some preliminary definitions and notation conventions. In Appendix B we prove the properties of our framework outlined in the main text, namely that any trace-nonincreasing, Γ-sub-preserving map can be dilated to a trace-preserving, Γpreserving map, as well as the equivalence of a class of battery models. Appendix C is dedicated to the definition and properties of the coherent relative entropy. Appendix D discusses the robustness of battery states to small perturbations. Finally, Appendix E provides a selection of miscellaneous technical tools which are used in the rest of the paper.

Appendix A: Technical Preliminaries
Let us first fix some notation. The state space of a quantum system S is a Hilbert space H S (in this work, we deal exclusively with finite-dimensional spaces), the dimension of which we denote by |S |. A quantum state ρ S of S is a positive semidefinite operator of unit trace acting on H S . A subnormalized quantum state ρ S is defined as satisfying tr ρ S 1. In this work, quantum states are normalized to unit trace unless otherwise stated. We use the notation A 0 to indicate that an operator A is positive semidefinite, and A B to indicate that A − B 0. For any positive semidefinite operator A S acting on H S corresponding to a system S, we denote by Π A S S the projector onto the support of A S . Furthermore, all projectors considered in this work are Hermitian. For each system S with Hilbert space H S , we fix a basis which we denote by {|k S }. Between any two systems A and B of same dimension (which we denote by H A H B or A B), we may define a reference (not normalized) entangled ket |Φ A:B := k |k A ⊗ |k B , as well as the partial transpose op-

. Logical process and process matrix
We denote by a logical process a full description of a logical mapping of input states to output states: Logical process. A logical process E X →X is a completely positive, trace-preserving map, mapping Hermitian operators on H X to Hermitian operators on H X .
A logical process along with an input state may be characterized by their process matrix, defined as the Choi-Jamiołkowski map of the completely positive map, weighted by the input state. Process matrix. Let E X →X be a logical process, and let σ X be a quantum state. Let R X be a system described by a Hilbert space H R X H X , and let |σ X R X = σ 1/2 X |Φ X :R X be a purification of σ X . Then the process matrix corresponding to E X →X and σ X is defined as ρ X R X = E X →X |σ σ | X R X , where the identity process is understood on R X . The process matrix is itself a normalized quantum state.
The reduced states σ X and σ R X of |σ X :R X on R X and X , respectively, are related by a partial transpose operation: The process matrix in return fully determines the channel E X →X on the support of σ X , allowing for a full characterization of the input state as well as the logical process on the support of the input.

. Semidefinite programming
Semidefinite programming is a useful toolbox which brings a rich structure to a certain class of optimization problems. We follow the notation of Refs. [ , ], where proofs to the statements given here may also be found.
Let A and B be Hermitian matrices, let Φ (·) be a Hermiticitypreserving superoperator, and let X 0 be the optimization variable, which is a Hermitian matrix constrained to the cone of positive semidefinite matrices. The prototypical semidefinite program is an optimization problem of the following form: To any such problem corresponds another, related problem in terms of a different variable Y 0: The first problem is called the primal problem, and the second, dual problem. Either problem is deemed feasible if there exists a valid choice of the optimization variable satisfying the corresponding constraint. If there exists a X 0 such that Φ(X )−B is positive definite, the primal problem is said to be strictly feasible; is positive definite. For these two problems, we define their optimal attained values with the convention that α = −∞ if the primal problem is not feasible and β = +∞ if the dual problem is not feasible. For any semidefinite program, we have α β, a property called weak duality. This convenient relation allows us to immediately bound the optimal attained value of one of the two problems by picking any valid candidate in the other.
The purified distance is also called Bures distance (up to a factor of 2) [ ] and coincides to second order with the quantum angle [ ]. Several equivalent prototypical forms for semidefinite programs exist in the literature.
For some pairs of problems, we may have α = β. In those cases we speak of strong duality. This is often the case in practice. A useful result here is Slater's theorem, providing sufficient conditions for strong duality [ , Theorem . ].
Theorem (Slater's conditions for strong duality). Consider any semidefinite program written in the form ( . ), and let its dual problem be given by ( . ). Then: (i) if the primal problem is feasible and the dual is strictly feasible, then strong duality holds and there exists a valid choice X for the primal problem with tr (A X ) = α; (ii) if the dual problem is feasible and the primal is strictly feasible, then strong duality holds and there exists a valid choice Y for the dual problem with tr (B Y ) = β.
We note that strong duality in itself doesn't necessarily imply the existence of an optimal choice of variables attaining the infimum or supremum. The existence of optimal primal or dual choices may be explicitly stated by Slater's conditions, or may be deduced by an auxiliary argument such as if the constraints force the optimization region to be compact.

Appendix B: Properties of our framework
. Dilation of Γ-sub-preserving maps to Γ-preserving maps For two systems X , Y , and corresponding operators Γ X , Γ Y 0, We say that a completely positive map Φ From a technical point of view, trace-preserving Γ-preserving maps don't handle nicely systems of varying sizes or with different Γ operators. For example, if X and Y are systems with tr Γ X tr Γ Y , there may clearly be no Γ-preserving map from X to Y which is also trace preserving. It turns out that, by focusing on trace-nonincreasing Γ-sub-preserving maps instead, we may circumvent the issue in a physically justified way: A tracenonincreasing Γ-sub-preserving map can always be seen as a restriction of a Γ-preserving map on a larger system. Furthermore, the ancillas we have to include in this dilation are prepared in, or finish up in, eigenstates of the respective Γ operators.
Proposition (Dilation of Γ-sub-preserving maps). Let K and L be quantum systems with corresponding Γ K and Γ L . LetΦ K →L be a trace-nonincreasing, Γ-sub-preserving map. Choose two arbitrary eigenvectors |k K and |l L of Γ K and Γ L , respectively. Then there exists a qubit system H Q with corresponding Γ Q diagonal in a basis composed of two orthogonal states {|i Q , |f Q }, such that there exists a trace-preserving, Γ-preserving map Φ K LQ →K LQ satisfying Here, the joint Γ operator on K, L, Q is Γ K LQ = Γ K ⊗ Γ L ⊗ Γ Q . Furthermore, the corresponding eigenvalues satisfy This means that for any trace-nonincreasing, Γ-subpreserving mapΦ K →L , we may find a larger system and a tracepreserving, Γ-preserving map Φ K LQ such thatΦ K →L is seen as the restriction of Φ K LQ to the case where the input is fixed to |l i LQ on LQ, where we only consider the subspace of the output in the support of |k f K Q on KQ.
If the operators Γ K , Γ L , Γ Q come from Hamiltonians H K , H L , H Q as Γ i = e −β H i for a fixed inverse temperature β, then the ancillas are prepared and left in pure energy eigenstates, specifically |l i LQ for the input and |k f K Q for the output. Furthermore condition ( . ) ensures that the total energy of the ancillas remains the same: Note that the apparent post-selection in ( . ) is simply a statement about the output of Φ. This is made clear by the following corollary. For instance, ifΦ is trace-preserving on a certain subspace, then as long as the input state is in that subspace, no post-selection occurs in effect because the output state on KQ is already exactly |k f K Q , i.e., if we were to project the output onto that state the projection would succeed with certainty. More generally, we show that performing the dilated mapping with the correct input states on the ancillary systems and without any post-selection at all, yields a process matrix which is just as close to the ideal process matrix as the one which would have been achieved with the original trace-decreasing map.
Corollary . Consider the setting of Proposition . Then all the following statements hold.
(a) Let P be any projector on H K and assume thatΦ is tracepreserving on the support of P, i.e., for any state τ supported on P, it holds that tr(Φ(τ )) = 1. Then the mapping Φ K LQ given by Proposition satisfies for any quantum state τ supported on P.
(b) Let σ K R be any pure state between K and a reference system R. Assume thatΦ satisfies tr(Φ(σ K R )) = 1. Then (c) Let σ K R be any pure state between K and a reference system R, and let ρ LR be any quantum state. Then the mapping Φ K LQ →K LQ provided by Proposition satisfies

. Equivalence of battery models
Consider a logical process E X →X which is not itself a free operation (i.e., E X →X (Γ X ) Γ X ). It turns out that it is possible to implement this process by investing a certain amount of resources by means of an explicit battery system.
One example of such a battery system is the information battery. The information battery is a quantum system A of dimension which we denote by |A|, and for which Γ A = 1 A . We require the battery to initially be prepared in a state 2 −λ 1 1 2 λ 1 and to finish in a state 2 −λ 2 1 2 λ 2 at the end, where both states are simply a state with a flat spectrum of rank 2 λ 1 or 2 λ 2 , and where we require that λ 1 , λ 2 0 and that 2 λ 1 , 2 λ 2 are integers. If λ 1 , λ 2 are themselves integers, this corresponds exactly to having λ 1 or λ 2 qubits in a fully mixed state and the remaining qubits in a pure state.
It is known that this model is equivalent to several other battery models known in the literature [ ], notably the work bit (or "wit") [ , ], or a "weight" system [ , ]. Here, we point out that these models are in fact different instances of a more general description, making their equivalence manifest. The most general system we have shown to be usable as a battery system is simply any system W with a arbitrary Γ W operator, which is restricted to be in states of the form σ = (P Γ W P)/tr P Γ W , where P is a projector which commutes with Γ W . The "value" or "uselessness" of this state is given by the quantity log tr(P Γ W ). The wit, the weight, as well as the information battery are all special cases of this general model.
The following proposition gives a necessary and sufficient condition as to when it is possible to overcome the Γ-subpreservation restriction by exploiting a particular charge state change of the battery, and shows how the different battery systems are equivalent. This proves Propositions I and II of the main text.
Proposition . Let T X →X be a completely positive, tracenonincreasing map. Let y ∈ R. Then, the following are equivalent: (ii) For any λ 1 , λ 2 0 such that 2 λ 1 , 2 λ 2 are integers and λ 1 − λ 2 y, there exists a large enough system A with Γ A = 1 A as well as a trace-nonincreasing, Γ-sub-preserving map Φ X A→X A satisfying for all ω X , (iii) For a two-level system Q with two orthonormal states |1 Q , |2 Q , and with Γ Q = 1 |1 1| Q + 2 |2 2| Q chosen such that 2 / 1 2 −y , there exists a trace-nonincreasing, Γ-sub-preserving map Φ X Q →X Q satisfying for all ω X , (iv) LetQ be any system and choose two orthogonal states |1 Q , |2 Q which are eigenstates of ΓQ corresponding to respective eigenvalues 1 , 2 which satisfy 2 / 1 2 −y . Then there exists a trace-nonincreasing, Γ-sub-preserving map Φ XQ →X Q satisfying for all ω X , (v) LetW 1 ,W 2 be quantum systems with respective corresponding Γ operators Γ W 1 , Γ W 2 , and let P W 1 , P W 2 be projectors satisfying Then there exists a Γ-sub-preserving, trace-nonincreasing map Φ XW 1 →X W 2 such that for all ω X ,

. Proofs
Proof of Proposition . By definition, Let Π Γ L be the projector onto the support of Γ L . We have Π Γ L 1 L and thus Let the system Q be as in the claim, with Γ Q diagonal in the basis { |i Q , |f Q }. Define now the completely positive map with some completely positive maps Ξ K L→K L and Ω K L→K L yet to be determined. First, note that the property ( . ) is obvious for this Φ K LQ , simply because |i Q and |f Q are orthogonal. It remains to exhibit explicit Ξ K L→K L and Ω K L→K L such that Φ K LQ is trace-preserving and Γ-preserving. Define as Note that Condition ( . ) is then equivalent to and that this is straightforwardly satisfied for an appropriate choice of Γ Q (and hence of i , f ). At this point, we'll derive conditions that Ξ K L→K L and Ω K L→K L need to satisfy in order for Φ K LQ →K LQ to map Γ K LQ onto itself and to be tracepreserving. Calculate We see that in order for this last expression to equal Γ K LQ = f |f f | Q ⊗ Γ K L + i |i i| Q ⊗ Γ K L , we need that the terms in square brackets above obey On the other hand, the adjoint map of Φ K LQ →K LQ is relatively straightforward to identify as We may thus now derive the conditions on Ξ K L→K L and Ω K L→K L for Φ K LQ →K LQ to be trace-preserving. Specifically, we need to ensure that Thus, for Φ K LQ →K LQ to be trace-preserving we must have Γ Let us now explicitly construct an Ξ K L→K L which satisfies both ( . b) and ( . b). These conditions may be written as where we have used ( . ) and defined two new operators A K L and B K L . Observe now that since l Γ 1/2 K 1 K − F K Γ 1/2 K ⊗ |l l| L Γ K ⊗ ( l |l l | L ) Γ K L , we have that A K L 0. Similarly, (1 K − F K ) ⊗ |l l| L 1 K L and hence B K L 0. Let ξ K L be a quantum state defined as follows: If tr A K L 0, then ξ K L = A K L /tr A K L ; else ξ K L = 1 K L / |K L |. Then define Ξ K L→K L (·) = tr (B K L (·)) ξ K L .
( . ) We then have thus satisfying condition ( . b). On the other hand we have which we need to show equals A K L to satisfy condition ( . a). Consider first the case where tr A K L = 0 and hence A K L = 0. Then and ( . ) = 0 = A K L as required. Now consider the case where tr A K L 0. We have Now, becauseΦ K →L (Γ K ) Γ L , the operatorΦ K →L (Γ K ) must lie within the support of Γ L . Thus the projector in the last term of ( . ) has no effect and can be replaced by an identity operator. We then have Since tr(B K L Γ K L ) = tr(A K L ), we have ( . ) = A K L as required. We have thus constructed Ξ K L→K L such that it satisfies conditions ( . b) and ( . b). Let's now proceed analogously for Ω K L→K L . We can rewrite conditions ( . a) and ( . a) as defining the operators C K L and D K L . We have k |k k| K ⊗ (Γ L − G L ) Γ K L and thus C K L 0. Also Γ −1/2 L (Γ L − G L ) Γ −1/2 L 1 L and thus D K L 0. Proceeding as for Ξ K L→K L , let ω K L be a quantum state defined as ω K L = C K L /tr C K L if tr C K L 0 or ω K L = 1 K L / |K L | otherwise. Define Then which satisfies ( . ). On the other hand, we have which we need to show is equal to C K L . First consider the case where tr C K L = 0, i.e. C K L = 0. Then Γ K L = k |k k | K ⊗ (Γ L − G L ), implying that Γ K = k |k k | K and G L = 0. Then and thus D K L has no overlap with Γ K L . It follows that ( . ) = 0 = C K L as required. Now assume that tr C K L 0. Then where the projector Π Γ L has no effect in the second expression since Γ L − G L is entirely contained within the support of Γ L . Then again ( . ) = C K L as required.
We have thus constructed a completely positive, trace preserving map Φ K LQ →K LQ which maps Γ K LQ onto itself and which satisfies ( . ). This concludes the proof.
Proof of Corollary . The proofs of (a) and (b) exploit the following fact: If a bipartite (normalized) quantum state ζ AB satisfies χ | ζ AB | χ B = ζ A for some pure state | χ B and a (normalized) quantum state ζ A , then ζ AB = ζ A ⊗ |x x | B . [Indeed, ζ AB must lie within the support of the projector Proof of (a): For any quantum state τ supported on P , we have by as- Proof of (c): We know that the mapping Φ K LQ provided by Proposi- We exploit the fact that the fidelity does not change if we project one state onto the support of the other state [indeed, we have F (σ, ρ) = tr σ 1/2 ρσ 1/2 1/2 = tr σ 1/2 Π σ ρ Π σ σ 1/2 1/2 = F (σ, Π σ ρΠ σ )]. This means in turn that This proves the claim since the purified distance is defined in terms of the fidelity.
(i) ⇒(v): By assumption we have T X →X (Γ X ) 2 −y Γ X . Let Γ W 1 , Γ W 2 and P W 1 , P W 2 satisfy the assumptions in the claim (v), and define the shorthands Define the map This map is completely positive by construction, and is trace nonincreasing because it is a composition of trace nonincreasing maps. We need to show that it is Γ-sub-preserving. We have using the fact that P W 2 Γ W 2 P W 2 Γ W 2 since Γ W 2 commutes with P W 2 .
(iv) ⇒(iii): This is a trivial special case of (iv). (iii) ⇒(i): Pick Γ Q , |1 Q , |2 Q , 1 , 2 such that they satisfy the assumptions of (iii) as well as 2 / 1 = 2 −y and let Φ X Q →X Q be the corresponding mapping. Observe that for any ω X Plugging in ω X = Γ X , and using the fact that 1 |1 1| Q Γ Q and that Φ X Q →X Q is Γ-sub-preserving, (v) ⇒(ii): This is in fact another special case of (v). Let λ 1 , λ 2 such that λ 1 − λ 2 y and that 2 λ 1 , 2 λ 2 are integers. Let A be any quantum system of dimension at least max{2 λ 1 , 2 λ 2 } and with Γ A = 1 A . Now we use our assumption that (v) holds. Choose W 1 = W 2 = A, P W 1 = 1 2 λ 1 , P W 2 = 1 2 λ 2 . Observe that tr(P W 1 Γ W 1 ) = tr(P W 1 ) = 2 λ 1 and tr(P W 2 Γ W 2 ) = tr(P W 2 ) = 2 λ 2 , and hence the assumptions of (v) are satisfied. Then we know that there must exist a Γ-sub-preserving, trace-nonincreasing map Φ X A→X A obeying ( . ). The latter condition reads by plugging in our choices for all ω X . This is exactly the condition that Φ has to fulfill, and hence Φ may be taken equal to the map Φ . It follows that (ii) is true.

Appendix C: The coherent relative entropy . Definition and basic properties
Consider two quantum systems X and X , described by respective Γ operators Γ X and Γ X . We would like to perform a logical process from X to X which is described by the process matrix ρ X R X , with a reference system R X X . As we have seen, the process matrix uniquely identifies both an input state σ X and a trace-nonincreasing, completely positive map E X →X on the support of σ X .
Because ρ X R X only fixes the mapping on the support of σ X , there may be several trace-nonincreasing, completely positive maps T X →X which implement this given process matrix. The coherent relative entropy is defined as the optimal battery usage achieved by a T X →X with fixed process matrix ρ X R X , relative to Γ operators Γ X , Γ X .
In fact, we allow the implementation to fail with some fixed probability ϵ 0 which can be chosen freely. This allow us to ignore very improbable events. Such a practice is standard in the smooth entropy framework, and it is even necessary in order to make physical statements and recover the correct asymptotic behavior [ , , ]. Hence, we allow the process matrix achieved by the optimization variable T X →X on the given input state to only be ϵ-close to the requested process matrix ρ X R X .
By Proposition , the optimal number of extracted battery charge y of a fixed T X →X is given by the condition T X →X (Γ X ) 2 −y Γ X . We are then directly led to the following definition.

Coherent Relative Entropy.
For a bipartite quantum normalized state ρ X R X , two positive semidefinite operators Γ X and Γ X such that t R X →X (ρ X R X ) lies in the support of Γ X ⊗ Γ X , and for ϵ 0, the coherent relative entropy is defined aŝ where the optimization ranges over all y ∈ R and over all completely positive maps T X →X satisfying the given conditions, and where we use the shorthand |σ X R X = ρ 1/2 R X |Φ X :R X .
If ϵ = 0, we may omit the ϵ superscript altogether: Clearly, the coherent relative entropy is monotonously increasing in ϵ, as the optimization set gets larger.
We now introduce the variable α = 2 −y and denote by T X R X the Choi matrix of T X →X , allowing us to write the coherent relative entropy as a semidefinite program.
Proposition (Semidefinite program). For a bipartite quantum normalized state ρ X R X , two positive semidefinite operators Γ X and Γ X such that t R X →X (ρ X R X ) lies in the support of Γ X ⊗ Γ X , and for ϵ 0, the coherent relative entropy may be written aŝ where α is the optimal solution to the following semidefinite program in terms of the variables T X R X E 0, α 0, and dual variables µ, ω X , X R X 0, with |ρ X R X E being an arbitrary but fixed purification of ρ X R X into an environment system E of dimension at least |E| |X R X |: Primal problem: Dual problem: (Proof on page .) In the above, the reference system R X may be understood as a "mirror system" which allows us to compare how the output and the input of the process are correlated. A classical analogue of R X would be a memory register which stores a copy of the input. Crucially, in the semidefinite program the "mirror images" Γ R X and σ R X of Γ X and σ X must be constructed consistently, using the same reference basis on R X , as encoded in the ket |Φ X :R X and the partial transpose operation t X →R X (·). In the semidefinite program, Γ X needs to be represented on R X , and general Choi matrices of processes T X →X need to be represented on X R X , so in general we need R X X even if a smaller system could hold a purification of σ X (for instance, if σ X is already pure). By contrast, in the definition ( . ) one could actually choose a more general R X system: Given σ X and E X →X , one may choose any purification |σ X R X and correspondingly define ρ X R X = E X →X (σ X R X ).
The dual problem ( . ) is strictly feasible (choose, e.g., ω X = 1 X /(2 tr(Γ X )), X R X = 1 R X and µ = 1/2), and T X R X = ρ −1/2 R X ρ X R X ρ −1/2 R X is a feasible primal candidiate, and hence by Slater's sufficiency conditions (Theorem ) we have that strong duality holds and there always exists optimal primal candidates. For ϵ > 0, the primal problem is also strictly feasible (choose , and there always exists optimal dual candidates as well. However, note that for ϵ = 0 the primal problem is not always strictly feasible (indeed, constraint ( . c) is very strong and fixes the mapping T X R X on a subspace; because it must be trace-preserving on that subspace then ( . a) cannot be satisfied strictly). This means that there is a possibility that there is no choice of optimal dual variables. However, since strong duality holds, there is always a sequence of choices for dual variables whose attained objective value will converge to the optimal solution of the semidefinite program.
Here are first some basic properties of the coherent relative entropy.
Proposition (Trivial bounds). For any 0 ϵ < 1, we havê In the thermodynamic version of the framework, these bounds can be understood in terms of work extraction. Suppose Γ X = Γ X = e −β H X with a Hamiltonian H X and an inverse temperature β. Then log Γ −1 X ∞ (resp. log Γ −1 X ∞ ) is β times the maximum energy of R (resp. X ), and similarly, tr Γ X (resp. tr Γ X ) is the partition function of X (resp. X ). The partition function is directly related to the work cost of erasure (resp. formation) of a thermal state to (resp. from) a pure energy eigenstate of zero energy. In this case, the bounds ( . ) correspond to the ultimate worst and best cases respectively. The ultimate worst case is that we start off in a thermal state and end up in the highest energy level, whereas the absolute best case would be to start in the highest energy eigenstate and finish in the Gibbs state.
Much like the conditional entropy and relative entropy, the coherent relative entropy is invariant under partial isometries of which ρ X R and Γ operators lie in the support. In particular, the coherent relative entropy is completely oblivious to dimensions of the Hilbert spaces which are not spanned by Γ R and Γ X . Proposition (Invariance under isometries). LetX ,X be new systems. Suppose there exist partial isometries V X →X and V X →X such that both t R X →X (ρ R X ) and Γ X are in the support of V X →X , and both ρ X and Γ X are in the support of V X →X . Then This proposition allows us to embed states in larger dimensions, as well as to show that it is invariant under simultaneous action of unitaries on the states and the Γ operators.
We may also check the behavior of the coherent relative entropy under re-scaling of the Γ operators (as the latter need not conform to any normalization). Intuitively, in the thermodynamic case where Γ = e −β H for a Hamiltonian H and an inverse temperature β, the transformation Γ → aΓ for a constant factor a yields the Γ operator corresponding to the modified Hamiltonian H → H −β −1 ln a, that is, a constant energy shift of all levels. Consequently, we expect that scaling the Γ operators introduces a constant shift in the coherent relative entropy, which would correspond to providing the required energy to compensate for the global change in energy. Proposition (Scaling the Γ operators). For any 0 ϵ < 1, and for real numbers a, b > 0, The coherent relative entropy furthermore obeys a superadditivity rule, expressing the fact that a joint implementation of two parallel independent processes cannot be worse than two separate implementations of each process.

Proposition (Superadditivity for tensor products). Let systems
Let ρ X 1 R X 1 and ζ X 2 R X 2 be two quantum states. Then for any ϵ, ϵ 0, where ϵ = √ ϵ 2 + ϵ 2 . (Proof on page .) In contrast to measures like the min-entropy and the maxentropy, we do not have equality in general in Proposition . One may see this with a simple example analogous to that in Ref. [ ]. Consider two qubit systems Q i with Γ Q i = 0 |0 0| + 1 |1 1| (with i = 1, 2; 0 > 1 ). On a single system, performing the logical process |0 → |+ = (|0 + |1 )/ √ 2 has a different cost than the yield of |+ → |0 . However, the transition |0 ⊗ |+ → |+ ⊗ |0 can be achieved with a swap operation, which is perfectly Γ-preserving and hence costs no pure qubits.
A further property of the coherent relative entropy can be derived in the case where the Γ operators are restricted by projecting them onto selected eigenkets, while still having the process matrix lying in their support. Then the coherent relative entropy remains unchanged.
Proposition (Restricting the Γ operators). Let P X and P X be projectors such that [P X , Γ X ] = 0 and [P X , Γ X ] = 0. Define Γ X = P X Γ X P X and Γ X = P X Γ X P X . Let ρ X R X be any quantum state with support inside that of Γ X ⊗ Γ R X . Then Another property relates the coherent relative entropy to that with respect to different Γ operators which represent "at least or at most as much weight on each state," as represented as an operator inequality. Intuitively, this proposition states that if we raise the energy levels at the input and lower the levels at the output, then the process is easier to carry out.
We further note that it is possible to rewrite the definition of the coherent relative entropy in a slightly alternative form.

Proposition . The optimization problem defining the coherent relative entropy can be rewritten as
where the minimization is taken over all positive semidefinite T X R X satisfying both conditions ( . a) and ( . c), and for which the operator tr R X T X R X t X →R X (Γ X ) lies within the support of Γ X . Equivalently, where the minimization is taken over all trace nonincreasing, completely positive maps T X →X which satisfy ϵ and for which T X →X (Γ X ) lies within the support of Γ X . (Proof on page .) Finally, we present an alternative form of the semidefinite program for the non-smooth coherent relative entropy, i.e., in the case where ϵ = 0. This version of the semidefinite program will prove useful in some later proofs.
Proposition (Non-smooth specialized semidefinite program). For a bipartite quantum state ρ X R X , and two positive semidefinite operators Γ X and Γ X such that t R X →X (ρ X R X ) lies in the support of Γ X ⊗ Γ X , the non-smooth coherent relative entropy can be written asD where α is the optimal solution to the following semidefinite program in terms of the variables T X R X 0, α 0, and dual variables Z X R X = Z † X R X , ω X 0, X R X 0: Primal problem: Dual problem: Here are the proofs corresponding to this section's propositions.

Proof of Proposition .
Write |σ X R = ρ 1/2 R X |Φ X :R X . Let |ρ X R X E be any fixed purification of ρ X R X in an environment system E with dimension |E | |X R X |.
First, consider any feasible candidates T X R E , α for ( . ). Then, setting T X →X (·) = tr E (T X R X E t X →R X (·)) and y = − log α satisfies the requirements of ( . ), in particular, F 2 (T X →X (σ X R X ), ρ X R X ) is a purification of T X →X (σ X R X ). Let T X →X and y be valid candidates in ( . ). Thanks to Uhlmann's theorem, there exists a pure quantum state |τ X R X E such that There exists a unitary W E such that |τ X R X E = W E V X →X E |σ X :R X , since those two states are both purifi-

Proof of Proposition .
Let and hence [(1 − ϵ 2 ) tr(Γ R X )] −1 tr R X (T X R X Γ R X ) is a subnormalized quantum state, which moreover lives within the support of Γ X by assumption. Hence, noting that Γ −1 X −1 ∞ is the minimal nonzero eigenvalue of Γ X . Thus, taking α = (1 − ϵ 2 ) tr(Γ R X ) Γ −1 X ∞ satisfies ( . b) yielding feasible primal candidates, which proves ( . a). Now consider the dual problem. Choosing ω X = (tr Γ X ) −1 1 X immediately satisfies ( . a). Using ρ X R X E 1 X R X E and ρ R X Π ∞ and X R X = 0 in order to fulfill ( . b), which proves ( . b).
Proof of Proposition . This is clearly the case, because the semidefinite problem lies entirely within the support of the isometries. Formally, any choice of variables for the original problem can be mapped in the new spaces through these partial isometries, and vice versa, and the attained values remain the same. Hence the optimal value of the problem is also the same.
Proof of Proposition . Consider the optimal primal candidiates T X R X E and α for the problem defining 2 . Then T X R X E and ab −1 α are feasible primal candidates for the semidefinite program with the scaled Γ operators. Hence The opposite direction follows by applying the same argument to the reverse situation with Γ X → a −1 Γ X , Γ X → b −1 Γ X .

Proof of Proposition .
Let T X 1 R X 1 E 1 , α 1 and T X 2 R X 2 E 2 , α 2 be the optimal choice of primal variables for 2 and tr (ρ and hence this choice of variables is feasible for the tensor product problem. We then have .

Proof of Proposition .
Let T X R X E and α be the optimal feasible candidates for the primal semidefinite problem defining 2 . Let T X R X E = (P X ⊗ P R X ) T X R E (P X ⊗ P R X ) and α = α , writing P R X = t X →R X (P X ). Then satisfying ( . a), and where the first equality holds because ρ R X and ρ X R X E already lie within the support of P R X and P X ⊗ P R X ⊗ 1 E , respectively, and hence those projectors have no effect. Hence ( . c) is fulfilled. Now we have using the fact that Let µ, X R X and ω X be any dual feasible candidates for . Now let µ = µ, X R X = P R X X R X P R X and ω X = P X ω X P X . Then tr(ω X Γ X ) = tr(ω X Γ X ) tr(ω X Γ X ) 1 (using the fact that Γ X Γ X since [Γ X , P X ] = 0), in accordance with ( . a).
Also, apply (P X ⊗ P R X )(·)(P X ⊗ P R X ) onto the dual constraint ( . b) to immediately see that µ , ω X and X R X obey the new constraint with Γ R X . Finally, the attained dual value is Hence, we now have which completes the proof.
Proof of Proposition . Let T X R X E and α be the optimal solution to the semidefinite program for 2 . They are then also feasible candidates for the semidefinite program for 2 , because the only condition that changes is ( . b), which is obviously still satisfied.
Proof of Proposition . Let T X R X be any candidate in the primal problem.
If tr R T X R X does not lie within the support of Γ X , then condition ( . b) is not satisfied and the candidate is not primal feasible; we can hence ignore it in the minimization. Otherwise, by conjugating condition ( . b) by Γ −1/2 X , we see that ( . b) is equivalent to which in turn is equivalent to because the left hand side of ( . ) is entirely within the support of its right hand side. Now, the optimal α which corresponds to this fixed T X R X is given by Γ This chain of equivalences may be followed in reverse order, establishing the equivalence of the minimization problems.
The formulation in terms of channels follows immediately from the translation of one formalism to the other.

Proof of Proposition .
In the case ϵ = 0, the conditions in ( . ) reduce to where we write |σ X R X = ρ 1/2 R X |Φ X :R X . These conditions, when written in terms of the Choi matrix T X R X corresponding to T X →X , yield precisely the semidefinite program given in the claim.

. Some special cases
In this section, we look at some instructive special cases where the coherent relative entropy can be evaluated exactly.
The first proposition concerns identity mappings. It is a property that one would expect very naturally: If the process matrix corresponds to the identity mapping on the support of the input, and if the Γ operators coincide, then the process should be a free operation and should not require a battery. This property may seem like a triviality, but it is in fact not so obvious to prove: Indeed, because the coherent relative entropy is a function of the process matrix only, the implementation can choose to implement whatever process it likes on the complement of the support of the input state. In other words, this proposition tells us that there is no way to extract work by exploiting the freedom on this complementary subspace when performing the identity map on the support of σ X . Proposition (Identity mapping). Let id X →X be the identity map from a system X to a system X X . Assume that Γ X = id X →X (Γ X ). Let σ X be any state on X , let R X X and |σ X R X = σ 1/2 X |Φ X :R X , and let |ρ X R X be the process matrix of the identity process applied on σ X , i.e. ρ X R X = id X →X (σ X R X ). Then Proof of Proposition . Let Φ X R X = id X →X (Φ X :R X ) be the unnormalized maximally entangled state on X and R X such that ρ X R X = ρ First we show thatD X →X (ρ X R X Γ X , Γ X ) 0. Consider the mapping T X →X = id X →X and y = 0, i.e., consider the identity mapping as an implementation candidate. This clearly satisfies the requirements of the maximization in ( . ) for ϵ = 0, and thuŝ We prove the reverse direction by exhibiting dual candidates for the problem given in Proposition . The tricky part is that there might not be an optimal choice of dual variables. The best we can do in general is to come up with a sequence of choices for dual candidates whose attained value converges to 1. For any µ > 0, let Then tr (ω X Γ X ) = 1, satisfying the dual constraint ( . a). Let's now study ( . b): is a rank-positive operator with support within Π ρ R X R X ⊗ Π ρ X X , and its nonzero eigenvalue is given by Let r = rank ρ R X . We then have Π and we may continue our calculation: Now, let P R X be the projector onto the eigenspaces associated to the positive (or null) eigenvalues of the operator µr Π Hence, for any µ > 0, this choice of dual variables satisfies the dual constraints. The value attained by this choice of variables is given by As the object Π recalling that tr Π ρ R X R X = rank ρ R X = r . Γ R X ; Lemma then asserts that there exists a constant c independent of µ such that Hence, Taking µ → ∞ yields successive feasible dual candidates with attained objective value converging to 1, hence proving that An essentially trivial proposition immediately follows from the fact that Γ-sub-preserving maps are admissible operations, and hence don't cost anything in our framework: Proposition . Let σ X be a quantum state and let E X →X be a Γ-sub-preserving logical process. With the process matrix ρ X R = E X →X σ 1/2 X Φ X :R X σ 1/2 X , we have for any ϵ 0, Proof of Proposition . The process E X →X itself is a valid optimization candidate in ( . ), and clearly Γ In general, the coherent relative entropy depends on the precise logical process used to map the input and output states. However, there are some classes of states for which the coherent relative entropy depends only on the input and output state.
The following proposition tells us that one may map the Γ X /tr Γ X state to the Γ X /tr Γ X state in however way one wants, i.e. regardless of the logical process, and yet in any case the coherent relative entropy is given by the ratio tr Γ X /tr Γ X . This is a consequence of allowing any Γ-preserving maps to be performed for free, and this ratio comes about from the normalization of the respective input and output states.
Proposition . Let P X and P X be projectors with [P X , Γ X ] = 0 and [P X , Γ X ] = 0. Let ρ X R X be a bipartite quantum state with reduced states ρ R X = t X →R X [(P X Γ X P X )/tr(P X Γ X )] and ρ X = (P X Γ X P X )/tr(P X Γ X ). Then, for any ϵ 0,

Proof of Proposition .
Let |ρ X R X E be a purification of ρ X R X into a (large enough) system E, and consider the semidefinite program given by Proposition . We give feasible primal and dual candidates which achieve the same value. First, let T X R X E = (1 − ϵ 2 ) ρ 1 R X as required by ( . a). Also, since ρ R X = P R X Γ R X P R X /tr(P R X Γ R X ) and ρ X = P X Γ X P X /tr(P X Γ X ), we have tr R X E (T X R X E Γ R X ) = (1 − ϵ 2 ) tr(P R X Γ R X ) tr R X (ρ X R X P X ) = (1 − ϵ 2 ) tr(P R X Γ R X ) ρ X α Γ X , where we have defined α = (1 − ϵ 2 ) tr(P R X Γ R X )/tr(P X Γ X ) and noting that [P X , Γ X ] = 0, hence satisfying ( . b). Finally, we have tr ρ satisfies ( . c). This choice of primal variables is feasible, and attains the value α . Now we exhibit feasible dual candidates. Let µ = tr(P R X Γ R X )/tr(P X Γ X ), ω X = P X /tr(P X Γ X ) and X R X = 0, and note that ( . a) is automatically satisfied. Then, since ρ X R X E 1 E ⊗ P X ⊗ P R X , we have keeping in mind that [P R X , Γ R X ] = 0, and hence condition ( . b) is satisfied. The value attained by this choice of variables is simply µ (1 − ϵ 2 ) − tr X R X = α , hence proving that this is the optimal solution of the semidefinite program.
Calculating − log α completes the proof.
We note that for this special type of states we have the nice expression for their relative entropy to Γ.
The expression D (ρ Γ) is thus also equal to − log tr P Γ since we know that Notably, the states of the form P ΓP/tr(P Γ) for [P, Γ] = 0 are precisely those general type of states which we allowed on battery systems in item (v) of Proposition .
In fact, we may prove a slightly more general version of Proposition for the case ϵ = 0: it suffices that the reduced state on the input is of the form Γ X /tr Γ X , and then the coherent relative entropy is oblivious to any correlation between input and output, or equivalently, to which process is exactly implemented, and depends only on the reduced states on the input and the output.
(Proof on page .) Proof of Proposition . Take any T X R X satisfying ρ and tr X T X R X 1 R X . Then since tr(Γ R X ) ρ R X = Γ R X , we have and thus This argument holds in particular for the optimal such T X R X .

. Data processing inequality
The data processing inequality is an important property desirable for an information measure. Intuitively, it asserts that processing information cannot make it more "valuable." In our case, the data processing inequality asserts that postprocessing, or applying a map to both the output state and output Γ, may only increase the coherent relative entropy.
Proposition (Data processing inequality). Let ρ X R X be a quantum state and let Γ X , Γ X 0. Let F X →X be a tracepreserving, completely positive map. Then, for any ϵ 0,

Proof of Proposition .
Let T X →X , y be optimal candidates for the optimization defining 2 in ( . ). We construct an optimization candidate for the coherent relative entropy of the post-processed state. Let The case of pre-processing, i.e. when a map is applied to the input before the actual mapping is carried out, is less clear how to formulate. Indeed, the expres-sionD ϵ RX →X (F R X →RX (ρ X R X ) F X →X (Γ X ), Γ X ) would correspond to the not-so-natural setting where one implements a process matrix defined by the state resulting when two logical processes are applied on both the system X of interest and the reference system R X on a pure state |σ X R X . However, a more general statement about composing processes can be derived in the form of a chain rule, which is the subject of the next section.

. Chain rule
If two individual processes are concatenated, what can be said of the coherent relative entropy of the combined processes? As one would expect, it turns out that the optimal battery use of implementing directly a composition of logical maps can only be better than the sum of the battery uses of the individual realizations of each map. Proposition (Chain rule). Consider three systems X , X , X with corresponding Γ X , Γ X , Γ X 0, and let R X X , R X X . Let σ X be a quantum state. Let E (1) X →X and E (2) X →X be two completely positive, trace-nonincreasing maps such that X →X , and note that where in second inequality we have used twice the fact that the purified distance cannot decrease under application of a completely positive, trace-nonincreasing map, and that E (1) proving that T X →X , y = y 1 + y 2 are valid optimization candidates in ( . ) for (Proof on page .) Proof of Corollary . Define systems X = A, X = AB and X = C. Let These mappings are trace nonincreasing. Let σ X = t R X →X (τ R X ) = t R X →X (ρ R X ). We see that E (2) X →X (t R A R B →AB (τ R A R B )) = τ C which has unit trace as required. Furthermore, let |σ X R X = σ 1/2 and, since E (1) All conditions for Proposition are fulfilled, and the claim follows.

. Alternative smoothing of the coherent relative entropy
There is another possible way to define the smooth coherent relative entropy (i.e., for ϵ > 0), based on optimizing its nonsmooth version (for ϵ = 0) over all states which are ϵ-close to the requested state. This smoothing method is the method used traditionally in the smooth entropy framework [ , , ]. The disadvantage of this alternative definition is that it can no longer be formulated as a semidefinite program. However, in the regime of small ϵ, it turns out that both definitions are equivalent up to factors which depend only on ϵ, and which do not scale with the dimension of the system (Proposition below). In particular, both quantities behave in the same way in the i.i.d. limit.
Alternative smoothing. For a normalized state ρ X R X , positive semidefinite Γ X , Γ X , and for ϵ 0, we define the quantitȳ where the maximization in ( . ) is taken over (normalized) quantum states which are in the support of Γ X ⊗ Γ X and which are close to ρ X R X in the purified distance, P(ρ X R X , ρ X R X ) ϵ.
Some properties ofD ϵ X →X (ρ X R X Γ X , Γ X ) carry over immediately toD ϵ X →X (ρ X R X Γ X , Γ X ), which we summarize here without explicit proof. These propositions are straightforwardly proven by applying the relevant property to the inner coherent relative entropy in ( . ). Proposition (cf. Proposition ). For any 0 ϵ < 1, Proposition (cf. Proposition ). LetX ,X be new systems. Suppose there exist partial isometries V X →X and V X →X such that both t R X →X (ρ R X ) and Γ X are in the support of V X →X , and both ρ X and Γ X are in the support of V X →X . Then We now give a loose equivalent of Proposition for the alternative smoothing of the coherent relative entropy. The error term is relatively loose (it scales proportionally to n and to ϵ), and it does not disappear in the i.i.d. limit unless the limit ϵ → 0 is taken explicitly. For this reason, for small ϵ, it might be advantageous to use Proposition in conjunction with Proposition .
Proof of Proposition . The lower bound is given simply as where the latter expression is provided by Proposition , recalling that for ϵ = 0 both versions of the smooth coherent relative entropy coincide exactly. For the upper bound, letρ X R X be the optimal state such that P ρ X R X , ρ X R X ϵ and invoke Proposition to get We have D ρ R X , ρ R X P ρ R X , ρ R X ϵ and analogously D(ρ X , ρ X ) ϵ . By continuity of the relative entropy given in Lemma , we where f 0 (ϵ, Γ) is as given in the claim. On the other hand, because ρ R X = P R X Γ R X P R X /tr P R X Γ R X and ρ X = P X Γ X P X /tr P X Γ X , as given by ( . ). This means that Crucially, this alternative smoothing method does not alter the quantity much in the regime of small ϵ. In fact, both versions of the smooth coherent relative entropy are related by a simple adjustment of the ϵ parameter, and up to an error term which depends only on ϵ and doesn't scale with the system size.
Proposition . Let ρ X R X be any quantum state. Then for any ϵ 0 with 3 √ ϵ < 1, Conversely, for any ϵ > 0 with 9ϵ 1/4 < 1, We need to prove the following lemma first.
Lemma . Let Γ X , Γ X 0. Let T X →X be a completely positive, trace-nonincreasing map. Let Q X = T † (1 X ). Assume that the support of Q X lies within the support of Γ X , and that T X →X (Γ X ) lies within the support of Γ X . Then Proof of Lemma . The optimal α is given by where we have used that · ∞ = max γ tr[γ (·)] with γ ranging over all density operators.
Proof of Proposition . First we prove ( . ). Letρ X R be the state which achieves the optimum inD ϵ X →X (ρ X R X Γ X , Γ X ), and let T X R X , α be optimal primal variables for 2 for the semidefinite program in Proposition , and denote by T X →X the completely positive, tracenonincreasing map corresponding to T X R X . Write |σ X R X = ρ 1/2 R X |Φ X :R X and |σ X R X =ρ 1/2 R X |Φ X :R X . Since P (σ R X ,σ R X ) ϵ , we see using Lemma that P (σ X R X ,σ X R X ) 2 √ ϵ . The purified distance may not increase under the action of the trace nonincreasing map T X →X , and hence Hence, T X →X is an optimization candidate for 2 with the same achieved value, proving ( . ). Now we prove ( . ). In the remainder of this proof, we use the shorthand system name R ≡ R X . LetT X R E ,α be the optimal primal vari- . We will construct an explicitρ X R close to ρ X R , as well as feasible candidatesT X R andα in the optimization for D X →X (ρ X R Γ X , Γ X ) as given by Proposition . We denote byT X →X the completely positive, trace nonincreasing map corresponding toT X R E . Let By assumption, P (ρ X R , ρ X R ) ϵ and hence D(ρ X R , ρ X R ) ϵ . Using the fact thatρ Define Q =T † (1 X ) and note that 0 Q 1. For any 0 < η < 1, let P η be the projector onto the eigenspaces of Q for which the corresponding eigenvalues are greater or equal to η; clearly P η and Q commute. Define R η = P η − P η Q P η , noting that P η , Q, R η all commute. By definition, ηP η P η Q P η , and hence R η The mappingT X →X is trace non-increasing, where P η, ⊥ = 1 − P η , keeping in mind that Q = P η Q P η + P η, ⊥ Q P η, ⊥ and that R η + P η Q P η = P η . FurthermoreT X →X is trace-preserving on the subspace spanned by P η , i.e. P ηT † X ←X (1 X ) P η = P η . This means that for any state τ lying in the support of P η , it holds that tr[T X →X (τ )] = 1. The map T X →X moreover satisfies where in the last inequality we have used Lemma to see thatα tr(Q Γ X )/tr Γ X . We are led to define (surprise!)α = η −1α .
It remains to find a stateρ X R which is close to ρ X R such that ρ Observe that tr(P η σ X ) where P η, ⊥ = 1 − P η , using the fact that all eigenvalues of Q within P η, ⊥ are less than η and that tr(Q σ X ) = tr T (σ X ) = trρ X 1 − ϵ . Then, using Lemma , . At this point, definẽ Becauseσ X lies within the support of P η , we have tr X ρ X R = tr X T † (1 X )σ X R = tr X T † (1 X ) P ησ X R P η =σ R , and hence we havẽ ρ 1/2 RT X →X (Φ X :R )ρ 1/2 R =ρ X R as required. Furthermore, the purified distance cannot increase under the action ofT X →X , so we have P (ρ X R ,ρ X R ) 2

. Recovering known entropy measures
An interesting aspect of the coherent relative entropy is that it reduces to various previously-known entropy measures, including the min-and max-relative entropies [ ], as well as the conditional min-and max-entropy [ , ]. These measures are already known to be relevant in counting the work cost of specific processes in quantum thermodynamics [ , , , , ].
First we present some definitions. Given a (normalized) quantum state ρ AB , we define the (conditional) von Neumann entropy, the (conditional alternative) max-entropy, and the (conditional alternative) min-entropy respectively as, For any ϵ > 0, we define the smooth (conditional alternative) max-entropy and smooth (conditional alternative) min-entropy respectively as where the optimizations range over (normalized ) statesρ AB and whereρ AB ≈ ϵ ρ AB denotes proximity in the purified distance, i.e., P(ρ AB , ρ AB ) ϵ. For a (normalized) quantum state ρ X , and any Γ X 0, we define the quantum relative entropy, the relative min-entropy, and the relative max-entropy respectively as, There exist several different variants of the min-and max-entropy [ , ]; however, all the max-entropies as well as all the min-entropies are equivalent up to terms of order log ϵ after smoothing with a parameter ϵ . One easily notices that the normalization of the state doesn't affect these quantities, so smoothing may be restricted to normalized states (in contrast to, e.g., Refs. [ , ]). recalling that Π ρ X X denotes the projector onto the support of ρ X . We define the smoothed versions of the relative min-and max-entropies as where the optimizations range over normalized statesρ AB such that P(ρ AB , ρ AB ) ϵ.
We furthermore define the hypothesis testing relative entropy [ -, ] for 0 < η 1 as We now show that we can recover the max-entropy in the case where for both input and output systems we have Γ = 1.
Proposition (Recovering the max-entropy). Let |ρ X R X E be any pure state on systems R X , X , and E with |E| |X R X |. Then Proof of Proposition . Let |ρ X R X E be any pure quantum state. Considering the semidefinite problem for 2 . Conditions ( . a) and ( . c) are automatically satisfied.
Now let ω X 0 with tr ω X = 1 such that tr ω X · tr R (ρ −1/2 R Xρ X R Xρ −1/2 R X ) = tr R Xρ −1/2 R Xρ X R Xρ −1/2 R X ∞ , and note that condition ( . a) is satisfied. Now let X R X = 0 and Z X R X =ρ −1 R X ⊗ ω X , and we see that The attained value is providing us with the opposite bound to ( . ), and hence proving that We now use this expression to show that These smooth quantities were introduced in Ref.
[ ] using the trace distance and optimizing over subnormalized states. The two distances are tightly related and a simple adjustment of the ϵ parameter is required. Furthermore we restrict to normalized states for our convenience; the D ϵ min, 0 is not affected and the D ϵ max is at most shifted by a factor depending on log(1 − ϵ ) only.
Consider the bipartition EX : R of the pure state |ρ EX R , and write the Schmidt decomposition |ρ EX R X =ρ with tr R X Φρ EX :R X = Πρ EX EX . Then Similarly, where the second equality holds because the argument of the partial trace is pure, and hence has the same spectrum on ER as on X (by Schmidt decomposition).
We now see that where the second equality holds by properties of the purified distance (Uhlmann's theorem). An analogous argument holds for H ϵ min, 0 (E | R X ) ρ .
The min-and max-relative entropies already have known connections to thermodynamics [ , , ] in terms of work cost of erasure and work yield of formation of a state in the presence of a heat bath. These results are recovered here, in a fully information-theoretic context.

Proposition
(Recovering the min-and max-relative entropies). The min-relative entropy is recovered with a trivial output state: writing σ X = t R X →X (ρ R X ). Furthermore the max-relative entropy is recovered with a trivial input state: Proof of Proposition . For any stateρ R X , consider the semidefinite program given in Proposition for 2 −D X →∅ (ρ R X Γ X , 1) . The choice In the dual problem, for any µ > 0 let Z R = µ Πρ R X R X and ω X = 1. Let P R X be the projector onto the eigenspaces associated with the positive (or null) eigenvalues of (µρ R X − Γ R X ), and let X R X = P R X (µρ R X − Γ R X ) P R X . Then the dual constraints ( . a) and ( . b) are clearly satisfied. The attained value is where we have used Lemma in the last step. If we take µ → ∞ we get successive feasible dual candidates whose attained value approaches 2 −D min, 0 (ρ R Γ R ) ; hence this is the optimal value of the semidefinite program. Finally, we havē Let's now prove equality ( . ). For any stateρ X , consider the semidefinite program given in Proposition for 2 . The choice T X = ρ X and α = Γ clearly satisfies the primal constraints, and thus Finally, we will see that the usual quantum relative entropy can also be recovered in the regime where we consider states of the form ρ ⊗n X n R n for n → ∞. We defer this case to Section C , as the proof of this property requires some additional bounds we have yet to present.

. Bounds on the coherent relative entropy
At this point, we further characterize the coherent relative entropy with bounds in terms of simpler quantities depending only on the input and output states. The main goal of this section is to prove Proposition and Proposition , which will allow us to understand our quantity's asymptotic behavior in the i.i.d. regime.
We begin with a few upper bounds on the coherent relative entropy, given in terms of a difference of relative entropies.

Proposition . We have the upper bound
writing σ X = t R X →X (ρ R X ) Proof of Proposition . Consider the optimal solution T X R X and α to the primal semidefinite program of Proposition , and let T X →X be the completely positive map corresponding to T X R X , i.e. defined by T X →X (·) = tr R X [T X R X t X →R X (·)]. The mapping defined in this way is completely positive since T X R X 0 and is trace-nonincreasing thanks to condition ( . a). The map T X →X thus satisfies the conditions of item (i) of Proposition . Hence, invoking item (ii) of that proposition, letΦ X A→X A be a trace nonincreasing Γ-sub-preserving map for large enough A, A , with Γ A = 1 A , with α = 2 −(λ 1 −λ 2 ) and |σ X R X = ρ 1/2 R X |Φ X :R X . (If α is irrational, the following argument may be applied to arbitrary good rational approximations to α .) Now, dilateΦ X A→X A using Proposition to a tracepreserving, Γ-preserving map Φ X AX A Q →X AX A Q with states |x X , |a A , |i Q , |x X , |a A , |f Q (all of them being eigenstates of the respective Γ operators), satisfying Using Proposition recalling that Γ A = 1 A , we see that as well as for any pure eigenstate y of any positive semidefinite Γ, Then, by the data processing inequality for the relative entropy and with ( . b), where we invoked the condition ( . c) in the last step. We then havê The following upper bound is easy to prove, although it has not found tremendous use.

Proposition . The coherent relative entropy may be upper bounded aŝ
Proof of Proposition . Consider an optimal solution T X R X and α for the primal semidefinite program. Then we have via the semidefinite constraints By definition, we have and thus we see that α 2 D max (ρ R X Γ R X ) is a candidate µ in this minimization. Hence 2 D max (ρ X Γ X ) α 2 D max (ρ R X Γ R X ) and The claim then follows fromD X →X (ρ X R X Γ X , Γ X ) = − log α .
The last of the upper bounds holds for the smooth coherent relative entropy. The present upper bound will be used to prove one direction of the asymptotic equipartition property.

Proposition .
Let ρ X R X be any quantum state, and denote the corresponding input state by σ X = t R X →X (ρ R X ). Then for any ϵ, ϵ , ϵ 0 such thatε := ϵ + ϵ + 2ϵ < 1, Proof of Proposition . Letρ X R X be the quantum state which achieves the optimum forD ϵ X →X (ρ X R X Γ X , Γ X ), i.e., satisfying P (ρ X R , ρ X R ) ϵ andD ϵ X →X (ρ X R X Γ X , Γ X ) =D X →X (ρ X R X Γ X , Γ X ). The proof proceeds by constructing dual candidates for 2 in ( . ) achieving the value in the claim. Define the quantum statesσ X ,ρ X as the optimal ones in the optimizations defining the smooth min and max relative entropies, i.e., satisfying P (σ X , σ X ) ϵ , P (ρ X , ρ X ) ϵ , as well as and we may define X R X = µ ∆ R in order for constraint ( . b) to be also satisfied. The attained dual objective value is obj. = tr(Z X R Xρ X R X ) − tr(X R X ) = µ tr Πρ X X ρ X − ϵ − ϵ . ( . ) Analogously to the input state, now we have for the output state D(ρ X ,ρ X ) P (ρ X ,ρ X ) P (ρ X , ρ X ) + P (ρ X ,ρ X ) ϵ + ϵ ; there must exist ∆ X 0 withρ X ρ X −∆ X and tr ∆ X ϵ +ϵ . Hence, tr Πρ X X ρ X tr Πρ X X ρ X − tr Πρ X X ∆ X 1 − ϵ − ϵ . Thus, The claim follows by noting that − log µ = D ϵ max (σ X Γ X )−D ϵ min, 0 (ρ X Γ X ).

Proposition . We have the lower bound
with σ X = t X →R X (ρ R X ).

Proof of Proposition .
Choose the primal candidate T X R X = ρ −1/2 R X ρ X R X ρ −1/2 R X . We have tr X T X R X = ρ −1/2 R X ρ R X ρ −1/2 R X = Π ρ R X R X 1 R X so our candidate satisifes ( . a). Also ( . c) is satisfied by construction, and tr R X T X R X Γ R X is in the support of ρ X and hence it lies in the support of Γ X .
According to Proposition we choose α = Γ −1/2 X Because the battery system is a part of the physical implementation of the process, we may ask why it is not included in the definition of the smooth coherent relative entropy ( . ) in a way which would allow the physical implementation to fail to produce the appropriate output battery state with a small probability. Remarkably, there would have been no difference had we chosen to smooth the battery states as well. This follows from the following proposition, which asserts that optimization candidates which include smoothing on the battery states are in fact already included in the optimization in the definition above. This holds for the general battery states of the form P A Γ A P A /tr(P A Γ A ), for a projector P A commuting with the Γ A of the battery (see item (v) of Proposition ). Proposition (Smoothing battery states). Let A, A be quantum systems with corresponding Γ A , Γ A . Let P A , P A be projectors such that [P A , Γ A ] = 0 and [P A , Γ A ] = 0, and let Φ X A→X A be a trace nonincreasing, completely positive map such that Φ X A→X A (Γ X ⊗ Γ A ) Γ X ⊗ Γ A , and such that Then there exists a trace-nonincreasing, completely positive map T X →X such both the following conditions hold: Proof of Proposition . Define, for any ω X , Then whereρ A X R := Φ X A→X A (σ X R ⊗ P A Γ A P A tr P A Γ A ) satisfies ϵ by assumption. Using the monotonicity of the purified distance [ ] in particular under the trace-nonincreasing completely positive map tr P A (·) , we have P T X →X (σ X R ), ρ X R ϵ .
( . ) We also have using the fact that P A Γ A P A = Γ 1/2 also with the fact that Φ X A→X A is Γ-sub-preserving. Then which completes the proof.
This means that the processes which also allow "fuzziness" on the battery states are de facto already included in the optimization defining the smooth coherent relative entropy ( . ). This is formulated explicitly in the following corollary.

Corollary .
Let ρ X R X be a subnormalized state, let Γ X , Γ X 0 and let ϵ > 0. Then where the optimization is performed over all systems A, A , all operators Γ A , Γ A , and all projectors P A , P A such that [P A , Γ A ] = 0 and [P A , Γ A ] = 0, for which there is a trace nonincreasing, completely positive map Φ X A→X A satisfying Φ X A→X A (Γ X ⊗ Γ A ) Γ X ⊗ Γ A as well as Proof of Corollary . First, let A, A , P A , P A , Γ A , Γ A and Φ X A→X A satisfy the conditions of the maximization ( . ). Let T X →X the mapping given by Proposition . Observe that Γ −1/2 X T X →X (Γ X ) Γ −1/2 X ∞ (tr P A Γ A )/(tr P A Γ A ). Note also that P (T X →X (σ X R ), ρ X R X ) ϵ as guaranteed by our previous use of Proposition . Hence, T X →X is a valid candidate in the optimization given by Proposition forD ϵ X →X (ρ X R X Γ X , Γ X ). HenceD ϵ X →X (ρ X R X Γ X , Γ X ) − log ( . ) To show that equality is achieved in ( . ), let T X →X be a valid optimization candidate in ( . ) forD ϵ X →X (ρ X R X Γ X , Γ X ) which achieves the optimal value y =D ϵ X →X (ρ X R X Γ R , Γ X ) = − log Γ −1/2 X T X →X (Γ X ) Γ −1/2 X ∞ , with P (T X →X (σ X R X ), ρ X R X ) ϵ . Then T X →X (Γ X ) 2 −y Γ X , and this mapping satisfies the conditions of item (i) of Proposition . Let A = A be a qubit system with P A = |0 0 | A , P A = |1 1| A , and Γ A = Γ A = 0 |0 0 | A + 1 |1 1| A , with 0 / 1 = 2 y . In virtue of item (iii) of Proposition , there exists a trace-nonincreasing, completely positive map Φ X A→X A such that Φ X A→X A (Γ X ⊗ Γ A ) Γ X ⊗ Γ A and which satisfies Φ X A→X A ((·) ⊗ |0 0 | A ) = T X →X (·) ⊗ |1 1| A . Then and hence Hence, all the conditions of the maximization ( . ) are satisfied, and the achieved value is indeed − log[(tr P A Γ A )/(tr P A Γ A )] = − log( 1 / 0 ) = y .

Lemma
(Smoothing "part of" a state). Let ρ AB be a bipartite normalized quantum state and letρ A be a normalized quantum state such that D(ρ A , ρ A ) δ . Then there exists a normalized quantum stateρ AB such that tr BρAB =ρ A , tr AρAB = ρ B and P(ρ AB , ρ AB ) 2 √ 2δ .
Proof of Lemma . Becauseρ A and ρ A are δ -close in trace distance, by Lemma there exists ∆ ± A 0 such that tr ∆ − A = tr ∆ + A = D (ρ A , ρ A ) δ and Let A =ρ A + ∆ − We now show that M A→A (ρ A ) =ρ A . On one hand, using A =ρ A + ∆ − A = ρ A + ∆ + A , we have while noting that ρ A lies within the support of A since A = ρ A + ∆ + A . We deduce that tr(M A ρ A M † A ) = 1 − tr(M A ∆ + A M † A ). On the other hand, and hence, combining ( . ) with ( . ) Define now the stateρ AB asρ where the identity mapping is understood on system B. By properties of quantum channels the state on B is preserved, i.e. tr AρAB = ρ B (and in particular we have trρ AB = 1), and we showed above that tr BρAB =ρ A . It remains to see thatρ AB and ρ AB are close in purified distance.
This distance can only decrease if we trace out the system C, and thus P M A ρ AB M † A , ρ AB √ 2δ . On the other hand, we have by definition with δ , and hence D M A ρ AB M † A ,ρ AB δ . Finally, by triangle inequality and using P (ρ, ρ ) 2D(ρ, ρ ), Lemma (Continuity of the relative entropy in its first argument). Let Γ 0. Let ρ, σ lie within the support of Γ. Assume that D(ρ, σ ) ϵ. Then where h(ϵ) = −ϵ log ϵ − (1 − ϵ) log(1 − ϵ) is the binary entropy.
Proof of Lemma . First, write and so Using the continuity bound of Audenaert [ ], we have where the states ρ and σ can be seen as living in a subspace of the full Hilbert space of dimension at most Γ (because they must both lie within the support of Γ), and where h(ϵ ) = −ϵ ln ϵ − (1 − ϵ ) ln(1 − ϵ ) is the binary entropy. On the other hand, as log Γ/ log Γ ∞ is a valid candidate for Z in Lemma . Inverting the roles of ρ and σ in the equation above we finally obtain: