Fully quantum fluctuation theorems

Systems that are driven out of thermal equilibrium typically dissipate random quantities of energy on microscopic scales. Crooks fluctuation theorem relates the distribution of these random work costs with the corresponding distribution for the reverse process. By an analysis that explicitly incorporates the energy reservoir that donates the energy, and the control system that implements the dynamic, we here obtain a quantum generalization of Crooks theorem that not only includes the energy changes in the reservoir, but the full description of its evolution, including coherences. This approach moreover opens up for generalizations of the concept of fluctuation relations. Here we introduce `conditional' fluctuation relations that are applicable to non-equilibrium systems, as well as approximate fluctuation relations that allow for the analysis of autonomous evolution generated by global time-independent Hamiltonians. We furthermore extend these notions to Markovian master equations, implicitly modeling the influence of the heat bath.


I. INTRODUCTION
Imagine a physical system with a Hamiltonian H S (x) that depends on some external parameter x, e.g., electric or magnetic fields that we can vary at will. By changing x we can push the system out of thermal equilibrium. This would typically require work that may be dissipated due to interactions with the surrounding heat bath. The latter may also make the dissipation random, in the sense that the work cost w is different each time we implement the same change of the Hamiltonian [1][2][3][4][5][6]. (Think of a spoon pushed through syrup. On microscopic scales the friction resolves into random molecular collisions.) These fluctuations can be described via a probability distribution P + (w). Crooks theorem [7] shows that there is a surprisingly simple relation between P + and the corresponding distribution P − obtained for the process run in reverse (i.e., where the time-schedule for the change of x is mirrored) namely where H i S and H f S are the initial and final Hamiltonians, respectively, and Z(H) is the partition function, which in the quantum case takes the form Z(H) = Tre −βH . Moreover, β = 1/(kT ), with k Boltzmann's constant, and where T is the absolute temperature of the heat bath. In this investigation we only consider a single heat bath with a fixed temperature T .
Here we avoid such auxiliary components, and obtain * Electronic address: johan.aberg@uni-koeln.de fluctuation relations that retain all quantum aspects of the evolution.
The key is to explicitly model all degrees of freedom involved in the process. This includes the control mechanism that implements the change of the external parameter, i.e., x in H S (x), as well as the 'energy reservoir', e.g., a battery or an excited atom, which donates the energy for the work w. Since work corresponds to a change of energy in this reservoir, it follows that the reservoir itself is forced to evolve as it fuels the dynamics. The general theme of this investigation is to formulate fluctuation relations in terms of this induced evolution. To make this more concrete, let us briefly display the first of the fluctuation theorems that we will derive. The roles of the probability distributions P + and P − are here taken over by the channels F + and F − that are induced on the energy reservoir by the forward and reverse processes, respectively. As we shall see, these channels can, under suitable conditions, be related by the following quantum Crooks relation where H E denotes the Hamiltonian of the energy reservoir E. The combined application of J βH E and J −1 βH E , where J βH E (Q) = e −βH E /2 Qe −βH E /2 , can be viewed as a counterpart to the term e βw in (1). The mapping from F − to F − (to be described in detail later) is related to time-reversals, and can in some sense be regarded as a generalization of the transformation of P − (w) to P − (−w) at the right hand side of (1). Note that the right hand side of (2) should be interpreted in the sense of compositions of functions, i.e., (2) can be written more explicitly , with σ being an arbitrary operator on the energy reservoir.
To get an alternative perspective on fully quantum fluctuation theorems and their relation to the second law, the reader is encouraged to consult [26]. While we here primarily consider generalizations of Crooks theorem, [26] mainly focuses on equalities, including generalizations of the Jarzynski equality. However, our paths do occasionally cross, for example in section II H where we share the focus on energy translation invariance, and section VII where thermal operations play an important role.
In the following section we derive (2) and moreover show that it can be decomposed into diagonal and offdiagonal Crooks relations, thus yielding fluctuation relations for coherences. We also derive quantum Jarzynski equalities, as well as bounds on the work cost. In section II H we regain the classical Crooks relation (1) from (2) via the additional assumption of energy translation invariance. We next turn to generalizations of (2), where section III introduces conditional fluctuation relations, and section VI approximate versions. In section VII we formulate fluctuation theorems for master equations.

A. The model
To derive the quantum Crooks relation in (2) we employ a general class of models that previously has been used in the context of quantum thermodynamics to analyze, e.g., work extraction, information erasure, and coherence [27][28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44]. The main idea is that we include all the relevant degrees of freedom (which in our case consist of four subsystems, see Fig. 1) and assign a global timeindependent Hamiltonian H to account for energy. On this joint system we are allowed to act with any unitary operation V that conserves energy, which is formalized by the condition that V commutes with the total Hamiltonian [H, V ] = 0. (See [45] for an alternative notion of energy conservation.) At first sight it may be difficult to see how such a manifestly time-independent Hamiltonian can be used to describe the evolving Hamiltonians in Crooks theorem. For this purpose we introduce a control system C such that the Hamiltonian of S = SB depends on the state of C. As an illustration, suppose that we wish to describe a transition from an initial Hamiltonian H i S to a final Hamiltonian H f S . One possibility would be to define a joint Hamiltonian of the form where |c f and |c i are two normalized and orthogonal states of the control system C. If the evolution would change the control from |c i to |c f , then this would effectively change the Hamiltonian of S from H i S to H f S . However, this change can in general not be achieved by an energy conserving unitary operation on S C alone, since the transition from H i S to H f S typically will involve a change of energy. The role of the energy reservoir E is to make these transitions possible by donating or absorbing the necessary energy. With a suitable choice of Hamiltonian H E of the energy reservoir, the global Hamiltonian H = H S C ⊗1 E +1 S C ⊗ H E allows for non-trivial energy conserving unitary operators V . The systems. The model explicitly includes the 'system' S on which we operate, the heat bath B, the control C that implements the change of the Hamiltonian on SB, and the energy reservoir E that donates or accepts the energy required to drive the processes. Most of our fluctuation relations are expressed in terms of the dynamics induced on the energy reservoir E.
For the main part of this investigation (Secs. II and III) we assume that the total system is described by a time-independent Hamiltonian that is non-interacting between SBC and E, i.e., is of the form H = HSBC ⊗1E +1SBC ⊗ HE. We moreover model the evolution by energy conserving unitary operators V , i.e., [H, V ] = 0. (We go beyond these assumptions when we consider approximate fluctuation relations in section VI.) For most of the derivations it is not necessary to make any distinction between S and B, and for this reason we will often bundle them together into an extended system S = SB. This 'rationalization' can be taken one step further toS = S C = SBC when we turn to the conditional fluctuation theorems in section III.
In this investigation the energy reservoir does not only serve as a source or sink for energy, but also acts as a probe of the dynamics of the system. Instead of using auxiliary measurements, which inevitably would introduce additional interactions that potentially may disturb the dynamics, we here let the energy reservoir take over this role. We do, so to speak, make an additional use of a component that anyway has to be included. A further benefit of using an explicit quantum probe is that we not only capture the flow of energy, but also the change in coherence and correlations. Needless to say, standard macroscopic energy reservoirs would be of little use for the latter purposes, due to the levels of decoherence that they are exposed to. However, our notion of energy reservoirs includes nano-systems like, e.g., single atoms or spins.

B. An intermediate version
In this section we derive a simplified version of our fluctuation theorem. This serves as a convenient intermediate step, and illustrates why time-reversal symmetry is useful.
We wish to determine the channel induced on the energy reservoir by a non-equilibrium process a la Crooks, where the system initially is in equilibrium, and is forced out of it. To model this we let the control system initially be in state |c i , and we let the combined system and heat bath S be in the Gibbs state G(H i S ), where G(H) = e −βH /Z(H). Moreover, we let the reservoir E be in an arbitrary state σ. Hence, the joint system is initially in the state G(H i S ) ⊗ |c i c i | ⊗ σ. After a global energy-conserving unitary operation V , the state of the energy reservoir is consequently given by the channel To obtain a Crooks-like relation we should somehow relate this forward process with a 'reversed' process, where the system instead is initiated in the Gibbs state of the final Hamiltonian, i.e., the global system should be in the joint state G(H f S ) ⊗ |c f c f | ⊗ σ. The question is how to formalize the idea of a reversed process acting on this initial state. A rather brutal interpretation would be to simply invert the entire global evolution, thus substituting V with V † (see Fig. 2). The resulting channel on the reservoir would in this case be Let us now assume that we have a perfectly functioning control system, in the sense that the state |c i is transformed into |c f with certainty. More precisely, we demand that the unitary operator V should satisfy the condition One can verify (see Appendix A) that this assumption implies the following relation between the channels F and R Here R * denotes the conjugate [46] of the channel R. If the channel has Kraus representation R(ρ) = j V j ρV † j , then the conjugate can be written R * (ρ) = j V † j ρV j [46].
As the reader may have noticed, we have written Z(H i S ) and Z(H f S ) in (6) rather than the more generally valid Z(H i S ) and Z(H f S ). To obtain the former we can assume that H i S = H i S ⊗1 B +1 S ⊗ H B and H f SB = H f S ⊗1 B +1 S ⊗ H B , and thus Z(H i S ) = Z(H i S )Z(H B ) and Z(H f S ) = Z(H f S )Z(H B ). One may observe that the right hand side of (6) is similar to Crooks' quantum operation time reversal [47] (not to be confused with the time reversals T or the mapping discussed in the next section) and closely related to Petz recovery channel [48][49][50][51], where a relation to work extraction was identified recently [41]. See also the discussion on time-reversals for quantum channels in [52]. For further comments on this topic, see Appendix A 9.
The approach of this investigation can be compared with another construction that also focuses on quantum channels [53,54], where the starting point is to assume a property of a channel (unitality) and derive fluctuation relations for the resulting probability distribution for suitable classes of initial and final measurements that sandwich the channel (see also the generalization in [55]). Sequences of channels are considered in [56]. Our quantum Crooks theorem is based on the idealized idea of a perfect control mechanism. This assumes that the energy conserving unitary evolution V on the joint system S CE turns the control state |ci into |c f with certainty, thus implementing the change of the Hamiltonian H i S to H f S perfectly. To model the forward process of the Crooks relation we assume that S C starts in the 'conditional' equilibrium state G(H i S ) ⊗ |ci ci|. The subsequent evolution under V induces a channel F on the energy reservoir E. As an intermediate step towards the quantum Crooks relation (2) we assume that the reverse process is given by the globally reversed evolution V † . With S C in the initial state G(H f S ) ⊗ |c f c f |, this results in a channel R on E. The preliminary Crooks relation in Eq. (6) relates the channels F and R. This result does not rely on any additional assumptions on how V comes about, or on the nature of the dynamics at intermediate times. However, if one so wishes, it is possible to explicitly model the path H(x) in the space of Hamiltonians. This path can be discretized as H l for l = 0, . . . , L with H0 = H i S and HL = H f S . To these Hamiltonians we associate states |c l in the control C, and construct the joint Hamiltonian H S C = L l=0 H l ⊗ |c l c l |. Hence, if the evolution traverses the family of control states, then we progress along the path of Hamiltonians. An alternative method to model evolving Hamiltonians is discussed in section VI.
Although (6) indeed can be regarded as a kind of quantum Crooks relation, it does suffer from an inherent flaw. The swap between V and V † means that we invert the entire evolution of all involved systems, including the heat bath. Apart from assuming an immense level of control, this assumption does not quite fit with the spirit of Crooks relation. The latter only assumes a reversal of the time-schedule of the control parameters, not a reversal of the entire evolution. In the following we will resolve this issue by invoking time-reversal symmetry.

C. Time-reversals and time-reversal symmetry
In standard textbooks on quantum mechanics (see e.g. [57]) time-reversals are often introduced on the level of Hilbert spaces via complex conjugation of wavefunctions (also applied in the context of quantum fluctuation relations, see e.g. [9,14,22,24,58]). Here we instead regard time-reversals as acting on operators (cf. [59,60]). Moreover, our time-reversals have the flavor of transpose operations rather than complex conjugations. Since den-sity operators and observables are Hermitian, the choice between conjugation or transposition is largely a matter of taste. Here we opt for the transpose, since this choice avoids the inconvenient anti-linearity of complex conjugation. A couple of key properties of our time-reversals T are T (AB) = T (B)T (A) and T (A) † = T (A † ). (For the complete characterization, see Appendix B.) To see why it is reasonable to refer to T as a 'timereversal', let us assume that the evolution operator V is time-reversal invariant, i.e., T (V ) = V . If an initial state ρ i is evolved into ρ f = V ρ i V † , then the properties of T mentioned above yield T (ρ i ) = V T (ρ f )V † . In other words, the reversed final state T (ρ f ) evolves to the reversed initial state T (ρ i ). Note that this 'backwards' transformation is implemented by the forward evolution V ρV † , rather than the inverted evolution V † ρV .
The -transformation that appears in (2) can be defined via the chosen time-reversal as As mentioned earlier, if F(σ) = j V j σV † j , then the conjugate is given by F * (σ) = j V † j σV j . By the properties of T mentioned above it thus follows that F (σ) = j T (V j )σT (V j ) † , i.e., we time-reverse the operators in the Kraus representation.
In the finite-dimensional case each time-reversal can be implemented by a transpose with respect to some orthonormal basis, followed by a special class of unitary operations. (Hence, our time-reversals do strictly speaking include a bit larger set of operations than proper transposes, see Appendix B.) Since the transpose is a positive but not completely positive map (as is illustrated by the effect of the partial transpose on entangled states [61,62]) we can conclude that time-reversals generally are not physical operations. Hence, one should not be tempted to think of time-reversals as something that we actually apply to a system. However, given a description of a state ρ, there is nothing that in principle prevents us from preparing the time reversed state T (ρ), which is sufficient for our purposes.  [3][4][5][6][8][9][10]. In our case, time-reversal symmetry enables us to in effect let the evolution run 'backwards' by swapping the control states from a 'forward track' to a 'reverse track'. By this we amend for the over-ambitious global reversal of the evolution that we employed for the intermediate fluctuation relation, and obtain a quantum counterpart to the reversal of the control parameter in the classical Crooks relation. Analogous to the setup in Fig. 2, the initial control state |ci+ yields an evolution where the initial Hamiltonian H i S is transformed to the final Hamiltonian H f S when the control state |c f + is reached. This process induces a channel F+ on the energy reservoir E. To each of these control states there exists a time-reversed partner starting with |c f − and ending with |ci− thus bringing the Hamiltonian H f S back to H i S . This induces a channel F− on the reservoir. By assuming timereversal symmetry, the channels F+ and F− can be related via the quantum Crooks relation in (2). for the initial Hamiltonian H i S , and the pair |c f + , |c f − for the final Hamiltonian H f S . The general idea is that the members of these pairs correspond to the forward and reverse evolution of the control system. One way to formalize this notion is via the following relations Hence, the time-reversal swaps the two control states into each other. Note that if V transforms |c i+ to |c f + perfectly, then V also transforms |c f − to |c i− perfectly. In the latter case one should keep in mind the reverse ordering of i and f ; the state |c f − is the initial control state of the reverse process (see Fig. 3). Let us assume that the unitary operator V and the initial and final control states |c i+ , |c f + satisfy the conditions of the intermediate fluctuation relation. The channels F + and R + , obtained by substituting |c i with |c i+ , and |c f with |c f + in equations (3) and (4), respectively, are according to (6) related by For the reverse process we obtain the channels F − and R − , where |c i this time is substituted by |c f − , and |c f with |c i− . By using the properties of the timereversal one can show (for details, see Appendix C) that R + T E = T E F − . By applying this equality to (9) our desired quantum Crooks relation (2) follows immediately. Note that both F + and F − correspond to the 'forward' evolution, i.e., we no longer need to impose a global inversion of the dynamics. After having established (2) an immediate question is how to interpret it physically. The classical Crooks relation (1) can be phrased as a comparison between two experiments, one for the forward path of control parameters, and one for the reversed. For each of these two setups we repeat the experiment in order to obtain good statistical estimates of the probability distributions P + and P − . The claim, so to speak, of Crooks theorem is that these two probability distributions are related as in (1). Our quantum fluctuation relation in (2) can be interpreted in a similar manner. Here the channels F + and F − induced by the forward and reverse process can in principle be determined by process tomography (see e.g. [63][64][65][66] and Sec. 8.4.2 in [67] for an overview). Analogous to the classical Crooks relation, our quantum fluctuation theorem tells us that these two channels should be related as in (2). One may note that the mapping F − → J βH E F − J −1 βH E in this setup is something that we calculate given an experimental estimate of the channel F − , analogous to how we would calculate the function e βw P − (−w) from the estimated distribution P − (w). In section IV we consider a reformulation of (2) that is associated with a scenario that does not require such a post-processing.
As the reader may have noticed, our quantum Crooks relation (2) does, in contrast to the classical Crooks relation (1), not contain any explicit reference to 'work'. Hence, we do in essence circumvent the issue of how to translate the classical notion of work into the quantum setting; a question that has been discussed rather extensively in relation to fluctuation theorems [11,12,15,[68][69][70][71][72][73][74][75][76][77][78][79][80][81]. We can nevertheless in some sense associate work with the loss of energy in the reservoir, which we employ in section II H where we regain the classical Crooks relation (1).

E. Diagonal and off-diagonal Crooks relations
Quantum systems do not only carry energy, but also coherence, i.e., superpositions between energy eigenstates. (An atom can, apart from being in the ground state or an exited state, also be in a superposition between the two.) Such coherences manifest themselves as non-zero off-diagonal elements in the matrix representation of the density operator in the energy eigenbasis. In the quantum regime, coherence emerges as a relevant resource alongside energy [27, 30, 32, 34, 35, 37-39, 45, 82-89]. While the classical Crooks theorem relates the distribution of work (and thus change of energy in the implicit energy reservoir) of the forward and reverse processes, the quantum version (2) additionally incorporates the evolution of coherence, as we shall see here.
The energy conservation and the diagonal initial state with respect to the Hamiltonian of SBC conspire to decouple the dynamics on E with respect to the 'modes of coherence' [35] (which in turn is a part of the wider context of symmetry preserving operations [90]). To make this more concrete, assume that H E has a complete set of energy eigenstates |n with corresponding non-degenerate energies E n . Let us also assume that T E acts as the transposition with respect to this energy eigenbasis. The decoupling does in this case mean that the channels F ± can map an element |n n | to |m m | only if E n −E n = E m −E m (see Appendix D for further details). Hence, each mode of coherence is characterized by an 'offset' δ = E n − E n from the main diagonal (see Fig. 4).
In particular, the main diagonal is given by the offset δ = 0. The dynamics of the diagonal elements under the forward process can be described via a conditional probability distribution p ± (m|n) = m|F ± (|n n|)|m = n|F * ± (|m m|)|n .
(10) The application of (2) yields which thus can be regarded as a diagonal Crooks relation.
In section II H we shall see how this in turn can be used to re-derive (1) via the additional assumption of energy translation invariance. For each permissible value of δ (which depends on the spectrum of H E ) we can characterize the dynamics of the corresponding off-diagonal mode by q δ ± (m|n) = m|F ± (|n n |)|m = n |F * ± (|m m|)|n , where the assumption of non-degeneracy implies that n is uniquely determined by n, δ, and similarly m by m, δ.
We obtain an off-diagonal analogue of (11) in the form of Z(H i S )q δ + (m|n) = e β(En−Em) Z(H f S )q δ − (n|m). (12) In other words, the functional form of the relations for the main diagonal and all the off-diagonals are identical. However, one should keep in mind that the numbers q δ ± (m|n) in general are complex, and thus cannot be interpreted as conditional probability distributions.
The conditional distributions p ± (m|n) and all q δ ± (m|n) can be regarded as representing different aspects of the channels F ± . However, one can also give more direct physical interpretations to these quantities. To this end one should keep in mind that the energy reservoir can be viewed as being part of our experimental equipment, and we thus in principle are free to prepare and measure it in any way that we wish. The conditional distribution p ± (m|n) can be interpreted as the probability to measure the energy E m in the reservoir after the experiment has Due to energy conservation in combination with the particular class of initial states, it turns out that the dynamics of the energy reservoir decouples along the modes of coherence [35]. One can think of these as the collection of diagonals (main and off-diagonals) of the density operator represented in an energy eigenbasis. Due to the decoupling it follows that the quantum fluctuation relation (2) can be separated into individual Crooks relations for each mode of coherence. As an example, suppose that the spectrum of the reservoir would include the energy levels E1 = 0, E2 = s, E3 = 3s, E4 = 4s for some s > 0. The dynamics on the main diagonal, δ = 0, satisfies the relation in (11). Each of the diagonals with offsets δ = ±s, ±2s, ±3s, ±4s satisfies a Crooks relation as in (12). For a more concrete example of the decoupling, see Fig. 9. been completed, given that we prepared the reservoir in energy E n before we connected it to the system. Equivalently, we could replace the initial preparation with an energy measurement, thus approaching the 'two-time' or 'two-point' measurements that play a central role in several investigations on quantum fluctuation relations (see e.g. [11][12][13][14][15][16][17][18][19][20][21][22][23][24][25], and for overviews see [8,9]), although we here apply these measurements on the energy reservoir, rather than on the system. An obvious issue with sequential quantum measurements is that the first measurement typically perturbs the statistics of the second measurement. However, in our case the decoupling comes to our aid. If we measure the energy in the reservoir after the process, then the statistics of this measurement would not be affected if we would insert an additional energy measurement before the process, irrespective of how offdiagonal the initial state may be. The decoupling thus justifies the use of two-point measurements on the energy reservoir, if our purpose is to determine p ± . However, the very same argument also implies that if we wish to determine q δ ± , then we have to use non-diagonal initial states, as well as non-diagonal measurements. For an example of such a setup, see Appendix D 3.

F. Jarzynski equalities
From the classical Crooks relation one can directly derive the Jarzynski equality e −βW = Z(H f )/Z(H i ) [6,91]. As mentioned above, it is not clear how to trans-late the random variable W into the quantum setting, and consequently it is also not evident how to translate the expectation value e −βW (which yields a variety of approaches to the quantum Jarzynski equality, see overviews in [8][9][10]). Like for the Crooks relation, we do not attempt a direct translation, but rather focus on the general dynamics in the energy reservoir.
By applying (2) to an initial state σ of the reservoir and taking the expectation value of the operator e βH E , it follows that Although this equality has the flavor of a Jarzynski equality, we can bring it one step further by additionally assuming that R + (1) =1, or equivalently F − (1) =1, i.e., that these channels are unital. This assumption yields This relation has a clear physical interpretation in terms of an experiment where we measure the expectation value of e βH E on the input state of the reservoir (e.g., from the statistics of energy measurements), and in a separate experiment measure the same observable on the evolved state F + (σ).
In a similar fashion one can derive a whole family of Jarzynski-like equalities (with as well as without the assumption R + (1) =1, see Appendix E) and another member of this family is This equality does not have a quite as direct physical interpretation as (14), but one can resort two-point energy measurements, resulting in fluctuation relations akin to e.g. [11-13, 79, 80]. To see this, assume that H E has a point spectrum. Then equation (15) takes the form mn e β(Em−En) p + (m|n) n|σ|n = Z(H f S )/Z(H i S ), where we have made use of the decoupling of the diagonal mode of coherence. This can alternatively be obtained directly from the diagonal Crooks relation (11), where the unitality of F − implies that p − is not only stochastic, but doubly stochastic.
There are other types of modified fluctuation relations that, in the spirit of Maxwell's demon, incorporate feedback control, resulting in efficacy factors (see e.g. [92][93][94]). The fluctuation relations considered in this section do not include explicit feedback processes (as opposed to the conditional fluctuation relations in section III, which can be said to represent a crude form of feedback, where we throw away results if we get the 'wrong' outcome in a control measurement). Nevertheless, one may wonder whether the global unitary evolution under some circumstances can be regarded as implicitly representing a feedback process on the system. If so, this could potentially pave the way for a merging of these approaches. However, we leave this as an open question. G. Bounds on the work cost As mentioned above, the classical Jarzynski equality follows directly from Crooks relation. It is therefore perhaps a bit surprising that the condition of unitality of the channel R + emerges in the derivations of our Jarzynski equalities. Classical fluctuation relations imply various inequalities, often regarded as manifestations, or refinements, of the second law (see e.g. [3,6]). Here we explore the condition of unitality of R + by establishing quantum counterparts of some of these classical bounds. (For other discussions on the relation between the second law and fully quantum fluctuation theorems, see [26].) In macroscopic thermodynamics the second law implies that the amount of work required to change a system from one equilibrium state to another, when in contact with a single heat bath, is at least equal to the free energy difference. In a statistical setting we would thus expect (e.g. as a special case of more general bounds [95][96][97][98]) that the average work cost should satisfy i.e., the work cost is at least equal to the difference in (equilibrium) free energy between the final and initial Hamiltonian (where equality typically is reached in the limit of quasi-static processes). The classical Jarzynski equality implies (16) via convexity of the exponential function [91]. It turns out that one similarly can obtain a quantum counterpart to (16). More precisely, one can use the diagonal Crooks relation (11) to show that (As a technical remark, we do for this derivation additionally assume that H E has a non-degenerate point spectrum. For details see Appendix F.) If we identify the decrease in average energy of the reservoir, Tr(H E σ) − Tr H E F + (σ) with the average work cost W , we thus regain the standard bound if R + is unital. Hence, the unitality of R + appear again, this time to guarantee the standard work bound.
The inequality (17) does not necessarily mean that the standard bound is violated if R + fails to be unital. However, one can construct an explicit example where the work cost is smaller than the standard bound for a process with a non-unital R + (see Appendix F 2). At first this may seem a bit alarming since it would appear to suggest violations of basic thermodynamics. However, one has to keep in mind that we here include the energy reservoir as a physical system, and that we cannot expect to regain standard bounds if we allow ourselves to use the energy reservoir per se as a resource (cf. discussions in [45]), and one may suspect that the unitality of R + is related to this issue. A further indication in this direction is that the energy translation invariance, which is the topic of the next section, not only allows us to re-derive the classical Crooks relation (1), but also guarantees that the channel R + is unital (see Appendix G).
For another counterpart to a classical bound, one can combine the forward process with the reverse processes to obtain a cycle (cf. section 5 in [3]). In the spirit of the Kelvin-Planck formulation of the second law (see e.g. [99]), one would not expect that such a cyclic process would result in a net gain of work, and thus W + + W − ≥ 0, with W + and W − being the (random) work cost of the forward and the reverse process, respectively. In the quantum case one can obtain a counterpart of this relation (see Appendix F 3). We find, perhaps unsurprisingly, that this analogue is valid when R + and R − are unital.
The inequality in (16) includes an expectation value, and thus opens up for the possibility that the (macroscopic) bound is violated for single instances of repeated experiments. In the classical case, fluctuation relations do imply more refined estimates of the work regarded as random variables. The probability that the work W violates the macroscopic bound [100], or [3]. In other words, the probability of a 'second law violation' is exponentially suppressed in the size of that violation. In the quantum case one can formulate a counterpart to this bound (see Appendix F 4).
As suggested by the discussions above, the appearance of R + is due to the explicit energy reservoir. One may thus suspect that this phenomenon would also occur in the purely classical case if explicit energy carriers are included. If so, one may wonder what property would take over the role of the unitality of the channels R ± . However, we will not consider these questions further in this investigation.

H. Energy translation invariance: A bridge to standard fluctuation relations
Let us for a moment reconsider the classical Crooks relation in equation (1). As formulated, it makes no explicit reference to any energy reservoir. Moreover, the distributions P ± are typically phrased as functions only of the work w, and thus only functions of the change of energy in the implicit reservoir (although it is difficult to see that anything in principle would prevent P ± from depending on additional parameters, like the actual energy level of the reservoir). One could even argue that for a well-designed experiment P ± should not depend on how much energy there is in the reservoir (as long as there is enough), since this in some sense is a property of the experimental equipment rather than a property of the system under study. This is in contrast with our more general formulation in terms of channels on the reservoir, which very explicitly allows for the possibility that the exact choice of initial state of the reservoir (and thus the energy) can make a difference. In order to formalize the idea that the experiment should be independent of the amount of energy in the reservoir, we do in this section assume energy translation invariance. This enables us to derive the classical Crooks relation (1) from the quantum relation (2). In this context one should note the approach in [26], where energy translation invariance plays an important role.
The technique for implementing energy translation invariance has previously been used to study work extraction and coherence [32,45]. Here we use a model where the spectrum of H E forms an equi-spaced doubly infinite energy-ladder [32] (see also the continuum version in [45]), i.e., the energy eigenstates |n correspond to energies E n = sn for some fixed number s > 0 and n ∈ Z. We impose the energy translation invariance by assuming that the unitary operators V should commute with energy translations along the energy-ladder, [V, ∆] = 0, where ∆ = n |n + 1 n|. (Technically, we also assume that the eigenvalues of H i S and H f S are multiples of s.) As a consequence, the channels F ± also become energytranslation invariant in the sense that for all j, k ∈ Z (see Appendix G). A further consequence is that the diagonal transition probabilities p ± , defined in (10), inherit the translation invariance Moreover, the translation invariance (18) conspires with the decoupling of the diagonals described in section II E such that we can rewrite F ± as F ± (ρ) = n,n ,k∈Z p ± (k|0) n|ρ|n |n + k n + k|. (20) Hence, the channels F ± are completely determined by the transition probabilities p ± (k|0) from |0 0| to the other energy eigenstates. Alternatively, one may say that the dynamics is identical along all of the diagonals (which does not imply that the different diagonals of the density matrix are identical). Our primary goal in this section is to regain (1) from (2). However, we face an immediate obstacle in that (1) very explicitly refers to 'work', while we in our constructions deliberately have avoided specifying what the quantum version of work exactly is supposed to be. A way to test Crooks theorem in a macroscopic setting would be to measure the energy content in the energy source before and after the experiment, in order to see how much energy that has been spent. This macroscopic type of two-point measurements makes sense since we can expect a macroscopic source to be in states that would not be significantly disturbed by energy measurements (e.g. in the sense of pointer states and quantum Darwinism [101][102][103]). Recalling the discussion in section II E, the decoupling of the diagonal and off-diagonal modes of coherence can be regarded as yielding a weaker form of stability. In this case all coherences are blatantly annihilated, but the evolution of the diagonal distribution is unaffected by repeated energy measurements. Since our aim is to regain the classical Crooks relation, this appears as an acceptable form of stability, and it also seems reasonable to identify work with the energy loss in the reservoir, w = E n − E m = s(n − m), for the initial measurement outcome E n and the final outcome E m . For these two-point measurements, the probability P ± (w) is obtained by summing over all possible transitions that result in the work w for the given initial state σ, and thus To be able to treat the energy reservoir as an implicit object, as it is in the standard classical case, the distributions P ± should not be functions of the initial state σ. Here the energy translation invariance comes into play. By combining (21) with (19) we find that P ± (w) = p ± (−w/s|0) = p ± (0|w/s), which thus removes the dependence on the reservoir. In the final step we combine the last equality with the diagonal Crooks relation (11) and obtain the classical Crooks relation (1).

III. CONDITIONAL FLUCTUATION THEOREMS
There are several reasons for why it is useful to generalize the type of quantum fluctuation theorems that we have considered so far. First of all, the fluctuation relation (2) and its accompanying setup is in many ways an idealization. For example, the requirement of perfect control together with energy conservation is a strong assumption that easily leads to an energy reservoir that has to have an energy spectrum that is unbounded from both above and below (see Appendix C 4) and a bottomless spectrum is certainly not very reasonable from a physical point of view. A further consequence of the idealization, which may not be apparent unless one dives into the technicalities in the appendices, is that (2) is based on rather elaborate assumptions. Apart from resolving these issues, the conditional fluctuation theorems naturally incorporate non-equilibrium initial states.
There exist previous generalizations to non-canonical initial states. See e.g. [104] for a classical case, and [18,25,81,105] for the quantum case. In the classical context of stochastic thermodynamics there are also fluctuation relations valid for arbitrary initial distributions [106,107]. Another example is the classical notion of extended fluctuation relations (EFRs) [108][109][110][111][112][113], typically based on metastable states, or partial equilibrium conditions (akin to the conditional equilibrium states discussed in Appendix A 3). In contrast, the conditional fluctuation relation that we consider here allows for arbitrary non-equilibrium initial quantum states. In section VII H we consider a quantum generalization of the classical EFRs.
To see how the conditional fluctuation relations can come about, let us again consider the perfect control mechanism, i.e., that the evolution transforms the initial control state into the final with certainty. Imagine now that we abandon this assumption, and instead include a measurement device that checks whether the control system succeeds in reaching the final control state or not. The idea is that we only accept the particular run of the experiment if the control measurement is successful. Analogous to our previous fluctuation relations, the conditional fluctuation theorem relates the induced dynamics of the forward and reverse processes, but which now are conditioned on successful control measurements (see Fig. 5).
It is useful to keep in mind that one should be cautious when interpreting post-selected dynamics, as it easily can end up in seemingly spectacular results. The conditional dynamics can for example create states with off-diagonal elements from globally diagonal states (see Appendix H 7 b for an explicit example). However, this should not be viewed as a mysterious creation of coherence, but simply as the result of a post selection with respect to a non-diagonal measurement operator.
In the introduction it was pointed out that an advantage with fluctuation theorem (2) is that it does not rely on any auxiliary measurements. It may thus appear a bit contradictory that we here re-introduce measurements as a fundamental component in the formalism. However, these only serve as control measurements upon which we condition the quantum evolution in the energy reservoir. This is in contrast to approaches where the purpose of the measurements is to generate classical outcomes (as for two-point energy measurements [8,[11][12][13][14][15][16][17][18][19][20][21][22][23][24][25]) and where the quantum fluctuation relations are based on the resulting probability distributions, much in the spirit of classical fluctuation relations.
As a final general remark one should note that it turns out to be unnecessary to restrict the control measurements to the control system; we can let them act on the joint systemS = S C = SBC in any manner that we wish, resulting in a conditional evolution on E.

A. The Gibbs map and the partition map
Each control measurement has the two possible outcomes 'yes' or 'no', and can be described via measurement operators 0 ≤ Q ≤1, where Tr(Qρ) is the probability of a 'yes' when measured on a state ρ. Similarly Tr[(1 − Q)ρ] is the probability of the outcome 'no'. In other words, {Q,1 − Q} is a binary positive operator valued measure (POVM) [46,114,115]. These operators serve a dual purpose in our formalism; not only describing control measurements, but also parameterizing initial FIG. 5: Conditional fluctuation theorems. Similar to our previous fluctuation theorems we here relate the dynamics induced on the energy reservoir E by the forward and reverse process, but conditioned on successful control measurements on S = SBC. The forward process is characterized by a pair of positive semi-definite operators Q i+ S , Q f + S on S, such that the initial state is given via the Gibbs map G βH S (Q i+ S ), and the control measurement is represented by Q f + S . More precisely, Q f + S corresponds to the 'successful' outcome in the POVM {Q f + S ,1 S −Q f + S }, and results in the induced CPMF+ on the reservoir. One should keep in mind that the mapping Q i+ S → G βH S (Q i+ S ) only serves as a convenient description of the initial state, and should not be interpreted as representing a particular physical process, or measurement. The reverse process, resulting in the CPMF−, is correspondingly characterized by the pair is the initial state, and Q i− S gives the control measurement. The CPMsF± are related via the conditional fluctuation theorem in (26). We are free to choose the operators Q i+ S , Q f + S in any way we wish, and in the finite-dimensional case we can obtain arbitrary initial states. Hence, we are not restricted to initial equilibrium states. The price that we pay for this additional freedom is that non-equilibrium initial states are translated to non-trivial control measurements in the reverse process.
states. The latter is done via what we here refer to as the 'Gibbs map' G βH and the 'partition map' Z βH defined by For finite-dimensional Hilbert spaces all density operators can be reached via G βH for suitable choices of Q. These mappings are generalizations of the Gibbs state and the partition function in the sense that G βH (1) = G(H) and Z βH (1) = Z(H).

B. A conditional fluctuation relation
As before, we assume a global non-interacting Hamiltonian of the form We furthermore assume time-reversals T S and T E such that T S (H S ) = H S , and T E (H E ) = H E . We also assume that the global evolution V preserves energy [V, H] = 0, and that it is time-reversal symmetric, T (V ) = V , with respect to T = T S ⊗ T E . The forward process is characterized by a pair of positive semi-definite operators Q i+ S , Q f + S on system S. The operator Q f + S characterizes a measurement at the end of the process (and it does not have to be related to energy measurements). The operator Q i+ S has the rather different role of characterizing the initial state ρ i+ S via the Gibbs map, such that ρ i+ S = G βH S (Q i+ S ). One should note that the initial state ρ i+ S can be prepared in any manner that we wish. The Gibbs map is only used as a convenient method to describe the initial state, and is not intended to imply any particular choice of preparation procedure. For example, one should not be tempted to interpret G βH S (Q i+ S ) as necessarily involving a measurement of Q i+ S . Even though Q i+ S , Q f + S do not always represent measurements, we will nevertheless for the sake of convenience refer to them as 'measurement operators' (simply meaning that they satisfy 0 ≤ Q ≤1).
The global initial state ρ i+ S ⊗ σ evolves via an energypreserving unitary operation V , and we condition the result on a successful measurement of Q f + S . The resulting completely positive map (CPM) on E is given bỹ That we generically get a CPM rather than a channel corresponds to the fact that the control measurement may fail. The quantity TrF + (σ) is the probability that the control measurement succeeds.
To obtain the reversed process we define the operators , and use Q f − S to generate the initial state, and Q i− S to characterize the final measurement. In other words, we not only timereverse the measurement operators, but also swap their roles. The resulting CPM on E for the reversed process thus becomes Hence, for the reverse process we do again have a single control measurement at the end of the process, but now characterized by Q i− S . With the above assumptions one can show (see Appendix H) that the CPMsF ± are related by the following 'conditional' fluctuation theorem where we use the notation Z βH S (Q i S ) = Z βH S (Q i± S ) and The conditional fluctuation relation (26) allows (up to infinite-dimensional technicalities) for arbitrary initial states on S, and thus in particular arbitrary coherences. We only need to choose the appropriate initial operator Q i+ S that generates the desired initial state via the Gibbs map.
The quantum fluctuation relation in (2) can be regained from (26), and as a first step we choose the measurement operators to be Q i± For the appropriate Hamiltonian H S , the Gibbs map gives the conditional equi- Due to the additional assumption of perfect control, the evolution V is such that we can replace the final measurement operators with identity operators, i.e., we do not have to perform any measurements at the end of the processes.
This sketchy re-derivation indicates that we can abolish the assumption of perfect control if we instead keep the measurements at the end of the protocol. Hence, these control measurements may fail, e.g., if the energy reservoir does not contain sufficient energy, which thus allows us to avoid an energy spectrum that is unbounded from below. (For an explicit example, see Appendix H 7 a.) For the conditional mapsF ± there is in general no decomposition of the dynamics into different diagonals. However, in the special case that Q i+ S and Q f + S are diagonal with respect to an eigenbasis of H S one can regain the decomposition of the dynamics (see Appendix H 6). In particular, one can additionally impose the energy translation invariance and obtain a conditional version of the classical Crooks relation (Appendix H 6).

IV. AN ALTERNATIVE FORMULATION
So far we have formulated our fluctuation relations solely in terms of channels and CPMs induced on the energy reservoir. Here we consider a reformulation that highlights two elementary properties on which our fluctuation relations in some sense are based.
Given some channel or CPM F, a pair of measurement operators Q i and Q f , and a Hamiltonian H, we define the 'transition probability' from Q i to Q f by Hence, P F βH [Q i → Q f ] is the probability that we would detect Q i after we have evolved the initial state G βH (Q i ) under the map F. The Gibbs map thus again appears as a method to parametrize the set of initial states.
The quantum Crooks relation (2) can be rephrased in terms of these transition probabilities as where Q i+ E , Q f + E are measurement operators on the energy reservoir (not on S), and where, as one may expect, . In section II D we noted the possibility to interpret the quantum Crooks theorem (2) in terms of process tomography of the two induced channels F ± . In that interpretation the mapping F − → J βH E F − J −1 βH E is something that we implement 'by hand' on the experimentally determined description of the channel F − . The reformulation (28) suggests a different interpretation where the fluctuation relation can be tested more directly via the estimated transition probabilities. The mapping J βH E (as well as the time-reversal T and the conjugate * contained in ) is in some sense put in by hand also in this scenario, but enters in the parametrization of the initial states via the Gibbs map, rather than via a post processing of the measurement data.
The interpretation of the quantum Crooks theorem (2), or conditional fluctuation theorem (26), in terms of process tomography may suggest rather extensive experimental procedures, since the number of measurement settings required to perform such a tomography increases rapidly with the size of the involved systems. (We need sufficiently many initial states and final observables in order to span the input and output spaces of F ± orF ± . See e.g. Sec. 8.4.2 in [67].) However, the reformulation (28) suggests milder tests, where we only make one single choice of initial state and final measurement for the forward and reverse process. The estimation of free energy differences, discussed in section VII H, is an example.
It is no coincidence that the measurement operators Q i± E , Q f ± E undergo the same transformations as the operators Q i± S , Q f ± S that we know from the conditional fluctuation relations. These similarities stem from the fact that all of our fluctuation relations can be regarded as special cases of a 'global' fluctuation relation, defined for global measurement operators Q i+ , Q f + on the whole of SBCE. It is straightforward to confirm (or to consult Appendix I) that energy conservation [H, V ] = 0 combined with time reversal symmetry T (H) = H, The global relation (29) can alternatively be phrased as the invariance of the quantity Tr All our fluctuation relations do in some sense express this basic invariance in different guises.
One can indeed re-derive (2) and (26) from (29). However, when doing so one quickly realizes that this hinges on another property (that we have used repeatedly without comment). Namely, if the global Hamiltonian H is non-interacting over two subsystems, i.e. H = H 1 ⊗1 2 +1 1 ⊗ H 2 , then the mapping J satisfies the factorization property Although elementary, it is in some sense this property (in conjunction with product time-reversals T = T 1 ⊗ T 2 ) that makes it possible to formulate fluctuation relations solely in terms of the dynamics of the energy reservoir, and also to eliminate unaccessible degrees of freedom (see Appendix I for further details). The central role of this property may become more apparent when we abandon it in section VI . As a side-remark one can note that if one attempts to formulate quantum fluctuation relations for nonexponential forms of generalized equilibrium distributions, then the lack of a factorization property for nonexponential functions makes the generalization problematic (see Appendix I 4).

V. CORRELATED INITIAL STATES
The conditional relations extend the notion of fluctuation theorems to non-equilibrium initials states on S. An obvious question is if also entanglement and general precorrelations can be included. (One could even argue that in order to deserve the label 'fully quantum' our fluctuation relations must include quantum correlations.) The global fluctuation relation (29) already provides an affirmative answer to this question, in the sense that we can generate arbitrary global initial states via suitable choices of measurement operators (including quantum correlations to external reference systems). However, (29) is not the only option for how to describe such scenarios, and here we highlight three special cases that focus on descriptions via channels or CPMs.

A. Correlations between E and an external reference
Imagine that the energy reservoir not only carries energy and coherences, but also carries entanglement and correlations with an external reference R (not included in SBCE). One option for obtaining a fluctuation relation that incorporates this scenario would be to regard ER as a new extended energy reservoir, with a Hamiltonian H ER and a new time-reversal T ER , with T ER (H ER ) = H ER . Both the quantum fluctuation relation (2) and the conditional fluctuation relation (26) are applicable to this scenario. In the latter case, the induced CPMs F ± on the new energy reservoir ER satisfies the corresponding quantum Crooks relation

B. Correlations between S and an external reference
An obvious alternative to the energy reservoir carrying correlations with an external reference is that S carries these correlations. We can analogously incorporate R into S, with the joint Hamiltonian H SR and an extended time-reversal T SR such that T SR (H SR ) = H SR . The requirements for the conditional fluctuation theorem (26) are satisfied for this extended system, thus resulting in the relation The two previous examples can both be regarded as variations of the conditional fluctuation relation, and in this sense do not add anything essentially new to the general picture. A maybe more interesting case is if we allow for pre-correlations between S and E. (It is not difficult to imagine cases where the energy reservoir E interacts repeatedly with S, and thus may build up correlations.) Apart from the global fluctuation relation (29) this case does not fit very well with our previous scenarios. However, it is straightforward to adapt our general formalism to find a fluctuation relation for the evolution on the joint system SE.
For the sake of illustration we consider one particular case related to the setup in section II D, but where we allow for initial correlations between S and E. In essence (for details on the setup, see Appendix J) we have an initial Hamiltonian H i SE and a final Hamiltonian H f SE and assume perfect control that transfers one into the other, resulting in the induced channels on the combined system SE. For these channels one can derive the fluctuation relation The partition maps on the left and right hand side cancel due to the identical initial and final Hamiltonian for the heat bath, which starts in the Gibbs state. Note also that the two applications of the J -map may potentially involve an initial Hamiltonian H i SE that is different from the final Hamiltonian H f SE .

VI. APPROXIMATE FLUCTUATION RELATIONS
The global Hamiltonian H has so far in this investigation only characterized the notion of energy conservation, while the dynamics has been modeled by a unitary operator V , with the only restriction that H and V should commute. In view of standard textbook quantum mechanics it would be very reasonable to demand a much more tight connection, where the global Hamiltonian H induces the evolution according to Schrödinger's equation, thus yielding V = e −itH/ . An additional benefit with the latter arrangement would be that it does not require any further interventions beyond the preparation of the initial state, the measurement of the final state, and the time-keeping for when to do the measurement. In other words, once we have started the global system it evolves autonomously. (For discussions on autonomous and clock controlled thermal machines in the quantum regime, see [116,117].) This should be compared with the models that we have employed so far, where one in principle should analyze the mechanism that implements the evolution V .
The problem is that if we would impose the condition V = e −itH/ for non-interacting Hamiltonians as in (23), the resulting dynamics on the energy reservoir would become trivial. If we on the other hand would abandon the non-interacting Hamiltonians, then we also have to abandon the factorization property (30), which, as pointed out in section IV, plays an important role in our derivations. The main observation in this section is that we can obtain approximate fluctuation relations as long as the factorization holds approximately, which also is enough to obtain a non-trivial evolution. In the following section we shall illustrate the general ideas with two special cases. (For a more general version that includes both of them, see Appendix K.)

A. Approximate conditional fluctuation relations
There is an additional reason for why it is useful to go beyond our previous settings. Namely that there exist rather evident ways to 'quantize' the classical control mechanism in Crooks relation that do not fit particularly well within the machinery that we have employed so far. These quantized control mechanisms moreover provide a good starting point for introducing approximate fluctuation relations.
Imagine a particle whose position x determines the parameter in the family of Hamiltonians H S E (x). More precisely, assume a joint Hamiltonian of the form where M C is the mass, andX C ,P C are the canonical position and momentum operators of the control particle. If the control particle is reasonably well localized in both space and momentum, then one can imagine that its propagation approximately implements the evolving control parameter x in the family of Hamiltonians H S E (x). For the sake of simplicity, let us assume that the control particle only affects the other systems in an 'interaction FIG. 6: A control particle. One way to 'quantize' the control parameter x of the classical Crooks relation would be to regard it as the position of a quantum particle. The propagation of the particle would approximately implement the time dependent Hamiltonian for suitable wave packets. A particularly clean example is obtained if E and S only interact when the control particle is in an 'interaction region' [xi, x f ] (cf. the construction in [116]). Since the global Hamiltonian contains interactions between E and S it does not fit with our previous classes of models, and in particular, it does not satisfy the factorization property (30). However, for suitable choices of measurement operators Q i+ C and Q f + C that are localized outside the interaction region, the systems becomes approximately non-interacting, and the factorization property (30) is approximately satisfied. This makes it possible to derive an approximate conditional fluctuation relation on the energy reservoir.
region' (see Fig. 6) corresponding to an interval [x i , x f ], while outside of this region it is the case that Although the systems thus are non-interacting outside the interaction region [x i , x f ] one should keep in mind that the kinetic energy termK =P 2 C /(2M C ) in (32) does not commute with X C , and thus prohibits a factorization as in (30). In some sense it is thus the kinetic operator K that causes the failure of the factorization property. On the other hand, it is also the kinetic operator that yields a non-trivial evolution of the control mechanism. It is this tension that we strive to handle via the approximate fluctuation relations. The basic idea is that if the measurement operators Q i+ C and Q f + C are well localized outside the interaction region, then the systems are approximately non-interacting, and consequently the factorization (30) should hold approximately. It is worth keeping in mind that even if the measurement operators are well localized in non-interacting regions, this does not exclude the possibility that the system evolves into states where the interactions are strong, even at the very moment of the control measurement. (For an explicit example, see Fig. 14 Although the special case of the control particle provides intuition, the more general setting of the conditional fluctuation theorems yields a more concise description.
For time-reversal symmetric systems one can show that this leads to the approximate fluctuation relation This can be turned into a quantitative statement where the size of the error in (35) is bounded by the errors in (34), see Appendix K 2.
B. Joint control system and energy reservoir Compared to the control particle in Fig. 6 there exists an even simpler setup where the control particle simultaneously serves as the energy reservoir (see Fig. 7). This corresponds to the global Hamiltonian again with an interaction region with a non-trivial dependence on x inside [x i , x f ]. As opposed to the previous setting, we here would have to perform the control measurement on the energy reservoir itself. This situation is conveniently described in terms of the transition probabilities discussed in section IV, resulting in the approximate fluctuation relation where for the particular choice of Hamiltonian (36) we . This approximate relation can also be made quantitative, see Appendix K 3. For a numerical evaluation of the errors in a concrete model, see Appendix K 3 c.

VII. FULLY QUANTUM FLUCTUATION RELATIONS FOR MARKOVIAN MASTER EQUATIONS
We have step by step extended the range of applicability of the fully quantum fluctuation relations, away from the idealized setting of (2), towards the purely Hamiltonian evolution in section VI. The general approach may  Fig. 6 is a particle that simultaneously serves as both control system and energy reservoir. Hence, it is the kinetic energy of the control particle that drives the non-equilibrium process (if the other systems would start in equilibrium). This is another example of a system that would generally not satisfy the factorization property (30), but for measurement operators Q i+ CE and Q f + CE that are localized outside the interaction region, the systems become approximately non-interacting. For this setup one can obtain an approximate fluctuation relation in terms of the transition probabilities introduced in section IV.
nevertheless appear abstract and rather remote from the standard machinery of open quantum systems. Here we aim to include a fundamental component in the toolbox of the latter, namely master equations [118], which opens up for the application of a range of modelling techniques. As such, this extension aligns with recent efforts to bridge resource theoretic approaches to quantum thermodynamics with the master equation formalism [87].
So far we have explicitly included all degrees of freedom that have some role to play, including the heat bath, which allows us to keep track of the evolution of all resources, and in particular coherences. Here we turn to the question of effective models where the heat bath is only included implicitly via master equations. Under suitable conditions, the notion of fully quantum fluctuation relations can be extended to this setting. Apart from providing a bridge to standard notions of open systems theory, an additional advantage of this generalization is that it avoids the rather extensive models that the 'all inclusive' approach yields for realistic heat baths. Although the latter is no issue for the type of purely theoretical questions that we have focused on so far, it can be problematic, e.g., for numerical assessments of how good the approximations in the approximate fluctuation relations are.
One should note previous approaches to fluctuation relations for master equations [119][120][121][122][123], including unravellings and quantum jump methods [124,125], and Brownian motion models [126]. Like for the previous sections, a prominent difference is that we here explicitly focus on the system that delivers the energy, and the changes that the thermal process induces on this energy reservoir. Since we aim at removing the heat bath B from the explicit description, we first consider the fluctuation relation obtained on the remaining systems SCE. One should note that this setting, and the corresponding fluctuation relation (40), is closely related to a fluctuation relation obtained in [26], with the difference that we here include time-reversals.
We assume that the heat bath is non-interacting with respect to the rest of the systems, Much in line with our previous derivations, one finds that In other words, (40) is the fluctuation relation that would be satisfied on the joint system SCE, assuming an energy conserving time-reversal symmetric dynamics. Due to the energy conserving dynamics with an equilibrium heat bath, the channels (39) belong to the class of thermal operations [27-30, 35, 127-133], although we here additionally require the time-reversal symmetric implementation described above. In the following we refer to this as 'time-reversal symmetric thermal operations'. As one might expect, time-reversal symmetric thermal operations form a proper subset to the set of thermal operations (see Appendix L 1).
B. Yet another extension: Assuming a global fluctuation relation In the previous section we found that a time-reversal symmetric energy conserving dynamics with a thermal heat bath leads to the fluctuation relation (40). In the following we shall consider a generalization where we turn things around and instead assume that the dynamics on SCE is such that it satisfies the relation (40). Hence, we enlarge the set of channels that we allow for, beyond the set of time-reversal symmetric thermal operations. (It is indeed an extension, see Appendix L 1.) It turns out that many (but not all) of the results of the previous sections can be regained for any channel F on SCE that satisfies (40), for some Hermitian operator H SCE and time-reversal T SCE such that T SCE (H SCE ) = H SCE .
In particular, with this extended assumption as starting point, and assuming a non-interacting Hamiltonian H SCE = H SC ⊗1 E +1 SC ⊗ H E , and T SCE = T SC ⊗ T E with T SC (H SC ) = H SC and T E (H E ) = H E , we can rederive the conditional fluctuation relations in section III (see Appendix L 2). In other words, holds for the CPMs Alternatively one can use the formulation in terms of transition the probabilities in section IV In the spirit of section VI, one can also obtain approximate versions of these fluctuation relations, with error bounds (see Appendix L 3).

C. A condition on generators
The primary reason for why we consider the extension provided by (40) is that it can be translated to a convenient condition on the generators of Markovian master equations. Here we consider master equations d dt F t = LF t with F 0 = I, where the generator L is timeindependent, and can be written on the Lindblad form where H is a Hermitian operator and L k are general operators, which guarantee trace preservation and complete positivity of the solution F t [134,135]. If we assume that the generator L satisfies for some Hermitian H SCE and some time-reversal T SCE , then it follows that the solution F t = e tL satisfies (40) for each time t ≥ 0. (See Appendix M 1 for some examples of generators that satisfy the type of condition in (45).) Consequently, (45) guarantees that we can apply the observations in the previous section. Hence, in the non-interacting case, the conditional evolution on system E satisfies the conditional fluctuation relation (41), or equivalently the global evolution satisfies (43). In other words, under the condition that the generator of the Markovian evolution satisfies (45), we regain the results from sections III and IV, and moreover one can also regain the notion of approximate fluctuation relations of section VI.
The relation (45) is, up to the application of timereversals, similar to quantum detailed balance for master equations (see e.g. Definition 2 in [136]). In Appendix M 1 a we consider a simple model of thermalization, where the generator satisfies (45) if the transition rates of the diagonal elements of the density matrix satisfy classical detailed balance.

D. Constructing generators
When constructing models we may need to combine different components, e.g., a generator that models thermal relaxation of the system, and another that affects the energy reservoir, as well as some interaction between the two. In order to apply our machinery, we need to know that the total generator satisfies (45). It turns out that one indeed can construct such generators in a systematic manner.
Suppose that we have two different subsystems with generators L 1 and L 2 . Moreover, suppose that L 1 J βH1 = J βH1 L 1 and L 2 J βH2 = J βH2 L 2 with respect to some Hermitian operator H 1 and H 2 , respectively. The generator L 1 ⊗I 2 +I 1 ⊗L 2 corresponds to an independent evolution of the two systems. However, let us assume that there additionally is an interaction Hamiltonian H int , with corresponding generator L int (ρ) = − i [H int , ρ]. If [H int , H 1 ⊗1 2 +1 1 ⊗ H 2 ] = 0, then it turns out that L = L 1 ⊗ I 2 + I 1 ⊗ L 2 + L int satisfies (45) with respect to H SCE = H 1 ⊗1 2 +1 1 ⊗ H 2 (see Appendix M 2 for details). In other words, we can use suitable interaction Hamiltonians in order to 'glue' local generators in such a way that the result satisfies (45). We make use of this technique for the examples in sections VII G, VII H, and VII I.

E. Decoupling again
A property that is no longer guaranteed to be true when allowing for all generators that satisfy (45) is the decomposition of the fluctuation relation into modes of coherence that was discussed in section II E and in Appendix H 6. However, if the generator L in addition is time-translation symmetric [87], then the decomposition is regained (see Appendix M 3). Moreover, analogous to the gluing of generators that satisfy (45), one can combine generators that satisfy time-translation symmetry. We will apply these observations in section VII I. The condition (40) for channels on SCE, and (45) for generators, have the advantage that they increase the range of applicability of the fully quantum fluctuation theorems. However, a drawback is that it is unclear what these conditions implicitly assume concerning the global initial state, as well as the evolution, on the complete system SCEB. Consequently, it is also unclear what these conditions imply concerning the requirements for initial resources and their evolution. Although clarifying such implications could be a subject of future studies, an alternative approach for gaining better control would be to instead impose stricter conditions than (45). In view of section VII A, a reasonable requirement would be that the generators induce time-reversal symmetric thermal operations, i.e., that e tL is a time-reversal symmetric thermal operation for each t ≥ 0. Although one indeed can find such generators (see Appendix M 4) it appears more tractable to drop the requirement of time-reversal symmetry, and only require generators of thermal operations (see Appendix M 4). Analogous to the gluing of generators that satisfy (45), described in section VII D, it turns out that one also can glue generators of thermal operations (see Appendix M 4). One can apply these concepts to the model in the next section.

G. Two coupled thermalizing spins
As an illustration of the concepts introduced in the previous sections we here consider a model consisting of two two-level system, e.g., two resonantly coupled spins, where one spin acts as the energy reservoir of the other. More precisely, the spins have the Hamiltonians H 1 = 1 2 Eσ z1 and H 2 = 1 2 Eσ z2 . We let T 1 and T 2 be the transposes in the eigenbasis of σ z1 and σ z2 , respectively. The spins are furthermore affected by a heat bath, and on each separate spin we assume that the resulting open system evolution is obtained via the generators The master equation corresponding to each of these generators drives the systems toward the Gibbs states G β (H 1 ) and G β (H 2 ), respectively. (For further details on this example, see Appendix M 5.) Moreover, it can be shown (see Appendix M 1 a) that each of these generators separately satisfies (45) with respect to H 1 and H 2 , respectively. Let us now further assume that the spins interact via the Hamiltonian H int = λ|01 10| + λ|10 01| (where |0 and |1 are the eigenstates of σ z ). By construction, H int commutes with H 1 ⊗1 2 +1 1 ⊗ H 2 , and by the technique outlined in section VII D, it follows that L = L 1 ⊗ I 2 + I 1 ⊗ L 2 + L int satisfies (45) with respect to Consequently, the reduced conditional dynamics (42) on one of the spins satisfy the conditional fluctuation relation (41). It turns out that the two generators in (46) are generators of thermal operations. Moreover, the interaction is such that the gluing mentioned in the previous section is applicable (see Appendix M 5 for details). Hence, the generator L not only satisfies (45), but is in addition a generator of thermal operations.
As an additional example we do in Appendix M 6 consider a system of two weakly coupled spins affected by a global thermalization. This system satisfies the approximate fluctuation relation developed in Appendix L 3. In Appendix M 7 we also discuss the prospects of finding more widely applicable approximate fluctuation relations.
Free energy differences are traditionally measured via quasi-static changes of external parameters, in which case we can identify the resulting work cost with the change of free energy. A prominent feature of classical fluctuation relations is that they offer alternative means to determine free energy differences for arbitrary driving forces [1][2][3][4][5][6]. That our quantum fluctuation relations also can be used for this purpose may have been slightly obscured by the fact that we phrase our relations in terms of partition functions rather than free energies. However, since the (equilibrium) free energy F (H) is related to the partition function via F (H) = −kT ln Z(H), it follows that the change of free energy directly corresponds to the quotient of partition functions via By inspection one can realize that the quantum Crooks relation (2), as well as the quantum Jarzynski equality (14), in principle could be used to determine Z(H f )/Z(H i ), and thus the free energy difference, although as discussed in previous sections, the assumptions behind these relations are rather idealized. (For a discussion on how one can determine approximate free energy differences via the approximate fluctuation relations, see Appendix K 3 d.) However, the approach via master equations also allows us to determine these quantities, and as an application we here consider a variation on this theme, where we in addition take the opportunity to generalize the classical notion of extended fluctuation relations [108][109][110][111][112][113] to the quantum regime.
Extended fluctuation relations describe the transitions between meta-stable regions of configuration space, where we can associate a free energy to each such region [108][109][110][111][112][113]. By application of external forces, the system can be pushed between these meta-stable regions, and Within each such collection there is a fast thermalization process, while there is a slow global thermalization. An external energy reservoir E, in the form of a single two-level system, is in resonance with the transition between the global ground state |0 in basin D0 and the local ground state |n * in basin D1. The energy reservoir acts as the counterpart to the external control in the classical EFRs. The transition probability P + (red solid curve) of the forward process, and the transition probability P − (blue solid curve) of the reverse process, as defined by (48), are plotted as functions of time, here expressed in a unit-free manner via t/(β ). The forward process is defined by . The transition probabilities P + and P − can be estimated by repeated experiments, and determine, via (47), the quotient Z1/Z0 of the partition functions Z0 and Z1 of D0 and D1, respectively, and thus also the desired free energy difference. The dotted lines correspond to the transition probabilities in the limit of infinite evolution times, where the system has reached the fixpoint of the master equation.
by recording the work cost, the EFRs can be used to determine the free energy difference. An example is the unfolding and refolding of DNA-strings by optical tweezers [110].
To mimic the classical setup of meta-stable configurations we partition the eigenstates of the Hamiltonian H SC into groups of states. One such collection, D 0 , contains the ground state, and D 1 is the desired collection of target states, with the corresponding projectors P 0 and P 1 . The set D 2 consists of all the remaining states. We wish to determine the quotient between the partition functions Z 0 = Z βH SC (P 0 ) and Z 1 = Z βH SC (P 1 ), and thus the free energy difference.
We model the evolution via a Markovian master equation where the generator L contains components that causes a fast thermalization within the groups of states, as well as a slow global thermalization, thus representing the meta-stability. We include an energy reservoir in the form of a single two-level system, and a resonant inter-action that induces transitions between the ground state and the 'local ground state' in the desired target basin. See Fig. 8 for a schematic illustration. The details of the model can be found in Appendix M 8, where the main observation is that the global generator satisfies (45), and thus all the induced channels F t satisfy (43).
The fluctuation relation (43) can be rewritten as where the transition probabilities are and F t = e tL are the induced channels. Hence, in order to determine the desired quotient Z 1 /Z 0 we have to repeat the forward experiment to estimate the transition probability P + , as well as the reverse experiment to estimate P − . As long as we know the values of (47). Another way to phrase (47) is to say that P + and P − are proportional for all times (cf. the red and blue curve in Fig. 8), and that this proportionality can be used determine the desired quotient.
We are in principle free to choose at which time to evaluate the transition probabilities, as well as the initial state and control measurements on the energy reservoir. However, some choices may result in low transition probabilities, e.g., if the initial state does not contain sufficient of energy to reach the desired excited basin D 1 . Keeping this observation in mind, we do for the calculation of Fig. 8 In other words, for the forward process, when the system starts in the conditional equilibrium of the ground state basin D 0 , we let the energy reservoir start in the excited state |1 . By this arrangement we compensate for the low initial energy in the system, with a high initial energy in the energy reservoir. For the reverse process this translates to the energy reservoir initially being in its equilibrium state, and the process being conditioned on the energy reservoir at the end being found in the excited state. However, in this case the system is initially in the excited basin D 1 , and we only wish to reach the ground state basin D 0 . One may thus expect that this arrangement could result in reasonable transition probabilities, which also is confirmed by Fig. 8, where both the forward and reverse process yield transient transition probabilities that reach beyond their long term limits.
One may observe the correspondence with the classical scenario. There we also need some method to detect the transitions between the two relevant basins, as well as some means to keep track of the work implicitly provided by the external controls. Moreover, without the work input from the external control, we would have to wait passively to observe fortuitous thermal fluctuations that result in transitions between the two desired basins.
The red dots represent the non-zero matrix elements of the density operator |ψ ψ| with respect to the number basis. The conditional evolutionF+ on the energy reservoir, defined in (42), is calculated for the evolution time t/(β ) = 1.5, and the dark colors correspond to the values | n|F+(|ψ ψ|)|n |. The upper left corner, n = n = 0, corresponds the probability to find the oscillator in the ground state, and the main diagonal n = n the probabilities for the excited states. The off-diagonal elements, n = n , represent the coherences between the energy eigenstates. One can recognize the leakage of energy out of the oscillator, as well as the decay of coherence. It is also clearly visible how each initial off-diagonal element only evolves and spreads along the particular diagonal that it belongs to, thus illustrating the decoupling of the modes of coherence.

I. Jaynes-Cummings with dissipation: Fluctuation relations for coherences
Here we illustrate the conditional fluctuation theorem (41), with focus on the decoupling into modes of coherence, and the fluctuation relations for coherences.
The Jaynes-Cummings (JC) model [137,138] of twolevel systems interacting with harmonic oscillators is a common approach to study atom-field interactions. This can be further generalized to master equations, including various open system effects, such as dissipation and decoherence. Such types of models have been considered, e.g. for superconducting qubits interacting with field modes [139][140][141], electron spins coupled to nano-mechanical vibrations [142,143], and a nano-mechanical oscillator interacting with a Cooper pair box [144]. Here we consider a particular case of this general class of models, where we let a single field mode serve as the energy reservoir, and where this interacts with a single two-level system, which in turn is affected by thermalization and decoherence.
We let the Hamiltonian of the two-level system be H SC = 1 2 Eσ z = − 1 2 E|0 0| + 1 2 E|1 1|, and let the Hamiltonian of the energy reservoir be H E = Ea † a, with E > 0. We also include an interaction Hamiltonian of the form The two latter Hamiltonians correspond to the genera- We choose the time-reversal T SC as the transpose with respect to the eigenbasis {|0 , |1 } of H SC , and T E is the transpose with respect to the number basis of the harmonic oscillator.
The two-level system is furthermore affected by an environment, which we model via the generator where σ + = |1 0| and σ − = |0 1|. The first line in (49) corresponds to the Hamiltonian evolution on the spin, while the next three lines model thermalization with rate r > 0 (see Appendices M 1 a and M 4 b), and the last line corresponds to an additional decoherence of rate κ > 0 with respect to the energy eigenbasis (Appendix M 1 b). The total generator is L = L SC ⊗ I E + I SC ⊗ L E + L int . For the particular case illustrated in figures 9 and 10 we choose the parameters such that βE = 1, rβ = 1, κβ = 0.1, λβ = 1. One can show (see Appendix M 9) that L satisfies (45) with respect to H SC ⊗1 E +1 SC ⊗ H E , and thus the reduced conditional dynamics on the energy reservoir satisfies the conditional fluctuation relation (41). Moreover, the generator L satisfies the time-translation symmetry mentioned in section VII E, and thusF ± are decoupled into modes of coherence, if Q i± SC and Q f ± SC commute with H SC (see Appendix M 9). This is illustrated in Fig. 9, where we choose Q i+ SC = |0 0| and Q f + SC = 0.05|0 0| + |1 1|. (The term 0.05|0 0| is only there in order to avoid that the red and blue curves in Fig. 10

overlap.)
Analogous to what we found in section II E (and Appendix D) each mode of coherence obeys a fluctuation relation of its own, implied by the general conditional fluctuation relation. Let us now zoom in, so to speak, to a very detailed view of how (41) constrains the dynamics of the coherences. We select two elements along a displaced diagonal, corresponding to |e 0 e 0 + d| and |e 0 +δ e 0 +δ +d|. In other words, we select two elements  (50) relates the evolution of the coherences carried by two off-diagonal elements along a displaced diagonal. The plot on the right displays |q+| (red curve) and |q−| (blue curve) plotted as functions of time. The plot on the left depicts the trajectories that q+ (red curve) and q− (blue curve) sweep in the complex plane during the same time interval. As predicted by (50), |q+| and |q−| are proportional to each other, and the phase factors of q+ and q− are identical. Analogous to how the classical Crooks relation relates the probability distribution of the work, and thus the change of energy in the reservoir, of the forward and reverse processes, the off-diagonal Crooks relation relates the changes of coherence.
along the diagonal with offset d, which are separated by the energy difference δ. The relation (41) yields In other words, q ± are the 'amplitudes' for the transitions between the elements along the displaced diagonal. Equation (50) predicts that these, generally complex, amplitudes are strictly related for all times, as is illustrated in Fig. 10, where we have chosen e 0 = 20, d = 3, and δ = −1. Hence, q + = 19|F + (|20 23|)|22 and q − = 20|F − (|19 22|)|23 . It should be emphasized that neither does |20 23| correspond to a proper state, nor does |22 19| correspond to a POVM element. Nevertheless, q + can be determined via a sufficient number of expectation values measured on the output, for a sufficiently large collection of different input states (see a similar discussion in Appendix D 3).
It may be worth noting that the relation (50) remains valid even in the case when there is no decoupling between the diagonals. The effect of the decoupling is rather to turn 'cross-mode relations' trivial. We discuss this further in Appendix M 9.

VIII. CONCLUSIONS AND OUTLOOK
We have generalized Crooks fluctuation theorem to a genuine quantum regime that incorporates the full quantum dynamics. This leads to a decomposition into diagonal and off-diagonal Crook's relations, one for each mode of coherence. We have also derived Jarzynski equalities, and re-derived standard bounds on the average work cost under an additional assumption of unitality of a certain induced channel. We have furthermore shown that the classical Crooks relation can be regained under the additional assumption of energy translation invariant dynamics on the energy reservoir. The general approach moreover leads to the concept of conditional fluctuation relations, where a pair of measurement operators characterizes the initial state and the final measurement, and where the transformation from the forward to the reverse process corresponds to a transformation of the pair of measurement operators. This generalization allows for non-equilibrium initial states, and can also be extended to include correlations. We have demonstrated that by allowing for errors in the fluctuation relation, we can incorporate the 'natural' setting where the global dynamics is determined by a single time-independent Hamiltonian. Finally, we have shown that the notion of fully quantum fluctuation theorems can be extended to master equations that implicitly model the influence of the heat bath.
Although we in this investigation have regained both the standard Crooks and Jarzynski relations, it would nevertheless be useful to obtain connections between the formalism of this investigation and the multitude of established quantum fluctuation relations (see e.g. the overviews in [8][9][10]).
For the fluctuation relations for master equations we have here focused entirely on the time-independent Markovian case. It seems likely that the approach could be generalized to time-dependent generators, and it would be interesting to consider the extension to non-Markovian master equations. One may also speculate if it would be possible to use the global Hamiltonian of the approximate fluctuation relations as a starting point to obtain a version for master equations, via a reduction of the heat bath, along the lines of standard derivations of master equations (see e.g. [118]).
On a more general level it could prove fruitful to explore the intersection between the resource theoretic perspective and the standard machinery of open quantum systems (see [87] for recent contributions in this direction). A concrete question is how to construct generators that yield thermal or time-reversal symmetric thermal operations (see discussions in Appendix M 4). Another question is what the condition (45) implies concerning the underlying global evolution, and the evolution of resources.
Classical fluctuation relations have been subject to several experimental tests [93,[145][146][147][148][149]. Various setups have been suggested for the quantum case [150][151][152][153][154][155][156], with recent experimental implementations in NMR [157], as well as in trapped ion systems [158]. See also [159] for tests in a single-electron box, and [160] for an experiment on a relation for non-thermal noise. The conditional fluctuation theorems, and in particular the approximate version, as well as those based on master equations, allow for a considerable flexibility, which suggests that experimen-tal tests may be feasible. Since the quantum fluctuation relation (2) and the conditional version (26) are phrased in terms of channels and CPMs, one may be tempted to conclude that every test of these relations necessarily would require a full process tomography, which generally is very demanding. However, the global fluctuation relation (29) suggests 'milder' tests based on small sets of suitable chosen measurement operators (corresponding to a partial process tomography). An example is the determination of free energy differences discussed in section VII H.
One could also consider the possibility to experimentally verify cases of Jarzynski equalities with and without the condition of unitality of the channel R + , such as in (13) and (14). It would also be desirable to get a better theoretical understanding of the role of the unitality of the channel R + , which one may suspect is related to the energy reservoir regarded as a resource. In this context one may also ask for the general conditions for the nonviolation of standard bounds, and how this relates to the energy translation invariance (cf. discussions in [45]).
In this investigation we have tacitly assumed that the heat bath can be taken as initially being in the Gibbs state. It would be desirable to let go of this assumption, e.g. via typicality [161,162] (see further discussions in Appendix N).
On a more technical note one may observe that whenever we actively have referred to the properties of the spectrum of the Hamiltonian of the reservoir, we have always assumed that it is a point spectrum. An analysis that explicitly investigates the effects of reservoir spectra that contain a continuum could potentially be useful.
One can imagine several generalizations of the results in this investigation. It does for example seem plausible with a grand canonical version, thus not only including energy flows, but also the flow of particles. (For a previous grand canonical fluctuation relation, see [163].) More generally one could consider settings with multiple conserved quantities [164][165][166][167].
Another potential generalization concerns a classical version of the conditional fluctuation relations. We have already obtained a particular class of classical conditional fluctuation theorems (Appendix H 6 a). However, these are classical in the sense of being diagonal with respect to a fixed energy eigenbasis, which should not be con-fused with a classical phase space setting. It seems reasonable that the structure of pairs of measurement operators, translated to functions over phase space, with classical counterparts for the Gibbs and partition maps, could combine with phase space flows to yield classical conditional fluctuation theorems. It may also be possible to bridge such a classical phase space approach to the quantum setting via Wigner functions and other phase space representations of quantum states.
The intermediate fluctuation relation (6) can be rephrased in terms of Petz recovery channel [48][49][50][51], which reminds of the recent finding in [41] that relates Petz recovery channel with work extraction. One may wonder if these results hint at a deeper relation. See further comments in Appendix A 9.
Several recent contributions to quantum thermodynamics have focused on resource theories, single-shot statistical mechanics, quantum correlations, and coherence [27-44, 128, 129, 168-181]. (For general overviews on recent developments in quantum thermodynamics, see [182,183].) The fluctuation relations in this investigation are at their core statements about dynamics, rather than about resources. Nevertheless, one could consider formulating quantitative characterizations of the evolution of resources in the spirit of Crooks theorem, and our fluctuation relations may serve as a starting point for such an analysis. In this context one should note recent efforts to link single-shot quantities and fluctuation theorems [184][185][186][187]. The fact that the present investigation is based on energy conserving dynamics, and thus brings the notion of fluctuation theorems under the same umbrella as previous investigations on quantum thermodynamics and coherence [27][28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44], may further facilitate the merging of these subjects.
The standard classical Crooks theorem compares the probability distributions of the random work costs of a forward and reverse process where the system is driven by external fields. Often this external field is taken as a parameter x in a Hamilton function. The system is usually imagined to additionally interact with a heat bath of a given temperature. The time-schedule of the parameter x is implemented as a function x t of time t, which runs from t = 0 to t = T . At t = 0 we assume that the initial system is in equilibrium with the heat bath. For the reverse process, the external parameter evolves as x t := x T −t for t = 0 to t = T . In other words, the time-schedule of the parameter is run in reverse. Again we assume that the system initially is in equilibrium with the heat bath, but now for the parameter value x 0 = x T . It is useful to keep in mind that these initial equilibrium distributions are conditioned on the value of the control parameter. The aim of the following sections is to make a quantum version of this classical setup.
The model consists of four components, the 'system' S, the heat bath B, the control C, and the energy reservoir E. Assumptions 1 below does not mention the system S or the heat bath B. The reason for this is that the main part of the derivations does not require any distinction between these subsystems, so they can be regarded as one single system S := SB.
For a Hamiltonian H and β = 1/(kT ), for Boltzmann's constant k and the absolute temperature T , we denote the partition function by Z β (H) = Tre −βH , and (assuming that Z β (H) is finite) we denote the Gibbs state by G β (H) = e −βH /Z β (H). Since we here only consider heat baths with one single temperature, we will often suppress the subscript and write G(H) and Z(H).

Assumptions 1.
Let H S , H C , and H E be complex Hilbert spaces. Let |c i , |c f ∈ H C be normalized and orthogonal to each other, and define the projector P ⊥ In the following we briefly discuss the rationale behind these assumptions.
The Hamiltonian H S C describes how the state of the control system C changes the Hamiltonian of S (see Fig. 11). Since |c i is orthogonal to |c f , and these in turn are orthogonal to the support of and H f S are the initial and final Hamiltonians, respectively, and |ci , |c f the corresponding orthonormal control states. operators V on S CE such that [H, V ] = 0. (For an alternative notion of energy conservation, see [45].) In addition to being energy conserving, we also require V to satisfy (A1). In other words, V should rotate the subspace H S E ⊗ Sp{|c i } to the subspace H S E ⊗ Sp{|c f }. This models the idealization of a perfect control mechanism, meaning that the evolution with certainty will bring the initial control state |c i to the final control state |c f , and thus with certainty will transform the initial Hamiltonian H i S to the final Hamiltonian H f S . In Appendices G 3 a and G 3 b we demonstrate that there exist setups that satisfy all conditions in Assumptions 1.
As mentioned above, we do not need to make a distinction between the system S and the heat bath B in most of these derivations. However, to obtain fluctuation relations where the partition functions only refer to system S, we can additionally assume that the initial and final Hamiltonians of the system and the heat bath are non-interacting. More precisely, we would assume that there exist Hermitian operators H i S and H f S on H S and a Hermitian operator and such that Z β (H i S ), Z β (H f S ), and Z β (H B ) are finite. In typical textbook quantum mechanics, the Hamiltonian defines the notion of energy and energy conservation, as well as being the generator of time-evolution. Here we do in some sense separate these two roles, since we let the time evolution be given by V with the only restriction that it commutes with H, without demanding that V = e −itH/ . This separation is very convenient since it gives tractable models (compared to introducing an interaction term in the Hamiltonian and try to analyze the resulting evolution via Schrödinger's equation) and has successfully been employed in several previous studies [27][28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44].
It is maybe worth emphasizing that when we in this investigation refer to two systems as being 'noninteracting', this only means that the energy observable is of the form H = H 1 ⊗1 2 +1 1 ⊗ H 2 . It does not imply that the evolution is of a trivial product form V 1 ⊗ V 2 , since (depending on the combination of the spectra of H 1 and H 2 ) there may exist non-trivial unitary operators V that commute with H.
One way to understand the separation of roles between H and V is to imagine that the global evolution is generated by a Hamiltonian H evol , i.e., that Although the above reasoning may serve as a possible justification, one may nevertheless wonder how to incorporate more 'standard' assumption that V = e −itH/ . This topic is discussed in Appendix K.
For a final observation concerning the structure of the energy conserving unitary operators, assume that the global non-interacting Hamiltonian H (in the finitedimensional case) is non-degenerate. Then its eigenvectors are all of the product form |1 n |2 m , for the two local eigenbases {|1 n } n and {|2 m } m of H 1 and H 2 , respectively. Hence, all unitary operators that commute with H can be written V = mn e iθmn |1 n 1 n |⊗|2 m 2 m |, for arbitrary real numbers θ mn . Although typically not product operators, these do not have the power to change the occupancies of the product energy eigenstates. In particular, these unitaries cannot transfer energy between the subsystems, which is not particularly satisfying as a model of thermodynamic processes. However, if the global Hamiltonian has degeneracies due to matchings of transition energies in the local spectra, then there exist energy conserving unitary operators that transfer energy. (For a simple example, see Appendix H 7 b). This matching is clearly a rather brittle assumption, and one could relax this idealization by allowing for transitions within a narrow energy shell. However, we shall not consider such generalizations in this investigation, but rather stick to perfect energy conservation. One may also note that the approximate approach, presented in Appendix K, provides an alternative route to handle this issue. There we assume V = e −itH/ and allow for interacting Hamiltonians, thus enforcing perfect energy conservation, as well as removing the need for matching of local spectra.

The initial states
In the typical derivation of Crooks theorem one assumes that the system initially is at equilibrium with respect to the initial value of the control parameter. In other words, for x = x i , the system should start in state G β H S (x i ) . When one considers a more explicit model that includes the degrees of freedom of the control system it becomes clear that the initial state of the system and control combined cannot be in a global equilibrium. For example, in our case the global equilibrium state on S C would be Hence, the global equilibrium is a weighted average over all the control states and the corresponding conditional equilibrium states in S . We rather have to think of system S as being in a 'conditional' equilibrium G β (H i S ) ⊗ |c i c i |. The conditional equilibrium corresponds to a projection (and subsequent normalization) of the global equilibrium onto an eigenspace of H S C .
The initial state of the forward process is the conditional equilibrium state of S C and an arbitrary state σ of the reservoir, i.e., G β (H i S ) ⊗ |c i c i | ⊗ σ. In an analogous fashion, the reverse process should start in a conditional equilibrium with respect to the final Hamiltonian, thus corresponding to the global state The fact that we here assume that E and S C initially are uncorrelated makes it possible to formulate our quantum fluctuation theorems in terms of quantum channels on the energy reservoir alone. In Appendix J we discuss a particular case of pre-correlations.
Although the validity of the fluctuation theorems per se does not rely on how these conditional equilibrium states come about, or whether it would be difficult or easy to prepare them, it is nevertheless justified to ask how they are supposed to be obtained. In the typical narrative surrounding the classical Crooks theorem it appears to be taken for granted that the system eventually settles at the When turning the control mechanism explicit (both in the classical and quantum case) it is clear that this is not an entirely innocent statement, as it suggests that there is a separation of time-scales, where the equilibration of the system is much faster than the equilibration of the controlling degrees of freedom. It is not difficult to imagine classical models where this assumption would make sense. Suppose for example that we would have a polymer with the ends attached to two (comparably) massive bodies immersed in a liquid (e.g. in the spirit of the experimental setup in [145]). The equilibrium state of the polymer depends on the distance between the anchor points, and it seems intuitively reasonable that the polymer typically would equilibrate on very short time scales compared to the Brownian motion of the massive bodies. These notions could also be adapted to the quantum case, akin to what we do in Appendices K 2 b, K 3 b, and K 3 c. One may even argue that this separation of timescales should be a requirement for well-designed control mechanisms. It is also clear that we cannot expect this to hold in general, but that it implies conditions on the nature of the interactions between system, control, and heat bath, as well as on the initial states.
In relation to these questions it may be useful to note the similarities between the type of conditional equilibrium that we consider here, and some of the settings in the literature on classical fluctuation relations for partial equilibrium conditions, or extended fluctuation relations [108][109][110][111][112][113]. One may ask similar questions as above, concerning the consequences of including explicit control systems, also in the classical scenario. Although it indeed would be relevant to elucidate the general conditions for well-functioning control systems in both the classical and quantum case, these questions will not be covered in this investigation.

Induced channels on the energy reservoir
For the standard formulations of Crooks theorem, the change of the external control parameters would typically push the system out of equilibrium at the expense of work. In our quantum treatment we wish to describe all aspects of how the state of the energy reservoir changes, which conveniently can be captured by the channels (trace preserving completely positive maps [46]) induced on the reservoir.
More precisely, we wish to describe how the state of the energy reservoir evolves under the action of a global energy conserving unitary operation V that additionally exhibits perfect control (A1). We furthermore assume that S starts in the conditional equilibrium with respect to the initial control state |c i as described in the previous section. The state of the reservoir after the evolution can thus be written Hence, F describes the change of state induced on the energy reservoir E due to the global dynamics V for this particular class of initial states. For this intermediate version we reverse the entire evolution on the global system. More precisely, we replace V · V † with V † · V . For a V generated by Hamiltonian evolution V = e −itH evol / , this corresponds to a replacement of t with −t. The reverse process starts in the local equilibrium with respect to the final Hamiltonian H f S , which results in the channel Although this indeed guarantees that the evolution is reversed in a very concrete sense, one can argue that it does not quite correspond to the spirit of Crooks relation, which only requires a reversal of the control parameters. In Appendix C we will remove this idealization. The purpose of the following sections is to establish a relation (Proposition 1) between the 'forward' channel F and the 'reverse' channel R.
As a further remark one can compare the type of channels defined in (A4) and (A5) with thermal operations [27-30, 35, 127-133]. Thermal operations are, as in (A4), obtained when initially uncorrelated ancillary systems interact with the system of interest via energy conserving unitary operations (for non-interacting Hamiltonians). However, as opposed to (A4), thermal operations require all the ancillary systems to initially be in their Gibbs states. In other words, the above channels would be thermal operations were it not for the control system, which initially is in a non-equilibrium state (as discussed in Appendix A 3). Nevertheless, (A4) is 'almost' a thermal operation in the sense that S C is in a conditional equilibrium state. An extension of the theory of thermal operations to these types of initial states could provide an alternative route to study fully quantum fluctuation relations, and could potentially yield insights on the violations of the standard bounds discussed in Section II G. However, we will not consider such generalizations in this investigation.

Conjugate CPMs
The conjugate map φ * of a completely positive map where Y are arbitrary (bounded) Hermitian operators, and σ arbitrary density operators. A convenient alternative characterization is via Kraus representations [46] For the derivations it will be convenient to keep in mind the following observation. Suppose that a CPM φ is defined via a unitary V : where Q a (bounded) and η a (trace class) are positive operators on an ancillary Hilbert space H a . It follows that the conjugate CPM φ * can be written One should note that the definition of the conjugate * via Tr(Y φ(σ)) = Tr(φ * (Y )σ) is not restricted to φ being a CPM. For example, if φ(σ) := AσB, for some operators A, B (not necessarily Hermitian), then φ * (Y ) = BY A.

The mapping J
For an operator A we define the mapping The reason for why we here choose the exponent to be −A/2, rather than say A, is only to make it more directly related to Gibbs states in the special case that A := βH and Q :=1, and thus J βH The mapping J A is a CPM, but is in general not trace preserving.
The mapping J βH does often occur together with its inverse J −1 βH , in such a way that J βH • φ • J −1 βH for some CPM φ (see e.g. Proposition 1). This combination can in some sense be viewed as a quantum version of the term e βw in the classical Crooks relation in (1). To see this, let us consider the special case that H E has a pure point spectrum, i.e., there exists an orthonormal basis of eigenvector |n with corresponding eigenvalues E n . For mappings from diagonal elements to diagonal elements we would get m|J βH φ J −1 βH (|n n|) |m = e β(En−Em) m|φ |n n| |m .
The term E n − E m is the decrease of energy in the reservoir, and by identifying this loss with the work performed, the analogy becomes evident.
For the general transition between arbitrary matrix elements, the corresponding expression reads m|J βH φ J −1 βH (|n n |) |m = e β(En−Em)/2 e β(E n −E m )/2 m|φ |n n | |m . The fact that the off-diagonal case is governed by two energy differences, rather than one, corresponds to the evolution of the coherences in the energy reservoir.

Derivation of an intermediate fluctuation relation
Proof. We only prove the first equality, since the proof of the second is analogous. First note that where we in the second equality have used [H, V ] = 0, and the fact that1 S ⊗ |c i c i | ⊗1 E commutes with e −α1 S C ⊗H E , as well as orthogonality of various terms. Next we use the assumed property of perfect control in Eq.
This leads to the first equality. The proof of the second equality is analogous.

Proposition 1 (An intermediate quantum Crooks relation).
With the definitions as in 1, the channels F and R defined in (A4) and (A5) are related as With the separation of S into system S and the heat bath B as in equation (A2) we thus get Proof. By comparing the definition (A5) of channel R, with Eqs. (A6) and (A7) in Appendix A 5 we can conclude that This can be rewritten as (A9).
With the additional assumption in equation . From this observation we obtain (A10) from (A9). Equation (A10) in Proposition 1 already has the flavor of a Crooks relation. However, as already has been mentioned, it relies on a too ambitious reversal where we invert the entire evolution. In Appendix C we shall remove this idealization, and let both the forward and reverse evolution be governed by the same 'direction of time', i.e., in both cases the global evolution is given by the map Q → V QV † .

Control in fluctuation theorems versus control in thermal protocols
In relation to the remarks concerning the swap of V to V † as being a 'too ambitious' reversal, one may note that in other contexts, such as work extraction and information erasure, one often imagines to be able to choose freely among all energy-conserving global unitary operations over all the involved degrees of freedom, including additional equilibrium systems. One may thus wonder why such a detailed control is acceptable in those scenarios, but not for fluctuation theorems. One should keep in mind that work extraction and information erasure in some sense are engineering tasks, where the purpose is to construct an optimal protocol or machinery. Moreover, the free equilibrium resources can be viewed as engineered ancillary systems that are thermalized by being put in contact with the heat bath, rather than themselves constituting the heat bath. This should be put in contrast with fluctuation theorems, where our task is not to design optimal procedures in engineered systems, but to make general statements about the nature of the given dynamics in arbitrary thermal systems. This may include systems provided by nature, about which we may have a very limited knowledge, and where our means of control are restricted to designated control systems (e.g. external fields).

Remarks concerning Crooks operation time reversal and Petz recovery channel
The notion of 'operation time reversals' was introduced in [47] as a quantum generalization of time-reversals of classical Markov chains. Given a channel Φ with fix-point density operator ρ, i.e., Φ(ρ) = ρ, the operation time reversal of Φ is defined by the mapping Let us now compare this with the right hand side of (A9). By construction R is a channel. However, one can confirm that it is the case that Hence, e −βH E is not a fixpoint of R, and thus the conditions for Crooks time reversal are not quite satisfied (unless Z(H i S ) = Z(H f S ), which would be the case for a cyclic process, i.e., if There exists a more general construction introduced in information theory, namely Petz recovery channel [48][49][50][51]. Given a channel Φ and a reference state ρ (that does not have to be a fixpoint of the channel Φ) Petz recovery channel is defined as Hence, Crooks time reversal emerges as a special case when ρ is a fixpoint of Φ. In this context one may also note the discussions on time-reversals for quantum channels in [52]. If we take e −βH E as the reference operator, it is straightforward to confirm that the intermediate fluctuation relation (A9) can be rephrased as F = R, i.e., that the forward channel is equal to the Petz-transformation (A12) of the reverse channel.
In [41] it was shown that the work gain in work extraction can be bounded by how well the initial state can be reconstructed via Petz recovery channel. One may in particular note the similarity between our channel R and the recovery channel R ρ→σ defined in [41], although the definition of R contains the control system that is subject to perfect control. In view of these structural similarities it is tempting to speculate on deeper relations between these results. Fluctuation relations can be viewed as statistical manifestations of the second law [6]; an observation that makes the connection to work extraction more plausible. Moreover, there are investigations that hint or elaborate on connections. One example is the generalized Jarzynski relations for feedback control [92][93][94]188]. Moreover, in [32] a classical Crook's relation was used as a component in a proof about single-shot work extraction, and recent investigations [184][185][186][187] have focused on exploring links between single-shot concepts and fluctuation theorems. On a similar note one may wonder whether there exists a more operational characterization of fluctuation relations. Although intriguing questions, we will not consider them further in this investigation.

Appendix B: Time-reversal and time-reversal symmetry
Here we discuss the notion of time-reversals that we shall use for obtaining the quantum Cooks relation. We begin with a quick reminder of the essence of the standard notion of time-reversals, which is closely related to complex conjugation. As mentioned in the main text, our time-reversals are primarily related to transposes rather than to complex conjugation (cf. the discussions on timereversals in [59,60]), and in section B 2 we compare complex conjugation to transposes regarded as time-reversal operations. After these preludes, we do in section B 3 turn to the actual definition of time-reversal that we employ in this investigation.

A brief reminder of the standard notion of time-reversals
Here we briefly recollect the notion of time-reversals in classical and quantum mechanics. More thorough discussions can be found, e.g., in chapter 26 of [189] and section 4.4 of [57]. These references also include the case of electric and magnetic fields, as well as angular momenta, which we do not cover. For an overview of timereversals in classical systems, see e.g. [190,191]. See also [192] for various notions of time-reversals in the context of classical fluctuation relations.
In classical mechanics, time-reversals are defined via the reversal of momenta, e.g., for a system of particles, their positions are left intact, but all the velocities are reversed. If the underlying Hamilton function is timereversal symmetric, i.e., is invariant under p → −p, then this implies that the reversed particles follow their reversed trajectories, and thus effectively behave as if time was running backwards. As an example one can consider a particle of mass M in a potential V , with Hamilton is also a solution, thus representing the particle moving backwards with reversed momentum.
Quantum mechanics does not possess a very crisp notion of phase space, or phase-space trajectories, due to the canonical commutation relation for the position and momentum operators. One can nevertheless introduce a notion of time-reversals. Suppose that the system has the Hamilton operator H =P 2 /(2M ) + V (X), and that ψ(x, t) is a solution to the corresponding Schrödinger In other words, a complex-conjugated wave-function evolves 'backwards', which suggests that time-reversals in quantum mechanics are related to complex conjugation. As further indications one may note that a plane wave ψ(x) = e ipx gets mapped to ψ(x) * = e −ipx , thus changing the sign of the momentum of the momentum eigenstates. Another example is the family of coherent states {|α } α∈C , with wave- . Coherent states can in some sense be regarded as representing fuzzy phase space points (with an as sharp simultaneous position and momentum as quantum mechanics allows for), where the real and imaginary part of α can be associated to the average position and momentum, respectively (see Appendix K 3 c). Since x|α * = x|α * , the effect of the conjugation is to swap the sign of the imaginary part of α, while leaving the real part intact, thus emulating the classical procedure of swapping momenta at fixed positions.
There is also a more abstract line of reasoning, arguing that transformations that leave the magnitude of inner products on the Hilbert space invariant either should be unitary or anti-unitary (see the Appendix to chapter 20 in [189], or chapter 27 in [193]), and that time-reversals fall in the category of anti-unitary operators (see chapter 26 of [189], or section 4.4 in [57]). Moreover, antiunitary operators can be written as a complex conjugation composed with a unitary operation (chapter 27 in [193]). Hence, on the level of Hilbert spaces, timereversals are closely related to the complex conjugate of the wave-function.
The above remarks have been focused on cases where there are no external parameters that break time-reversal symmetry. The typical example of such symmetry breaking is external magnetic fields. In such cases, the timereversal operation would not only include a change of the state of the system, but also a change of the Hamiltonian (e.g. swapping the directions of the external magnetic fields) which thus means that we have to intervene and change the nature of the dynamics of the system. This goes somewhat against the general spirit of the present investigation, where we employ time-reversal symmetry precisely in order to avoid having to make such interventions. (It would be more in spirit to explicitly include the systems and currents that generate the magnetic fields.) It nevertheless seems reasonable that one could generalize the type of fluctuation relations that we consider here in order to incorporate external time-reversal breaking parameters. However, we leave this as an open question.

Complex conjugation vs transpose
As discussed in the previous section, the standard notion of time-reversals is in quantum mechanics typically formulated on the level of Hilbert spaces via anti-unitary operators, and can be expressed via complex conjugation of wave-functions. Here we shall make a slight shift of perspective, and consider the action of the complex conjugation on the level of density operators, and compare this to transposes. We will see that both these operations in some sense can be regarded as time-reversal operations.
The standard time reversal can be expressed in terms of the complex conjugation ψ * (x) of wave functions ψ(x), or via an orthonormal basis as |ψ * = n |n n|ψ * . On the level of operators this translates to Q * = x|Q|x * |x x |dxdx , or Q * = nn n|Q|n * |n n |. In comparison, the transpose, τ , acts as Hence, complex conjugation inverts the evolution operator, while the transpose leaves it intact. At first sight it may thus seem a bit odd that the transpose can implement any form of time-reversal. To understand this we should consider the manner in which these mappings act on products of operators, namely In other words, complex conjugation leaves the operator ordering intact, while the transpose reverses the ordering. In some sense, (B1) and (B2) complement each other when it comes to the reversal of the evolution. To see this, assume that an initial state ρ i is evolved into the state ρ f = e −itH evol / ρ i e itH evol / . For the complex conjugate we get and consequently ρ τ i = e −itH evol / ρ τ f e itH evol / . Hence, we do again obtain the effective reversal of the evolution. We can conclude that for conjugation the time-reversal is due to the inversion of the time evolution operator, while for the transpose it is due to the inversion of the operator ordering.

What we require from time-reversals
Instead of directly defining time-reversals in terms of transposes we here rather define it via a 'wish-list' of properties. By inspection one can see that transposes satisfy these conditions, although the latter allow for a slightly larger class of operations (see Proposition 2). One can also see that this definition immediately excludes the complex conjugation (due to the assumed linearity). Hence, one should not take this list as the ultimate and most general definition of what a time-reversal possibly could be, but rather as convenient set of assumptions that is sufficient for our purposes and makes the book-keeping in the proofs simple. It may potentially be the case that a more general notion of time-reversals could extend the resulting family of quantum Crooks relations. Although an interesting question, it will not be pursued further in this investigation.

Definition 1. A linear map T is called a time-reversal if
Tr[T (σ)] = Tr(σ), (B3c) It is certainly justified to ask in what sense a map T with the above properties deserves to be called a 'timereversal'. Much analogous to the discussions of complex conjugates and transposes in the previous section, let us now assume that ρ f := V ρ i V † , for some unitary operator V and initial state ρ i . We get where we in the second equality make use of the reordering-property (B3a) and of property (B3b). Our first observation is that T (V ) is a unitary operator (see By comparison with the discussion in the previous section, we can conclude that T , much in analogy with the transpose, obtain its capacity to 'time-reverse' from the reordering property (B3a), as opposed to complex conjugation that obtains this power due to its capability to invert the time-evolution operator. As we will see in Appendix B 5, the time-reversals T are indeed very closely related to transposes. As a bit of a technical remark, in the infinitedimensional case one may additionally require that T maps bounded operators to bounded operators, and trace class operators to trace class operators. If one restricts to bounded A, B in (B3a) it follows that T (A), T (B), and T (AB) are bounded. By demanding that A in (B3b) is bounded we make sure that the Hilbert adjoint A † is well defined and bounded (see Theorem 3.9-2 in [194]). By the requirement that T maps bounded operators to bounded operators we know that T (A) is bounded, and thus T (A) † is also well defined. If one restricts σ to be trace class in (B3c) it follows that Tr(σ) is well defined, and if T maps trace class operators to trace class operators, Tr[T (σ)] is also well defined. Although this is a reasonable collection of assumptions, one should keep in mind that we here tend to apply these maps also to unbounded operators.

The -transformation
For a CPM φ we define φ as where T is a given time-reversal, and where φ * is the conjugation discussed in Appendix A 5. It is a straightforward application of the properties of the time-reversal T to show the following alternative definition It is also straightforward to confirm the following lemma.
In other words, if {V k } k is a Kraus representation of φ, then {T (V k )} k is a Kraus representation of φ . Hence, if φ is a CPM, then φ is a CPM. If φ is a channel (trace preserving CPM), then φ is not necessarily a channel. However, if φ is a unital channel (φ(1) =1), then φ is a channel, and moreover a unital channel.

Characterization of T in finite dimensions
The purpose of this section is to make more precise what kind of mappings that the list of properties in Definition 1 specifies, how they relate to transposes, as well as deriving some further properties that will be useful for the subsequent derivations. Throughout this section we assume that the underlying Hilbert space is finite-dimensional, although some of the results would be straightforward to extend to the infinite-dimensional case.
For a finite-dimensional Hilbert space H, we do in the following let L(H) denote the set of linear operators on H. Our first general observation is that if T 1 and T 2 are time-reversals on two different finite-dimensional Hilbert spaces, then T 1 ⊗ T 2 is also a time-reversal. It turns out that each single property in Definition 1 is separately preserved under the tensor product. The proof can be obtained via decompositions Q = mn Q  If we now furthermore assume that T satisfies (B3b) and that V is a unitary operator, then T  • If T satisfies (B3a) and (B3b), then T maps projectors to projectors. Furthermore, pairwise orthogonal projectors are mapped to pairwise orthogonal projectors.
Proof. A linear operator P is a projector if and only if P 2 = P and P † = P (and P is bounded in the infinitedimensional case). Assuming that P is a projector it follow by properties (B3a) and (B3b) that T (P ) is also a projector. (If T preserves boundedness, then the boundedness of T (P ) is guaranteed.) Two projectors are orthogonal if and only if P 1 P 2 = 0. Thus by property (B3a) it follows that T (P 2 )T (P 1 ) = T (P 1 P 2 ) = 0. The dimension of the subspace onto which a projector P projects is given by Tr(P ). By assumption (B3c) it follows that Tr(T (P )) = Tr(P ). Hence, the dimension is preserved. In the case that the Hilbert space is finite-dimensional, then TrT (1) = Tr1 is the dimension of the Hilbert space. Hence T (1) is a projector with the dimension of the Hilbert space, and thus T (1) =1.
Next we make the observation that T (Q) 1 = Tr T (Q)T (Q) † = Tr T (Q † Q). By Lemma 4 we know that T maps positive operators to positive operators. Hence, T (Q † Q) is a positive operator, and thus T (Q † Q) is well defined and positive (see e.g. section 9.4 in [194]). By Lemma 4 we know that T ( . By the reasoning above we thus know that both T (Q † Q) and T ( Q † Q) are positive square roots of T (Q † Q). However, the positive square root of a positive operator is unique (Theorem 9.4-2 in [194]), and thus T ( Proof. By Lemma 5 we know that each T (P m ) is a projector, and that it projects onto a subspace of the same dimension as P m . Next one can confirm that HT (P m ) = T (H)T (P m ) = T (P m H) = h m T (P m ). Hence, T (P m ) must be an eigenprojector corresponding to eigenvalue h m . Since T (P m ) and P m projects on spaces of the same dimension, we must have T (P m ) = P m .
Given an orthonormal basis {|k } K k=1 of a finitedimensional Hilbert space H, we define the transpose with respect to this basis as Since the transpose depends on the choice of basis, an obvious question is what happens when we make a change of basis. The following lemma, which we state without proof, specifies how one can express the new transpose in terms of the old.
Similarly, the old transpose τ old can be expressed in terms of the new basis as The following Lemma is a special case of Autonne-Takagi's decomposition, see e.g. Corollary 4.4.4 in [195].
or equivalently Moreover, U is uniquely determined by T and B up to a global phase factor.
(The choice of global phase factor in U does not affect the property of being symmetric or skewsymmetric.) 3. If T satisfies (B3a), (B3b), and (B3c), then the following are equivalent: • There exists an orthonormal basis {|ξ k } k of H such that • The unitary operator U in (B11) satisfies U τ = U , i.e., U is complex symmetric.
As a further remark one may note that (B12) directly implies that T is a positive but not completely positive map, since it is a composition of a unitary operation and a transpose, and the transpose is not completely positive [61,62].
Proof of Proposition 2. We start by proving that properties (B3a), (B3b), (B3c) implies equation (B11). From Lemma 5 we know that {T (|k k|)} k is a set of pairwise orthogonal projectors onto one-dimensional subspaces that span the whole space. This means that there exists a unitary operatorŨ such that T (|k k|) =Ũ |k k|Ũ † .
By using T (|k k|) =Ũ |k k|Ũ † and (B3a) it follows that z k k z kk = k |Ũ † T (|k k |)T (|k k|)T (|k k|)Ũ |k = z k k . One can realize that these two last conditions together imply that z k k = z * 1k z 1k . Moreover, |z 1k | 2 = z kk = 1. Hence, there exist real numbers θ k such that z k k = e i(θ k −θ k ) . By putting U :=Ũ l e −iθ l |l l|, we find that T (|k k |) = z kk Ũ |k k|Ũ † = U |k k|U † , and thus (B11) holds. For the opposite implication, assume that there exists a unitary U such that (B12) holds. It is straightforward to confirm that each of the properties (B3a), (B3b), (B3c) is satisfied.
For uniqueness, suppose that that there exist two unitary operators U 1 , U 2 that both satisfy (B12). Consequently, , from which it follows that U 1 = e iχ U 2 for some χ ∈ R Next, we turn to the second item of the proposition. Assume that (B3a), (B3b), and (B3c) are satisfied. We know that there exists a unitary operator U such that equation (B12) holds. If we use this observation twice we find This implies that T 2 = I if and only if U τ = e iθ U for some real number θ. By the definition of the transpose it follows that k |U |k = k|U τ |k = e iθ k|U |k for all k, k . If this equality is iterated we obtain k |U |k = e iθ k|U |k = e 2iθ k |U |k , and thus (1 − e 2iθ ) k |U |k = 0, for all k, k . Hence, either 1 − e 2iθ = 0, or k |U |k = 0 for all k, k . However, the latter is not possible since U is unitary. We can conclude that e 2iθ = 1, and thus e iθ = ±1. This combined with U τ = e iθ U yields U τ = ±U . Finally we turn to the third item of the proposition. Let τ denote the transpose with respect to {|ξ k } k . Then (B13) is the same as saying that T (Q) = Q τ . By Lemma 8 we know that we can express the transpose τ in terms of the transpose τ (with respect to the basis {|k } k ) as Q τ = W W τ Q τ (W W τ ) † , for a unitary operator W such that |ξ k = W |k . In terms of the original basis {|k } k we know that T (Q) = U Q τ U † . Hence, U Q τ U † = W W τ Q τ (W W τ ) † , and thus U = W W τ e iχ for some χ ∈ R. Hence, we can conclude that the unitary operator U satisfies U τ = U and thus is complex symmetric.
To derive the opposite implication, assume that there exists a unitary operator U such that U τ = U and (B11) holds. By Lemma 9 we know that there exists a unitary operator W on H such that U = W W τ . Define |ξ l := W |l for all l. Since W is unitary it follows that {|ξ l } l is an orthonormal basis of H. One can verify that (B13) holds.
As a corollary of Proposition 2 it follows that if T leaves the elements of an orthonormal basis intact, then T can be written as a transpose in this basis followed by phase shifts. Corollary 1. Let {|n } n be an orthonormal basis and assume that the time-reversal T is such that T (|n n|) = |n n|. Then there exists real numbers θ n such that T (|n n |) = e i(θ n −θn) |n n|, and thus with |ξ n := e iθn/2 |n it is the case that T (|ξ n ξ n |) = |ξ n ξ n |. Here we construct a new set of assumptions that includes time reversal symmetry (see Fig. 12).

Assumptions 2.
Let H S , H C , and H E be complex Hilbert spaces. Let |c i+ , |c i− , |c f + , |c f − ∈ H C be normalized and such that the linear span H i C := Sp{|c i+ , |c i− } is orthogonal to H f C := Sp{|c f + , |c f − }. Let P i C and P f C denote the projectors onto these two subspaces, and define P ⊥ • and H := H S C ⊗1 E +1 S C ⊗ H E .
• T S C and T E are time-reversals, and T := T S C ⊗ T E . We assume and In Appendices G 3 c and G 3 d it is demonstrated that there exist setups that satisfy all conditions in Assumptions 2.
At first sight it may seem a bit counterintuitive that the time-reversal should leave the unitary evolution V invariant, i.e., that T (V ) = V , rather than inverting the evolution, V → V † , which in essence is how the standard complex-conjugation-based time-reversal works. However, as discussed in Appendix B 3, the capacity of T to time-reverse stems from the reordering property T (AB) = T (B)T (A), rather than from the inversion of the evolution operator.
The pair of control states |c i+ and |c i− (as well as |c f + and |c f − ) can be thought of as abstractions of the idea of a wave-packets with fairly well defined momenta, where the time-reversal changes the direction of motion. However, we are not tied to any such specific scenario, and can apply the formalism whenever Assumptions 2 is valid for some choice of time-reversal T .
Assumptions 2 are constructed in such a way that the unitary V , the initial state |c i := |c i+ , and the final state |c f := |c f + satisfy Assumptions 1. This translation only amounts to redefining the projector P ⊥ C and the Hamiltonian H ⊥ . More precisely, starting with Assumptions 2 we can define the projectors P ci+ := P i C − |c i+ c i+ | and P cf + := P f C − |c f + c f + |. With P ⊥ C being the projector in Assumptions 2, we can define the new projector in Assumptions 1 as P ⊥ C := P ⊥ C + P ci+ + P cf + . Similarly, given the Hamiltonian H ⊥ in Assumptions 2 we can define the new H ⊥ := H i S ⊗ P ci+ + H f S ⊗ P cf + + H ⊥ in Assumptions 1. Hence, the restriction to Assumptions 1 only requires us to reshuffle the Hamiltonians. In an analogous manner, V , |c i := |c f − , and |c f := |c i− also form a valid triple in Assumptions 1. Note that in this case |c f − is the initial state of the effectively reversed evolution.
One should note that one can consider several variations on Assumptions 2. For example, one could imagine an alternative to (C2) where we instead assume a product time-reversal T S C = T S ⊗ T C , and However, the assumption in (C2) is more general, and provides a rather useful flexibility.
One should keep in mind that although Sp{|c i+ , |c i− } is orthogonal to Sp{|c f + , |c f − } we do not necessarily assume that |c i+ is orthogonal to |c i− (In principle, Assumptions 2 even allows for the possibility that |c i+ is parallel to |c i− .) The reason is that a generic state is not orthogonal to its time-reversal. (The same remark applies to the standard notion of time-reversal via complex conjugation.) To see this, suppose that T can be implemented as the transpose with respect to some orthonormal basis {|ξ n } n . For |c i+ = n c n |ξ n we would thus have |c i− = e iθ n c * n |ξ n , for some arbitrary real number θ. Hence, c i− |c i+ = e −iθ n c 2 n , which would be zero only for a particular sub-manifold of states. Even though the time-reversal per se does not force |c i+ and |c i− to be orthogonal, one may still wonder if the conditions in Assumptions 2 would 'conspire' to enforce this. However, this is not the case, as is shown by an explicit As the reader may have noticed, a considerable part of Assumptions 2 deals with the control system, which is due to the rather strong idealization that perfect control entails. In Appendix H we will abandon this idealization, and as a bonus we also obtain a leaner set of assumptions (cf. Assumptions 4).

Lemma 10. With Assumptions 2 it is the case that
One may wonder why we do not directly assume (C5) in Assumptions 2 rather than (C2). The reason is partially that the latter choice defines the action of the time reversal on the control states in a cleaner manner, but also because it aligns with the more general set of assumptions that we will use in Appendix H 3.
Proof. We first note that T S C (H S C ) = H S C and T S C (1 S C ) =1 S C implies T S C (e αH S C ) = e αH S C (e.g. via a Taylor expansion) for all α ∈ C. Moreover, due to the orthogonal supports of H i S ⊗ P i C , H f S ⊗ P f C , and H ⊥ we can conclude that We exemplify the rest of the derivation with the trans- [By property (B3a) and T S C (e αH S C ) = e αH S C ] The other identities can be derived in an analogous manner.

The induced channels
Given the initial state |c i+ and final state |c f + we define the channels For the initial state |c f − and the final state |c i− we similarly define the channels

Deriving a quantum Crooks relation
Lemma 11. Given Assumptions 2, then the channels R + , F − , as defined in Eqs. (C7) and (C8) are related as and thus Hence, under the assumption of time-reversal symmetry we can in effect simulate the reversed time evolution (i.e., the replacement of V with V † ) via the 'forward' evolution V . By applying the property T 2 E = I to (C9) one can also show R + T E = T E F − and R + = T E F − T E .
Proof of Lemma 11. We use the definition of R + in Eq. (C7) and the general relation Tr 2 [T 1 ⊗ T 2 ](ρ) = T 1 Tr 2 (ρ) to obtain By multiplying (C9) from the left with T and using the relation T 2 = I and the the alternative definition of in (B6) we obtain (C10).
Proposition 3 (Quantum Crooks relation). With Assumptions 2, the channels F ± as defined in Eqs. (C7) and (C8) satisfy With the separation of S into system S and the heat bath B as in equation (A2) we thus get Proof. The triple V , |c i := |c i+ , |c f := |c f + from Assumptions 2 satisfies Assumptions 1. It follows that we can apply Proposition 1 on the pair of channels F + and R + and thus obtain Z(

Unbounded HE
The requirement of perfect control, i.e., that V satisfies (C3) puts rather stringent conditions on the properties of H E . To see this, let us assume that H E has a pure point spectrum corresponding to the orthonormal eigenvectors {|n } n with respect to the energy eigenvalues E n . Let us furthermore assume that H S is finite-dimensional. Here we shall see that for generic choices of initial and final Hamiltonians H i S and H f S , the perfect control implies that the spectrum of H E must be unbounded from both above and below. Due to the assumption of energy conservation, the energy reservoir has to compensate for any change in energy in the transition from the initial to the final state. Let h i n be the eigenvalues of H i S and similarly h f m the eigenvalues of H f S . Suppose that h f m = h i n for all m, n. This means that every possible transition either must cost or yield energy, which has to be drawn from or deposited in the reservoir E. Imagine now that S initially is in an eigenstate |h i n . Suppose that at the end of the process there is a non-zero probability for finding S in the state |h f m with h f m > h i m . For this to happen, the reservoir has to donate the energy q := h i m − h f n . Suppose that the spectrum of H E would be bounded from below, i.e., E lower = inf n E n > −∞. This means that there exists some state |k of the reservoir such that all transitions downwards in energy (if any available) would be smaller than q. In other words, if the energy reservoir would start in state |k , then it cannot donate the energy q, and the transition cannot occur. For a reservoir with a spectrum bounded from below, the only way to avoid this would be if all transitions in S always would go downwards in energy. Generic choices of H i S to H f S would involve both increases and decreases in energy, and thus the spectrum of H E must be unbounded from both above and below.
The key point behind the unboundedness is the demand that the control system always should succeed in its task irrespective of the state of the system and the energy reservoir. It would be reasonable with a control system fails in some cases, e.g., if the energy in the reservoir is too low (i.e., too close to the ground state). In Appendix H we introduce conditional fluctuation relations that allows for failing control systems. (For an explicit example, see Appendix H 7 a.) Appendix D: Diagonal and off-diagonal Crooks relations

Decoupling of diagonals
We here demonstrate the useful fact that the dynamics under the induced channels F ± and R ± decouples along different diagonals or modes of coherence [35]. We first show that the channels F ± and R ± commute with the commutator with respect to H E . Lemma 12. With Assumptions 2, the channels F ± and R ± as defined in Eqs. (C7) and (C8), satisfy where the last term becomes zero due to the cyclic property of the partial trace Tr S C with respect to H f S ⊗ |c f + c f + | ⊗1 E . By the definition of the global Hamiltonian H in Assumptions 2 By combining this with [H, V ] = 0 in (D2) the lemma follows.
Corollary 2. Suppose that H E has a complete orthonormal eigenbasis {|n } n with corresponding eigenvalues E n . Then The analogous statement holds for R ± .
If H E is non-degenerate (i.e., E n = E n if and only if n = n ) then it follows by Corollary 2 that m|F ± (Q)|m = n m|F ± |n n|Q|n n| |m .
Hence, F ± cannot 'create' off-diagonal elements with respect to the energy eigenbasis. Moreover, if we are only interested in the diagonal elements of the output, we only need to consider the diagonal elements of the input. Another way to put this is that the statistics of an energy measurement on the output is unaffected by an additional energy measurement on the input.

Diagonal Crooks relations
Let us assume that H E has a pure non-degenerate point spectrum with eigenenergies E n corresponding to the complete orthonormal eigenbasis {|n } n . We furthermore assume that T E (|n n|) = |n n|. (Due to Corollary 1 this is only a very minor generalization compared to assuming that T E is the transpose with respect to {|n } n .) Imagine now that we represent the density operator of the energy reservoir as a matrix with respect to the basis {|n } n . Since F ± are channels it follows that the numbers p ± (m|n) := m|F ± (|n n|)|m , can be interpreted as conditional probability distributions. In Appendix G 1 we shall use the additional assumption of energy translation invariance on the energy reservoir to show how (D5) leads to the standard classical Crooks relation.

Off-diagonal Crooks relations
Like in Appendix D 2 we here assume a discrete nondegenerate spectrum of H E , with corresponding orthonormal eigenbasis {|n } n and energy eigenvalues E n . We also assume that T E is the transpose with respect to this basis, and thus T E (|n n |) = |n n|.
As discussed in Appendix D 1, the channel F + can only induce transitions between |n n | and |m m | if E n − E n = E m − E m . For each δ we can thus define a corresponding set of operators {|n n |} n,n :En−E n =δ . (This set would be empty for many values of δ.) For each such δ, we will construct a Crooks relation, analogous to what we did for the diagonal case.
As the generalization of p + (m|n) and p − (n|m) we define q δ ± (m|n) := m|F ± (|n n |)|m , where q 0 ± = p ± . The reason for why it is enough to write 'q δ ± (m|n)' rather than 'q δ ± (mm |nn )' is that m and n are uniquely determined by δ, m, and n, due to the assumption that H E is non-degenerate.
The set of numbers q δ ± (m|n) represent the channels F ± in the sense that F ± (ρ) = δ m,n n m :En−E n =δ Em−E m =δ q δ ± (m|n)|m n|ρ|n m |.

(D7)
Proposition 5. With Assumptions 2, assume that H E has a complete orthonormal eigenbasis {|n } n with corresponding non-degenerate eigenvalues E n . Let T E be the transpose with respect to {|n } n . Then q δ ± (m|n) defined in (D6) satisfy Proof. Let n, n and m, m be such that E n −E n = E m − E m = δ. If we apply both sides of equation (C13) on the operator |n n |, and operate on both sides of the resulting equality with m| · |m we obtain With the assumption that T E is the transpose with respect to {|n } n , together with the identifications in equation (D6), we obtain the proposition.
As mentioned in the main text we need to use offdiagonal initial states as well as off-diagonal measurement operators in order to determine the numbers q δ ± (m|n) in a 'prepare and measure'-experiment. There are many possible arrangements, but let us here construct a setup that determines these numbers via interference. Let n, n and m, m with n = n and m = m be such that δ = E n − E n = E m − E m , with non-degenerate E n . Define the POVM element A := (|m + |m )( m| + m |)/2 and the family of initial states |ψ θ := (|n + e iθ |n )/ √ 2. Then the probability of measuring A on the evolved state is where we have made use of the decoupling, and the fact that m |F ± (|n n|)|m = m|F ± (|n n |)|m * by virtue of the complete positivity of F ± . Hence, the magnitude and phase of q δ ± (m|n) can be determined via the amplitude and phase-shift of the interference pattern with respect to the phase θ.

Appendix E: Jarzynski equalities
Jarzynski's equality [91] can be formulated as e −βW = Z(H f )/Z(H i ). This is often written in the more elegant form e −β(W −∆F ) = 1, where ∆F = F (H f )−F (H i ), with F (H) = −kT ln Z(H), is the (equilibrium) free-energy difference between the initial and final state. Here we obtain the following family of quantum Jarzynski equalities Proposition 6. With Assumptions 2, the channels F + and R + as defined in Eq. (C7) satisfy for r ∈ R and z ∈ C.

(E2)
The condition The relations (14) and (15) in the main text are obtained as special cases of (E2).
Strictly speaking, in the infinite-dimensional case the traces in the above expressions are not necessarily well defined and finite for all operators ρ. However, we here proceed under the assumption that ρ are chosen such that the traces are well defined.
Proof. By Assumptions 2 it follows that Proposition 3 is applicable, and thus the channels F ± as defined in Eqs. (C7) and (C8) satisfy equation (C12). By applying (C12) to the operator e (−β+r+z)H E /2 ρe (−β+r−z)H E /2 , multiplying both sides of the resulting equality with e βH E , and take the trace, and divide by Z(H i S ), one obtains [By Eq. (C10) and the definition of ' * '] With the definition of the commutator C H E (σ) := [H E , σ], we can write e −zC H E /2 R + (1) = e −zH E /2 R + (1)e zH E /2 . Combined with the fact from Lemma 12, that C H E and R + commute, we thus get e −zH E /2 R + (1)e zH E /2 = R + (1). This proves (E1).
One may get the impression that the members in the family of equalities in Proposition 6 are independent. However, at least in the finite-dimensional case one can transform them into each other, and in this sense they should maybe rather be regarded as the same equality in different guises. To see this, start with assuming that (E1) is true for all operators ρ on a finite-dimensional Hilbert space. We wish to show that this implies that (E1) is also true for r and z substituted with arbitrary r and z . Let r = r + ∆r and z = z + ∆z in (E1) and define ρ := e ∆rH E /2 ρe ∆rH E /2 . This yields the equality We can now use the fact (Lemma 12) that the commu- From this is follows that (E1) remains valid with r, z, ρ substituted by r , z , ρ . In the finite-dimensional case it is also clear that the mapping ρ → ρ = e ∆rH E /2 ρe ∆rH E /2 for Hermitian H E and real ∆r is a bijection on the space of linear operators. Hence, (E1) with r , z holds for all operators ρ.

Appendix F: Bounds on the work cost
Here we investigate quantum analogues to some classical bounds on the work cost of processes. We find that one indeed can obtain such bounds.

Bound on the average energy loss in the reservoir
For processes that start in equilibrium one would expect that the work cost should be bounded from below by the equilibrium free energy difference of the final and initial Hamiltonian of the system W ≥ F (H f )−F (H i ).
Here we derive a similar expression in our setting, under the assumption that R + is unital, and that H E has a pure non-degenerate point spectrum, i.e., that there exists a complete orthonormal basis {|n } n of eigenvectors to H E corresponding to distinct eigenvalues E n . (The latter assumption may not necessarily be essential.) Proposition 7. With Assumptions 2, assume that H E has a complete orthonormal eigenbasis with corresponding non-degenerate eigenvalues. Assume that the initial state is G(H i S ) ⊗ σ, with σ being a density operator on H E . Then Hence, if we identify the loss of average energy in the energy reservoir, Tr(H E σ) − Tr H E F + (σ) , with W , equation (F2) thus gives the standard bound.
Proof. Let E n and |n be eigenvalues and corresponding orthonormal eigenvectors to H E such that {|n } n is a complete orthonormal basis to H E . Define where the inequality follows by the convexity of the exponential function. By combining this inequality with the quantum Jarzynski equality (E1) in Proposition 6 for r = 0 and z = 0, one obtains Since the logarithm is monotonically increasing, and thus preserves the inequality, we thus obtain (F1), where we use F (H) = −kT ln Z(H).

An example
One should keep in mind that the inequality (F1) does not per se imply that the standard work bound W ≥ F (H f ) − F (H i ) necessarily is violated when R + is not unital; it only allows for the possibility. However, here we construct an explicit example where one indeed gets a violation.
We begin with a general remark to put this, maybe not entirely transparent, example in perspective. The general goal is to find a case where the joint unitary evolution on S E is such that the loss of energy in the energy reservoir is too small compared to the standard bound. More precisely, we wish to find a global unitary V such that D(V, σ), defined below, violates the standard bound. In Appendix G we will show that a specific class of energy translation invariant models yields unital R + , and thus recovers the standard bound. That model is based on a special Hamiltonian on E, as well as a specific class of Hamiltonians on S , such that every possible transition in S always can be compensated by a corresponding transition in E. This results in a particularly simple structure of isomorphic eigenspaces, each enumerated by an integer j. Since the global unitary V by assumption is energy conserving, it means that it block-diagonalizes into a collection of smaller unitaries {V j } j on these eigenspaces. For the energy translation invariant model in Appendix G, all these unitary operators are (in certain sense) equal. Here we will use the very same structure of Hamiltonians and eigenspaces, but we let all V j vary independently, thus increasing the number of free parameters in the minimization of D(V, σ) from finite to infinite. From this perspective it is maybe not entirely surprising that this opens up for a violation of the standard bound.
With the setting as in Assumptions 2 we define the average energy loss D(V, σ) in the energy reservoir By energy conservation, the assumption of prefect control, and the general relation H = F (H) − kT ln G(H), one can show that The strategy will be to construct a model with a Hamiltonian and a particular class of energy conserving unitary operators V that is simple enough that we can determine the corresponding minimum of D(V, σ). Let us assume that H E = s j∈Z j|j j| where s > 0, for an orthonormal basis {|j } j∈Z . (We will use the very same Hamiltonian in Appendix G.) Moreover, we assume that H S is finite-dimensional and that the eigenvalues of H i S and H f S are integer multiples of s, i.e., they have the eigenvalues {sz i n } N n=1 , {sz f n } N n=1 , for some z i n , z f n ∈ Z, with corresponding eigenvectors |χ i n , |χ f n (again the same as in Appendix G). To make the derivations simpler we also assume that these eigenvalues are non-degenerate.
One can realize that for each single j all the vectors |i + j,n :=|χ i n |c i+ |j − z i n , |i − j,n :=|χ i n |c i− |j − z i n , for m, n = 1, . . . , N , correspond to the same global energy sj. Hence, any unitary transformation that only transforms within these collections is energy conserving. However, we also have to satisfy perfect control. Hence, the unitary should transfer |c i+ to |c f + (as well as |c f − to |c i− ). With the above remarks in mind, we define the following class of unitary operators on H S CE where the matrices [U ] m,n are unitary for each fixed j. (If we additionally assume that these matrices are independent of j, then we obtain the class of energy translation invariant unitaries that is considered in Appendix G.) By construction (F6) is energy conserving, and the first line corresponds to transitions from the control state |c i+ to |c f + , thus implementing the desired perfect control. The second line in (F6) analogously describes evolution from |c f − to |c i− . The two last lines in (F6) serve no active role in our protocol, but are there in order to guarantee unitarity, energy conservation, and time-reversal symmetry of the global evolution V .
Next we define time-reversals on S C and E. First de- which so to speak swaps the control states between the positive and negative 'tracks'. We use this in turn to de- where τ denotes the transpose with respect to the orthonormal basis B := {|χ i n |c i+ } n ∪{|χ i n |c i− } n ∪{|χ f n |c f + } n ∪{|χ f n |c f − } n . If this would have been a finite-dimensional case, we could have used Proposition 2 to conclude that T S C is a time-reversal. However, it is straightforward to directly check the properties in Definition 1.
Let T E be the transpose with respect to the basis Next, note that and where λ ↓ n (Q) denotes the n:th eigenvalue of Q, ordered non-increasingly. The minimum in (F8) can be obtained by noting that [|U (j):f +,i+ m,n | 2 ] m,n is a doubly stochastic matrix for each j. Hence, according to Birkhoff's theorem [196] it can be regarded as a convex combination of permutation matrices. Since every permutation matrix results from a unitary matrix, we know that the maximum of (F7) is given by a permutation.
(Alternatively, one can define U (j) := m,n U . By the general relation max U Tr(U † QU R) = m λ ↓ m (Q)λ ↓ m (R), see e.g. Theorem 4.3.53 in [195], it follows that (F8) holds.) Assume that the energy reservoir starts in the specific energy eigenstate σ := |0 0|. The definition of r j in (F9), together with the assumed non-degeneracy of H i S and thus of z i n , leads to By combining this observation with (F8) we get In other words, we get a violation of the standard bound whenever S G(H i S ) + ln λ ↓ 1 G(H f S ) > 0. For an explicit example where this is the case, let H i S = H f S = s K k=0 k|χ k χ k |. In this particular case we find In the limit of large K this approaches sβe −sβ /(1−e −sβ ), which is strictly larger than zero since sβ > 0. Thus, for sufficiently large K it follows that min D(V, σ) < F (H f S )−F (H i S ). Hence, with the identification between D(V, σ) and W we do get a violation of the standard bound.

Bound for a closed cycle
Here we consider the counterpart to the classical bound W + + W − ≥ 0, where W + and W − are the work costs of the forward and reverse process, respectively. As in Appendix F 1, we take Tr(H E σ) − Tr H E F + (σ) as the counterpart of W + . Assuming that we use the very same energy reservoir also for the reversed process, we let W − correspond to Tr H E F + (σ) −Tr H E F − F + (σ) , thus assuming that the energy reservoir is initially in state F + (σ) in the second application. The inequality (F1) in Proposition 7 is applied for the forward process, and the analogous inequality is applied for the reversed process, which yields Hence, in this case we regain the standard result if both channels R + and R − are unital.

Bound on 'second law violations'
In the classical case, Crooks theorem and Jarzynski's equality put constraints on the distribution of the work cost. In particular, one can obtain a bound on the probability that the work value in a single run would violate the classical macroscopic bound W ≥ ∆F , where ∆F := F (H f S )−F (H i S ) (for an initial equilibrium distribution). More precisely, regarding the work W as a random variable, we can ask for the probability that the work W is smaller than ∆F −ζ. In [100] (alternatively, see section 7 of [3]) it is shown that P [W < ∆F − ζ] ≤ e −βζ . In other words, the probability of a such an event is exponentially suppressed in the size of the violation ζ.
Here we obtain an analogous bound in the quantum setting, but we again find that regaining the standard expression requires unitality of R + . For this discussion we assume that H E has a complete orthonormal basis {|n } n of eigenvectors.
We let P ≤E0 denote the projector onto the energy eigenstates of H E that has at most energy E 0 . In other words, P ≤E0 σP ≤E0 = σ implies that the probability to find an energy larger than E 0 in σ is zero. We similarly let P ≥ζ−∆F +E0 denote the projector onto the energy eigenstates of H E that have at least the energy ζ − ∆F + E 0 .
Assuming that P ≤E0 σP ≤E0 = σ we can thus interpret Tr P ≥ζ−∆F +E0 F + (σ) as the probability that we would observe an energy gain in the reservoir that is at least ζ − ∆F . Equivalently, this would be the probability that we would observe that the work done on the system is at most ∆F − ζ. In this sense we regard Tr P ≥ζ−∆F +E0 F + (σ) as an analogue of P [W < ∆F −ζ], for the class of initial states σ such that P ≤E0 σP ≤E0 = σ.
We first observe the following operator inequality J βH E (P ≥ζ−∆F +E0 ) ≤ e −β(ζ−∆F +E0)1 . Since R + is a completely positive map, it means that it preserves operator inequalities, and thus By applying the fluctuation relation (C12) in Proposition 3 onto σ and take the expectation value of the projector P ≥ζ−∆F +E0 we get where we use Lemma 11, and the definition of the channel conjugate R * + . We next note that J −1 βH E (σ) is a positive semidefinite operator, and hence the operator inequality in (F11) implies that whereσ := J −1 βH E (σ)/Tr(e βH E σ) is a density operator. If we assume P ≤E0 σP ≤E0 = σ, then it follows that Tr(e βH E σ) ≤ e βE0 . By combining this observation with (F12), (F13) and e β∆F = Z(H i S )/Z(H f S ), it follows that Tr P ≥ζ−∆F +E0 F + (σ) ≤ Tr R + (1)σ e −βζ . Hence, even without further conditions on the channel R + , there is an exponential suppression of the energy gain in the reservoir. If R + is unital, R + (1) =1, we obtain the counterpart Tr P ≥ζ−∆F +E0 F + (σ) ≤ e −βζ to the classical bound.

Appendix G: Energy translation invariance
In this investigation, we have allowed for the possibility that the processes depend non-trivially on the amount of energy in the energy reservoir. Here we consider a further restriction that implements the idea that the experiment does not depend on the energy level. This model has previously been used in [32] to analyze coherence and work extraction. Here we only describe the most essential aspects of this model. For a more detailed description, see [32]. First of all, imagine the Hamiltonian H E of the energy reservoir as a doubly infinite ladder of energy levels with energy spacing s > 0. (See also the continuum version in [45].) As one can see, this Hamiltonian has a bottomless spectrum (which echoes the discussions in Appendix C 4). Although this is not the most physically satisfying assumption, one can view it as an idealization of a 'battery' that has a much higher energy content than the characteristic scale of energy costs in the experiment. We furthermore assume that the Hamiltonian H S of system S (which includes all systems that are not E, i.e., in our case, system S, the heat bath B, and the control C) is such that all its eigenvalues (we assume a finitedimensional Hilbert space H S with dimension N ) are integer multiples of the energy spacing s. (Due to this assumption it becomes easy to construct non-trivial energy conserving unitary operations.) In other words, we assume that H S has an eigenbasis {|ψ n } N n=1 with corresponding eigenvalues sz n where z n ∈ Z for each n. Note that we allow H S to be degenerate, in which case {|ψ n } n is an eigenbasis of our choice.
In this section we not only demand that the global unitary operations are energy conserving, [H, V ] = 0, but also that they are energy translation invariant. To define what we mean by this, we introduce the energy translation operator ∆ = j |j + 1 j| on the energy reservoir. We say that a unitary operator V on H S ⊗ H E is energy translation invariant if [1 S ⊗ ∆ a , V ] = 0 for all a ∈ Z. It turns out [32] that that all energy conserving and energy translation invariant unitary operators in this model can be written in the following way (In contrast to the timereversals T , there is no swap of the ordering.) We also need to incorporate time-reversals (an aspect not included in [32]).

Lemma 13.
Let T E be defined as the transpose with respect to the orthonormal basis {|j } j∈Z . Let H S be finitedimensional and let T S be such that T S (H S ) = H S . Then for all operators U on H S .
The proof is a direct application of the properties of time-reversals combined with Lemma 7 and (G3).
The following lemma shows that the induced channels R ± and F ± are unital in this model. Hence, they automatically satisfy the condition that emerged in the considerations on Jarzynski relations and work bounds in Appendices E and F, respectively. (The unitality of this type of induced channels was previously observed in section II.C in the Supplementary Material of [32].) Lemma 14. For the channels F ± and R ± defined in equations (C7) and (C8), with V : The proof is obtained by inserting the definition (G2) of V (U ) into the definitions of F ± and R ± in equations (C7) and (C8), and apply these to the identity operator.
Lemma 15. With F ± and R ± as defined in equations (C7) and (C8), with V := V (U ) as in (G2), it is the case that Proof. Here we only show the equality for F + . The others are obtained analogously. The proof is based on the fact that V (U ) commutes with1 S ⊗ ∆ j . With the notation We can regard m|F ± (|n n |)|m as the matrix elements in a matrix representation of the linear maps F ± . It turns out that the translation invariance in Lemma 15 in conjunction with the decoupling between the coherence modes described in Appendix D 1 reduces the number of independent parameters in this representation. More precisely, where p ± (m|n) = m|F ± (|n n|)|m are the diagonal transition probabilities as defined in (D4). The mapping F ± is thus determined by the probabilities by which |0 0| is mapped to the other eigenstates of H E . This can equivalently be expressed as The expression in (G7) can be compared with the more general case in (D7). In Appendix D 3 it was demonstrated that the off-diagonal modes of coherence satisfy Crooks relations that are structurally identical to the one along the diagonal. Equations (G6), or equivalently (G7), implies a stronger statement for the special case of the energy translation invariant model. Namely, that the dynamical map along each the off-diagonal modes is identical to the one along the main diagonal. (This does not imply that the elements of the density matrix along the different diagonals are the same.)

Regaining the standard Crooks and Jarzynski relations
The standard Crooks relation can be written where P ± (w) := P (W ± = w), and where W + and W − are the work costs of the forward and reverse processes regarded as random variables. In the following we shall see how one can regain (G8) from the diagonal Crooks relation (D5) in Appendix D 2 by additionally assuming energy translation invariance in the energy-ladder model. If we identify the loss of energy in the reservoir with the work done, then a transition from energy level n to m in the reservoir corresponds to the work w = E n − E m (cf. [9]). The probability P ± (w) is obtained by summing up the probabilities of all the transitions that generate the work cost w. More precisely, where p ± (m|n) are the conditional probability distributions, defined in (D4), that describe the transitions among the diagonal elements.
The energy-ladder model yields E n = sn. Hence, n − m = w/s. By (G6) it follows that A direct consequence is that the probability distribution P ± (w), defined in (G9), becomes independent of the initial σ, These observations can be used to regain the classical Crooks relation (G8), where the second inequality is due to the diagonal Crooks relation in (D5). Here w means that we sum over the set of possible energy changes, which for this particular model is sZ.
Since we have re-derived the classical Crooks relation, we do also more or less automatically obtain the classical Jarzynski equality e −βW = Z(H f )/Z(H i ) [91]. This can be done via the 'standard' derivation where the first equality is due to the Crooks relation (G12). One can alternatively use the fact that R + (1 E ) = 1 E (by Lemma 14) and use the quantum Jarzynski equality (E2) to derive the classical Jarzynski relation by again making use of the decoupling of the diagonals, and the energy translation invariance. In the main text it is claimed that the mapping F − → F − can be regarded as a generalization of the map P − (w) → P − (−w). This generalization becomes evident for the energy translation invariant model. Let T E be the transpose with respect to {|n } n . By the definition of it follows that where the last equality follows from the translation invariance in Lemma 15. Hence, the action of can in some sense be identified with the change of signs.

Examples
The main purpose of these examples is to show that there exist setups of Hamiltonians, states, and unitary operators that satisfy Assumptions 1 and Assumptions 2. We also take the opportunity to construct discretizations of paths of Hamiltonian within these models. The reason for why these demonstrations have been postponed until this section is that the energy-translation invariant systems have properties that make them convenient for constructing explicit examples. These examples are only sketched, and the details of the straightforward but in some cases somewhat long-winding confirmations are left to the reader.

a. A minimal example without time-reversal
Here we demonstrate a 'minimal' setup that satisfies the conditions in Assumptions 1. Let H i S and H f S be Hamiltonians on H S for which the eigenvalues are multiples of s, i.e., sz i n and sz f n for z i n , z f n ∈ Z, and let H E := s j j|j j| be the energy-ladder. Let |c i , |c f ∈ H C be two orthonormal states, and let The operators1 S ⊗|c i c i | and1 S ⊗|c f c f | are blockdiagonal with respect to the energy eigenspaces of H S C . Due to this one can confirm that . Hence, the fact that U satisfies perfect control implies that V := V (U ) also satisfies the condition for perfect control, and we can conclude that this setup satisfies all conditions of Assumptions 1. (G15) In the following we shall define a unitary operator U on S C that generates one single step along the discretization. The propagation along the path is obtained by iterating U such that the entire evolution along the Lstep discretization is generated by U L . Let U 1 , . . . , U L be arbitrary unitary operators on H S and define U := L−1 l=0 U l ⊗|c l+1 c l |+U L ⊗|c 0 c L |. One can confirm that U is unitary. The unitary operator V (U ) is energy conserving, and analogous to Appendix G 3 a one can con- Hence, V := V (U ) L satisfies the conditions in Assumptions 1.

c. A minimal example with time-reversal
Here we consider a setup that satisfies the conditions in Assumptions 2. With H i S , H f S as in Appendix G 3 a, and H E the energy-ladder, let {|c i+ , |c i− , |c f + , |c f − } be orthonormal elements spanning the Hilbert space H C of the control system C. Let and H ⊥ := 0. We next turn to the time-reversals. On As one can see, Y is a unitary operator on H C . Define the basis where {|χ i n } n is an orthonormal eigenbasis of H i S and {|χ f n } n is an orthonormal eigenbasis of H f S . Define where τ denotes the transpose with respect to the basis B. Note that1 S ⊗Y is complex symmetric with respect to the basis B (and the space H S C on which it operates is finite-dimensional). Hence, according to Proposition 2 it follows that T S C is a time-reversal (and is moreover the transpose with respect to some basis). One can verify that T S C (H S C ) = H S C , and furthermore Moreover, we define the time-reversal T E on the energy reservoir as the transpose with respect to the basis {|j } j∈Z , and thus it is the case that T E (H E ) = H E . We define the global time-reversal as T := T S C ⊗ T E . Let U + and U + be arbitrary unitary operators on H S , and define U : where U − := nn |χ i n χ f n |U + |χ i n χ f n | and U − := nn |χ f n χ i n |U + |χ f n χ i n |. One can confirm that U − , U − , and U are unitary, and thus V (U ) is an energy conserving unitary operator. Moreover, one can confirm that T S C (U ) = U . Since T S C (H S C ) = H S C (and since H S C is finite-dimensional) we know by Lemma 13 that T (V (U )) = V (T S C (U )) = V (U ). Hence, the dynamics is time-reversal symmetric. With a reasoning analogous to Appendix G 3 a, one can also show that Hence, all the conditions of Assumptions 2 are satisfied.

d. Discretized paths of Hamiltonians with time-reversal
Here we modify the setup of Appendix G 3 b such that it incorporates time-reversal, and satisfies the conditions in Assumptions 2.
We let {|c ± l } L l=0 be a set of orthonormal elements spanning the Hilbert space H C of the control system C. For the family of Hermitian operators ( H l ) L l=0 , let To compare with Assumptions 2 we have We next turn to the time-reversals. On One can confirm that U is invariant with respect to T S C . By an analogous reasoning as in Appendix G 3 c one can show that the energy conserving unitary operator V (U ) satisfies T (V (U )) = V (U ). By the general properties of time-reversals it thus follows that the operator V := V (U ) L is an energy conserving, time-reversal symmetric, and unitary operator. The proof that V also satisfies perfect control In Appendix C 1 it was pointed out that a state and its time-reversal do not necessarily have to be orthogonal to each other. It was also claimed that it is possible to find a setup that satisfies Assumptions 2 and in addition is such that the pair of control states |c i+ and |c i− are not orthogonal to each other (and analogously for |c f + and |c f − ). Here we demonstrate this claim, and we also discuss how additional assumptions may enforce orthogonality.
Let H i S and H f S be as in Appendix G 3 a with eigenvalues sz i n and eigenvectors |χ i n , as well as eigenvalues sz f n and eigenvectors |χ f n , respectively. We let H E be the energy ladder, with eigenvalues sj and eigenstates |j . We let the control space H C be four-dimensional, with an orthonormal basis {|i |0 , |i |1 , |f |0 , |f |1 }.
The vectors |c i+ and |c i− are typically not orthogonal for generic choices of α, β, and analogously for the pair |c f + , |c f − . It is convenient to also define one can confirm that T S C (H S C ) = H S C , and also that One can also confirm that Although U thus is time-reversal symmetric and satisfies perfect control with respect to the designated control states, it is typically not energy conserving. However, since T S C (H S C ) = H S C (and since H S C is finite-dimensional) we know by Lemma 13 that T (V (U )) = V (T S C (U )) = V (U ). Moreover, by construction, [V (U ), H S C ⊗1 E +1 S C ⊗H E ] = 0, and thus V (U ) is both time-reversal symmetric and energy conserving.
With a reasoning analogous to Appendix G 3 a, one can also show that . Hence, all the conditions of Assumptions 2 are satisfied. Moreover, this is achieved with control states where |c i+ is not necessarily orthogonal to |c i− , and where |c f + is not necessarily orthogonal to |c f − . This includes the special case that |c i+ and |c i− are parallel, which happens if the phase factors of α and β are identical. One may wonder how this parallelity fits with the idea that the control states represent the forward and reverse propagation of control parameters. First of all, if |c i− is parallel to |c i+ , and |c f − parallel to |c f + , then perfect control implies that repeated applications of V (U ) swap the control back and forth between |c i+ c i+ | and |c f + c f + |. Moreover, one should observe that the above example, and indeed Assumptions 2, only concerns the mapping between the initial and final control states, and does not include any requirements concerning what happens at any potential intermediate states of the process. Let us now additionally assume (much as in Appendix G 3 d) a sequence of control states {|c ± l } l . We do moreover demand perfect control for all states in the forward path, as well as perfect control for all states in the reverse path, i.e., By using the unitarity of the global evolution V (U ) it follows that Consequently, if we would demand that Sp{|c + l+1 , |c − l+1 } should be orthogonal to Sp{|c + l−1 , |c − l−1 }, then it follows that |c + l must be orthogonal to |c − l . Hence, perfect control of the reverse and forward paths conspires with the assumed orthogonality of the control spaces to enforce orthogonality between the forward and reverse control states.

Appendix H: Conditional fluctuation relations
Here we consider a generalized type of fluctuation relation that naturally includes non-equilibrium states. This extension may at first sight seem rather radical. However, our quantum fluctuation relation in Proposition 3 strictly speaking already requires initial non-equilibrium states, due to the control system, as discussed in Appendix A 3.
As we have seen in Appendix C 4, the assumption of perfect control is a rather strong condition, and may require an energy reservoir spectrum that is unbounded from below (as well as above). The conditional fluctuation relations allow us to abolish the perfect control (see Appendix H 7 a). Not only can we avoid unbounded spectra, but we can also base the conditional fluctuation relations on finite-dimensional Hilbert spaces (see Appendix H 7 b for an explicit example).

The Gibbs map and the partition map
For a given operator A we define the Gibbs map G A and the partition map Z A by By construction, G A (Q) is a density operator whenever Q is a positive operator (modulo the existence of Z A (Q)).
In the special case that A = βH for β ≥ 0, then Z βH (1) = Z β (H) and G βH (1) = G β (H). An immediate question is what class of density operators that can be reached by the Gibbs map. If H is a bounded Hermitian operator, then e ±βH is also bounded, and thus J −βH (ρ) < +∞, where Q := sup ψ Q|ψ denotes the standard operator norm. For an arbitrary density operator ρ (which by virtue of being trace class also is bounded, see e.g. [114]) let Q := J −βH (ρ)/ J −βH (ρ) . By construction 0 ≤ Q ≤ 1, and one can confirm that that G βH (Q) = ρ. Hence, for bounded Hermitian operators H, one can reach all density operators via the Gibbs map (and thus in particular if the Hilbert space is finite-dimensional). The issue becomes more complicated if H is unbounded, since we have to take into account the domain of definition of H and of e ±βH . More generally it may be the case that the Gibbs map does not generate the entire set of density operators. Although we do use the Gibbs map for unbounded H, we will nevertheless not consider this question further in this investigation.
One can further note that G βH is a many-to-one map from the set of POVM elements, although in a relatively mild sense. If Q is a POVM element, then rQ for 0 < r < 1 is also a valid POVM element. The Gibbs map G βH maps both Q and rQ to the same density operator.

Without time-reversal
As mentioned earlier, the fact that we drop the assumption of perfect control implies a simpler structure. The first simplification is that we here only need to consider two subsystems: the energy reservoir E and the rest S. For the general theory there is no need for any further partitioning into subsystems, but in order to relate to the results in previous sections we would let S = S C = SBC. • Let Q i S and Q f S be operators on H S such that 0 ≤ Q i S ≤1 S and 0 ≤ Q f S ≤1 S .
The operators Q i S and Q f S play dual roles in this analysis. First, they correspond to control measurements. For example, we can form the two POVMs (Nothing in this formalism forces us to necessarily use binary POVMs. See the discussion at the end of Appendix H 3.) In these POVMs, Q i S and Q f S are the 'successful' outcomes, and the CPMsF and R, defined in (H1) below, generate the corresponding (non-normalized) post-measurement states of the reservoir conditioned on these successful outcomes.
The second role of Q i S and Q f S is that the they parametrize initial states via the Gibbs map G βH S . These roles are swapped within the pair, such that for the reverse process, Q f S gives the initial state, and Q i S the measurement.
We define the completely positive maps The following is the counterpart of Lemma 1, and is left without proof.
Lemma 16. With V , H S , and H E as in Assumptions 3, it is the case that for every α ∈ C Proposition 8. With Assumptions 3, the CPMsF and R as defined in (H1) satisfy Proof. By comparing the definition of the CPMR with Eqs. (A6) and (A7) in Appendix A 5, we can conclude that (H4) By multiplying from the left with J βH E and from the right with J −1 βH E we obtain Eq. (H3).

With time-reversal
Assumptions 4. Let H S and H E be complex Hilbert spaces. Let T S and T E be time-reversals on S and E, respectively, and let T := T S ⊗ T E .
• Let H S and H E be Hermitian operators on H S and H E , respectively, and let • Let V be a unitary operator on H S ⊗ H E such that [H, V ] = 0.
• Let Q i+ S and Q f + S be operators on H S such that Define the CPMs The CPMsF ± andR ± describe the unnormalized mapping from the input to the output, conditioned on the successful control measurement. The corresponding success probabilities are given by the traces. (In Appendix H 6 b we shall consider these success probabilities in the special case of energy translation invariance.) Analogous to Lemma 11 one can prove the following.
Lemma 18. With Assumptions 4, the CPMsR + and F − as defined in Eq. (H7) are related as and thusR * The proof is obtained by combining the definition of R + in Eq. (H7) with the general fact that T 1 Tr 2 (ρ) = Tr 2 [T 1 ⊗ T 2 ](ρ) , the time-reversal symmetry, and Lemma 17.
Here we use the notation Z βH S (Q i S ) : The application of Lemma 18 to the above equation results in equation (H10).
Due to Lemma 17 we know that . Note that Proposition 9 only makes a statement concerning pairs of measurement operators. It does not make any assumptions on the POVMs that these measurement operators may be members of. For example, instead of basing the induced CPMs in (H7) on the pair (Q i+ S , Q f + S ) we could equally well obtain fluctuation relations for each of the pairs (Q i+ There is also no need to assume that the POVMs are binary. For two POVMs {Q i+ S,k } k and {Q f + S,l } l one can, for each possible combination of POVM elements (Q i+ S,k , Q f + S,l ), construct the corresponding CPMsF (k,l) ± as in (H7), where each of these pairs satisfies the conditional fluctuation relation (H10).

Generally no decoupling of diagonals
In Appendix D 1 we showed that the channels F ± induced on the reservoir are such that the dynamics decouples along the modes of coherence. One may thus wonder whether something similar is true for the conditional CPMsF ± . In Appendix D 1 the starting point was Lemma 12, which shows that F ± and R ± commute with the commutator with respect to H E . The following Lemma shows that this is generally not true for the conditional CPMsF ± andR ± , and thus we cannot expect to have a separation of the dynamics of the different diagonals of the density matrix. (For an explicit example of such 'mixing' of diagonal and off-diagonal elements, see Appendix H 7 b.) Lemma 19. With Assumptions 4, the CPMF + defined in Eq. (H7) satisfies the following relation Analogous statements hold forF − andR ± .
The proof is obtained via H = H S ⊗1 E +1 S ⊗ H E and the energy conservation [H, V ] = 0.

Nevertheless diagonal and off-diagonal conditional fluctuation relations
Although there is no decoupling, there do strictly speaking still exist counterparts to (D5) and (D8). To see this, suppose that H E is non-degenerate, with a complete orthonormal eigenbasis {|n } n . Define the general transition matrixq ± (mm |nn ) := m|F ± (|n n |)|m for arbitrary m, n, m , n . Assuming that T E is the transpose with respect to {|n } n , we can rewrite the conditional fluctuation relation (H10) in its 'matrix form' Nothing prevents us from definingp ± (m|n) := q ± (mm|nn) = m|F ± (|n n|)|m , andq δ ± (m|n) := q ± (mm |nn ) for E n − E n = E m − E m = δ, and as special cases of (H12) write (H14) We can view (H13) and (H14) as the conditional counterparts to (D5) and (D8). However, while (D5) and (D8) describe the dynamics within the decoupled diagonals, we cannot interpret (H13) and (H14) in the same manner, due to the lack of decoupling. More generally, the objectsp ± (m|n) andq δ + (m|n) must be interpreted with more caution than their counterparts p ± (m|n) and q δ + (m|n). For example, thep ± (m|n) is the probability to detect the energy reservoir in eigenstate m, given that the reservoir was prepared in state |n n|, and that the control measurement is successful. We can interpret p ± (m|n) in a similar manner (without the control measurement). However, due to the decoupling we can also interpret p ± (m|n) as describing the evolution of the diagonal elements of the density matrix, irrespective of the initial state. More precisely, we know that the probability m|F ± (σ)|m to detect a specific final energy eigenstate m only depends on the diagonal elements n|σ|n . However, m|F ± (σ)|m not only depends on the diagonal elements of the input, but on the entire state σ. In other words, we can no longer claim that an initial energy measurement would not perturb a final energy measurement. In the case that the measurement operators Q i± S and Q f ± S commute with H S we can regain several of the prop-erties of the unconditional fluctuation relations. By a direct application of Lemma 19 we get [H E ,F ± (σ)] = F ± ([H E , σ]). Analogously to how we obtained Corollary 2 from Lemma 12, and with analogous assumptions, we also regain the decoupling of the different modes of coherence, i.e., m |F ± (|n n|)|m = 0, if E m − E n = E m − E n . In this case (H13) and (H14) thus gain a status analogous to (D5) and (D8), in the sense that they describe the dynamics within each decoupled diagonal.

a. A classical conditional Crooks relation
By additionally assuming the energy translation invariant model as in Appendix G one regains the energy translation invariance of the induced CPMs ∆ jF ± (σ)∆ † k = F ± ∆ j σ∆ † k . Analogous to Appendix G 1 we can also defineP whereP ± (w) can be interpreted as the probability that the energy reservoir looses the energy w and that the control measurement is successful. The decoupling again guarantees the stability of the detection probabilities under repeated energy measurements. We obtain the classical conditional Crooks relation in a manner very similar to what we did in Appendix G 1.

b. A classical conditional Jarzynski relation
The control measurements generally do not succeed with unit probability. However, for the energy translation symmetric case, with diagonal measurement operators, the success probabilities TrF ± (σ) and TrR ± (σ) become independent of the state σ of the energy reservoir. To see this, we first define the following transition probabilities that do not involve the energy reservoir.
In words f + is the probability that we would obtain the 'successful' outcome when we measure the POVM One should keep in mind that since Q f ± S and Q i± S commute with H S , it follows that the above expressions do not involve coherences with respect to the energy eigenbases.
For example, if H S is non-degenerate with eigenstates |ψ n then f + = nn ψ n |Q f + S |ψ n | ψ n |U |ψ n | 2 ψ n |G βH S (Q i+ S )|ψ n . One can confirm that the CPMsF ± andR ± in (H7) with V := V (U ) as in (G2), and [Q i± S , H S ] = 0, [Q f ± S , H S ] = 0, satisfy the following relations TrF ± (σ) = f ± Tr(σ), TrR ± (σ) = r ± Tr(σ), (H18) Hence, the success probabilities of the control measurements are independent of the state of the energy reservoir. It is instructive to write the expression for F + in (H18) in full Hence, in terms of the success probability, the experiment involving the energy reservoir behaves as if it was a simpler experiment not including the reservoir, where the unitary V (U ) is replaced by U (but one should keep in mind that this relies on the assumptions that Q f + S and Q i+ S commute with H S , and thus block-diagonalize with respect to the energy eigenspaces of H S ).
By the classical conditional Crooks relation . As opposed to the unconditional case, wP − (−w) is generally not equal to 1, but equates to the success probability of the reverse process, i.e., wP − (−w) = wp − (w/s|0) = TrF − (|0 0|) = f − . Thus . (H20) Given that the control measurement succeeds, we can define the conditional probability for the work cost w as P + (w|Q f + S ) :=P + (w)/ w P + (w ) =P + (w)/f + . By using this we can rewrite (H20) in the more symmetric form where we use the notation e −βW |Q f + S := w e −βw P + (w|Q f + S ). The conditional Jarzynski relation in (H21) does remind of the Jarzynski equality under feedback control [92][93][94], and it may be worthwhile to investigate this potential link further. However, we will not do so in this investigation.

a. Abolishing perfect control
As discussed in Appendix C 4 the perfect control (see equations (A1) or (C3) and (C4)) can lead to an energy reservoir that has an unbounded spectrum from both above and below. From a physical point of view a spectrum that is unbounded from below is somewhat uncomfortable. With the conditional fluctuation relations we no longer need to assume perfectly functioning control systems. We could for example let the transition from initial to final control state fail if the energy reservoir runs out of energy, so to speak. Here we demonstrate this in the case of a harmonic oscillator as the energy reservoir.
We make use of a model that was introduced in quite a detail in section IV in the Supplemental Material of [32]. Due to this, only the briefest description will be provided here. The main point is that one can construct a family of unitary operators V + (U ) that act identically to V (U ) as long as the energy in the energy reservoir is high enough. (We do not employ the 'injection' of energy that was used in [32], but instead allow the procedure to fail.) Apart from the Hamiltonian for the energy reservoir, H + E := s +∞ j=0 j|j j| and the class of unitary operators V + (U ), the rest of the model is as in Appendix G 3 c. We let For each unitary operator U on H S C it follows that V + (U ) is unitary on H S CE . We let T E be the transpose with respect to {|j } j≥0 , and let T S be such that T S C (H S C ) = H S C . (Note Lemma 7.) From this it follows that T := T S C ⊗ T E is such that T V + (U ) = V + T S C (U ) .
One can also confirm that V + (U )|ψ |j = V (U )|ψ |j for all |ψ ∈ H S C and all j ≥ z max − z min , where V (U ) is defined in (G2).
More generally, in terms of the eigenprojectors P (l) + of the total Hamiltonian H, it is the case that V + (U )P (l) One can say that V + 'censors' our choice of U in the sense that if U entails an energy change that we cannot afford, then V + (U ) avoids to perform the too expensive parts of the operation.
As an example, let us modify the setup in Appendix G 3 c such that we replace V (U ) with V + (U ). For the sake of illustration we consider an extreme case where For these choices, all transitions from the initial to the final Hamiltonian require energy. Moreover, z max = 4 and z min = 1. One furthermore finds that P (1) Hence, if the control is in state |c i+ and the reservoir is in the vacuum state |0 , we find that V + (U )[ρ ⊗ |c i+ c i+ | ⊗ |0 0|]V + (U ) † = ρ ⊗ |c i+ c i+ | ⊗ |0 0| no matter what U we feed into it, and thus the control measurement will always signal 'fail'. On the other hand, if there are four or more quanta of energy in the reservoir, then In particular, if we would could choose U as in (G20), then the control measurement would always succeed.

b. S and E as single qubits
The conditional fluctuation relations allow us to treat energy reservoirs with finite-dimensional Hilbert spaces. Here we consider the extreme case where both S and the energy reservoir E are single spin-half particles.
We assume that the spins are associated with magnetic moments, and that they are affected by a constant external magnetic field, such that they are in resonance, i.e., the splitting of the eigenenergies are identical. More precisely, for some s > 0. The identical energy gap implies that there exist non-trivial energy conserving unitary operations with respect to H := H S ⊗1 E +1 S ⊗ H E . More specifically, H has the eigenenergies −s, 0, s and corresponding energy eigenspaces Sp{|0, 0 }, Sp{|0, 1 , |1, 0 }, and Sp{|1, 1 }. An energy conserving unitary operator thus has to be block diagonal with respect to these energy eigenspaces, The expansion of the CPMsF ± for arbitrary Q i± S and Q f ± S in terms of the {|0 , |1 } basis results in remarkably bulky and unilluminating expressions. Therefore we shall here only consider the simpler special case where Q i+ S := 1 S , Q f + S := |ψ ψ|, |ψ := 1 . The partition maps take the values Z βH S (Q i S ) = e βE/2 + e −βE/2 and Z βH S (Q f S ) = (e βE/2 + e −βE/2 )/2.

Appendix I: Alternative formulation
Up to now we have focused on the dynamics of the energy reservoir, and formulated all our results in terms of channels or CPMs induced on this system. Here we shall take a step back and briefly re-examine the structure of these fluctuation theorems from a global point of view.

Global invariance
Let us for a moment forget the division into systems, heat baths, and energy reservoirs, and consider one single system with a global Hamiltonian H, and a unitary evolution V that is energy conserving [H, V ] = 0, and where this system satisfies a time-reversal symmetry T (H) = H, T (V ) = V . For any pair of global measurement operators Q i+ and Q f + , it is the case that where as usual Q i− := T (Q i+ ) and Q f − := T (Q f + ). In other words, (I1) expresses an invariance of the quantity All our fluctuation relations can in some sense be regarded as special cases of this global invariance, which here emerges from the combination of time-reversal symmetry and energy conservation.
Time-reversal symmetry alone is not enough to derive this invariance; energy conservation also is needed. However, if it would be the case that V = e −itH/ , then it follows that [H, V ] = 0, and the assumption T (H) = H would automatically yield T (V ) = V . Hence, in this case time-reversal symmetry would be enough.
The relation (I1) can be rewritten as the global fluctuation relation (29) in the main text.

Factorization of non-interacting degrees of freedom
The global symmetry in (I1) does not explain how we can express fluctuation theorems in terms of channels or CPMs on the relevant systems. Throughout this investigation we have repeatedly used the fact that the exponential function factorizes over non-interacting degrees of freedom. To be more precise, suppose that the global system be decomposed into two subsystems 1 and 2 (i.e., H = H 1 ⊗ H 2 ) and assume a non-interacting Hamiltonian H = H 1 ⊗1 2 +1 1 ⊗ H 2 , with the consequence that J βH = J βH1 ⊗ J βH2 . For product measurement operators Q = Q 1 ⊗ Q 2 this results in the factorization of the partition map Z βH (Q 1 ⊗ Q 2 ) = Z βH1 (Q 1 )Z βH2 (Q 2 ), and thus also for the Gibbs map G βH (Q 1 ⊗ Q 2 ) = G βH1 (Q 1 ) ⊗ G βH2 (Q 2 ). In other words, the two states G βH1 (Q 1 ) and G βH2 (Q 2 ) can be prepared separately on respective system.
One way in which the factorization could fail would be if the global Hamiltonian is interacting, and this is the topic of Appendix K. In Appendix I 4 we briefly discuss the more exotic alternative that thermal states would not be characterized by Gibbs states.

Inaccessible degrees of freedom
In the context of statistical mechanics we would typically deal with large numbers of degrees of freedom that we have no access to, e.g., a heat bath. This means that we neither have direct access to prepare arbitrary states on these degrees of freedom, nor to make arbitrary measurements on them. (One can of course imagine some form of partial accessibility, but to keep things simple we here assume 'all or nothing'.) Thus imagine that the total system is divided into two subsystem 1 and 2, where 2 is inaccessible to us, and 1 is completely accessible. We also assume that the global Hamiltonian is non-interacting Since system 2 is inaccessible to us, all available measurement operators are of the form Q = Q 1 ⊗1 2 , i.e., we can only perform the trivial measurement on system 2. Correspondingly, a trivial preparation would be an equilibrium state G β (H 2 ) on the unaccessible degrees of freedom, with the philosophy is that nature provides equilibrium states 'for free'. Hence, all possible initial states that we would be able to prepare would be of the form To further highlight how the factorization property enters in the treatment of the unaccessible degrees of freedom, let us take a closer look at the global fluctuation relation in (29). Suppose that the forward process would be characterized by a measurement operator of the allowed form Q f + = Q f + 1 ⊗1 2 . Then we know that the initial state of the reverse process would be given by . In other words, trivial measurements on the unaccessible degrees of freedom get mapped to trivial preparations on these systems, and vice versa. However, this would no longer be true if G βH (Q 1 ⊗1 2 ) would not factorize.
This line of reasoning may also fail if G βH2 (1 2 ) would not correspond to the equilibrium state on system 2. This would be the case if we would choose β in our fluctuation relations to be different from the actual β of the heat bath. From a purely mathematical point of view, the fluctuation relations are of course valid for all values of β irrespective of whether they correspond to the actual temperature or not. However, in this case G β (H 2 ) rather than G β (H 2 ) would be the true equilibrium state. Hence, it would require an active intervention on system 2 to prepare the state G βH1

The issue with non-exponential generalizations of the Gibbs maps
As an illustration of the particular role of the exponential function and the Gibbs distribution, let us imagine that we attempt to use some other form of function to describe a generalized type of equilibrium states. (This should not be confused with other types of generalizations, such as Jaynes [197,198] and recent approaches to multiple conserved quantities [164][165][166][167].) More precisely, let g be any reasonable (possibly complex valued) function, and define the generalized map J g βH (Q) := g(βH)Qg(βH) † , as well as the generalized Gibbs and partition maps , Z g βH (Q) := TrJ g βH (Q).
Here G g (1) = g(βH)g(βH) † /Tr g(βH)g(βH) † would presumably take the role of a generalized form of equilibrium state. One could imagine constructing fluctuation relations for this generalized setup, and it is indeed straightforward to repeat the derivation of (I1) to obtain At first sight this may seem like an endless source of non-standard fluctuation theorems for hypothetical non-Gibbsian distributions. However, since the factorization property fails for general non-exponential choices of g, we can for example not reproduce the reasoning in Appendix I 3.

Appendix J: Pre-correlations
Here we provide some further details on the example of section V C in the main text, where we describe a setup similar to the one for the quantum Crooks relation (2), but where we wish to allow for the possibility that S and E are pre-correlated. The quantum Crooks relation (2) is formulated in terms of channels on the energy reservoir E. However, this implicitly assumes that E initially is uncorrelated with the degrees of freedom it is about to interact with. Hence, in the present case we cannot express fluctuation relations in terms of channels or CPMs on E alone, but one alternative is to formulate a fluctuation relation in terms of channels on the joint system SE.
We let the global Hamiltonian be where H i SE and H f SE are the initial and final Hamiltonians of the combined system and energy reservoir (where we can let these be non-interacting if we so wish). Moreover, like in Assumptions 2, P i C and P f C are the projectors onto the two orthogonal spaces Sp{|c i+ , |c i− } and Sp{|c f + , |c f − }, respectively.
The total time-reversal is of the form T := T SE ⊗ T B ⊗ T C . (This is different from the decomposition T SBC ⊗ T E that we use in Appendix C.) We assume We furthermore let T C be such that We assume a global unitary evolution operator V that is energy conserving [V, H] = 0, time-reversal symmetric T (V ) = V , and satisfies perfect control We define the forward and reverse channels By using the relation T SE Tr CB Q = Tr CB T (Q), perfect control, and energy conservation, it follows, much as in previous derivations, that which can be rewritten as

Appendix K: Approximate fluctuation relations
As discussed in Appendix A 2 we have up to now separated the role of the global Hamiltonian H as characterizing energy, from its role as generator of the time evolution. The latter role we have so far assigned to the unitary operator V , with the restriction that it should be energy conserving [H, V ] = 0. Here we consider the modifications needed to re-join these two roles in the sense that we let V = e −itH/ (which automatically satisfies the condition for energy conservation [H, V ] = 0). Some issues appear when we try to fit V = e −itH/ with our previous assumptions on the structure of H. For example, in Assumptions 2 we explicitly assumed that the global Hamiltonian is of the form We furthermore assumed that the initial state of the control system in the forward process has support in the subspace onto which P i C projects. If the global evolution is given by V = e −itH/ , this implies that the control system will never leave the initial subspace, and thus fails to satisfy the assumption of perfect control. In other words, we cannot obtain the relevant dynamics with these combinations of assumptions.
This particular issue does not apply to the setting of the conditional fluctuation relations in Assumptions 4, since we there neither assume a special structure of H S C , nor of the initial state. However, in the conditional setup we still assume that the global Hamiltonian is of the form In other words, we assume that there is no interaction between S = S C and the energy reservoir E. Needless to say, if the global evolution would be given by V = e −itH/ , then the state of the energy reservoir would be left unaffected by whatever happens in S C, and the whole idea of the energy reservoir thus becomes meaningless. Hence, we do again find that an evolution of the form V = e −itH/ clashes with our general assumptions in the sense that it generates a trivial dynamics.

A general notion of approximate fluctuation relations
To highlight the general structure we consider a separation into two anonymous subsystems 1 and 2. The reason for this is that we will consider different ways to partition the subsystems S, B, C, and E.

a. The approximation
In Appendix I 2 we pointed out that for non-interacting Hamiltonians H = H 1 ⊗1 2 +1 1 ⊗ H 2 , the function J βH satisfies the factorization property J βH (Q 1 ⊗ Q 2 ) = J βH1 (Q 1 ) ⊗ J βH2 (Q 2 ). Since we in this section abandon these convenient non-interacting Hamiltonians, the question is what is supposed to replace them. Intuitively, the idea is that for positive operators with suitable support, the action of the global Hamiltonian H can be approxi- The more exact formulation is based on the J βH map.
We assume a product time reversal T = T 1 ⊗T 2 and local approximate Hamiltonians Suppose that for the measurement operators the approximate factorization holds The idea is that under these conditions we should obtain the following approximate global fluctuation relation Here we consider approximate versions of the conditional fluctuation relations in Appendix H. The general case is treated in the following subsection, and in the next we consider the more concrete special case of a particle as control system. a. The general case Here we identify system 1 of the previous section with S, and system 2 with E. We thus assume Similar to the conditional fluctuation relations in Appendix H we define CPMs on the energy reservoir conditioned on the successful control measurements With (K8) as starting point one can also obtain an approximate fluctuation relation in terms of channels, i.e., more in the spirit of (26). Let us define the following measure of difference between maps (K9) This particular choice of measure has no deeper reason than that it makes the derivations simple. Also define By the approximate conditional fluctuation relation (K8) it follows that Hence, this is a quantitative version of the approximate conditional relation (35) in the main text. In (K8) we only consider the error for a specific pair Q i+ E , Q f + E , while in (K11) we ask for the worst case error over the entire set of positive semi definite operators. It may very well be the case that pointwise error can be small for some specific choice of operators, while uniform error would be large. Hence, the formulation via the transition probabilities can be more 'forgiving' than the formulation via channels. This should be compared with the non-approximate case, where the choice largely is a matter of convenience.
b. The special case of a control-particle Imagine a joint Hamiltonian of the form Here M C is the mass andX C ,P C are the canonical position and momentum operators of the control particle. Assume furthermore that H S E (x) is of the form Hence, outside the 'interaction region' [x i , x f ] all the three systems systems S , E, and C are non-interacting. For the sake of illustration we consider the special case of measurement operators of the form where Q i± S , Q f ± S are measurement operators on S , and where Q i± C , Q f ± C are measurement operators on C which are 'concentrated' in the regions (−∞, x i ] and [x f , +∞), respectively. It seems intuitively reasonable that the further down from x i that Q i+ C is supported, the better is the approximation where we have introduced the notationK :=P 2 C /(2M C ), and used the fact that (K14) defines non-interacting Hamiltonians between S and C.
The approximate fluctuation relation (K11) takes the form . One may wonder how to choose the time-reversals T S and T E . One possibility is if there exist orthonormal complete bases of H S and H E , such that the family of , and H f E are real valued matrices in these bases. In this case we can choose T E and T S as transpositions with respect to these bases, and T C as the transposition with respect to the position representation, and let T S = T C ⊗ T S . This guarantees that (K6) holds.
As a further comment one may observe that what we assign as being the energy reservoir is largely a matter of choice. In this particular example it is clear that also the control particle can donate energy.

Joint control and energy reservoir
Here we turn to a setting where the control and the energy reservoir are one and the same system. Hence, instead of dividing the global system between E and S C, we here divide it into CE and S . a. The general case Here we let system 1 (in Appendix K 1 a) be S and system 2 be CE. We assume as well as [V, H] = 0 and T (V ) = V . By Proposition 10 where we introduce the following short hand notation for the transition probabilities Hence, (K18) is the quantitative version of (38) in the main text. b. A single particle as both control and energy reservoir In Appendix K 2 b we considered the case of a particle whose motion implements the time-dependent Hamiltonian in Crooks relation. There we regarded the degrees of freedom of the particle as separate from the designated energy reservoir. This made it possible to express CPMs on the energy reservoir conditioned on the control measurements on the control particle. An intuitively reasonable alternative would be that the motion of the control particle also fuels the process, i.e., it is the initial kinetic energy of the particle that that drives the whole non-equilibrium process. The global Hamiltonian can in this case be chosen to be where M CE is the mass, andX CE ,P CE are the canonical position and momentum operators of the particle. We assume i.e., the Hamiltonian for S is constant outside the interaction region.
Since the particle moreover is free outside the interaction region, we can take the initial and . Under these conditions we thus get the approximate fluctuation relation

c. Numerical evaluation
To make the approximate fluctuation relations a bit more concrete we here make a numerical evaluation of a special case of the combined control and energy reservoir particle in the previous section. We consider a single particle of mass M that is restricted to move along the Approximate factorization.
To assess the quality of the approximate factorization we evaluate y-axis, and this spatial degree of freedom is taken as the combined control and energy reservoir CE. The particle also carries a magnetic moment corresponding to a spinhalf degree of freedom, which we interpret as system S .
(A single spin is of course somewhat ridiculous regarded as a combined system and heat bath, but this example only serves to illustrate the formalism, for which the sizes of the participating systems do not matter.) We assume that the spin interacts with an external magnetic field that is time-independent, but is a function of y. The total Hamiltonian can be expressed in terms of the differential operator where n(y) determines the strength and direction of the external magnetic field as a function of y, and where S ) are the Pauli spin operators, with } being the eigenbasis of σ (z) . For n = 1 it follows that E 0 is the excitation energy of the spin.
To get a particularly simple model we here assume that n(y) = (0, 0, 1) for y < −y 0 , n(y) = [3/4 − y/(4y 0 )] sin( π(y+y0) 4y0 ), 0, cos( π(y+y0) 4y0 ) for −y 0 ≤ y ≤ y 0 , and n(y) = (1/2, 0, 0) for y 0 < y. Hence, for all positions below −y 0 the magnetic field is directed along the z-axis. Within the interaction region [−y 0 , y 0 ] the field rotates in the xz-plane until it aligns with the x-axis at y 0 , simultaneously as it decreases in strength to the half. We choose H i CE = H f CE =P 2 /(2M ) =:K, H i S := E 0 σ z /2, and H f S := E 0 σ x /4. Define T CE to be the transpose with respect to the coordinate representation, and thus T CE (K) =K. For the chosen n(y), the Hamiltonian n(y) · σ is represented as a real valued matrix in the eigenbasis of σ z . Hence, T S can be chosen as the transpose with respect to the eigenbasis of σ z , and thus T S n(y) · σ = n(y) · σ, T S (H i S ) = H i S , and T S (H f S ) = H f S . We also get T (H) = H. As measurement operators on CE we choose projectors onto coherent states Q i+ CE := |α i α i |, Q f + CE := |α f α f |, where the corresponding wave-functions are Here, σ is the standard deviation, and 2σRe(α) the expectation value, of the corresponding Gaussian distribution |ψ α (y)| 2 . (With the coherent state defined as the displaced ground state of a harmonic oscillator, σ is determined by the parameters of the chosen oscillator.) Similarly, Im(α)/σ is the average momentum of the coherent state. One can confirm that T CE (|α α|) = |α * α * |, and thus the time-reversal changes the sign of the momentum, but leaves the position intact. For the spin degree of freedom we let the measurement operators be Q i+ S = Q f + S =1 S . We choose (somewhat arbitrarily) the parameters such that 2 /(M E 0 y 2 0 ) = 0.1, βE 0 = 1, and such that the standard deviation is σ = y 0 /2. This means that the typical thermal energy kT is equal to the excitation energy of the spin (for y ≤ −y 0 ), and the width of the wave-packet is of the same order as the size of the interaction region. Figure 13 displays the numerical evaluation of the factorization error d H H1,H2 (1 S , |α α|) as defined in (K4). Here we choose H 1 :=K, and as H 2 we choose E 0 σ z /2 (red curve), and E 0 σ x /4 (green curve), for α := r + 2i with r ∈ [−10, 10]. Since the standard deviation is σ = y 0 /2 it follows that the spatial wave-packet ψ α is centered at ry 0 . For the sake of comparison we also include the 'local' approximation H 2 := E 0 n(ry 0 ) · σ/2 (blue curve), where for a state centered at the location ry 0 we approximate the total Hamiltonian H with the non-interacting HamiltonianK + E 0 n(ry 0 ) · σ/2. By construction, the blue curve coincides with the green for r ≤ −1, and with the red for 1 ≤ r. Maybe unsurprisingly, the local approximation is better than the others inside the interaction region.
We now turn to the test of the approximate fluctuation relation, and for this purpose we choose an evolution time t such that tE 0 / = 21.5. (This particular choice happens to make the transition probability for the forward process fairly large.) In Fig. 14 The error in the approximate fluctuation relation is small (approximately 1.6 * 10 −8 ), which corresponds to the fact that the measurement operators that are well separated from the interaction region. One should compare this with the final wave packets, where one can clearly see that these have significant weights within the interaction region. This illustrates the fact that it is the properties of the measurement operators, rather than the final states, that matter for the quality of the approximation. One can also note that the final states are not mirror images of each other. Hence, the symmetry discussed in Appendix I 1 does not imply that the wave packets of the forward and reverse processes have to be symmetric images of each other.
). An estimate of the relative error is |Z i P + − Z f P − |/(|Z i P + | + |Z f P − |) ≈ 2.2 * 10 −8 . One can also calculate the upper bound in the right hand side of (K18), which becomes d H

d. Approximate free energy differences
One can use the setting of the joint control and energy reservoir to approximately evaluate the free energy difference between the final and initial Hamiltonians H f S and H i S , respectively, or equivalently, the quotient of the partition functions Z(H f S )/Z(H i S ). Since and Hence, this enables us to approximately determine the free energy difference between the final and initial Hamiltonian.
For the very same setting as in the previous section, the true quotient is Z(H f ) Z(H i ) = (e −1/4 + e 1/4 )/(e −1/2 + e 1/2 ) ≈ 0.91. For the evaluation of the right hand side of (K23) we can use that Q i± CE and Q f ± CE are space translations of each other, and thus Z βK (Q i± CE ) = Z βK (Q f ± CE ), which thus cancel in (K23). Numerical evaluation yields a difference between the left and right hand side of (K23) that is approximately 4 * 10 −8 .
Appendix L: Assuming a global fluctuation relation

Comparisons
Here we investigate the class of channels F that satisfy the relation i.e., the class of channels that satisfy the fluctuation relation (40) obtained in section VII A. More generally, we investigate the relations between this class, the thermal operations [27-30, 35, 127-133], time-reversal symmetric thermal operations, as well as the Gibbs preserving maps [130] (see Fig. 15). For the sake of clarity we here state the definitions that we employ. By these definitions it is clear that we get a family of thermal operations, as well as a family of Gibbs preserving maps, for each choice of β and H on a given Hilbert space. Similarly, we get a class of time-reversal symmetric thermal operations for each choice of β, H, and T such that T (H) = H. Analogously we get a class of channels that satisfy (L1), for each β, H, and T (where is defined via T ). However, in this case we have the choice whether to additionally demand that T (H) = H or not. In the setup of section VII A, the condition T (H) = H is satisfied by assumption (since the starting point is timereversal symmetric thermal operations). Moreover, for the applications of (L1) in Appendices L 2 and L 3 we assume that T (H) = H holds. (It is in any case a convenient assumption, since it implies that T J βH = J βH T .) Most of the results in this section are based on (L1) for T (H) = H (i.e. class F in Fig. 15), with the exception of Lemma 20, which holds true for every T , regardless of its relation to H. From the definitions in the previous section it is clear that all time-reversal symmetric thermal operations are thermal operations. Here we show that there exist thermal operations that are not time-reversal symmetric thermal operations. We do this by proving a more general statement, namely that there exist thermal operations that do not satisfy (L1) for any choice of time-reversal T such that T (H) = H. (This is more general since we know from section VII A that all time-reversal symmetric thermal operations satisfy (L1). ) We consider two non-interacting two-level systems in resonance, H = H B = E 0 |0 0| + E 1 |1 1|, where we assume E 1 > E 0 , and thus each of these systems is nondegenerate. The joint Hamiltonian H tot = H ⊗1 B +1 ⊗ H B has the three eigenspaces Sp{|00 }, Sp{|01 , |10 }, and Sp{|11 }, and the most general energy conserving unitary operators on these two systems can be written where θ 0 and θ 1 are arbitrary real numbers, and U := U00 U01 U10 U11 is an arbitrary unitary 2 × 2 matrix. We write the Gibbs state on the heat bath as G β (H B ) = λ|0 0| + (1 − λ)|1 1|, where we for the sake of notational convenience have introduced λ := e −βE0 /(e −βE0 + e −βE1 ). We can thus construct the following thermal operations on S Let us now consider any time-reversal T such that T (H) = H. Since H is assumed to be non-degenerate, it follows by Lemma 7 that we must have T (|0 0|) = |0 0| and T (|1 1|) = |1 1|. We can use this to show that Hence, if |U 10 | = |U 10 |, then the thermal operation F does not satisfy (L1) for any choice of T such that T (H) = H (thus providing an element in the set TO \ F described in Fig. 15). From the discussion in section VII A it follows that every time-reversal symmetric thermal operation with respect to β, H, T with T (H) = H has to satisfy (L1). We can thus conclude that there exist thermal operations that are not time-reversal symmetric thermal operations.
b. There exist channels that satisfy (L1), but are not thermal operations As pointed out in section VII A, all time-reversal symmetric thermal operations satisfy (L1), where we by definition of the time-reversal symmetric thermal operations must have T (H) = H. An immediate question is if all channels that satisfy (L1) for T (H) = H also are timereversal symmetric thermal operations. Here we show that there exist channels that satisfy (L1) for β, H, and T with T (H) = H, but that are not thermal operations (and thus not time-reversal symmetric thermal operations). The counterexample is based on the fact that thermal operations cannot map states that are diagonal in the energy eigenbasis of H, to states that have offdiagonal elements [35].
This example moreover shows that (L1) admits channels that are not enhanced (or generalized) thermal operations [37]. The latter are Gibbs preserving channels F that also satisfy F([H, ρ]) = [H, F(ρ)] for all operators ρ, i.e., they are time-translation symmetric [35]. By the same reasoning as in Appendix D 1, the channels F decouple along the modes of coherence, and thus cannot create off-diagonal elements from diagonal inputs, for non-degenerate H.
Select some β ≥ 0, Hermitian operator H, and timereversal T on a Hilbert space H, such that T (H) = H. Let {A k } k be a POVM, and define the channel This type of channels can be implemented by a measurement of the POVM {A k } k on the input state ρ, followed by a preparation of state G βH T (A k ) conditioned on outcome k. (These are 'entanglement breaking' channels [199][200][201]). By using the condition T (H) = H, one can confirm that all channels (L2) satisfy (L1). Let us consider the qubit case with H = E 0 |0 0| + E 1 |1 1|, with E 1 > E 0 , and the channel (L2) for the two-element for −1 ≤ r ≤ 1 and −1 ≤ η ≤ 1. One can confirm that the resulting channel F satisfies and thus maps a diagonal state to a non-diagonal state for suitable choices of r and η. Hence, F generally cannot be a thermal operation, or enhanced thermal operation. We have thus constructed examples of channels that satisfy (L1) for T (H) = H, but which are not thermal operations (and thus are elements of the set F \ TO described in Fig. 15). Consequently, these channels are also not time-reversal symmetric thermal operations.

c. (L1) versus Gibbs preservation
The following lemma shows that every channel that satisfies (L1) is a Gibbs preserving map. For general discussions on Gibbs preserving maps, see [130]. Lemma 20. Let F be a channel that satisfies (L1) with respect to β ≥ 0 and Hermitian operator H (and an arbitrary time reversal T ). Then F(e −βH ) = e −βH . Hence, if Z β (H) is finite, then F G β (H) = G β (H).
• Let F be a channel such that where is defined with respect to T SCE .
. One may note that the above assumptions imply that With a channel F on the joint system 12, we define the following CPMs on system 1 The following is the counterpart of Proposition 9.
Proposition 11. With Assumptions 5, the CPMsF + andF − as defined in Eq. (L5) are related as Here we again have made use of Lemma 17 to . The proof of Proposition 11 is obtained if one first observes the relation and uses this together with (L4), the definition (L5), and J βH SCE = J βH1 ⊗ J βH2 .

An approximate version
where r(k |k) ≥ 0, thus resulting in the generator This is a special case of the Davies generators [136,203,204], where one may note that the evolution of the diagonal elements p l := l|ρ|l are decoupled from the offdiagonal elements, and satisfy the classical master equation d dt p l = k r(l|k)p k − k r(k|l)p l . One can furthermore show that Hence, if the rates r(k |k) of the classical master equation satisfy detailed balance, then L satisfies (M1). A special case of (M2), with r(k |k) = rG β (H) k for all k , k yields Suppose that we have a Hamilton operator H such that T (H) = H, and a collection of observables D k that commute with H, and are time-reversal symmetric, i.e., D † k = D k , [H, D k ] = 0, and T (D k ) = D k . If we take D k as the Lindblad operators in (44), then for a nondegenerate H, the resulting master equation is such that the off-diagonal elements of the density operator in the energy eigenbasis decay exponentially, while the diagonal elements remain invariant. Moreover it is the case that L = L and [J βH , L] = 0, which implies that (M1) is satisfied. A special case is a single spin-half particle with Hamiltonian H := 1 2 Eσ z , and a single Lindblad operator D = √ rσ z for some r ≥ 0. In this case the generator takes the form L(ρ) = −i[H, ρ]/ + rσ z ρσ z − rρ.

c. Thermalizing harmonic oscillator
Consider a bosonic mode with annihilation and creation operators a and a † , and Hamiltonian H := ω(a † a + 1 21 ) for ω > 0. One can model the thermalization of this mode by the following generator (see e.g. [205]) with Γ > 0 where n B = 1 e β ω −1 is the average number of quanta in the thermal state of the mode. Hence, in this case we have the two Lindblad operators L 1 := Γ(1 + n B )a and L 2 := √ Γn B a † . If we assume that T is the transpose with respect to the number basis of the mode, then T (a) = a † , and one can confirm that (M6) satisfies (M1), where the relations ae −βωa † a/2 = e −βω/2 e −βωa † a/2 a, e −βωa † a/2 a † = e −βω/2 a † e −βωa † a/2 , and e −β ω = n B /(1 + n B ) are useful.
2. Composing generators that satisfy (45) In Appendix L 1 c we found that if a channel F satisfies (40), then F is Gibbs preserving (see Lemma 20). The following lemma provides the corresponding statement for generators. One may note that the condition L * (1) = 0 is another way of saying that TrL(ρ) = 0, which means that the generator yields a trace preserving evolution, which by construction is satisfied by generators on the Lindblad form (44).
Although a direct consequence of linearity, the following lemma is convenient since it can be applied even if the two generators L a and L b do not commute, and it thus may be difficult to evaluate e t(La+L b ) , even if we can evaluate e tLa and e tL b separately. (An example of such noncommuting generators can be found in Appendix M 5.) Lemma 23. Let H be a Hermitian operator on the complex Hilbert space H. Let L a and L b be linear maps such that L a J βH = J βH L a and L b J βH = J βH L b . Then L := L a + L b satisfies LJ βH = J βH L . The following proposition can be used to 'glue' generators on different subsystems via an interaction Hamiltonian in such a way that the global generator satisfies (M1). Proposition 13. Let H 1 and H 2 be Hermitian operators on the complex Hilbert spaces H 1 and H 2 , respectively. Define H := H 1 ⊗1 2 +1 1 ⊗ H 2 . Let T := T 1 ⊗ T 2 where T 1 and T 2 are time-reversals on H 1 and H 2 , respectively. Let β ≥ 0. Let L 1 and L 2 be generators on H 1 and H 2 , respectively, such that One may observe that by Lemma 22 it follows that the generator L in Proposition 13 has G β (H 1 ) ⊗ G β (H 2 ) as a fixpoint, even though there is an interaction term. In the general case G β (H 1 ⊗1 2 +1 1 ⊗ H 2 + H int ) would not be a fixpoint; an example being the generator in Appendix M 5.

Decoupling of diagonals again
In Appendices D 1 and H 6 we discussed the decoupling of diagonals, or modes of coherence. In the following section we show that the condition (45) on the generators is not strong enough to guarantee such decompositions. In section M 3 b we discuss a sufficient condition for regaining the decoupling.
a. An example Consider a Hamiltonian H on a finite-dimensional Hilbert space with eigenvalues E n and eigenbasis |n . For the sake of convenience we introduce the notation C H (ρ) := [H, ρ]. In the following we say that a map F satisfies the mode decomposition with respect to H, if n|F(|m m |)|n = 0 for every n, n , m, m such that E m − E m = E n − E n . (If H in addition is nondegenerate, then the decomposition implies that diagonal elements can only be mapped to diagonal elements.) Let L be a generator, and let F t := e tL . If F t satisfies the mode-decomposition with respect to H for all t ≥ 0, then it follows that C H L = LC H . (To see this, one can first note that the mode decomposition implies that C H F t = F t C H for each t ≥ 0. By differentiation at t = 0, one obtains C H L = LC H .) By negation if follows that if C H L = LC H , then there must exist some t ≥ 0 for which F t fails to satisfy the mode-decomposition.
For every channel Φ it is the case that L := Φ − I is a Lindblad generator. (To see this, take the operators in a Kraus representation of Φ as the Lindblad operators of L.) Recall the class of channels (L2) defined in Appendix L 1 b. Since every such channel Φ satisfies (40) we can conclude that L := Φ − I satisfies (45). For Since both J βH and T are invertible, it follows that a non-zero R implies C H Φ = ΦC H . One can convince oneself that if H is non-degenerate, then it is indeed possible to find an orthonormal basis {|ψ k } k such that R = 0. Consequently both the resulting channel Φ and the generator L := Φ − I fail to commute with C H . By the reasoning above, we know that there must exist some time t ≥ 0 such that F t := e tL fails to satisfy the mode decomposition, although L satisfies (45).
The above construction provides an example of a channel that fails the decoupling. However, in section VII I, we primarily focus on the decoupling of the conditional CPMsF ± defined in (42). To construct an example also for this case, take the above L as the generator for E, and make the trivial extension L SCE := L ⊗ I SC , and let H SCE := H ⊗1 SC +1 ⊗ H SC , for some arbitrary Hamiltonian H SC with T SC (H SC ) = H SC . We can conclude that L SCE satisfies (45) with respect to H SCE , while the conditional CPMsF ± generally fail to decouple.

b. Regaining the decoupling
If L is such that C H L = LC H , where C H (ρ) := [H, ρ], then the evolution F t := e tL is time-translation symmetric [87], i.e., e isC H F t = F t e isC H for all t ≥ 0 and all s, or equivalently e −isH F t (ρ)e isH = F t (e −isH ρe isH ) for all ρ, t ≥ 0 and s.
Let us now assume that H := H 1 ⊗1 2 +1 1 ⊗ H 2 , and define the conditional CPMF + (ρ) : With the assumptions C H L = LC H , [Q f + 2 , H 2 ] = 0, and [Q i+ 2 , H 2 ] = 0, it follows that C H1F+ =F + C H1 . (One can prove this by using e −isH F t (ρ)e isH = F t (e −isH ρe isH ) in the definition of F + , and differentiate at s = 0.) By the same reasoning as in Appendix D 1 one can conclude that the CPM F + decouples along the modes of coherence.

Generators of thermal operations and time-reversal symmetric thermal operations
As mentioned in Section VII F, a drawback with relying on the condition (45) is that it is unclear what it implies concerning the evolution of resources. Here we develop some tools that enable us to show that a generator yields thermal operations. We also find a class of generators that results in time-reversal symmetric thermal operations.

a. Generators of thermal operations
Recall that we defined thermal operations in Appendix L 1 a.
Lemma 25. Let F 1 and F 2 be two thermal operations with respect to the same Hamiltonian H and the same β. Then the composition F 2 • F 1 is also a thermal operation corresponding to H and β.
Proof. Since F j is a thermal operation on the underlying Hilbert space H, then there exists an ancillary Hilbert space H Bj , a corresponding Hamiltonian H Bj , and a uni- For a given β ≥ 0 and Hermitian operator H, we say that a linear map L is a generator of thermal operations with respect to β and H, if e tL is a thermal operation with respect to β and H, for each t ≥ 0.
A more or less direct consequence of Lemma 25 is the following.
The generator L r yields the family of channels where Z := e βE/2 + e −βE/2 . This family of channels can be obtained via an ancillary two-level system with Hamiltonian H B = 1 2 Eσ z . One can confirm that the unitary operators We can thus conclude that L r is a generator of thermal operations.
Similarly it is the case that e tLr 0 ,r 1 = (1 − e − t 2 (r0+r1) )D + e − t 2 (r0+r1) I, D(ρ) := |0 0|ρ|0 0| + |1 1|ρ|1 1|. (M9) In other words, e tLr 0 ,r 1 is a convex combination of the identity mapping and the pinching D. For an ancillary two-level system with a degenerate Hamiltonian H B ∝ 1 B , the unitary operator U = |0 0| ⊗ σ x + |1 1| ⊗ σ y , is globally energy conserving, and D(ρ) = Tr B (U [ρ ⊗ 1 21 B ]U † ). Hence, D is a thermal operation. Since D and I are thermal operations, it follows that their convex combination e tLr 0 ,r 1 also is a thermal operation for each t ≥ 0 (see Appendix C in [35]). Hence, L r0,r1 is a generator of thermal operations. One can furthermore confirm that L H , L r , and L r0,r1 commute with each other. Hence, we can apply Lemma 26, which implies that L also is a generator of thermal operations.
It is plausible that the general class of generators in (M3) that satisfy (M4) are generators of thermal operations. However, we will not consider this question here.

c. Non-commuting generators of thermal operations
In the following we wish to generalize the addition of generators to the case when these do not necessarily commute. The idea is that we shall use the Trotter decomposition, i.e., the relation e tL1+tL2 = lim n→∞ (e tL1/n e tL2/n ) n . By repeated applications of Lemma 25 it follows that (e tL1/n e tL2/n ) n is a thermal operation for each n. However, it is not clear (at least not to the author) whether the set of thermal operations is closed, i.e., that the limit map e tL1+tL2 actually is a thermal operation, as we have defined them. One may wonder whether it would not be possible to define a 'limit bath' for n → ∞. However, one can realize that the use of Lemma 25 in the proof of Proposition 14 entails an indefinitely increasing number of thermal ancillary systems as n increases. Hence, the 'limit object' that would realize the limit channel for this particular construction would correspond to an infinite tensor product. Here, we do not consider the rather technical issue of whether one can make sense of that limit object or not, but we leave this as an open question. To be on the safe side, here we allow for the possibility that the set of thermal operations is not closed, and settle for maps that generate channels in the closure. The closure is defined with respect to the choice of norm in the following bound, which is obtained from Theorem 3 in [206].
where A 1 , . . . , A p are bounded operators with respect to the norm · of some Banach algebra.
Proposition 14. Let L 1 , L 2 , . . . , L p be generators of thermal operations with respect to a Hermitian operator H and β ≥ 0. If these generators are bounded with respect to a norm · , then L := j=1 L j is a generator of maps in the closure (with respect to · ) of the set of thermal operations with respect to H and β.
Proof. We let A j := tL j in (M10). Since we assume that L 1 , L 2 , . . . , L p are finite, if follows that the right hand side of (M10) goes to zero as n → ∞ for each fixed t. Hence, for each fixed t it is the case that lim n→∞ e tL − (e tL1/n · · · e tLp/n ) n = 0.
Since L 1 , . . . , L p are assumed to be generators for thermal operations with respect to H and β, it follows that e tL1/n , · · · , e tLp/n are all thermal operations. By Lemma 25 we can conclude that (e tL1/n · · · e tLp/n ) n is also a thermal operation with respect to H and β. By (M11) we know that for every neighborhood of e tL (for a fixed t) with respect to · , there exists an n such that the thermal operation (e tL1/n · · · e tLp/n ) n is in that neighborhood. We can conclude that for every t ≥ 0, the channel e tL is in the closure of the set of thermal operations. Hence, L is a generator of maps in the closure of the thermal operations with respect to H and β.
Here we provide a general method to glue generators of thermal operations, much analogous to what Proposition 13 does for generators that satisfy (45), but with the caveat that we can only prove that the resulting generator produces channels in the closure of the set of thermal operations. In the following we define L int (ρ) := −i[H int , ρ], for all operators ρ. Proposition 15. Let H 1 and H 2 be Hermitian operators on the complex Hilbert spaces H 1 and H 2 , respectively. Let β ≥ 0. Let L 1 be a generator of thermal operations with respect to H 1 and β, and let L 2 be a generator of thermal operations with respect to H 2 and β. Moreover, let H int be a Hermitian operator such that [H int , H 1 ⊗ 1 2 +1 1 ⊗ H 2 ] = 0. Then L 1 ⊗ I 2 + I 1 ⊗ L 2 + L int is a generator of maps in the closure of the thermal operations with respect to H 1 ⊗1 2 +1 1 ⊗ H 2 and β.
Proof. One can first observe that if L 1 is a generator with respect to H 1 , then L 1 ⊗ I 2 is a generator with respect to H 1 ⊗1 2 . Since L 1 ⊗ I 2 and I 1 ⊗ L 2 commute, it follows by Lemma 26 that L 1 ⊗ I 2 + I 1 ⊗ L 2 is a generator of thermal operations with respect to H 1 ⊗1 2 +1 1 ⊗ H 2 . Next we observe that if [H int , H 1 ⊗1 2 +1 1 ⊗H 2 ] = 0, then it follows that L int is a generator of thermal operations with respect to H 1 ⊗1 2 +1 1 ⊗ H 2 . By Proposition 14 we can conclude that by adding L 1 ⊗ I 2 + I 1 ⊗ L 2 and L int we obtain a generator of maps in the closure of the thermal operations.

d. Generators of time-reversal symmetric thermal operations
Recall the definition of time-reversal symmetric thermal operations in Appendix L 1 a.
For a given β ≥ 0, Hermitian operator H, and timereversal T , such that T (H) = H, we say that a linear map L is a generator of time-reversal symmetric thermal operations, if e tL is a time-reversal symmetric thermal operation with respect to β, H, and T , for all t ≥ 0.
Unfortunately, it seems difficult to directly generalize Lemma 25, and thus also Proposition 14. The issue is that even if the unitary operators U 1 and U 2 in the proof of Lemma 25 would be time-reversal symmetric with respect to the time-reversals T ⊗ T B1 and T ⊗ T B2 , respectively, it is not clear that U := [U 2 ⊗1 B1 ][U 1 ⊗1 B2 ] would be time-reversal symmetric under T ⊗ T B1 ⊗ T B2 . It is conceivable that the set of time-reversal symmetric thermal operations is not closed under composition of channels. Although an interesting issue, we leave it as an open question, and here explicitly construct a family of generators that yield time-reversal symmetric thermal operations.
For the purpose of establishing our example, let H be a non-degenerate Hamiltonian on a finite-dimensional Hilbert space, and let T be a time-reversal such that T (H) = H. We focus on the generator (M5), i.e., L(ρ) = − i [H, ρ]+rG β (H)Tr(ρ)−rρ. The solution to the master equation corresponding to this generator is given by the family of channels F t (ρ) = e −rt e −itH/ ρe itH/ + (1 − e −rt )G β (H)Tr(ρ).
In the following we show that the channel F t for each t is a time-reversal symmetric thermal operation. (It is conceivable that the same is true for the channels obtained from the more general generators in (M3), but we will not consider this question here.) Our first observation is that the channel F t for each t is a convex combination of the Hamiltonian evolution ρ → e −itH/ ρe itH/ and the replacement map R(ρ) := G β (H)Tr(ρ). The Hamiltonian evolution is a time-reversal symmetric thermal operation. In the following we shall show that R also is a time-reversal symmetric thermal operation.
We let H B be isomorphic to H. With respect to some selected isomorphism, let the Hamiltonian on H B be a 'copy' of the Hamiltonian H. Similarly we let the time reversal on H B be the isomorphic copy of the one on H. Let |k simultaneously denote both the energy eigenbasis of H and H B , in such a way that |k corresponds to the same energy eigenvalue in both cases. By assumption, H is non-degenerate. Lemma 7 thus yields T (|k k|) = |k k|. Corollary 1 implies that there exist real numbers θ k such that T (|k l|) = e i(θ l −θ k ) |l k|. Hence, R is a timereversal symmetric thermal operation. Since F t is a convex combination of time-reversal symmetric thermal operations, it follows by Lemma 21 that F t is also a timereversal symmetric thermal operation. We can conclude that L is a generator of time-reversal symmetric thermal operations.

e. A word of caution
The definition of generators of thermal operations (or time-reversal symmetric thermal operations, or their closures) as we have stated it, only requires that the induced channel F t is a (time-reversal symmetric) thermal operation for each single time t. In other words, the definition is 'pointwise' in the sense that it in principle allows for a different physical setup for each time t. We made use of this for the construction in the previous section, where the convex combination of the Hamiltonian evolution and the replacement map is obtained via Lemma 21, where the weight λ := e −rt is obtained via the ancillary Hamiltonian, which has to be adapted for each t. (Although as mentioned in Appendix L 1 d, one can obtain a proof via an alternative technique.) This adaptive construction should be put in contrast with another scenario (cf. the discussion in Appendix A 2) where we have a fixed interaction Hamiltonian H int such that [H int , H tot ] = 0, where H tot := H ⊗1 B + 1 SCE ⊗ H B , and where the evolution is determined by H evol := H int + H tot . For all t ≥ 0, the channels F t (σ) = Tr B (e −itH evol / [σ ⊗ G β (H B )]e itH evol / ) are by construction thermal operations with respect to β and H. In this case we thus have a single physical setup, in the sense of a fixed global Hamiltonian H evol that generates the evolution for all times. However, one would not generally expect that the resulting family of maps {F t } t≥0 would satisfy a time-independent Lindblad master equation. (In derivations of Markovian master equations one tends to consider limits of infinite heat baths, see e.g. [114,118].) The question is if a generator of thermal operations (in the point-wise sense) always can be implemented by a time-independent physical setup of the type described above (allowing for an infinite heat bath). We will not explore this question here. However, a potential starting point for such investigations could be the notion of Davies generators [136,203,204]. 5. Further details on the two thermalizing spins in section VII G We consider two two-level systems, or the internal degrees of freedom of two spin-half particles, with Hamiltonians H 1 := 1 2 Eσ z1 and H 2 := 1 2 Eσ z2 . We also assume an interaction Hamiltonian of the form H int := λ|01 10| + λ|10 01|. We let T 1 and T 2 be the transposes in the eigenbasis of σ z1 and σ z2 , respectively. On the separate spins we assume thermalizing generators L 1 and L 2 as defined in (46). We know from Appendix M 1 a that L 1 and L 2 separately satisfy (M1). By adding an interaction Hamiltonian, via the generator L int (ρ) := −iλ[H int , ρ]/ , we obtain the global generator L := L 1 ⊗I 2 +I 1 ⊗L 2 +L int , where I denotes the identity map. By construction, [1 1 ⊗H 2 +H 1 ⊗1 2 +1 1 ⊗, H int ] = 0, and the conditions of Proposition 13 are satisfied, and thus Proposition 11 is applicable to all the induced channels F t = e tL . On one of the reduced systems, e.g., system 1, we can generate the conditional dynamicsF ± as defined in (L5) for each F t , whereF ± satisfy (L6). In other words, with one of the particles acting as the energy reservoir for the other, we regain the conditional fluctuation relation.
The generator L does not only satisfy (M1), but also yields channels in the closure of the thermal operations with respect to H 1 ⊗1 2 +1 1 ⊗ H 2 and β. To see this, we know from Appendix M 4 d that L 1 and L 2 are generators for time-reversal symmetric thermal operations, which is a particular case of thermal operations. Since [1 1 ⊗ H 2 + H 1 ⊗1 2 , H int ] = 0, we can use Proposition 15 to conclude that L generates channels in the closure of the thermal operations with respect to1 1 ⊗ H 2 + H 1 ⊗1 2 and β.
On a different note one can confirm that L int (L 1 ⊗I 2 + I 1 ⊗ L 2 ) = (L 1 ⊗ I 2 + I 1 ⊗ L 2 )L int . Hence, even though H int commutes with H 1 ⊗1 2 +1 1 ⊗ H 2 , this does not imply that L int commutes with L 1 ⊗ I 2 + I 1 ⊗ L 2 . As a further remark along these lines, one may observe that Lemma 22 yields that G β (H 1 ) ⊗ G β (H 2 ) is a fixpoint of L. By explicit evaluation one can show that G β (H 1 ⊗ 1 2 +1 1 ⊗ H 2 + H int ) is not a fixpoint. Hence, in spite of the coupling term H int , the fixpoint still remains the product of the local Gibbs states. 6. Example of the approximate fluctuation relation: Two weakly interacting spins with global thermalization The example of the exact fluctuation relation in Appendix M 5 requires that the spins are resonant and that the interaction Hamiltonian commutes with the sum of the local Hamiltonians. Here we relax those assumptions, and instead apply the global approximate fluctuation relation of Proposition 12.
In Appendix K 3 b we discussed the approximate fluctuation relations in terms of interaction regions, where the quality of the approximation depends on how far out in the non-interacting region that the operators Q i± and Q f ± are localized. Here we take to opportunity to consider an alternative setting, more in the spirit of perturbation theory, where the quality of the approximation rather depends on the interaction strength.
Similar to Appendix M 5 we consider two spin-half particles, but where we allow for different excitation energies, i.e., we have the Hamiltonians H 1 := 1 2 E 1 σ z1 and H 2 := 1 2 E 2 σ z2 . We also have an interaction Hamiltonian H int , resulting in the global Hamiltonian We let T 1 and T 2 be the transposes in the eigenbasis of σ z1 and σ z2 , respectively. We assume that the interaction Hamiltonian is such that [T 1 ⊗ T 2 ](H int ) = H int . According to the results in Appendix M 4 d it follows that L satisfies (M1).
If we let H i 1 := H f 1 := H 1 and H i 2 := H f 2 := H 2 , then all the conditions of Proposition 12 are satisfied for the channels F t = e tL , thus yielding the approximate fluctuation relation (L7). Since the local approximate Hamiltonians H i 1 , H i 2 , H f 1 , H f 2 are obtained by disregarding the interaction term, it does intuitively seem reasonable that the error should be small when λ is small.
As a concrete example we let H int := σ x1 ⊗ σ x2 , where this interaction Hamiltonian is chosen such that it does not commute with H 0 , but is such that [T 1 ⊗ T 2 ](σ x1 ⊗ σ x2 ) = σ x1 ⊗σ x2 . For each channel F t = e tL , Proposition 12 bounds the difference between where For the calculations yielding Fig. 16, we assume E 1 β = 1, E 2 β = 1.5, λβ = 0.2, rβ = 0.1, where these are dimensionless groups of parameters. In Fig. 16(a) the pair f (t), r(t) is plotted for times t/(β ) ∈ [0, 50], where the operators Q i+ 1 , Q i+ 2 , Q f + 1 , Q f + 2 have been chosen as projectors onto pure states that are selected independently according to the Haar distribution. In the limit of large evolution times, the state of the system evolves to G β (H tot ), and thus f (t) and r(t) each approaches a limit value, which correspond to the dotted lines. In Fig. 16(b) the maximum error over the given time interval is plotted as a function of the interaction strength λ. This is compared with the bound from Proposition 12. Analogous to what we found in Appendix K 3 c concerning the error bound in Proposition 10 (and more specifically concerning the bound in (K18)), the error bound in Proposition 12 (empty circles in Fig. 16(b)) seems to be somewhat pessimistic compared to the actual error (filled circles). As expected, the error decreases for decreasing λ.
7. More widely applicable approximate fluctuation relations?
The approximate relation in Proposition 12 allows us to apply the fluctuation relations in a wider setting than the exact relations. Moreover, Proposition 12 provides an analytical bound (although potentially crude) that is time-independent, which thus allows us to estimate the quality of the approximate fluctuation relation irrespective of how long we allow the system to evolve. However, this comes at the price that the conditions of Proposition 12 have to be satisfied. In particular, for a given generator L we have to find a Hermitian operator H such that LJ βH = J βH L , and this can be challenging. It would thus be desirable to find generalizations that would be more easily applied. As an indication that such generalizations may be possible, here we numerically test the approximate fluctuation relation in a scenario where Proposition 12 is not obviously applicable.
Here we combine the two local generators of Appendix M 5 with the Hamiltonian part that was used in Appendix M 6. In other words, we assume a generator of the form For the parameters we choose E 1 β = 1, E 2 β = 1.5, λβ = 0.2, r 1 β = 0.1, r 2 β = 0.2. Like in Appendix M 6 we choose Q i+ 1 , Q i+ 2 , Q f + 1 , Q f + 2 as projectors onto random pure states. Analogous to Fig. 16 we do in Fig. 17(a) compare the functions f (t) and r(t) defined in (M13), but where we now evaluate these functions for the generator (M14). A comparison of Fig. 17 and Fig. 16 suggests that the behaviors on a qualitative level are rather similar, which gives some indication that a generalization of Proposition 12 could be possible. For example, one could imagine introducing some systematic approximation at the level of the global fluctuation relation, i.e., replacing the condition LJ βH = J βH L with some approximate version. However, we will not consider this question further in this investigation.

Further details on the example in section VII H
We let {|n } n be an orthonormal eigenbasis of the Hamiltonian H SC , with H SC |n = h n |n . The corresponding generator is L H SC (ρ) := − i [H SC , ρ]. The set of eigenstates of H SC are partitioned into the three subsets D 0 , D 1 , and D 2 , where D 0 represents the ground state basin, D 1 the desired meta-stable configurations, and D 2 all the other states. We construct the corresponding projectors P j := n∈Dj |n n|. For each such set of eigenstates we also define a corresponding partial partition function Z j := n∈Dj e −βhn = Z βH SC (P j ).
where we assume that each set {r j (k |k)} k,k ∈Dj satisfies the detailed balance (M4) described in Appendix M 1 a. By construction L j only causes transitions within D j , leading to a local thermalization within this basin. We moreover assume a global thermalization L global on the same form as (M15), but where the sums span over all eigenstates. We model the slow equilibration between the basins by choosing the transition rates r(k |k) of the global dissipator much smaller than those for the local dissipators. We assume a two-level energy reservoir with Hamiltonian H E := E 0 |0 0|+E 1 |1 1|, and corresponding generator L H E (ρ) := − i [H E , ρ]. The interaction between the energy reservoir and the system is generated via a resonant coupling that causes a transition from the ground state |0 to a selected state |n * in the desired basin, n * ∈ D 1 , such that E 1 − E 0 = h n * − h 0 . More precisely, the interaction Hamiltonian is of the form This interaction Hamiltonian is, so to speak, the handle by which we push the system towards the desired basin. The total generator is L := L H SC +L H E +L Hint +L 0 +L 1 +L 2 +L global . (M17) We choose the time-reversals on both the system and energy reservoir as the transpose with respect to the corresponding energy eigenbasis. One can confirm that the generators L j and L global all satisfy (M1) with respect to H SC , by virtue of being special cases of the generator in Appendix M 1 a. By Lemma 23 it follows that their sum also satisfies (M1) with respect to H SC . Lemma 24 yields that L H E satisfies (M1) with respect to H E . Since [H SC ⊗1 E +1 SC ⊗ H E , H int ] = 0 it follows by Proposition 13, that L satisfies (M1) with respect to H SC ⊗1 E +1 SC ⊗ H E . Hence, each F t = e tL satisfies the global fluctuation relation (43).
We use the fluctuation relation (43) in order to determine the partition function quotient Z 1 /Z 0 between the desired meta-stable basin D 1 and the ground state basin D 0 . For this purpose we assign Q i+ SC := P 1 and Q f + SC := P 2 in (43). By Z βH SCE (Q i± ) = Z 0 Z βH E (Q i± ) and Z βH SCE (Q f ± ) = Z 1 Z βH E (Q f ± ) we obtain (47) and (48) in the main text.
In the following we describe the specific choices for the numerical evaluation presented in Fig. 8. In order to mimic a somewhat 'messy' system with no particular structure, up to the general picture painted in the main text, we select energy levels and transition rates randomly. We let D 0 contain 5 states, D 1 consist of 5 states, and D 2 consist of 20 states. The eigenvalues in D 0 are constructed by drawing all h n β independently from the uniform distribution in the interval [0, 2], after which the whole spectrum is shifted such that the lowest eigenvalue is at zero, yielding the global ground state. The elements of D 1 are such that all h n β are drawn independently and uniformly in the interval [3,5], and those of D 2 from the interval [0, 4]. We choose n * as the lowest energy level in D 1 , i.e., the 'local' ground state. These constructions implement the idea that the desired basin D 1 is higher up in energy compared to the ground state basin D 0 , and that there are several alternative states in D 2 that are energetically favorable. For the transition rates r j (k |k) and r(k |k) we first construct a symmetric matrix A with real non-negative elements, and let r(k |k) := A k ,k e β(h k −h k )/2 /(β ). (The division by β is there in order to make A unit-free.) One can confirm that this guarantees that r(k |k) satisfies the detailed balance (M4) with respect to e −βh k . For our implementation we let each independent element of A be assigned as the absolute value of a random number drawn from the Gaussian distribution with zero mean and unit variance. The same procedure is repeated for the local transition rates, but where we additionally take into account that all transitions to the other basins should be zero. In order to model the slower global transitions we furthermore multiply the global r(k |k) with 0.005, thus making these global transitions about 200 times slower than the local transitions within each basin. Finally, we choose the interaction strength λ such that λβ = 1. For the particular instance in Fig. 8 we have Z 0 ≈ 2.27, Z 1 ≈ 0.0728, and thus Z 1 /Z 0 ≈ 0.0320. 9. Further details on the JC-model in section VII I a. L satisfies (45) Here we show that the generator L defined in (49) satisfies (45) (which is the same as (M1)). We know from Appendix M 1 that the various components in (49) satisfy (M1) with respect to H SC . Hence, by Lemma 23 we can conclude that L SC satisfies (M1) with respect to H SC . The generator L E trivially satisfies (M1) with respect to H E . Since [H SCE , H int ] = 0, Proposition 13 yields LJ βH SCE = J βH SCE L . Since the conditions of Corollary 3 are satisfied, it follows that all channels F t := e tL for t ≥ 0 satisfy Eq. (L4) in Assumptions 5, and thus Proposition 11 is applicable. We can thus conclude that the conditional fluctuation relation (41) is satisfied on the energy reservoir for the conditional mapsF ± , based on the underlying evolution F t .  Fig. 10, the two off-diagonal elements belong to two different modes of coherence. For the setting in Fig. 10 the quantities d± defined in (M18) would be identically zero, while for the new measurement operators (M19) they become non-trivial, and satisfy the fluctuation relation in (M18). The plot on the right displays |d+| (red curve) and |d−| (blue curve), while the left depicts the trajectories d+ (red curve) and d− (blue curve) in the complex plane. Like in Fig. 10  c. The case of no decoupling As mentioned in the main text, the off-diagonal fluctuation relations are valid even if there is no decoupling. The decoupling merely makes certain fluctuation relations trivial. To illustrate this, let us consider the pair of off-diagonal elements |19 23| and |20 22|, which one can realize belong to two different modes of coherence. The relation (41) in this case yields For diagonal measurement operators, both d + and d − vanish, and thus trivially satisfy (M18). However, let us consider a new couple of measurement operators that are not diagonal in the energy eigenbasis, namely (M19) Figure 18 illustrates the fluctuation relation (M18) for this choice of Q i+ 2 and Q f + 2 .
d. Is L a generator of maps in the closure of thermal operations?
One can argue that the total generator L should reasonably yield maps in the closure of the set of thermal operations with respect to H SC ⊗1 E +1 E ⊗ H E . First of all, one can note that L SC is a special case of the class of generators considered in Appendix M 4 b (with r 0 , r 1 such that r 0 + r 1 = 4κ), and thus is a generator of thermal operations with respect to H SC . Moreover, L E is only the Hamiltonian evolution of E and is thus trivially a thermal operation with respect to H E . By construction, H int commutes with H SC ⊗1 E +1 E ⊗ H E , and thus one may be tempted to apply Proposition 14. However, this proposition is strictly speaking not applicable since the Hamiltonians H E and H int , and thus the generators L E and L int , are unbounded. However, it appears reasonable that if the initial state has bounded energy, then L could be truncated to a finite number of energy eigenstates, to an arbitrarily good accuracy. For that truncated system, Proposition 14 would reasonably be applicable. This argument suggests that L is some sense could be a generator of channels in the closure of thermal operations. However, strictly speaking this remains to be proved. Alternatively, one could consider some generalization of Trotter's decomposition for unbounded operators (see e.g. [207][208][209]). However, we leave such generalizations as an open question. the transition probability of changing the state of system 1 from eigenstate n to n (for a non-degenerate H 1 ) as This is almost what we want, apart from the fact that the evolution is reversed. Here we can make use of the time reversal symmetry (and Lemma 7) to obtain p(n |n)G n (H 1 ) = p(n|n )G n (H 1 ), i.e., the transition probability p(n |n) satisfies detailed balance.

Heat baths in the Gibbs state
We do in this investigation often assume that the heat bath initially is in the Gibbs state corresponding to a given temperature. Although not an unusual assumption, e.g., in derivations of master equations [211] and [118] (see in particular sections 3.6.2.1 and 4.2.2), it is nevertheless worth considering the justification, especially since one may argue that it is not the heat bath per se that is Gibbs distributed, but rather systems that are weakly coupled to it. One possible argument would be that the environment can be separated into a 'near environment' that is relevant on the time scale of the experiment, and a 'far environment' (or 'super bath') that puts the near environment into the Gibbs state (see e.g. the discussions in [10]). Another approach would be to assume that an ideal heat bath in some sense behaves as if it is Gibbs distributed. These issues approach the question of thermalization in closed systems [212][213][214], and along these lines one may speculate that typicality [161,162] could be employed to obtain a more refined analysis of fluctuation relations.