From single-shot towards general work extraction in a quantum thermodynamic framework

This paper considers work extraction from a quantum system to a work storage system (or weight) following reference [1]. An alternative approach is here developed that relies on the comparison of subspace dimensions without a need to introduce thermo-majorisation used previously. Optimal single shot work for processes where a weight transfers from (a) a single energy level to another single energy level is then re-derived. In addition we discuss the final state of the system after work extraction and show that the system typically ends in its thermal state, while there are cases where the system is only close to it. The work of formation in the single level transfer setting [1] is also re-derived. The approach presented now allows the extension of the single shot work concept to work extraction (b) involving multiple final levels of the weight. A key conclusion here is that the single shot work for case (a) is appropriate only when a \emph{resonance} of a particular energy is required. When wishing to identify"work extraction"with finding the weight in a specific available energy or any higher energy a broadening of the single shot work concept is required. As a final contribution we consider transformations of the system that (c) result in general weight state transfers. Introducing a transfer-quantity allows us to formulate minimum requirements for transformations to be at all possible in a thermodynamic framework. We show that choosing the free energy difference of the weight as the transfer-quantity one recovers various single shot results including single level transitions (a), multiple final level transitions (b), and recent results on restricted sets of multi-level to multi-level weight transfers.


Introduction
The neat characterisation of general classical non-equilibrium processes in terms of fluctuation relations [2,3,4,8] has rapidly advanced the general understanding of thermodynamic processes and properties at the mesoscopic scale. Work, in particular, is a thermodynamic quantity of interest and the stochastic fluctuations of work done on a system are captured in the Jarzynski relation [3]. The fluctuation relation approach has been extended to quantum systems where probabilistic energy transfers of the system that undergoes unitary evolution are associated with the fluctuating work done on the system [5,6,7,9,10,11,12]. Again the work for this quantum scenario can be captured in a quantum Jarzynski relation. On the other hand, thermodynamic processes for a quantum system can be studied in a setting where the system interacts with a heat bath and a work storage system (or weight) undergoing global unitary dynamics [13,14,1,15,16,16,18,17,19]. Operation on the system then results in a change of the work storage system's state and it is that change that is here associated with "work". These approaches are referred to as "thermodynamic resource theory" and "single shot thermodynamics". Recent papers, e.g. [1,15,16], derive upper bounds on the amount of work that can be drawn from a quantum system that starts in a non-equilibrium state in a "single shot". The single shot work done by the system is here associated [1] with the transition of the weight from a single energy eigenstate (of energy 0) to another single energy eigenstate (of energy w). This situation is sketched in Fig. 1a. The proof of the bounds provided in [1] relies on established mathematical concepts from quantum information theory and a new concept called "thermo-majorization". Researchers, in particular those outside of quantum information theory, may find the proof mathematically heavy and are unable to follow the detailed logic. This technical difficulty overshadows the interpretation of the results and may hinder their further development and formulation of experimental tests of single shot results.
Here we aim to re-derive single shot work extraction limits while keeping the technical side as simple as possible. The hope is that stripping the discussion from some of the jargon will allow to focus on the physical meaning of the results, clarify the situation they describe, and develop the argument further to adapt to different physically relevant scenarios.
The paper is organised as follows. The known work extraction result of [1] for scenario (a) in Fig. 1 is re-stated in Section 2 and then re-derived in Section 3. The final state of the system after this work extraction procedure is explored in Section 4. Also re-derived, in Section 5, is the work of formation which was first identified as different from the extractable work in [1]. The extension of single shot work extraction to general transfer processes is discussed thereafter. Section 6 is concerned with the extractable work allowing (b) the transition of the weight from a single energy eigenstate of energy 0 to a set of energy eigenstates of energy [w,w + δ]. Section 7 identifies a transferquantity that characterises (c) the transition of the weight from an arbitrary range of energy eigenstates to another range of energy eigenstates. Finally, the findings and open questions are discussed in Section 8.

Known results on maximal single shot work extraction
A key result in single-shot thermodynamics is the identification of a maximal work [1,15] that can be extracted with success probability 1 − from a system starting in a state ρ S under so-called thermal operations [1]. Here F (τ S ) := − 1 β ln Z S is the standard free energy associated with the thermal state τ S := e −βH S Z S for a system Hamiltonian H S at inverse temperature β, with Z S = tr[e −βH S ] the partition function. (In [1] the system is a qubit with the excited state energy tuned such as to have exactly the optimal work value that can be gained, i.e. H S = 0 |0 S 0| + w max |1 S 1|.) The other quantity, F min (ρ S ), is a generalised free energy applicable for the non-equilibrium state ρ S [1] which will be detailed below. This maximal work is valid for initial states ρ S that are diagonal in the energy basis and it is at least a lower bound on the maximal work for non-diagonal states [1,15,20].
This result is derived within the thermodynamic resource theory setting [13,14,1,15,16,16,18,17,19] involving three components: the system of interest, S, a bath B, and a weight (or work storage system) W . In the simplest case, the Hamiltonian at the start and the end of the process is assumed to be the same and the sum of the three local terms, H = H S + H B + H W . The weight is assumed to have no degeneracies, i.e. all its energy eigenstates have different energies E W . The system's degeneracy is not restricted and we denote the multiplicity of each energy E S by M S (E S ) and label each of them by g S (E S ) = 1, ..., M S (E S ). The degenerate bath levels at energy E B are labeled by f B (E B ) and their multiplicity is assumed to be exponentially growing with inverse temperature . This exponential growth of the degree of degeneracy (or the density of states) generically results for all systems made of many similar subsystems that feature short range interactions [21]. We note that it only holds for a possibly large but finite energy regime.
Thermal operations have been defined [1] as those transformations of the system that can be generated by a global unitary, V , that acts on system, bath and work storage system initially in a product state ρ S ⊗ τ B ⊗ |E ini W W E ini W |, with the bath in a thermal state, τ B = e −βH B Z B , and the work storage system in one of its energy eigenstates, |E ini W . Conceptually, global unitaries V describe the operation of a "work extraction machine" that aims to extract as much energy as possible to the work storage system. Perfect energy conservation is imposed by requiring that the unitary may only induce transitions within an energy shell of total energy E = E W + E S + E B . This is equivalent to requiring that V must commute with the sum of the three local Hamiltonians.
The generalised free energy of the non-equilibrium state ρ S is defined as Here h(E S , g S , ) is a binary function that determines whether a particular energy eigenstate, |E S , g S , is included in the summation or not. The value of h depends on ρ S and on the failure rate that is being accepted for the work extraction. The exact dependence will be discussed further in Section 3. The optimal work stated in Eq. (1) now corresponds to the following task: For the weight initially entirely in its ground state (with energy E ini W = 0) the full system is transferred to a final quantum state such that the probability for the weight to be found in an energy eigenstate with energy E fin W is 1 − where 1 > ≥ 0, see Fig. 1a. This process is associated with the "lifting" of the weight and the energy difference experienced by the weight is identified with "extracted work", w : For the special case of perfect work extraction, i.e. = 0, the summation in Eq. (2) includes all energy eigenstates |E S , g S that are populated in the initial state, i.e. h(E S , g S , 0) = 1 when E S , g S |ρ S |E S , g S > 0, and 0 otherwise. The maximal work is then whereΠ ρ S is the projector on the support of ρ S .

Work extraction bounds from limits on probability transfer
The derivation of the maximal extractable work presented in [1] rests on an analysis of state dimensions which is combined with the newly introduced concept of thermomajorisation. This is a variation on majorisation, an important tool in the study of doubly stochastic matrices [22,23,24] and quantum channels in particular [25,26].
Here we present a derivation of the same result without a need of invoking thermomajorisation explicitely. We hope this re-derivation is more straightforward to follow for researchers wishing to familiarise themselves with single-shot thermodynamics. The rational of the presented approach is to compare dimensions of the involved projective subspaces to conclude what transformations on the system are possible in the setting given and what maximal work extraction they enable. The re-analysis opens avenues of generalising the previous result, valid for transitions of the weight from single energy level to single energy level, to processes where the weight transfers between multiple energy levels, which we will explore in Sections 4 and 6. The work required to form a non-equilibrium state is also described, in Section 5.
The desired thermal transformation is of the form where the system and bath start in a fixed state ρ SB and end in some state σ SB , while the work storage system lifts from a single energy level, |0 , to another single energy level, |w , by an energy w > 0, see Fig. 1a. Such a transformation, however, turns out to be impossible for a large class of initial states, ρ SB , namely those which have full rank. Thus one allows transformations under which the l.h.s. of (4) is transformed into the r.h.s. only up to a success probability 1 − , as already introduced in Sect. 2.
Since the global unitary, V , is fully energy conserving we may treat the global dynamics for each global energy shell E separately and later combine their contributions. Note that those energy shells are projective subspaces and so are the individual energy levels that make up the shell. We denote the local projectors defined by their associated local energies E S , E B and To find the maximal work w max we first consider a probability P E ini ≤ 1 which falls initially into a projective subspaceΠ E ini of dimension d E ini , i.e. P E ini = tr[ηΠ E ini ] for the initial state η. The key task here is to decide if this probability be transferred entirely into a projective subspaceΠ E fin under unitary transformations V . This is of course possible if holds. Rewriting this condition using the non-trivial eigenstates |n of and therefore one must have n|Π E fin |n = 1 for n = 1, ..., d E ini . This is only possible if the dimension of the space into which the probability is mapped, d E fin := rk[Π E fin ], is at least the same as the initial dimension, i.e. the condition becomes If not the whole probability P E ini but a slightly reduced probability (1 − )P E ini is to be transferred, then one may replaceΠ E ini in Eq. (5) with any projectorΠ E ini ( ) that fulfils Defining the smallest initial subspace dimension as ini , the final space dimension condition, when allowing a small error probability in the transfer, relaxes to This constraint is now the key condition to establish what the maximum extractable work is for the thermal operations specified in Eq. (4). Since V cannot mix energy shells, it is necessary to check the condition for each energy shell E. We interpret the projectorΠ E fin used above as the operator that projects on the non-trivially populated subspace of the final global state, σ SB ⊗ |w W w|, with energy E. By construction one has the relation We can now identify the dimension ofΠ E fin , where Z S = E S M S (E S ) e −βE S is the thermal equilibrium partition function at inverse temperature β for the system. The second step is to consider the initial subspace projectors in the energy shell E, In the following we aim to specify the dimension d E ini ( , η) of a sub-projector ofΠ E ini in whose associated subspace lives the fraction 1− of the initial state (η) population (P E ini ) in energy shell E. For = 0 and ρ SB a full rank state the dimension ofΠ E ini itself is just However, to determine the initial dimension d E ini ( , η) for a finite failure rate > 0 we will need to specify the global initial state η a little more. While not the only choice, here we consider the class of initial global product states previously discussed [1,15,16,17], where ρ S is a system state that is diagonal in the basis of the system Hamiltonian and the bath is in a thermal state τ B . We will label the eigenvalues of ρ S when diagonalised in the system energy eigenbasis by λ(E S , g S ) where E S is the corresponding energy and g S the degeneracy index. By construction all non-zero eigenvalues of η in the energy shell E, i.e. the non-zero eigenvalues ofΠ E ini ηΠ E ini , are then Here f B = 1, ..., M B is the degeneracy index of the bath at energy E B = E − E S ; but it does not affect the magnitude of η's eigenvalues. The eigenvalues thus have a high multiplicity, given by the bath multiplicity M B . The eigenvalues can be re-labeled with α = 1, ..., d E ini (0) as r E (E S , g S , f B ) = r E α , such that they are arranged in decreasing order, Fig. 2. The spectra of different energy shells E, as sketched in Fig. 2, differ only by a factor of e −βE for the individual values while their multiplicity M B differs by a factor of e βE . The population probability of the global state η in energy shell E is given by of the subspace within the energy shell E where most of the initial probability, P E ini (1 − ), lives. In the sum above one simply has to add up the α to d E ini ( , η) ≤ d E ini (0) which must be chosen such that the probability reduces to the desired level, Comparing with Eq. (14) the final dimension is given by where h(E S , g S , ) determines which terms are included in the sum, as visualised and explained in Fig. 2. An h-value of 1 (0) indicates that a whole block of global eigenvalues all corresponding to system state |E S , g S is (not) included in the summation, while a fractional h-value indicates that a fraction of the eigenvalues in a block is included, see Fig. 2.
From single-shot towards general work extraction in a quantum thermodynamic framework 7 The value of d E ini ( , η) must be chosen as the smallest integer that fulfills (17). It can happen that has a value that would require to split up an individual eigenvalue r E α in order to fulfill (17) as an equality, i.e.
where n is an integer and 0 < a < 1 a real fraction. In this case the eigenvalue r E n+1 must be fully included, i.e. h must be chosen as the larger proper fraction available. For example, having to split the 3rd of 5 eigenvalues in a block (E S , g S ) the associated h(E S , g S , ) must be chosen 3/5 rather than 2/5, in order to guarantee that the failure probability is strictly less than .
For a map that is identical to (4) up to a failure probability we have obtained the initial and final subspace dimensions for each energy shell E. They allow us to check the maximal work extraction condition Eq. (9) for each E. One has The last line shows that because of the trivial dependence of d E ini ( , η) on E, the latter drops out and the expression for the maximal extractable work stated in Eq. (1) is recovered [1]. Note, that the definition of h has been extended from a binary function, used in Eq. (1), to include rational fractions. The optimal work described by Eq. (19) is thus marginally larger than the work described by Eq. (1). To recap, this work is maximal under variation of the global unitaries V that realise the map (4). The bound is tight when is chosen such that no splitting of eigenvalues would be necessary.
Note, that using the eigenvalues of the thermal state, τ S , denoted by t(E S ) := e −βE S Z S , the maximal extractable work (1) can also be written as Clearly, if h was 1 for all its arguments, i.e. all the eigenvalues in Fig. 2 have to be included, then the maximal extractable work is 0. Work can be extracted if > 0 or the initial state has rank less then the system Hilbertspace dimension or both.

The final system state
The work extraction protocol, Eq. (4), has mapped η → η (V ). It is natural to ask in what reduced state σ S = tr BW [η (V )] the system is left as a result. We will here answer this question. A crucial point to note is that not a single unique unitary V corresponds to maximum work extraction but that there are infinitely many, giving rise to potentially very different final system states. As a first step we look at the average final state, obtained through the application of each of the unitaries defined above and integration over the Haar measure, which we denote by · . Details on integration over Haar unitaries can be found e.g. in [27]. Note that even though the unitaries V commute with H, η (V ) itself need not be diagonal w.r.t. the above basis due to the possibility of having coherences within energy shells. For the diagonal part of η (V ) w.r.t. a basis consisting of products of energy eigenstates of individual subsystems, η diag (V ), one finds Eigenvalues r E α of global initial state η in energy shell E given in Eq. (16) arranged in decreasing order by their index α. For any particular system state |E S , g S there is a whole block of global state eigenvalues of the same magnitude that arises due to the bath's degeneracy ini , is indicated by the red box. The slightly reduced probability that is to be transferred, P E ini (1 − ), is indicated by the green box. To make up the slightly reduced probability blocks of probabilities are either fully included (h = 1), fractionally included (e.g. h = 3/5), or not included (h = 0) in the summations Eq. (18) and Eq. (19).
see Appendix A for details of the derivation. This is a factorized state where the system and bath are each in thermal states at inverse temperature β. However, this result in itself is not sufficient to conclude that typically an almost thermal state of the system results from an individual V . One needs to calculate also the relative variances of P fin (E, E S , g S ). The latter are the portions of the diagonal elements at E S , g S of the final reduced state of the system σ S that correspond to the parts of the total final state living in energy shell E, i.e., E S , g S |σ S |E S , g S = E P fin (E, E S , g S ). Hence, if these relative fluctuations are small one will typically get diagonal elements of σ S that resemble their averages, which in turn coincide, according to Eq. (21), with those of a thermal state. Concretely we obtain for those relative fluctuations, see Appendix A, which is indeed very small due to the large multiplicity of the bath Off-diagonal elements have to be considered separately, but it turns out that the variance to their vanishing mean also scales as . Thus, for a unitary drawn at random all elements of a typical final system state σ S are close to the average thermal state if the bath is large.
The entire above reasoning is along the lines of what has become known as "quantum typicality" [28,29,30,31].
Having realised that optimal work extraction can result in a multitude of final states, with typical state being close to the thermal state, one may wonder why it is not possible to extract more work in those rare instances where the final state happens to be fairly different from the thermal state. Here it is important to note that the final state need not to be factorized between system and bath (c.f. Eq. (21) only describes the diagonal part). Indeed, it is known [32,33,34,35,36] that only a negligible set of the final states will be factorized when the degeneracies of the bath B are large. However, to repeat the same work extraction process requires an initially factorized state, thus preventing repetition and further work extraction along the same route in those cases. Thus there is no second law conflict with a final state being non-thermal.

Minimal work cost of formation
A key finding of the single shot thermodynamics approach presented in [1] is the realisation that, in analogy to entanglement of formation and distillation, the work required to form a non-equilibrium state may differ from the work that can be extracted from that state. Here we will now re-derive the minimal cost of formation, w min , of engineering with certainty ( = 0) a diagonal state σ S from a thermal state τ S = e −βH S Z S , under thermal operations.
Considering again global unitaries V that commute with the Hamiltonian, the desired operation is with any final state permitted such that tr B [σ SB ] = σ S . Using the same reasoning that lead to Eq. (16) the eigenvalues r E (E S , g S , f B , E W ) of the global initial state η in a particular energy shell E are given by where g S and f B are the degeneracy indices labelling the various energy eigenstates for E S and E B = E − E S − E W , respectively. By construction the global eigenvalues are only non-zero when the weight has energy E W = w and the non-zero eigenvalues in shell E are all equal. The eigenvalues of the desired final system state σ S which is assumed diagonal in the system's energy eigenbasis {|E S , g S } of H S are denoted by s(E S , g S ) = tr[σ SB |E S , g S E S , g S |]. The contributions stemming from the energy shell E to the diagonal elements of the final system state σ S may thus be written as where the sum is performed over all bath degeneracy indices at energy E B = E −E S . We note that since the initial state has no off-diagonal elements between different system energies, say, E S and E S , and the unitary V commutes with H no such off-diagonal elements can be generated under V . There may be off-diagonal elements within a single energy subspace E S , i.e. E S , g S |σ S |E S , g S = 0. These off-diagonal elements can always be "avoided" though by choosing the basis {|E S , g S } for the system subspace of energy E S appropriately. Thus, w.l.o.g. the state σ S can be assumed diagonal with diagonal elements as given in (25).
Since V is unitary, not only the eigenvalues of the initial state η (in energy shell E) but also those of the final state η (in energy shell E) are given by Eq. (24) The probability of the final state σ S to be found in state |E S , g S , denoted by s(E S , g S ), is then obtained by summing over contributions from all the energy shells, where E M B (E)e −βE = Z B was used. Importantly this inequality must be fulfilled for all pairs E S , g S . Using the eigenvalues of the thermal state of the system and rearranging one obtains as the condition on the work cost of formation. One can see now that the energy eigenstate |E * S , g * S with the largest ratio =: µ is the one that constraints the whole transformation. The tight lower bound on the work cost of formation is then µ can also be expressed as µ = min{λ : s(E S , g S ) ≤ λ t(E S ) ∀E S , g S } or for σ S the desired diagonal state of the system. The work cost Eq. (29) for the ideal map Eq. (23) can easily be extended to allow final states in an vicinity of the desired state σ S . µ is then replaced by µ = inf σ S min{λ : σ S ≤ λ τ S } where σ S is close to σ S , ||σ S − σ S || ≤ , where || · || is the trace norm [24].
6. Generalisation of work extraction to multiple levels in the final state of the work storage system We have seen in the previous section that the single shot concept gives sensible results for work extraction when single levels of the weight are being considered (case (a) in Fig.  1). While for truly microsopic systems this may be a suitable analysis, case (a) is not the right picture for mesoscopic or macroscopic work extraction process. It is not feasible to lift a work storage system from a true quantum energy eigenstate to another true energy eigenstates. The density of states is so large that it will be practically impossible to pick a single eigenstate of a macroscopic system [28]. This indicates that an extension of the single shot thermodynamic framework to transitions between multiple levels, see Fig. 1b and 1c, is desirable. The approach presented above now allows a straightforward generalization to thermal processes where the work storage system is transferred from the ground state to not just a single energy level, but an interval δ of energy levels, see Fig. 1b. To do so we will now turn to a harmonic oscillator work storage system with energy spacing ∆E, similar to the one considered in [17], and differing from the qubit work storage system used in [1]. For simplicity we will assume that also the system and the bath have oscillator-like equidistant energy eigenlevels of integer multiples of ∆E. Again, the weight shall have no degeneracies whatsoever while the system and bath again have degeneracies M S (E S ) and M B (E B ) at their energies E S and E B , respectively.
Work extraction of an amount of workw is now identified with the transition (with probability 1 − ) of the work storage system from its ground state to any state living in the energy subspace [w ,w + δ], see Fig. 1b. The ideal transfer ( = 0) is now associated with the map where the final state of the weight σ W := tr SB [σ SBW ] is now mixed with support in the interval specified. Here the general case of entangled states between weight and the rest is allowed. If the role of these correlations is of interest, then restrictions to product states could be considered. One finds, see Appendix B, that the maximal work is given byw showing an additional term with respect to the single final energy level situation characterised by Eq. (1). This expression holds under the conditions that compared to the thermal energy, 1 β , the final energy range is large, δ >> 1 β , while the energy spacing is small, ∆E << 1 β . Physically this means that the final interval needs to contain a large set of energy levels. The surplus on the r.h.s. does not depend on δ as long as the above conditions are fulfilled. However, the work does depend on the level spacing and can go to infinity for ∆E → 0.
To judge whether these conditions are fulfilled for meso/macro-scopic work storage systems, it is instructive to consider realistic numbers. At room temperature the thermal energy is 1 β ≈ 2.5 · 10 −2 eV; about the energy of a single optical phonon in a solid. Thus allowing a final energy range of δ for the macroscopic weight system that is large compared to the energy of a single phonon, condition δ >> 1 β is fulfilled. For the work storage system one can imagine a pendulum with eigenfrequency 1 Hz which results in an energetic level spacing of ∆E ≈ 4 · 10 −15 eV<< 1 β thus fulfilling the second condition. Level spacings of many meso/macro-scopic work storage systems, such as batteries, are even smaller by several orders of magnitude. These example numbers indicate that both conditions will generally hold for meso/macro-scopic systems.
Maybe surprisingly the additional term, − ln(β∆E)/β, is an up-shift as sketched in Fig. 1b, implying a work above that of Eq. (1). This seems to indicate a conflict of Eq. (32) with the second law, but this is only a problem in a naive sense. To properly discuss second law violations one would have to build a cyclic machine that enables work extraction. It is possible to close the desired work extraction transformation, Eq. (31), to a cycle, however, it is not possible to run the cycle again. This is because the weight started in an energy eigenstate, |0 W , while ending in a reduced state σ W which is not an energy eigenstate. Therefore there is no true second law violation as the process cannot be repeated using the same weight. Exploring if there is a link between the apparent violation of the second law in Eq. (32) and the existence of weight-system or system-bath correlations [37,38,39] in the final state in Eq. (31) is an interesting future avenue.
Finally, the implication of Eq. (32) is that one can extract more work when the final weight state is allowed to live in a range of energy levels (b), rather than when restricting to a single level (a). While this is mathematically sound some may find this counterintuitive as single shot work is often associated with a worst case scenario. The sketch in Fig. 1b intuitively suggests that the worst case result for jumping from the ground state to a range of energy states is a single level transition to the lowest level, implying the lowest energy in (b) is the same as the single energy in (a),w = w. However, this is not correct -the salient point is that populations of energetic levels higher than w would not count as "success" in the situation depicted in Fig. 1a. To achieve a high probability of success, 1− , in (a) the population needs to be concentrated in just that one level and this is what leads to a lower amount of extractable work in comparison to case (b), i.e.w > w. Now the question is how significant it is if the weight ends up exactly with energy, say w, or with an energy in a range, say [w, w + δ]? The second case is of relevance for many mechanical processes in physics and engineering where gaining work is the key aim, and obtaining a little more energy would be judged positively. There are other situations where resonance with a particular energy value is key for performance, for instance, this may be the case in biological energy conversion processes, such as photosynthesis [40]. We propose that the work "extracted" in such resonance processes may be described as "resonance work" or "matched work". To decide which approach to use to calculate work, e.g. the single shot with single level transitions or multiple level transitions or other approaches, one has to first identify what is really neededenergy of a certain amount or energy above a certain threshold.

Generalisation of work extraction to multiple levels in the initial and final state of the work storage system
We found that the physically motivated extension to multiple final levels (Fig. 1b) resulted in a physical interpretation only in the context of matching a particular energy, i.e. in a resonance situation. For work extraction in the sense of "at least this much or more energy" the predictions came out unphysical. To try and rectify this we now proceed to allow an energy range in both, the initial and final state, as indicated in Fig. 1c. In this scenario, one is left with the problem of defining work on the basis of an initial and a final energy distribution of the weight. When the weight transfers from multiple levels to other multiple levels without a means to distinguish any of these transitions, there is no single energy difference ∆E W that can be straightforwardly linked to work. Even if one considers the multitude of energy differences associated with the different single level transitions, it is challenging to formulate a "worst case scenario" for the reasons discussed in the previous section.
We will here not attack the complicated problem of defining single shot work for transfers between multiple levels of the weight, see Fig. 1c and Fig. 3c, and finding the optimum work. Instead, our aim here will be to find a transfer-quantity, which we denote w , that indicates whether an initial weight energy distribution can or can not be transformed into a final distribution. To analyse the general multiple level scenario (Fig. 1c) we consider again a global unitary (V ) commuting with the sum of local Hamiltonians as before and no restrictions on their spectra. V maps an initially factorised state to some final possibly correlated state, where the initial bath state is assumed thermal and the weight's final reduced state is σ W := tr SB [η ]. Various transfers between different energy distribution of the weight are sketched in Fig. 3. The average energy change of the weight on its own cannot be significant to limit thermodynamic transformations. For example, a weight starting in the ground state can have its average energy raised just by coupling it to a heat bath. Intuitively, the transfer-quantity should reward energy increase while punishing spreading the energy across different energy levels of the weight. It is known that the free energy has exactly such a balancing property and this motivates us to define the transfer-quantity for bringing a weight from state σ W to state σ W as the free energy difference of the weight, Here ∆U W = tr[H W (σ W − σ W )] and ∆S W /k B = −tr[σ W ln σ W ] + tr[σ W ln σ W ] are the average energy change and entropy change of the weight and T is the temperature of the initial bath state. The free energy difference is also being suggested as a work quantifier based on an axiomatic approach [42].
Using sub-additivity of the von Neumann entropy it is straightforward to show, see Appendix C, that the transition Eq. (33) can only be possible when the transfer-quantity obeys at least the following inequality Here F (ρ S ) − F (ρ S ) = −∆F S = −∆U S + T ∆S S is the free energy difference of the two, in general, non-equilibrium system states ρ S and ρ S =:= tr BW [η ], with ∆U S and ∆S S defined analogously to above, using instead the system Hamiltonian H S . Note, that inequality Eq. (35) is necessary but not sufficient, i.e. there are examples where this inequality is fulfilled and the transition may still not be possible. Equality in Eq. (35) can only occur when the final global state factorises with the final bath state being a thermal state, see Appendix C. Thus the bath B must remain in a thermal state under the optimal work extraction process. This clearly hints in the direction of the bound being reachable in the classical macroscopic limit as was suggested in [1]. Now one can consider special cases of this general relation. A subclass of map Eq. (33) are the single level to single level transitions, sketched in Fig. 1a. This situation is also sketched in an energy probability distribution picture for the weight, see Fig. 3a.
Mathematically one now obtains, using Eq. (35), the necessary condition for a transformation ρ S → ρ S to be thermodynamically allowed. To maximise w one clearly wants to choose the final state thermal, ρ S = τ S . The highest value of w that could be permissible is thus F (ρ S ) − F (τ S ). In general one has F min (ρ S ) < F (ρ S ) with F min (ρ S ) approaching F (ρ S ) in the i.i.d. limit (infinitely many identical copies) [1]. This means that inequality Eq. (36) is here a lesser requirement than the tight bound Eq. (1), giving just an upper threshold of what transformations may be allowed. For weight transitions from a single level to multiple levels (sketched in Fig. 1b) the inequality gives so it is down to the choice of a suitable final weight state σ W to enable the transformation to be thermodynamically possible. Fig. 3b shows an example of a final energy distribution of the weight (orange box). It can be seen that if one was to shift up the final distribution in energy while keeping the entropy the same, F (σ W ) would grow thus making the inequality continuously tighter. The limit on how far the final weight distribution can be shifted in energy and the transition still being allowed is given by the system's free energy difference. For a multiple level to multiple level transition (sketched in Fig. 1c) an example initial weight distribution is sketched in Fig. 3c. If the energy distribution of the weight is solely shifted to a higher energy without changing its shape, i.e. not changing the entropy, then the inequality reduces to This result is the same as for the tight bound derived for a slightly different process in which global unitaries are chosen to be of a specific form but for which only average energy conservation is required [17]. Condition Eq. (35) produces sensible results for the special cases discussed here. While for transformation to be thermodynamically possible fulfilling the condition is only necessary, not sufficient, the condition's strength lies in its applicability for general globally energy conserving transformations on initially factorised states. It also gives an easy to check criterion allowing to rule out many potential weight transitions. Finally, the transfer-quantity w may be interpreted as identical to the work that can be extracted on average from a system, W , such that condition (35) turns into the statement This statement can also be found from the Jarzynski equality, both in the classical and quantum case, by applying Jensen's inequality, and is viewed as an expression of the standard second law of thermodynamics [5,6,7,9,10,11,12,43,44,45].

Discussion
We have re-derived the extractable work and the work of formation in the single shot setting proposed in [1], where a work storage system transfers from a single energy level to another single energy level with probability 1 − . Our alternative derivation of the optimal work value for which such a transformation is still possible was based on the comparison of subspace dimensions while no discussion of thermomajorisation was required. (Thermo-majorisation [1] offers an additional and separate method of addressing the same optimisation problem.) The approach presented here facilitates a discussion of the the final state of the system after work extraction has been performed. Indeed, we find that typically the reduced final state is a minimum free energy thermal state as has been suggested [1]. "Typically" is here to be understood in the very same sense in which it is often used in the context of thermalisation studies: it is overwhelmingly frequent w.r.t. Haar distributed unitaries [28,29,30,31]. The implication of this finding is two-fold: on one hand it should not come as a surprise if a "work-extracted" system is left in a thermal state, on the other hand the question of how far away from a thermal state a system may end up for a specific, for instance physically motivated, unitary is a promising direction for future research. The presented approach opened the possibility to discuss a single shot work concept when transitions of the work storage system between a single energy level and a range of final energy levels is permitted. Extensions to multiple levels are desirable to reflect experimental constraints -current and near-future experimental control of meso/macroscopic systems does not allow to distinguish between energy levels that are spaced by less than an optical phonon. While the results for the multiple final level situation are mathematically sound, they raise interpretation issues when applied to the physical context. Besides showing an apparent violation of the second law that requires careful attention, an important conclusion emerges. While there is a sense of "maximum work extractable" with probability 1 − in the single shot setting there is no sense of "minimum work extractable" in a transition involving multiple levels. The term "work extraction" intuitively suggests that an energy of a certain amount or higher is being made available. In contrast, the single shot setting is suited to characterise resonance processes where a specific amount of energy is stored in the work storage system, and there is a thermodynamic limit to how much that can be. Due to its nature, the work extracted to the weight may here be thought of as "resonance work" or "matched work".
Finally, the aim was to consider multiple energy levels of the work storage system for both, initial and final state. We have not tried to generalise the single shot approach to this situation because of the issues in physical interpretation that we could not fully resolve. Instead we provide a means to decide whether a transfer can be thermodynamically allowed by introducing a transfer-quantity w . The resulting necessary bound, w ≤ −∆F S , is applicable for general initial and final states of the weight but it is not a tight bound, i.e. there are some transformations that are fulfil the bound while still not being possible with the resources considered. The bound does however give tight results for the single level case (a) when applied to N → ∞ i.i.d copies [1,15], the multiple level result for specific unitaries [17], and it recovers the tight bound on the macroscopic average work implied by Jarzynski's relation and given by the second law. This convergence may pave the road towards a consistent approach to work extraction that applies all the way from the micro to the macro regime. Since the criterion is fairly simple to apply it facilitates the discussion of many practical limits on work extraction in the quantum regime. To rephrase, while Eq. (35) is not precisely tight it is sufficiently tight to be relevant and thus it may be considered a valuable concept.
Thus, if m is sufficiently large, those relative deviations become (negligibly) small. Which means even for a single unitary drawn at random according to the Haar measure s may be expected to be given by s ≈ s for the overwhelming majority of cases.
Equiped with these findings we may now identify the "typical" local reduced final state of the system S. To this end we consider (A.1) with the following ascriptions: furthermore we note that Let η diag be the diagonal part (w.r.t. the product energy eigenstates of the uncoupled subsystems) of the full system final state that has actually changed under work extraction, i.e. everything except for the " -part that remained unchanged, and η diag,E that part of it a energy E. Then one finds from (A.1), inserting (A.6) and (A.7): Since P (E) is invariant under V it may be calculated most conveniently from (15). From this calculation it is found to be actually independent of E, i.e., the total probabilities on all energy shells are the same. Using (10) and (11) yields To find η diag one has to some the above equation over E. However, at this point it is actually more instructive to go back to the original, local energies and sum over E S , E B rather than E S , E. Doing so yields: Using the index shift E B − w → E B , this may conveniently be summed as which is (21) as given and discussed in Section 4. However, to conclude that the actual final state of the system S corresponding to a single random unitary is close to e −βĤ S /Z S and thus a minimum free energy state it remains to be shown that the relative deviations of η diag are small. To this end it is instructive to write out the diagonal matrix elements of the reduced final system state explicitly where |E S , g, E, f, w are the respective (product) energy eigenstates of the decoupled system. So a single P f in (E, E S , g), i.e., a contribution to the respective diagonal element of the final reduced state of S from some energy shell E, is itself a sum over very many diagonal elements of the full final state, as may be seen from the lower line of (A.12). Namely, it runs over all bath energy eigenstates at which is very small if the bath is large. This is (22) as given and discussed in Section 4. Furthermore, if the unitaries are drawn at random, theÛ E are independent of each other. Thus one may conclude from (A.13) and the central limit theorem, that according to the first line of (A.12), the relative deviations of E S , g|σ S |E S , g will be even smaller if many energy shells are involved. An analogous consideration (which we do not present here in full detail for brevity) applies to the off-diagonal elements of the final reduced state of S. The analogue to (A.3) required to find the average of those off-diagonal elements reads [21] n|V AV † |n = 0 for n = n , (A.14) Thus (using the same ascriptions as before, (A.6)) on average off-diagonal elements of the full system final state vanish. Since off-diagonal elements of reduced states are sums of off-diagonal elements of the full state exclusively, the averages of the final reduced state of the system σ S also vanish. Thus on average, the final state is indeed diagonal in its energy eigenbasis. Furthermore only those (off-diagonal) elements of the full state for which the full system states |n , |n both correspond to the same bath system state |E B , f contribute to the reduced state of S at all. Thus each contribution to the reduced state of S may be associated with a certain energy shell E B of the bath. An analogue to (A.4) which may also be found from typicality considerations [21] essentially states that the deviations of the off-diagonal elements of the reduced state of S again scale as , just like in the case of the diagonal elements, cf. (A.13). This result is also given and discussed in Section 4.
Appendix B. Derivation of maximum work extraction for multiple final states in the work storage system Obviously the new definition of work extraction as described in Sect. 6 allows for a different (larger) space of possible final states than the previous ones. To account for this one simply has to restart the calculation ofΠ E f in , or rather d E f in , such as to enlarge the final Hilbert space in order to comprise all final states which are possible according to the above re-definition. This "new" final Hilbert space may described as a sum over many "old" ones. This change is most conveniently implemented by restarting from (11)  where n is a natural number that labels the eigenvalues in the allowed final intervall. Since (B.2) is a geometric series the summation can be easily done Obviously, gradually increasing the width of the allowed final energy regime for the weight system W leads to a quick increase of d E f in in the very beginning. Beyond a certain (still rather narrow) width of δ ≈ kT , no relevant further increase occurs. For macroscopic systems that may be used to store work one usually has ∆E << 1/β., In this case (B.4) may be simplified further such as to yield Considering a d E f in based on this and inserting the latter on the l.h.s. of (19) eventually leads to an analogue of (1) which now reads This is (32) as given and discussed in Sect. 6.

Appendix C. Derivation of an upper bound to the state transfer quantity w
This part of the appendix is dedicated to a derivation of (35) in Sect. 7. In the remainder any state of the total system, possibly including correlations, will be denoted by η. Reduced local states will be denoted by ρ S = Tr BW (η) for the non-equilibrium system, σ W = Tr SB (η) for the weight storage system, and τ B = Tr SW (η) for the bath. Just as before V transforms the total initial state η into the total final state η which means η = V ηV † . And just as before we assume conservation of the sum of local energies, i.e., [H S + H B + H W , V ] = 0. Free energies will be denoted as where X := ρ S , σ W , τ B , η. Thus, free energies may refer either to parts or to the total system. The expectation value of the respective energy is denoted by U (X) for the corresponding Hamiltonian, H S , H W , H B . Generally primed operators will refer to final states and "unprimed" operators to initial states. Again, as also mentioned in Sect. 7, we assume factorizing initial conditions, i.e., η = ρ S ⊗ τ B ⊗ σ W . We also make the assumption of the initial state of the bath being a minimum free energy Gibbs state, i.e, τ B ∝ e −βH B . The only difference in the set up of the approach in this Section compared to the previous parts of this paper is that we do not require the state density of the spectrum of the bath to be exponentially growing.
From single-shot towards general work extraction in a quantum thermodynamic framework 21 Due to this set up, by construction, the total entropy and the sum of local energies are both invariant under V . Thus, the initial total free energy and the final total free energy are the same: Due to the factorizing initial conditions we have From the Araki-Lieb theorem [41] it follows that S(η ) ≤ S(ρ S ) + S(τ B ) + S(σ W ) (C.4) and hence, Thus inserting (C.3) and (C.5) into (C.2) yields which may simply be rearranged as A Gibbs state at inverse temperature β is the state with the globally lowest free energy based on a specific β. Since we assumed an initial Gibbs state for the bath it follows that , F (τ B ) is the lowest possible bath free energy. Consequently, whatever F (τ B ) is, it can only be larger than F (τ B ). Thus Since the l.h.s. is simply F (σ W ) − F (σ W ) = w as defined in (34) this completes the derivation of (35).