thermodynamics forms part of the bedrock of our current understanding of the physical world .
it has remained unchanged despite huge revolutions in physics , such as relativity and quantum theory , and few believe it will ever fail . over time , it has been applied to situations well outside its original domain ; from black holes @xcite , to quantum engines comprised of only a few qubits @xcite .
a fundamental question is that of the applicability of thermodynamics to quantum systems @xcite ; it is this question that we wish to address in this paper .
one of the most fundamental questions one would like to ask is how much work can be extracted from a system , given access to a thermal bath at temperature @xmath0 .
this question , for generic quantum systems and hamiltonians has been investigated intensively , e.g. in @xcite yet , until very recently only partial results have been obtained and it remained an open problem .
very recently however strong general results were obtained @xcite , made possible by employing a new conceptual framework , namely that of  resource theories " .
the advent of resource theories is one of the main paradigm shifts which occurred within quantum information theory ; the main idea is to bring to the forefront the study of _ resources _ needed to implement various tasks .
the archetypal resource theory in this context is entanglement theory @xcite .
however , numerous other examples have now been developed , including reference frames @xcite , purity @xcite and asymmetry @xcite , which has culminated in a general formalised notion of a resource theory @xcite . in @xcite
the authors introduced an appealing resource theory of thermodynamics , based on the class of allowed operations first studied in @xcite .    here
we revisit and modify the resource theory framework of thermodynamics as originally put forward in @xcite .
in this new context we achieve two main results : first we prove the second law of thermodynamics .
second , as described in more detail below , we show that free energy is a relevant quantity for individual quantum systems .
the latter result is particularly relevant following the results of @xcite which call into question the role of free energy for individual quantum systems .
classical thermodynamics tells us that the total amount of work we are able to extract from a system is given by its change in _ free energy _ , which was also supported by previous partial quantum results @xcite .
yet in @xcite it was shown that work equal to free energy can be extracted only if we _ collectively _ process many copies of the same system . when acting on each copy individually ,
the amount of work that can be extracted is generally significantly less than the free energy .
these results therefore suggest that the free energy is not the relevant quantity for individual systems .    here
we revisit the issue of work extraction and show that free energy is a significant quantity for individual systems .
our paradigm is similar to that of @xcite but differs in an essential aspect . in @xcite they considered _
almost deterministic _ of failure ] work extraction , from the ` single - shot ' viewpoint which has received much attention lately @xcite . here , in contrast , we will consider _ average _ work extraction .
we prove that there exist simple protocols which extract _ average _ work equal to the free energy change of the system .
crucially , for systems in ` classical ' states ( mixtures of energy eigenstates ) our protocol works on a single copy of the system .
this establishes the fact that free energy is a meaningful notion even for individual systems , when their states are classical .
however , for non - classical states , where coherences between energy levels exist , we prove that collective actions are necessary , so long as no external sources of coherence are used .
more precisely , we prove that when acting on an individual system the amount of average work that can be extracted is equal to the free energy of its decohered state  the free energy due to coherences is ` locked ' and can not be used .
as more copies are collectively processed , some of this locked free energy is released  we can extract the free energy of the decohered state of @xmath1 copies , which is larger than @xmath1 times the free energy of a single decohered system . in the limit of infinitely many copies ,
the average work extracted per copy reaches its entire free energy . whether or not external coherent resources allow extraction of work equal to the free energy for individual systems , and how to account for such resources ( given that they may provide free energy themselves even without the system ) remains an open question .
the paper is organised as follows . in sec .
[ s : preliminaries ] we go through the preliminaries , including a brief description of the resource theory of thermodynamics in sec .
[ ss : resource theory ] , work storage systems in sec .
[ ss : work storage ] and a proof that the second law holds in sec .
[ s : second_law ] . in sec .
[ s : diagonal ] we study work extraction from diagonal systems , beginning with a motivating example in sec .
[ s : motivating example ] , before moving onto a full qubit protocol in sec .
[ ss : full protocol ] .
we discuss a special case in sec .
[ ss : maxwell demon ] , present a full protocol for arbitrary dimension systems in sec .  [ ss : qudits ] and prove optimality in sec .
[ s : optimality ] . in sec .  [ s : coherence ] we show how work can be extracted from coherence by acting collectively on multiple copies of the system .
we finish by briefly discussing how the results of this paper can be understood from the perspective of ` virtual temperatures ' in sec .
[ s : virtual ] , before concluding in sec .
[ s : conclusions ] .
the first ingredient in a resource theory is a set of free resources . by
free we mean that we have an unlimited supply of this resource , since it is deemed easy to acquire . in the present context of thermodynamics
this free resource is _ a thermal bath at temperature @xmath0_. more precisely , we assume that we have an unlimited supply of finite - dimensional systems , with any desired hamiltonian @xmath2 , in their thermal state @xmath3 , @xmath4 where @xmath5 is the inverse temperature throughout for convenience ] , and @xmath6 is the partition function .
the second ingredient is a set of allowed operations , those which one has the ability to perform with ease . in the original resource framework
these allowed operations were _ any energy conserving unitary transformation_. in particular , any unitary operation which commutes with the total ( non - interacting ) hamiltonian of all the systems under consideration .
this allows one to transform systems in a controlled way , but without admitting an external source of energy .
however , we will also introduce an additional element into the resource framework , a _ work storage system _ , whose sole purpose is to provide and store work for thermodynamic transformations . in the next section
, we will place some additional constraints on the allowed operations , which prevent us from ` cheating ' by using work storage system for other purposes ( e.g. by using it as a cold reservoir in a heat engine ) , and allow us to use the same work storage system for multiple thermodynamic protocols .
given these ingredients , any additional system which is not in thermal equilibrium with a bath at temperature @xmath0 is a useful resource . the question that remains is to quantify how useful different resource states are .
one way to quantify the usefulness of different resource states is to find a transformation from every resource state to some _ fiducial _ resource which allows for comparison in a well - defined and easy manner . in the resource theory of entanglement , for example
, one can quantify the entanglement of a state by the optimal asymptotic number of maximally entangled states that can be created per resource state , or in other words the optimal rate at which states can be converted into maximally entangled states .
different states will have different optimal rates , and thus the rate quantifies how useful they are .
we seek here an analogous fiducial resource for thermodynamics .
work is the desired output in this case , and different states can produce work at different rates .
because we wish to study a closed quantum system , with conserved total energy , we desire a system where we can store the work extracted from resource states .
similarly to entanglement theory , where the maximally entangled state is chosen for convenience , here we wish to find a work storage system which we deem to be most convenient .    in previous work @xcite a candidate was put forward  raising a qubit deterministically from its ground state to it s excited state .
this qubit was termed a _ wit _ , short for _
work bit_. however , choosing the energy gap of the work bit requires advance knowledge of the work to be extracted , and this model does not translate well to non - deterministic work extraction , which we will be interested in here .
furthermore , we would prefer to be able to use a single work storage system as a ` battery ' capable of gaining and expending work in multiple thermodynamic processes .
the alternative work storage system we will consider here is a suspended _ weight _ , which is raised or lowered when work is done on or by it . in particular
, we will consider a quantum system whose height is given by the position operator @xmath7 , with hamiltonian @xmath8 representing its gravitational potential energy we show that the weight can be replaced by a system with discrete equally - spaced energy levels .
this introduces a small error in the results , but this can be made as small as desired by appropriately scaling the spacing of the weight . ] . for simplicity
, we choose @xmath9 , such that the value of @xmath7 directly denotes the work stored by the mass . such a system has a long history of being used as a work storage system in classical thermodynamics @xcite .
we will place two additional constraints on the allowed dynamics governing interactions with the weight :    1 .
the average amount of work extracted in an allowed protocol must be independent of the initial state of the weight.[i : i ] 2 .
all allowed unitaries should commute with translation operations on the weight .
this reflects the translational symmetry of the weight system , and the fact that only displacements in its height are important.[i : ii ]    these constraints are intended to prevent us from ` cheating ' by using the weight for purposes other than as a work storage system ( e.g. as a cold reservoir , or a source of coherence ) .
for example if the weight starts in a pure state , it has zero entropy , so one needs to be careful to avoid unwittingly using this as a source of free energy , in addition to the system . constraint ( i ) encapsulates this requirement .    constraint ( ii ) is a bit more subtle .
on the one hand , it is very plausible that it is a consequence of constraint ( i ) .
we however have not been able to show this . on the other hand , even if it does not follow from ( i ) , we would still like to assume it , as it seems wrong to use properties of the weight in the protocol , even if they do not affect the work extracted .
furthermore , constraint ( i ) ensures that we can use the same work storage system for multiple thermodynamics protocols ( or on several copies of the same state ) without having to worry how the initial state has been modified by earlier procedures .
as we are free to choose any initial state of the weight due to constraint ( i ) above , for simplicity we will usually take the initial state of the weight to be a narrow normalised wavepacket @xmath10 centred on the origin ( i.e. @xmath11 ) .
when the same wavepacket is raised above the origin by a distance @xmath12 , we will denote the state by @xmath13 , where @xmath14 is the translation operator , where @xmath15 is the usual momentum operator satisfying @xmath16 = i \hbar$ ] . ] .
we now show that the second law of thermodynamics holds in our framework , by proving a probabilistic version of the second law  that there is no protocol which extracts a positive quantity of average work from a thermal bath ( i.e. that there is no way on average of turning heat into work ) @xcite . to show this we will use proof by contradiction .
consider a thermal bath at temperature @xmath0 and the weight , i.e. there is no additional system out of thermal equilibrium .
let us first consider the energy changes during the protocol .
suppose that we are able to extract work from the bath and store it in the weight , @xmath17 .
the average energy of the thermal bath must change by @xmath18 due to energy conservation .    now consider the entropy changes during the same protocol ( in particular , the changes in von neumann entropy @xmath19 . as the bath and weight are initially uncorrelated , their initial entropy is simply the sum of their individual entropies .
unitary transformations conserve the total entropy , @xmath20 . however , as correlations can form during the protocol
, the sum of the final entropies of the bath and weight can be greater than the sum of their initial entropies ( as the entropy is subadditive ) .
this means that @xmath21    given an initial thermal state for the bath ( with positive temperature ) , any change of the state which reduces its average energy must also reduce its entropy ] , @xmath22 .
however , within our framework all allowed protocols are such that the average work extracted is independent of the initial state of the weight ; we are therefore free to choose any initial state of the weight we like .
consider now that the initial state of the weight is a very wide wavepacket .
we show in appendix [ a : second_law ] that the entropy change of the weight in this case can be made as small as desired , in particular we can make @xmath23 .
this would result in violating .
hence there is a contradiction , and thus there is no way to extract work from the bath .
we will begin our exploration of work extraction by considering the special case of extracting work from systems whose states are diagonal in the energy eigenbasis .
this represents systems which are essentially classical , since coherence plays no role , and states are simply mixtures of energy eigenstates .
we will present a protocol which extracts work equal to the change in free energy of the system .
in contrast to existing protocols , here our protocol will take one copy of the system , and extract average work equal to the free energy of the system .
the protocol contains at its core a single elementary building block which is able to extract a vanishing amount of work blue , with maximal efficiency .
the full protocol consists of many repetitions of this one step .
we shall present first this building block in a motivating example and then show precisely how it is used to build the full protocol . in the main text the emphasis will be on the results of the protocol , with the more detailed analysis provided in the appendices .
let us consider the task of performing the following transformation on a single qubit @xmath24 whose hamiltonian is @xmath25 and where @xmath26 .
that is , we wish to consider the small transformation from a diagonal state to a nearby diagonal state .
the initial and final state differ in free energy , and hence the goal is to extract an amount of work as close as possible to this difference , namely @xmath27 where @xmath28 is the free energy of @xmath29 with respect to a bath at inverse temperature @xmath30 , @xmath31 is the average energy , @xmath32 is the ( classical ) binary entropy , @xmath33 , and we have taken the first order expansion in @xmath34 to arrive at the final line .
we shall now see that to first order we can extract exactly this amount of work from the system .
to do so let us bring in a thermal state from the bath  the free resource at our disposal  and choose its hamiltonian such that the population in the excited state is @xmath35 . for thermal qubits
the relation between excited state population @xmath36 and energy spacing @xmath37 is @xmath38 thus we will choose the hamiltonian of the bath qubit to be @xmath39 with @xmath40 let us take the weight to be prepared initially in the state @xmath41 of zero average energy , and consider applying an energy conserving unitary transformation @xmath42 which interchanges @xmath43 for any @xmath44 , whilst leaving all orthogonal states unchanged can be expressed in terms of the translation operator @xmath14 as @xmath45 where @xmath46 . note that this commutes with the free hamiltonian @xmath47 . ] .
it is the change in average energy of the weight which is of interest .
a straightforward calculation ( given for completeness in the appendix ) shows that this is given by @xmath48 which is equal to @xmath49 to first order in @xmath34 .
thus we observe that if we wish to to make a change of state from @xmath50 to @xmath51 , a way to proceed is to bring in a qubit from the bath in the state @xmath52 .
whenever @xmath50 is not the thermal state ( given it s
hamiltonian @xmath53 ) , we find that @xmath54 , and therefore there is a difference in energy between the excited states of the two qubits .
it is thus not possible to swap the state of the two qubits using an energy conserving unitary .
however , by bringing in the weight we can perform the unitary which is energy conserving , and , at the level of the reduced states of the system and bath , indeed performs a swap .
the system therefore ends up in the desired state @xmath51 , and we find that the change in average energy of the weight , when the state of the system and bath are close , approaches exactly the change in free energy of the system .      the above insight can be used to build a full protocol which is able to extract an amount of work approaching the free energy change in transforming a system from a state @xmath50 to its thermal state @xmath55 .
the basic idea is that , since in making a small change of state we have seen that the work extracted approaches the free energy change , we can divide a large change of state into many small changes and at each stage extract the desired amount of work .
therefore , let us fix an integer @xmath56 , and consider @xmath57 thermal qubits @xmath58 , @xmath59 , @xmath60 where @xmath61 is the excited - state probability in the thermal state @xmath55 .
this collection of bath qubits have excited - state probabilities which vary linearly from that of the initial state of the system @xmath62 to that of the thermal state of the system @xmath55 , in increments of @xmath63 .
we will apply , in turn , the sequence of unitary transformations @xmath64 , where @xmath65 acts on bath qubit @xmath66 , system and weight and swaps the states @xmath67 whilst leaving all other orthogonal states unchanged .
assuming once again that the weight starts in the state @xmath41 , it is the final state , and in particular the final average energy of the weight which is of interest , as the number of steps @xmath57 tends to infinity . in appendix
[ a : weight ] we calculate explicitly this state in the asymptotic limit .
the result is that the final reduced state in the infinite limit , denoted @xmath68 , is @xmath69 the average energy is thus @xmath70 where @xmath71 is the relative binary entropy .
we observe that the average energy of the weight at the end of the protocol , and hence the average work extracted , approaches precisely the free energy difference in the asymptotic limit of infinitely many thermal qubits .
although this is promising , it should be noted that the final distribution of the weight does not have the form one may intuitively have asked for ( i.e. a peak around a single value , at the free energy itself ) .
instead we find that the solution has perfect correlation between the initial state of the system and the final energy of the weight .
it is worth noting that this interesting distribution coincides with the results found in @xcite where , even though the details of the allowed transformations differ , it was shown that for classical systems , optimal work extraction protocols converge on this distribution in probability .    note also that in the large @xmath57 limit , although many thermal qubits are required , each of them is only slightly perturbed by the process .    finally , we consider the case of @xmath1 independent copies of the system  i.e. the macroscopic limit . to do
so we simply repeat the protocol above on each qubit separately , using a single weight to store the work . in each case
we have seen that the weight is transformed from a single peak ( at @xmath41 above ) to two peaks .
since the protocol is linear , it follows immediately the the final distribution of the weight will be the @xmath1-fold convolution of the above distribution for a single qubit . from the central limit theorem one
concludes that the final average energy of the weight is @xmath72 with fluctuation of the order @xmath73 . for large @xmath1 these fluctuations will be insignificant compared to the average , and we obtain an almost deterministic quantity of work , with the amount of work extracted per copy of the system equal to the free energy difference .
the results presented here are completely consistent with those presented in @xcite .
it should be noted however the stark difference in which the two protocols achieve the same goal . in @xcite
the analysis first considers all @xmath1 systems together and uses ideas from information theory to compress information within large typical subspaces . here ,
on the other hand , each qubit is manipulated separately and nowhere is the idea of a typical subspace ever introduced , nevertheless they both achieve the same end result .      the protocol outlined in the previous subsection is the general protocol which allows for the extraction of work from an arbitrary diagonal state of a qubit , for any given hamiltonian .
there is one particular choice of state that will be particularly important in later sections . as such
, we shall briefly look at it in more detail .    consider a qubit for which the hamiltonian vanishes ( @xmath74 ) and for which all the probability is initially in the state @xmath75 ( @xmath76 ) .
since the hamiltonian vanishes , the system lives in a degenerate space , and since it is pure we have maximal information about the state of the system .
this information can be used to extract work from the heat bath .
since all states of the system have equal energy , it is clear that the system provides only information , whilst it is the bath which provides the energy .    for a degenerate system the equilibrium state @xmath77 ,
thus after applying the protocol from the previous section , in the asymptotic limit of infinitely many bath qubits , the final state of the weight is given by @xmath78 corresponding to the extraction of an amount of work @xmath79 from the system .
this is an analogous process to the isothermal expansion of a single - molecule gas from one side of a box into the full volume , as discussed in szilard s well - known treatment of maxwell s demon @xcite .
it should be noted that contrary to the previous subsection , where the final state of the weight was found to consist of two peaks , in this special case of a pure initial state it consists of only a single peak .
thus it is not necessary to go to the many - copy regime to extract a deterministic amount of work in this case .      to conclude the analysis of diagonal systems it is now necessary to move beyond qubits , to quantum systems of arbitrary finite dimension @xmath80 , and arbitrary hamiltonians .
our strategy is to connect a pair of energy levels in the system to a sequence of thermal qubits in the bath , shifting the occupation probability between these levels as in the qubit case ( sec .
[ ss : full protocol ] ) .
we then repeat this process for different pairs of levels until we have the desired final state .
as the amount of work extracted in each step does not depend on the initial state of the weight ( as proven in appendix [ a : work_independence ] ) , we can consider each step separately and simply sum the total work extracted .    an important difference from the qubit case is that the occupation probability of the two levels in the system that are coupled to the bath at any given stage need not sum to unity .
for example consider a qutrit ( or larger system ) in the state @xmath81 where we wish to shift a small amount @xmath34 of probability from @xmath75 to @xmath82 .
to do this , we take a thermal qubit with excitation probability @xmath83 , so that the _ ratio _ of occupation probabilities in the bath qubit is the same as in that in the desired final state of the system .
we then apply the unitary @xmath84 where @xmath85 is the energy of the state @xmath82 , and all orthogonal states are left unchanged .
we show in appendix [ a : qudits ] that the change in the average energy of the weight during this process is equal to the free energy change of the system , to first order in @xmath34 .    from this
it is straightforward to extend the qubit protocol to arbitrary diagonal states . for sufficiently large @xmath57
we can choose a sequence of @xmath86 states for the system where two adjacent states differ in occupation probability between a pair of levels by @xmath87 , with the first and last states equal to the initial state of the system and its thermal state respectively than in @xmath55 to the @xmath75 state , then move probability from @xmath75 to the remaining levels , using @xmath88 steps for each pair of levels . ] .
we then pick the hamiltonian for @xmath57 thermal qubits such that unitaries of the form take the reduced state of the system from from one state in the sequence to the next .
this is done by taking the thermal qubits to have populations equal to those of the pair of levels of interest of the next state in the sequence , after renormalising . in the limit
@xmath89 the average amount of work put into the weight equals the free energy change of the system , regardless of the precise choice of path .
interestingly , an equivalent protocol would work for transitions between any two diagonal states , @xmath50 and @xmath29 , extracting an average amount of work equal to @xmath90 .
this implies that creating a diagonal state @xmath50 from a thermal state costs the same average amount of work as can be extracted from @xmath50 when it is thermalised . in this sense
thermodynamic transitions between diagonal states are reversible .
this differs from the results of @xcite , who show that such transitions are irreversible when considering ( almost ) deterministic work extraction , rather than average work .
we now show that the above protocol is optimal .
in particular , we will argue that the maximum free energy that can be extracted from a transition between diagonal states @xmath50 and @xmath29 is @xmath90 , using a modification of our proof of the second law ( in section [ s : second_law ] ) .
suppose that we have a protocol which extracts average work @xmath91 ( where @xmath92 ) when the system is transformed from @xmath50 and @xmath29 .
we can then use the above protocol to return the state from @xmath29 to @xmath50 in a finite number of steps , extracting work @xmath93 , where we choose the number of thermal qubits such that @xmath94 is in the range @xmath95 .
the net effect is that a positive average work @xmath96 is extracted into the weight , and the system begins and ends the combined procedure in the same state @xmath50 .
considering total energy conservation for the combined protocol , we note that the average energy of the bath must have decreased by at least @xmath97 , which means that the bath s entropy must also have decreased by a finite amount .
however , the system does not change in entropy , and the change in entropy of the weight can be made as small as desired by choosing its initial state to be a sufficiently broad pure state ( see appendix [ a : work_independence ] ) .
hence entropy conservation can not be satisfied by our hypothetical protocol , and thus no protocol exists which extracts more average work than the free energy change .
so far all of our discussions have involved only states which are diagonal in the energy eigenbasis and the protocol presented involved shifting probability only between these energy eigenstates .
we can of course consider more general states , and ask the question of how to extract the maximum amount of work from such states .      as a motivating example , let us consider a system with hamiltonian @xmath98 prepared initially in the pure state @xmath99 this state has the same average energy as the thermal state @xmath55 , however , since this state is pure , it has zero entropy and hence its free energy differs from that of the thermal state .
thus one would like to extract work from this state , with the limit on extractable work given by @xmath100 previously we were able to extract work from single copies of diagonal states .
however , we show in the next section that it is impossible to extract work from a single copy of @xmath101 given the assumptions of the framework .
this is similar to the analysis of @xcite where they also found that the state is useless for ( almost ) deterministic work extraction .
however , it is only a single copy which is a useless resource ; two copies can be used to extract work , although the amount is less than that given by ( [ e : opt work ] ) .
the important point is the way in which work is extracted , which will suggest a different way in which one can understand an asymptotic protocol ( in the number of system qubits ) able to extract the optimal amount of work .
consider two copies of the state @xmath101 , which written out in full is given by @xmath102 let us consider that we now dephase this state in the energy eigenbasis , so called collective - dephasing .
we can achieve this in two ways , either by allowing the state to evolve under its hamiltonian freely for some unknown duration of time , or more systematically by applying controlled-@xmath103 operations between maximally mixed ( therefore degenerate ) bath qubits and the system .
note that both of these are energy conserving unitaries . in either case ,
at the end of the dephasing the state @xmath50 is @xmath104 where @xmath105 .
we note that since @xmath106 and @xmath107 have the same energy , the definite phase between them is preserved .
the important point is that when considering the combined system we find that we have a two - dimensional degenerate subspace and within this subspace we are in the pure state @xmath108 , and _ not _ the orthogonal state @xmath109 .
thus we have knowledge that we are with certainty in one of two orthogonal states and we can use this information to extract work from a thermal bath by allowing it to ` isothermally expand ' into the full subspace . randomising these two states brings the pair of qubits to their thermal state .
we can thus apply the analogue of the protocol in sec .
[ ss : maxwell demon ] , coupling only the two states inside the degenerate subspace to the thermal bath , and it follows immediately that the final average energy of the weight , in the asymptotic limit , is @xmath110 except for the limiting case @xmath111 , corresponding to the unphysical condition @xmath112 , this value is strictly less than the change in free energy of two system qubits , @xmath113 this inequality is due to the fact that the collective - dephasing changed the entropy of the system but extracted no work in the process .
one may wondering therefore why this operation is considered in the first place . in appendix
[ a : coherence ] we show that we can apply the same analysis , including the collective - dephasing , to @xmath1 copies of @xmath101 and extract , in the asymptotic limit @xmath114 , work equal to the free energy change @xmath115 .
this is possible since , as we also show , collective - dephasing increases the entropy of @xmath1 systems by an amount which grows as @xmath116 , which becomes negligible in the asymptotic limit .
we thus see that coherence between states of different energy in fact plays no thermodynamic role asymptotically in work extraction .
altogether this highlights an essential difference between diagonal and non - diagonal states ; when @xmath117 , the state of multiple qubits in a diagonal state will be maximally mixed inside each energy eigenspace .
however , for non - diagonal states , these subspaces take on non - trivial states , and work can be extracted from them by allowing them to ` isothermally expand ' into the full subspace .
we now present a general strategy to extract work from @xmath1 copies of an arbitrary state @xmath50 , of arbitrary dimension @xmath80 .
it is helpful to divide the protocol into three steps :    1 .
collectively dephase the state @xmath118 in the joint energy eigenbasis .
[ i : dephase ] 2 .
allow the resulting state to ` isothermally expand ' inside each energy eigenspace , until it equals @xmath119 , where @xmath120 is the state obtained by dephasing @xmath50 in its energy eigenbasis .
[ i : expand ] 3 .
individually transform each copy of @xmath120 into @xmath55 .
[ i : transform ]    it follows from the results of sec .
[ ss : qudits ] that steps ( [ i : expand ] ) and ( [ i : transform ] ) can be performed whilst extracting an average amount of work equal to the free energy change .
the free energy change in the first step is not captured as work , but is simply lost .
however , we show in the appendix [ a : coherence ] that the amount of work lost in this step is at most @xmath121 .
the average amount of work extracted per copy of the original system is therefore @xmath122 in the limit as @xmath123 , we therefore extract an average work per copy of @xmath50 equal to its free energy change , as desired .
if we only have a single copy of the system , the amount of work we can extract from @xmath50 is given by the free energy change of the decohered state , @xmath124 .
this can be obtained by first dephasing @xmath50 into @xmath120 and then using the protocol in sec .
[ ss : qudits ] .
we now show that this is optimal , following the approach given in @xcite .
firstly , note that as we require the average work extracted by a protocol to be independent of the initial state of the weight , we are free to choose that state however we like  here we choose it to be a very narrow wavepacket centred on zero .
now consider a decomposition of the total state space into subspaces , each of which has total energy ( of the system , bath and weight ) close to one of the energy eigenvalues of the system and bath subspace corresponds to the total energy @xmath125 lying in the range @xmath126 , where @xmath127 are the energy eigenvalues of the system and bath .
furthermore we choose the width of the weight s initial wavepacket to be narrower than the smallest subspace . ] .
note that any work extraction protocol can be followed by a transformation which decoheres the state with respect to these total energy subspaces , without affecting the average work extracted .
however , this decohering operation commutes with the unitaries used in the protocol , so we can move it to the beginning of the protocol without changing the work extracted . at the beginning of the protocol
, this operation has the sole effect of decohering the system in its energy eigenbasis ( changing @xmath50 to @xmath120 ) .
hence the protocol extracts the same amount of work as it would have if it had operated on @xmath120 .
consider the model of the smallest possible heat engines @xcite , consisting of two qubits , one with energy spacing @xmath128 in thermal contact with a bath at temperature @xmath129 , and a second with energy spacing @xmath85 in contact with a bath at @xmath130 . as a composite system this pair of qubits is not in a global thermal state .
nevertheless , let us assign a ` virtual temperature ' to each transition via the identification @xcite @xmath131 where @xmath132 and @xmath133 are the probability of being in the ` excited ' state ( the state of higher energy ) and ground state ( the state of lower energy ) respectively , with @xmath134 and @xmath135 being their energy eigenvalues , and @xmath136 is the ` inverse virtual temperature ' .
for the case in hand , the virtual inverse temperature for the states @xmath137 and @xmath138 is @xmath139 where we have denoted the probability for qubit @xmath140 to be in the excited state by @xmath141 , and we have used the relation @xmath142 for a thermal state .
the motivation for introducing the concept of virtual temperatures is that for the smallest machines it gives a concise characterisation of their behaviour ; the function of the machine is determined by the virtual temperature  refrigerator , heat pump or heat engine , if colder , hotter , or negative temperature respectively ; carnot efficiency is approached when the virtual temperature approaches the external temperature for the refrigerator and pump , and when approaching minus infinite temperature for the heat engine .
it is the final machine mentioned , the heat engine , which is relevant here , since this is the machine which produces work
. we can think of the system qubit and bath qubit together to be a two - qubit heat engine and that the operating point of the protocol is the carnot point of the engine .
let us return to the motivating example of section [ s : motivating example ] .
our system qubit had spacing @xmath143 with excited state probability @xmath144 , whilst the bath qubit had spacing @xmath37 with excited state probability @xmath145 .
let us rename the state @xmath146 and @xmath147 . with this renaming ,
the interaction becomes @xmath148 where @xmath149 is the spacing of the virtual qubit .
thus from this perspective it is explicit that the unitary is the one which exchanges energy from the virtual qubit into the weight , analogous to the hamiltonian of the smallest heat engine @xcite .
the operating point of the protocol was to choose @xmath37 such that @xmath150 .
in this regime , to first order , the inverse virtual temperature becomes @xmath151 where @xmath152 .
thus the inverse virtual temperature becomes vanishingly small and negative as @xmath153 , which is exactly the carnot limit of the small heat engine .
the picture that one obtains from this perspective is that the reason why any state which is not a thermal state at temperature @xmath0 is a resource is because the _ composite system of resource state + thermal state _ contain non - trivial virtual temperatures .
one can extract work from a system approaching its free energy when the only exchanges between the composite system and weight involve virtual qubits whose inverse temperatures become negatively infinite .    finally , we conclude by noting the protocol for systems with many energy levels becomes easier to explain using this perspective .
a non - thermal state will have transitions ( i.e. pairs of levels ) at many different temperatures , and each pair needs to be bought to the same temperature in the thermalisation process . in the protocol
the bath qubits interact only with a single pair of levels at a time . to approach reversibility
it must be the case that any systems which interact only differ in temperature by an infinitesimal amount , but this is exactly the condition enforced by choosing the renormalised probability of the pair to be close to the bath qubit populations .
finally , the unitary which is applied is the basic thermalising unitary and the energy exchanged in the limit is precisely the free energy .
to summarise , in this paper we have analysed the fundamental laws of thermodynamics using the recently proposed concept of resource theories .
we proposed an alternative resource theory which differs in certain aspects from the original one . in this conceptual framework
we have proved a number of results .
first we proved the second law of thermodynamics .
second we proved that for systems that are diagonal in the energy eigenbasis , but not at equilibrium with the thermal bath , we can extract work equal to the free energy by processing each system _ individually _ , hence showing the free energy is a relevant quantity for individual systems .
third , we proved that when systems are not diagonal in the energy eigenbasis , i.e. they have coherences between different energy eigenstates , it is not possible to extract work equal to the free energy by processing them individually .
work equal to the free energy can however be extracted if we allow for collective processing of such systems ( in the asymptotic limit of many copies ) .    a number of important questions open immediately .
first of all , whether the assumptions which underlie our resource theory framework are too restrictive . in particular , this may be the reason why we can not extract the entire free energy by processing single systems with coherences between different energy levels .
indeed , given our assumptions we are very limited in how we can access and manipulate the relative phase between two different energy levels , hence we can not interfere them in a controlled way .
as such , for all practical purposes the different energy levels behave as if they were decohered ; it is precisely the free energy of this decohered state that is the maximum we can extract in our framework . to be able to interfere different energy levels ,
i.e. to control their relative phase , we need a
frame of reference " for it .
one way to look at this is that we need some other resource with coherent superpositions between energy levels .
another way to express this is that we essentially need a clock : the phase between two energy levels varies in time , so a  frame of reference " for it is essentially a clock .
when collectively processing many copies the different systems act effectively as reference systems for each other .
for individual processing however we essentially need to add an external clock . in our present framework
we did not include such a clock since we were not able to guarantee that one can not unwittingly cheat by using the clock itself as a source of free energy .
it is conceivable however that a more careful formulation of the resource theory would permit integrating a clock in a consistent and controlled manner . in this case
, it may be possible that work equal to the free energy can be extracted from all quantum states by only processing individual copies .
second , while in the above we asked if we can relax some of the constraints imposed in the resource theory , for example by including a clock , we must also enquire whether we may indeed need to strengthen some of the constraints . in particular , one may be concerned that we have used unitary transformations as opposed to hamiltonian evolution .
unitaries imply controlled evolution , i.e. turning on and off interactions at precise time intervals .
one may wonder whether this does not require some free energy to achieve .
if this is the case , then it is only an illusion that we have extracted work equal to the free energy from the system , since we had to pay to implement the process .
although such a detailed analysis is missing , the fact that all of the results obtained within the resource theory framework so far are consistent with our expectations is an implicit indication that the assumptions are indeed justified .
to conclude , the resource theory framework seems to be a natural and powerful way to approach thermodynamics .
it has already delivered significant results and we believe that further investigation along these lines will lead to a much deeper understanding of the foundations of thermodynamics .
sp and ps acknowledge support from the european project ( integrated project
q - essence " ) .
sp acknowledges support from the erc ( advanced grant `` nlst '' ) , and the templeton foundation .
ajs acknowledges support from the royal society .
ps is grateful to lidia del rio , johan berg , joe renes , philippe faist , renato renner , oscar dahlsten and luis masannes for interesting discussions .
in each step of our protocols in which work is extracted , the state of a thermal qubit is swapped with a pair of energy levels in the system , with a corresponding translation of the weight in order to conserve total energy .
consequently , each work - extraction step can be represented by a unitary transformation of the form @xmath154 where the states @xmath155 are an orthonormal basis of energy eigenstates for the system and the relevant portion of the bath , such that @xmath156 , @xmath14 is the translation operator on the weight , and @xmath157 is a permutation matrix .
furthermore , apart from the initial decohering of non - classical states ( discussed in section [ s : coherence ] ) , which is entirely independent from the weight , the entire protocol can be cast in this form .
it is easy to see that all such unitaries commute with translations on the weight .
we now show that the average work extracted by a unitary of this form does not depend on the initial state of the weight ( even if it is initially correlated with the state of the system ) .
let us denote the initial state of the system , bath and weight by the density operator @xmath50 .
the average work extracted is given by @xmath158 where @xmath159 is the hamiltonian of the weight ( defined for convenience as an operator on the entire system ) .
now note that @xmath160 where in the third line we have used the fact that for permutation matrices @xmath161 ( where @xmath162 is the kronecker delta function ) , and in the fourth line we have used the fact that @xmath163 . inserting this expression in ( [ eq : workindependence ] ) , we obtain @xmath164 where @xmath165 is the reduced density matrix of the system and bath . hence the average amount of work extracted is independent of the initial state of the weight as desired .
note that the most general energy - conserving unitary transformations which commute with all translations on the weight have the form @xmath166 where @xmath167 is an arbitrary unitary matrix .
however , for such unitaries the work extracted would generally depend on the initial state of the weight .
in this appendix , we provide further details for our proof of the second law in section [ a : second_law ] .
we first argue that any reduction in the average energy of an initially thermal state ( with positive temperature ) must also yield a reduction in its entropy .
we will only need to use the fact that a thermal state is the maximal entropy state with a given average energy .
if a system starts in a thermal state and is transformed to a final state with fixed average energy , the entropy change @xmath168 will be maximised when the final state is also thermal . in the case
where the average energy decreases , and the initial state has positive temperature , the final state will be a thermal state of lower temperature , and thus lower entropy .
we now show that the entropy change of the weight in any particular protocol may be made as small as desired by choosing its initial state to be a sufficiently broad pure state ( e.g. a state @xmath169 with wavefunction @xmath170 equal to @xmath171 for @xmath172 , and 0 otherwise , where @xmath173 ) .
first note that the requirement that transformations are translationally invariant on the weight means that they have the form given in ( [ e : general_unitary ] ) .
when applied to a thermal state of the bath , the effect of the protocol on the weight is to transform it into a finite mixture of translations of the initial state @xmath174 , where @xmath175 are probabilities and @xmath140 and @xmath176 label energy eigenstates ( of energies @xmath127 and @xmath177 ) of the bath .
if the thermal systems used in the protocol have total dimension @xmath80 , and the initial state of the weight is pure , then the final state of the weight lies in a @xmath178-dimensional subspace spanned by the states @xmath179 for @xmath180 .
as the final state of the weight lives in a finite dimensional subspace , its entropy can be shown to be continuous due to fannes inequality @xcite .
@xmath181 where @xmath182 is the trace distance between @xmath183 and @xmath184 .
we can make @xmath182 as small as we like by taking sufficiently large @xmath185 and therefore make the entropy change as small as we like .
for the case in hand , a straightforward calculation shows that @xmath186 , where @xmath187 is the maximum energy gap of the system - bath hamiltonian .
note that all of the above arguments apply equally well if we consider a system in addition to the bath which is initially in a mixture of energy eigenstates , as considered in section [ s : optimality ] .
in this appendix we shall provide more details into the example of section [ s : motivating example ] , where a state undergoes a transformation and in the process supplies an amount of work @xmath188 .
consider the state @xmath189 with hamiltonian @xmath25 , along with a thermal qubit @xmath190 with hamiltonian @xmath191 , where @xmath192 .
let us bring in a weight in the state @xmath41 , and apply the unitary transformation @xmath42 , which interchanges @xmath193 whilst leaving all other orthogonal states unchanged . applying this unitary to the combined system we find that @xmath194 from this one can finds that the final reduced state of the system and bath qubit are @xmath195 and @xmath196 respectively .
thus we see that at the level of reduced states these two systems have swapped states .
the change in free energy of the system @xmath197 is @xmath198    moving on to the weight its final reduced state @xmath199 is @xmath200 the change in average energy of the weight @xmath201 is thus @xmath202 now , let us take @xmath203 and expand to second order in @xmath34 both @xmath197 and @xmath201 , @xmath204 the change in free energy and the change in average energy of the weight thus coincide to first order in @xmath34 and differ only by a factor of 2 in the second order term . since @xmath205 , we see immediately that @xmath206 , so that the change in free energy is always larger than the change in average energy of the weight , as we would expect .
in this appendix we will show how to arrive at equation for the asymptotic state of the ladder . to do so
let us consider first those instances where the system qubits starts in state @xmath75 .
given this we shall then calculate the expected energy of the weight and its variance in the limit of large @xmath57 to first order , from which we shall be able to conclude that it approaches a definitive value in the asymptotic limit at the desired energy .
a analogous method can also be employed assuming the system starts instead in the state @xmath207 , with the desired result also obtained .    by calculating the first few stages of the protocol and then by induction
it is easy to show that the expected energy of the weight at the end of the protocol is @xmath208 } = -p_{eq } e_s + p e_b^{(1 ) } + \sum_{k=1}^n ( q^{(k ) } - q^{(k-1)})e_b^{(k)}\ ] ] where the superscript @xmath209 $ ] is a reminder that this is the case for the system starting in the state @xmath75 , and as defined in the main text we have @xmath210 by expanding the logarithms in powers of @xmath211 and denoting @xmath212 , after some basic manipulations this can be re - written as @xmath213 } = -p_{eq } e_s + p e_b^{(1 ) } + \tfrac{a}{\beta}\log\left(\tfrac{1-p}{p}\right ) \\      + \frac{a}{\beta n}\sum_{k=1}^n \sum_{n=1}^{\infty }
\left(-\frac{1}{n}\left(\frac{ak}{(1-p)n}\right)^n + \frac{1}{n}\left(\frac{-ak}{pn}\right)^n \right)\end{gathered}\ ] ] the advantage of performing this expansion is that we can now interchange the order of summation and note that the only term which depends upon @xmath66 is the term @xmath214 which is common to both terms in the sum .
we can thus use the expansion @xmath215 to write @xmath216 } = -p_{eq } e_s + p e_b^{(1 ) } + \tfrac{a}{\beta}\log\left(\tfrac{1-p}{p}\right ) \\
+ \frac{1}{\beta } \sum_{n=1}^{\infty } \left(\frac{a^{n+1}}{n}\left(\frac{1}{(-p)^n}-\frac{1}{(1-p)^n } \right)\left(\frac{1}{n+1 } + \frac{1}{2n}\right)\right ) \\+ \mathcal{o}\left(\tfrac{1}{n^2}\right)\end{gathered}\ ] ] this sum can now be evaluated explicitly , and after re - expressing @xmath143 in terms of @xmath217 , expanding @xmath218 to first order in powers of @xmath219 , and an amount of manipulation we arrive at @xmath213 } = \tfrac{1}{\beta}\log\left(\tfrac{1-p}{1-p_{eq}}\right ) + \tfrac{1}{\beta}(p_{eq}-p)\big(\tfrac{1}{2}\big(s_c'(p_{eq})\\-s_c'(p)\big ) -\tfrac{1}{1-p}\big)\tfrac{1}{n } + \mathcal{o}\left(\tfrac{1}{n^2}\right)\end{gathered}\ ] ] thus demonstrating that the weight is peaked around the point expected when the system starts off in the state @xmath75 with an offset which vanishes in the asymptotic limit .    considering the case now
when the system starts off in the state @xmath207 and again calculating the first few stages of the protocol and then by induction it can be shown that @xmath220 } = { \langlee\rangle}_w^{[0 ] } + e_s - e_b^{(1)}\ ] ] thus by re - expressing @xmath143 in terms of @xmath217 and expanding @xmath218 to first order it is straightforward given the previous results to show that @xmath221 } = \tfrac{1}{\beta}\log\left(\tfrac{p}{p_{eq}}\right ) + \tfrac{1}{\beta}(p_{eq}-p)\big(\tfrac{1}{2}\big(s_c'(p_{eq})\\-s_c'(p)\big ) + \tfrac{1}{p}\big)\tfrac{1}{n } + \mathcal{o}\left(\tfrac{1}{n^2}\right)\end{gathered}\ ] ] which again gives the desired result .
let us move on now to a calculation of the variance @xmath222 } = { \langlee^2\rangle}_w^{[i ] } - { \langlee\rangle}_w^{2[i]}$ ] of each of the two packets , where for simplicity we will neglect the finite width of the initial wavepacket .
again by induction it can be shown that the spread of both packets is identical ( and hence we shall drop the superscript @xmath223 $ ] ) and equal to @xmath224 let us consider the @xmath225 term in this sum , multiplied by @xmath57 . defining @xmath226 and expanding this summand in terms of @xmath219
we find @xmath227 thus for large @xmath57 the leading order contribution to this sum becomes equal to @xmath228 evaluating this integral explicitly we find finally that @xmath229 thus we see that each peak has a spread of the order of @xmath230 which vanishes in the asymptotic limit @xmath231 .
therefore in this limit we can conclude that the distribution of the ladder approaches a two - peaked distribution , as given by equation .
in this appendix we wish to show that the average work extracted when moving the occupation probability between energy levels is still equal to the free energy in a @xmath80-dimensional system . it will suffice to consider a qutrit , and moving probability @xmath34 from the ground state @xmath75 to the second excited state @xmath82 .
let us take our system to be initially in the state @xmath81 and thus to end in the state @xmath232 where the system hamiltonian is @xmath233 to achieve this , we append a bath qubit with energy level spacing @xmath37 and ground state population @xmath36 and apply the unitary transformation which interchanges only the states @xmath234 this induces on the system and weight the transformation @xmath235 where we now carry out the final trace over the bath qubit for brevity of presentation .
thus in order that the final reduced state of the system is @xmath236 we find that the ground state population of the bath must be chosen to be @xmath237 the denominator is the total probability to be in either of the states @xmath75 or @xmath207 , and hence this expression can be seen as a renormalised version of the qubit case , where the total probability to be in either state always sums to unity .
we see that it is the ratio of probabilities which must be close to the ratio of populations of the thermal qubits , which is equivalent to saying that they must be close in temperature ( see sec .
[ s : virtual ] ) .
the change in energy of the weight is given by @xmath238 thus using the fact that @xmath239 and expanding to first order in @xmath34 we find that the work extracted from the system is given by @xmath240 which a straightforward calculation verifies is equal to the change in free energy @xmath241 to first order in @xmath34 .
if we do a sequence of @xmath57 such transitions between the states @xmath50 and @xmath29 , in each of which @xmath242 , then we will obtain @xmath243 . in the asymptotic limit in which the number of thermal qubits @xmath57 goes to infinity
, we will therefore extract average free energy equal to the free energy change .
in this appendix we will present the full details for how work can be extracted from coherence .
we shall first consider the special case presented in the main text for @xmath1 systems , and then move on to the general case .
consider @xmath1 copies of @xmath101 , where @xmath244    there will be @xmath245 energy eigenspaces with energies @xmath246 , @xmath247 .
the dimension of the eigenspace with energy @xmath246 will be @xmath248 .
after collective - dephasing in each eigenspace the system will be a pure superposition over all states , and the probability to be in each eigenspace will be @xmath249 .
we then cause the state to ` isothermally expand ' in each degenerate subspace , taking the state from the initial pure state to the final maximally mixed state and in the process extracting @xmath250 energy from the bath , where @xmath80 is the dimension of the subspace . in total , the final average energy of the ladder will be @xmath251 in the asymptotic limit , as @xmath252 it is straightforward to show that @xmath253 since in the limit the only contribution to the sum comes from @xmath254 .
we thus see that asymptotically the expected amount of work is extracted .
there are a couple of comments which are worth mentioning .
first we note that due to concentration effects , we know that almost all weight lies in those subspaces with energy @xmath255 .
we could therefore ignore those subspaces which lie outside this range and obtain , to leading order , the same amount of work .
the results obtain however are independent of the concentration effects .
second we recall that the protocol starts with collective - dephasing in the energy eigenbasis .
it might appear that this operation , which changes the entropy of the system , throws away work .
however , asymptotically we obtain to first order the optimal amount of work , and so we conclude that the amount thrown away must scale sub - linearly in @xmath1 .
in fact the amount of entropy thrown away is only @xmath256 , the entropy of the binomial distribution , since the dephasing leaves the system binomially distributed amongst energy eigenspaces which have orthogonal support .
this shows that asymptotically the coherence between states of different energy are thermodynamically insignificant .      finally , for the case of arbitrary states of arbitrary dimension @xmath80
, we note that the same conclusion can also be drawn .
first we need to show that the operation of collective - dephasing never increases the entropy of a collection of systems too much in the asymptotic limit .
let us denote the projectors onto the energy eigenspaces by @xmath257 , and the total number of different energies by @xmath258 .
after the operation of collective - dephasing the state becomes block diagonal in the energy eigenbasis , namely @xmath259 we are interested in the difference in entropy @xmath260 , i.e. the entropy generated by this operation .
to do so , let us first consider the coherent version of collective - dephasing .
let us introduce an ancillary system @xmath261 with @xmath258 states @xmath262 prepared initially in the state @xmath263 .
let us also consider the unitary operation @xmath264 @xmath265 applied to the state @xmath266 this performs the transformation @xmath267 it is straightforward to see that @xmath268 whilst @xmath269 considering now the entropies , we have @xmath270 , since the two states differ by the appended pure ancilla and the joint unitary transformation .
thus , from the araki - lieb inequality @xmath271 we have @xmath272 next , note that we can rewrite @xmath51 in the form @xmath273 where the sum is restricted to those @xmath66 for which @xmath274 . comparing this to ( [ e : rhoa ] )
, we note that @xmath275 , as a mixture of orthogonal mixed states always has higher entropy than the same mixture of orthogonal pure states .
hence the absolute value can be omitted on the right - hand - side of equation and after rearranging we get @xmath276 next , note that @xmath277 , since in the worst case @xmath278 is maximally mixed over @xmath258 states .
hence we find @xmath279 the number of different energy levels @xmath258 is upper bounded by the number of ways of distributing @xmath1 indistinguishable particles between @xmath80 distinguishable energy levels , which is given by @xmath280 .
thus @xmath281    this demonstrates that the operation of collective - dephasing on @xmath1 qubits can only increase the entropy by a logarithmic amount in @xmath1 .
the increase _ per qubit _ is thus of the order @xmath282 , which vanishes in the asymptotic limit .
this result does not follow from any concentration of measure , but simply by the fact that the the number of energy eigenvalues of @xmath1 non - interacting systems is logarithmic in @xmath1 .
in this appendix we will show that the energy level spacing of the weight need only become continuous in the asymptotic limit and that for any finite number of bath qubits @xmath57 it is sufficient to consider the levels to have a minimum spacing @xmath283 which scales as @xmath284 .
let us begin by recalling how the protocol works .
we pick a collection of @xmath57 bath qubits which have excited state probabilities @xmath285 given by @xmath286 and therefore excited state energies @xmath287 . at each stage of the protocol
the weight either gains or loses energy @xmath288 .
let us now assume instead that the of being a continuous degree of freedom that the weight has a discrete ( but infinite ) set of states @xmath289 and hamiltonian @xmath290 accordingly , we shall adjust the energy levels of the bath qubits to @xmath291 such that @xmath292 where the @xmath293 are integers , and we take the smallest possible @xmath294 possible such that this condition is met , meaning that @xmath295 .
to proceed , we first note that can alternatively be re - written as @xmath296 } & = -p_{eq } e_s + p e_b^{(1 ) } + \sum_{k=1}^n ( q^{(k ) } - q^{(k-1)})e_b^{(k ) } \nonumber \\      & = \sum_{k=0}^{n-1 } q^{(k ) } ( e_b^{(k ) } - e_b^{(k+1)})\end{aligned}\ ] ] thus upon making the replacement @xmath297 for the case of a discrete weight , the average energy , conditional on the qubit starting in the ground state becomes @xmath298 } & = \sum_{k=0}^{n-1 } q^{(k ) } ( \tilde{e}_b^{(k ) } - \tilde{e}_b^{(k+1 ) } ) \nonumber \\      & = \sum_{k=0}^{n-1 } q^{(k ) } ( e_b^{(k)}\ ! -\ !
e_b^{(k+1 ) } ) + \sum_{k=0}^{n-1 } q^{(k ) } ( \varepsilon^{(k)}\ ! -\ !
\varepsilon^{(k+1 ) } ) \nonumber \\      & = { \langlee\rangle}_w^{[0 ] } + \sum_{k=0}^{n-1 } q^{(k ) } ( \varepsilon^{(k ) } - \varepsilon^{(k+1)})\end{aligned}\ ] ] it is the final term in the last line which is the error introduced by considering a discrete weight , and thus it is the magnitude of this term which is of interest .
this can easily be bounded as follows @xmath299 therefore as long as the product @xmath300 as @xmath301 , then this term will asymptotically vanish .
choosing @xmath302 would ensure that this correction is @xmath87 and thus the same order as the leading order correction to @xmath303}$ ] for finite @xmath57 .
an identical analysis holds also for @xmath304}$ ] , the average energy of the weight conditional on the system starting in the state @xmath207 , and therefore we conclude that the results more generally do not rely crucially on the continuous nature of the weight .