# Coherence and measurement in quantum thermodynamics

###### Abstract

Thermodynamics is a highly successful macroscopic theory widely used across the natural sciences and for the construction of everyday devices, from car engines and fridges to power plants and solar cells. With thermodynamics predating quantum theory, research now aims to uncover the thermodynamic laws that govern finite size systems which may in addition host quantum effects. Here we identify information processing tasks, the so-called “projections”, that can only be formulated within the framework of quantum mechanics. We show that the physical realisation of such projections can come with a non-trivial thermodynamic work only for quantum states with coherences. This contrasts with information erasure, first investigated by Landauer, for which a thermodynamic work cost applies for classical and quantum erasure alike. Implications are far-reaching, adding a thermodynamic dimension to measurements performed in quantum thermodynamics experiments, and providing key input for the construction of a future quantum thermodynamic framework. Repercussions are discussed for quantum work fluctuation relations and thermodynamic single-shot approaches.

## I Introduction

When Landauer argued in 1961 that any physical realisation of erasure of information has a fundamental thermodynamic work cost he irrevocably linked thermodynamics and information theory Landauer61 (). A practical consequence of this insight is that all computers must dissipate a minimal amount of heat in each irreversible computing step, a threshold that is becoming a concern with future computer chips entering atomic scales. The treatment of general quantum information processing tasks within the wider framework of quantum thermodynamics has only recently begun. Theoretical breakthroughs include the characterisation of the efficiency of quantum thermal engines Scully (); Kosloff14 (); Lutz14 () and the extension of widely used classical non-equilibrium fluctuation theorems to the quantum regime Mukamel03 (); TLH07 (). A new thermodynamic resource theory Janzing00 () has led to the discovery of a set of second laws that replaces the standard macroscopic second law for finite size systems Brandao13b (); Lostaglio14 (). These results have substantially advanced our understanding of nanoscale thermodynamics, however putting a finger on what is genuinely “quantum” in quantum thermodynamics has remained a challenge. Quantum mechanics differs from classical mechanics in at least three central aspects: the special nature of measurement, the possibility of a quantum system to be in a superposition and the existence of quantum correlations. The thermodynamic energy needed to perform a (selective) measurement has been investigated Jacobs12 () and the total work for a closed thermodynamic measurement cycle explored Erez10 (). The catalytic role of quantum superposition states when used in thermal operations has been uncovered Aberg14 () and it has been shown that work can be drawn from quantum correlations Zurek03 (); delRio () in a thermodynamic setting, see Fig. 1. In particular, del Rio et al. delRio () showed that contrary to Landauer’s principle, it is possible to extract work while performing erasure of a system’s state when the system is correlated to a memory. This can occur if and only if the initial correlations imply a negative conditional entropy, a uniquely quantum feature. The thermodynamic process does however now require operation on degrees of freedom external to the system, i.e. the memory’s.

Our motivation is here to shed light on the implications of performing a measurement on a quantum state that has coherences. We will consider this task in the thermodynamic setting of Landauer’s erasure, involving a heat bath at fixed temperature and operation on uncorrelated and identically prepared copies of the system (i.i.d. limit). This is of interest in the context of the quantum Jarzynski equality, for example, and will also be central for experiments testing quantum thermodynamic predictions in the future. To tackle this question we define the information-theoretic “projection” for a given initial quantum state and a complete set of mutually orthogonal projectors . Such state transformation can be seen as analogous to the state transfer of erasure, , to a blank state . Physically, this projection can be interpreted as the result of an unread, or unselective Kurizki08 (), measurement of an observable that has eigenvector projectors . In an unselective measurement the individual measurement outcomes are not recorded and only the statistics of outcomes is known. In the literature the implementation of unselective measurements is often not specified, although it is typically thought of as measuring individual outcomes, e.g. with a Stern-Gerlach experiment, see Fig. 2a, followed by mixing. The crux is that the information-theoretic projection can be implemented in many physical ways. The associated thermodynamic heat and work will differ depending on how the projection was done and we will refer to the various realisations as “thermodynamic projection processes”. One possibility is decohering decohering () the state in the so-called pointer basis, , a thermodynamic process where an environment removes coherences in an uncontrolled manner resulting in no associated work. In general it is possible to implement the state transfer in a finely controlled fashion achieving optimal thermodynamic heat and work values.

## Ii Main result

Of particular importance in thermodynamics is the projection of the system’s initial state onto the set of energy eigenstates of the system’s Hamiltonian with the energy eigenvalues. Here the state’s off-diagonals with respect to the energy eigenbasis are removed - a state transformation that is frequently employed in quantum thermodynamic derivations and referred to as “dephasing” or “measuring the energy”. Our key observation is that there exists a thermodynamic projection process realising this transformation and allowing to draw from the quantum system a non-trivial optimal average work of

(1) |

Here is the temperature of the heat bath with which the system is allowed to interact, see illustration Fig. 1, is the Boltzmann constant and is the von Neumann entropy. Crucially, this work is strictly positive for quantum states with coherences. Extending the key observation to general projections one finds that optimal thermodynamic projection processes can be implemented that allow to draw an average work of

(2) |

where an additional internal energy change term appears.

The optimal work values stated in Eqs. (1) and (2) are valid for processes applied to classical and quantum states alike. While for a classical ensemble the entropy change, , will be zero this is not so in the general quantum situation, where initial non-diagonal quantum states result in a strictly positive entropy change NielsenChuang (). We note that while the optimal work values are in principle attainable, practical implementations may be suboptimal resulting in a reduced work gain or a higher work cost. The physical meaning of can be grasped by considering a lower bound Wolf13 () on it, , see Appendix E. Here is the dimension of the system and denotes the Hilbert-Schmidt norm. The first factor quantifies the distance of the initial state from the fully mixed state, while the second factor, , quantifies the angle between the diagonal basis of and the projection basis . These terms correspond to incoherent and coherent mixing contributions. The entropy change is non-trivially bounded only if the initial state is not an incoherent mixture with respect to that basis. The entropy bound is the largest for pure initial states whose basis is mutually unbiased with respect to . In this case the optimal entropy change is .

One may wonder where the work has gone to. There are two equivalent approaches to the accounting of work. In the present analysis the focus is on the work that the system exchanges, as done in statistical physics bioexperiments (); TLH07 (); CTH09 (); Berut12 (); OSaira12 (). In this approach it is often not explicitly mentioned where the work goes to, but the only place work can go to are the externally controlled energy sources. Similarly, the heat, i.e. the energy change minus the work, is established implicitly. For example, in the experimental realisation of classical Landauer erasure with a colloidal silica bead trapped in an optical tweezer Berut12 (), the dissipated heat of erasure was calculated by knowing the applied tilting forces and integrating over the bead’s dynamics. The second approach is to collect work in a separate work storage system SSP14 (), as illustrated by the weight in Fig. 1 and detailed in Appendix C. Both the implicit and the explicit treatment of work are equivalent in the sense that the results obtained in one approach can be translated into the other.

The thermodynamic assumptions made to prove Eq. (2) are congruent with current literature Landauer61 (); Esposito10 (); AG13 (); SSP14 (); specifically they are: (T0) an isolated system is a system that only exchanges work and not heat; (T1) the validity of the first law relating the internal energy change, , of the system during a process to its average heat absorbed and work drawn, ; (T2) the validity of the second law relating the system’s entropy change to its average absorbed heat, , when interacting with a bath at temperature , with equality attainable by an optimal process; (T3) the thermodynamic entropy to be equal to the von Neumann entropy in equilibrium as well as out-of-equilibrium, . In addition we make the following standard quantum mechanics assumptions: (Q0) an isolated system evolves unitarily; (Q1) control of a quantum system includes its coherences. Details of the proof are in Appendix A. We note that in the single-shot setting whole families of second laws apply Brandao13b (); Lostaglio14 () that differ from (T2) stated above. However, in the limit of infinitely many independent and identically prepared copies of the system these collapse to the standard second law, (T2), on the basis of which Eq. (2) is derived.

From the information-theory point of view the projections considered here constitute just one example of the larger class of trace-preserving completely positive (TPCP) maps characterising quantum dynamics. Of course, all TPCP maps can be interpreted thermodynamically with the assumptions stated above, resulting in an optimal average work given by a free energy difference. Erasure is another such map whose study forged the link between information theory and thermodynamics. The benefit of discussing “projections” here lies in the insight that this focus provides: it uncovers that coherences offer the potential to draw work making it a genuine and testable quantum thermodynamic feature. This work is non-trivial even when the thermodynamic process is operated on the system alone, not involving any side-information delRio () stored in other degrees of freedom.

## Iii Example

To gain a detailed understanding of thermodynamic projection processes that give the optimal work stated in Eq. (1) we now detail one such process for the example of a spin-1/2 particle (qubit), see illustration in Fig. 2b and 2c as well as Appendix B. This process consists of a unitary evolution, a quasi-static evolution and a quench AG13 (), and it is optimal for any finite-dimensional quantum system as shown in Appendix D. An experimentalist, Emmy, prepares the spin in a state ( w.l.o.g.) exposed to an external magnetic field which she controls. The Hamiltonian associated with the system is where the energy difference between the aligned ground state, , and anti-aligned excited state, , is given by with the spin‘s magnetic moment. Importantly, in general the spin state’s basis, , are superpositions with respect to the energy eigenbasis, and with . For the optimal implementation of the projection Emmy now proceeds with the following three steps.

Firstly, she isolates the spin from the bath and modifies external magnetic fields to induce a unitary rotation, , of the spin into the energy basis. In nuclear magnetic resonance (NMR) Brazil () and pulsed electron spin resonance (ESR) experiments Gavin () such rotations are routinely realised by radio-frequency and microwave pulses respectively, as evidenced by Rabi oscillations. The power, duration and phase of such a pulse would be chosen to generate the spin-rotation along the green circle until the desired unitary is achieved. In the same step Emmy adjusts the strength of the external B-field such that the spin state is Boltzmann-distributed at temperature with respect to the energy gap of the Hamiltonian at the end of the step, . In NMR or ESR the B-field magnitude is tuned quickly on the timescale to achieve the desired energy gap. In the second step, Emmy wants to implement a quasi-static evolution of the spin that is now thermal. She brings the spin in contact with the heat bath at temperature and quasi-statically adjusts the magnitude of the external B-field allowing the spin state to thermalise at all times. The final B-field, , is chosen such that the final thermal state becomes . In ESR this step can be realised by changing the external B-field slowly on the timescale so that the spin continuously equilibrates with its environment. Finally, Emmy isolates the spin from the environment and quickly changes the B-field to its original magnitude while the state remains .

During Step 1 and 3 the system was isolated and the average work drawn is thus just the average energy change. During Step 2 the average work is the equilibrium free energy difference between the final and initial thermal states at temperature , see Appendix B for details. In NMR/ESR the work contributions drawn from the spin system are done on the external B-field and the microwave mode. This could be detected by measuring the stimulated emission of photons in the microwave mode or observing current changes induced by the spins dynamics Brazil (); Gavin (). The overall thermodynamic process has now brought the spin from a quantum state with coherences, , into a state without coherences, , while keeping the average energy of the spin constant. The net work drawn during the three steps adds up to showing the attainability of the optimum stated in Eq. (1) for the spin-1/2 example. We note that Eq. (1) is also the maximal work that can be extracted from a qubit state under any transformation of the system that conserves its average energy, , i.e. for qubits is the optimal final state under this condition.

We emphasise that this optimal implementation involves a finely tuned and controlled operation that relies on knowledge of the initial state . This is akin to the situation considered in delRio () where knowledge of the initial global state of system and memory is required for optimal erasure with side-information. It is important to distinguish this situation from that of Maxwell demon’s who has access to knowledge of the individual micro-states that make up the ensemble state , and who uses it to beat the second law Maruyama09 (). In the scenario considered here there is no knowledge of the individual micro-states and the process does not violate the second law, on the contrary, it is derived from it.

## Iv Implications

### iv.1 Single-shot analysis

The preceding discussion concerned the average work that can be drawn when operating on an ensemble of independent spins. This scenario contrasts with the single shot situation considered in a number of recent publications Brandao13b (); delRio (); Aberg13 (); HO13 (). In particular, two major frameworks Aberg13 (); HO13 () have recently been put forward to identify optimal single-shot work extraction and work cost of formation in the quantum setting. These frameworks rely on a resource theory approach Janzing00 () and make use of min- and max-relative entropies that originate from one-shot information theory. The optimal work extraction schemes of these frameworks require non-diagonal states to be decohered first to become diagonal in the energy basis. This decoherence step is assumed to not have an associated single-shot work. However, the present analysis of energy basis projections showed that thermodynamic projection processes can yield positive average work, see Eq. (1). Therefore one may expect a positive work for removing coherences from a state in the single-shot setting, too. Since our focus is the limit we will not aim to construct the single-shot case. Nevertheless, to establish a notion of consistency between single-shot results Aberg13 (); HO13 () and the average analysis presented here we now separate the projection into a diagonal part that can be analysed in the single-shot framework and a non-diagonal part that can be analysed in the average framework. One possible decomposition of is the split in three steps each starting and ending with Hamiltonian : . Here is the rotated state defined above and is the thermal state for the Hamiltonian at temperature . We can now use a single-shot analysis HO13 () for Steps and that involve only states diagonal in the energy basis, giving a single-shot work contribution of , see Appendix F. Here and are the min- and max-relative quantum entropies, respectively. Taking the limit of copies for Steps and and adding the average work contribution for the initial non-diagonal rotation , , one indeed recovers the optimal average work as stated in Eq. (1). After making public our results very recently a paper appeared David15 () that derives the work that can be extracted when removing coherences in a single-shot setting. These results are in agreement with Eq. (1) and reinforce the above conclusion that coherences are a fundamental feature distinguishing quantum from classical thermodynamics.

### iv.2 Quantum fluctuation relations

The key observation was that thermodynamic projection processes can have a non-trivial work and heat. Another instance where this has interesting repercussions is the quantum Jarzynski equality Mukamel03 (); TLH07 (). This is a generalisation of the prominent classical fluctuation relation valid for general non-equilibrium processes, which has been used to measure the equilibrium free energy surface inside bio-molecules by performing non-equilibrium pulling experiments bioexperiments (). The quantum version has recently been tested for the first time in a nuclear magnetic resonance experiment Brazil (). The quantum Jarzynski relation, , links the fluctuating work, , drawn from a system in individual runs of the same non-equilibrium process, with the free energy difference, , of the thermal states of the final and initial Hamiltonian, see Appendix G. In its derivation a system initially in a thermal state with respect to Hamiltonian at temperature is first measured in the energy basis of . The Hamiltonian is then varied in time ending in generating a unitary evolution, , of the system, see Fig. 3a. A second measurement, in the energy basis of , is then performed to establish the final fluctuating energy. For each run the difference of the two measured energies has been associated with the fluctuating work TLH07 (), . The experiment is repeated, each time producing a fluctuating work value. On average the work extracted from the system during the quantum non-equilibrium process turns out to be where is the ensemble’s state after the unitary evolution, and similarly the average exponentiated work is calculated. The above identification was made assuming that the system undergoes a unitary process with no heat dissipation. However, the need to acquire knowledge of the system’s final energies requires the second measurement. The ensemble state is thus further altered from to , the state with any coherences in the energy basis of removed. This step is not unitary - during the projection the system may absorb heat, , indicated in Fig. 3b, whose value depends on how the process is conducted. Thus, while the energy difference for the projection is zero, , for states with coherences the entropy difference is not trivial, . This implies that in an experimental implementation of the Jarzynski relation the work done by the system on average can be more than previously thought, . We conclude that the suitability of identifying , and hence the validity of the quantum Jarzynski work relation, depends on the details of the physical process that implements the second measurement. This conclusion is not at odds with previous experiments Brazil () which showed nature’s agreement with , involving the average of the exponentiated measured fluctuating energy.

### iv.3 Correlated systems

It is insightful to extend the thermodynamic analysis of projections to correlated systems. An experimenter may have access not only to the system but also the auxiliary systems with which is correlated delRio (). She can then perform a global operation, , that implements a projection locally on the system , i.e. , while leaving the reduced state of the auxiliary system unchanged, i.e. . By doing so the experimenter can optimally draw the overall work , where is the entropy change for the state of system+auxiliary and is still the energy change of the system alone. This quantity can be re-written as the sum of two terms: , the extractable work when operating on the system alone given in Eq. (2), and , a positive term quantifying the quantum correlations between and , see Appendix H. The latter contribution was previously identified in an inspiring paper by Zurek Zurek03 (). It depends on the choice of projectors and is related to, but broader than, quantum discord discord () which is optimised over all possible projectors. This means that even states of system and auxiliary that can be considered classically correlated (i.e. no discord) provide an advantage for drawing work contrasting with the erasure process where this only occurs for highly entangled states delRio (). The gap between these two sets of correlated states is an intriguing fact and calls for further exploration of the link between thermodynamics and information theory in the quantum regime.

## V Conclusions

To conclude, erasure is not the only irreversible information processing task – in the quantum regime a second fundamental process exists that mirrors Landauer’s erasure. In contrast to the minimum heat limit of erasure, thermodynamic projection processes have a maximum work limit. While the former is non-zero for the erasure of classical and quantum bits, optimal thermodynamic projection processes have a non-zero work only when applied to quantum states with coherences. The optimal average work stated in Eqs. (1) and (2) constitutes an experimentally accessible quantum thermodynamic prediction. Future experiments testing this optimal work may be pursued with current setups, for instance with NMR/ESR techniques Brazil (); Gavin () or single atoms Maunz11 (); Volz11 (), and promise to be accessible with other platforms entering the quantum regime, such as single electron boxes OSaira12 (). Experiments will be limited by practical constraints, such as achieving a quasistatic process and obtaining the maximum work for pure states which may require, for instance, very large B-fields.

The derivation of the optimal work value is mathematically straightforward, just like that of Landauer’s principle. The result’s significance is that it opens new avenues of thought and provides key input for the construction of a future quantum thermodynamic framework. For example, the developed approach opens the door to investigate the connection between microscopic statistical physics and macroscopic thermodynamics in the quantum regime. While it is straightforward to identify the thermodynamic work of quantum processes involving macroscopic ensembles, what is needed is a microscopic concept of work that when averaged, gives the correct macroscopic work. The microscopic work concept should be valid for general (open) quantum processes and quantum states (including coherences), and only require access to properties of the system. While single-shot approaches have discarded coherences Aberg13 (); HO13 (), fluctuating work approaches cannot be applied directly to a system undergoing open quantum evolution CTH09 ().

The observation is also important from the experimental perspective as testing quantum thermodynamic predictions will involve measurement – a projection process. We have argued that measurements, such as those required in establishing the Jarzynski equality, are not necessarily thermodynamically neutral. Indeed, they can be implemented in different physical ways and in general play an active role in thermodynamics, contributing a non-zero average heat and work. This new perspective gives physical meaning to the change of entropy in the debated quantum measurement process - it provides a capacity to draw work. Specifically, work can be drawn when coherences of a state are removed during an unselective measurement.

Finally, it is apparent that optimal thermodynamic projection processes require use of knowledge of the initial state , i.e. its basis and eigenvalues. One may be inclined to exclude use of such knowledge, particularly when considering projections in the context of measurement which is often associated with the acquisition of knowledge. Such restriction would necessarily affect the set of assumptions (T0-T3, Q0-Q1) in the quantum regime. These could be changed, for example, to the second law not being possible to saturate (cf. T2) or to choosing a new quantum non-equilibrium entropy that only considers the state’s diagonal entries (cf. T3). The latter would mean a departure from standard quantum information theory where entropies are basis-independent. Thus whichever approach one takes - not making or making a restriction - quantum coherences will contribute a new dimension to thermodynamics. They either lead to non-classical work extraction or they alter the link between information theory and thermodynamics in the quantum regime. The line drawn here between the assumptions (T0-T3, Q0-Q1) and results (Eqs. (1) and (2)) establishes a frame for this possibility to be investigated.

###### Acknowledgements.

We thank T. Deesuwan, M. Wolf and R. Renner, G. Morley, R. Uzdin and D. Reeb for insightful discussions and J. Gemmer, R. Renner, S. Horsley and T. Philbin for critical reading of the manuscript. P.K. acknowledges support from the Swiss National Science Foundation (through the National Centre of Competence in Research ‘Quantum Science and Technology’) and the European Research Council (grant 258932). J.A. is supported by the Royal Society and EPSRC. J.A. thanks the Isaac Newton Institute in Cambridge where part of this work was conceived for the stimulating environment and kind hospitality. This work was supported by the European COST network MP1209.## Appendix A Proof of Eq. (2)

Using the first law (T1) the average work drawn in a thermodynamic projection process is simply , where is the average energy change for that process. Relating the average heat absorbed by the system during the process to its entropy change one then obtains (T2). Here is the difference of von Neumann entropies of the system’s state before and after the projection (T3). The average work drawn is thus , where the entropy change is non-negative and the energy change can be either positive or negative. The stated optimal work, , is achieved when the inequality is saturated by an optimal process (T2) the implementation of which may require knowledge of the initial state and control of coherences (Q1). In the special case of a projection onto the energy eigenbasis the internal energy change is zero, , and one obtains Eq. (1).

## Appendix B Spin example

We here detail the three steps of the optimal thermodynamic projection process of the spin system discussed in the main text. Emmy starts with a spin in state

(3) |

with Blochvector

(4) |

where is the vector of the three Pauli matrices, and and is the unit vector in the Blochsphere pointing from the origin to the state , see Fig. 2b. We assume without loss of generality that . If this was not the case, the labels and should be interchanged. The spin’s initial Hamiltonian is given by , where with are the rank-1 projectors onto the two energy eigenstates and . This Hamiltonian arises when the spin is exposed to an external magnetic field . The energy separation of the aligned ground state, , and anti-aligned excited state, , is , where is the magnetic moment of the spin. A general initial state is not diagonal in the basis , in other words the spin’s eigenstates are superpositions with respect to the energy eigenbasis, and with . The spin’s Blochvector, , is then not parallel to the B-field, . Emmy wants to obtain the state where the coherences with respect to the energy basis have been removed,

(5) |

where is the probability for obtaining outcome in a measurement of . Here has the same average energy as the initial state ,

(6) |

where we used orthonormality and completeness of the projectors . The Blochvector of the final state is defined as

(7) |

where is the unit vector in the Blochsphere pointing from the origin to the state . Since geometrically the mapping is a projection of onto the vertical axis in the Blochsphere, the length of the final Blochvector, , is shorter than the initial Blochvector, . This shortening is associated with an entropy increase NielsenChuang (). When describing the process in the following we assume that in accordance with the illustration in Fig. 2b. At the end of this section we come back to the case .

Emmy proceeds with three steps made up of quantum thermodynamic primitives with known work and heat contributions AG13 (), Fig. 2b:

In the first step, , Emmy isolates the spin from the bath and rotates the B-field such that the variation of the field induces a unitary transformation of the spin into the energy eigenbasis, with unitary . The state after this step is

(8) |

The B-field after this step, , is chosen such that the new Hamiltonian has eigenvalues , where is the Boltzmann constant and is the temperature of the heat bath that Emmy will use in the next step. This choice of the B-field makes the state a thermal state with respect to at temperature , i.e. with and inverse temperature . Since the system was isolated in the first step no heat exchange was possible and the entire average energy change of the system is drawn from the system as work . Physical constraints may make this process difficult to realise, for instance, pure initial states would require a B-field, , of infinite magnitude because thermal states at any finite temperature are only pure if the energy gap is infinite. In this case there is a trade-off between the maximal magnitude the B-field can reach and the precision with which the process is carried out. In the following we assume that the maximal B-field is large enough to make the error in the precision negligibly small.

In the second step, , Emmy brings the spin in contact with the bath at temperature , not affecting the spin’s state as it is already thermal. She then quasi-statically decreases the magnitude of the B-field, while keeping the system in contact with the bath at all times, such that the final Hamiltonian is where the B-field is chosen such that where is the probability of measuring in the initial state, . The quasi-static evolution means that the system is thermalised at all times, arriving in the final state

(9) |

which is thermal with respect to where . This state is exactly , the desired final state after the projection. The quasi-static process considered here has a known average work given by the free energy difference Gemmer (); AG13 (); Aberg13 (), where and are standard thermal equilibrium free energies and is the von Neumann entropy defined by and likewise for .

Finally, in the third step, , Emmy isolates the spin from the bath and changes the energy levels of the Hamiltonian such that it becomes the initial Hamiltonian again. This step is done quickly so that the state of the spin does not change. Because the system is isolated the energy change in this step is entirely due to work . In total, this thermodynamic process has brought the spin from the quantum state to the state while not changing the energy of the spin, . The overall average work drawn from the spin is

showing the optimality of the three step process for the spin example, cf. Eq. (1).

The above example assumed . Suppose now that the probability to find the final state in the ground state with respect to the Hamiltonian was smaller than to find it in the excited state , i.e. . Proceeding through the three steps described one finds that the mathematics is exactly the same. In particular, after Step 2 is a thermal state with respect to at inverse temperature .
The only difference occurs in the interpretation as for the Hamiltonian the ground state is because is negative. This is feasible by making the B-field negative, thus swapping the ground and the excited state. Consequently the analysis above and the resulting expression of the total extracted work remain the same.

The work extracted in the individual steps of the thermodynamic projection process can be either positive or negative, depending on the initial state , the Hamiltonian and the temperature of the heat bath. Their sum, , is strictly positive whenever the initial state was not diagonal in the energy eigenbasis, a consequence of the entropy increase NielsenChuang () from to . On the other hand for classical states – all diagonal in the energy basis – the optimal work for such a projection is always zero.
Appendix D extends the optimality proof of the above three step process to the general finite-dimensional case.

A note on optimal work extraction at constant average energy. Assume we are given an initial state and a non-degenerate Hamiltonian for a quantum system. The goal is to find the maximal work that can be obtained in a thermodynamic process that involves a heat bath at temperature under the restriction that the average energy of the system after the process is the same as it was before the process, . Using Eq. (2) together with the condition that internal energy does not change this amounts to finding the maximum over the set of states with ,

(10) |

It is well-known that at a fixed expectation value of an observable the Gibbs states are the states of maximal entropy PuszWoronowicz (); Lenard (). Here the parameter has to be chosen such that the energy of the Gibbs state matches - therefore there is only one , with such that , that gives the maximum here. The maximum entropy is then

(11) |

and the maximum average work that can be extracted from at fixed average energy is then

(12) |

For the special case that the system is a qubit (two-dimensional) the optimum Gibbs state for work extraction is identical to the projected state and the maximal work that can be drawn from a system starting in state , while keeping its average energy fixed, is in Eq. (1). To see this we expand and with . Now here must be chosen such that , i.e. , so that has just the right energy . On the other hand the projection state has the same expansion, . We note that this coincidence is not true for higher dimensional systems where the energy-projected state will in general have a non-monotonous, non-canonical distribution in its energy eigenbasis, while must be Gibbs-distributed.

Considering the illustration in Fig. 2b, the qubit states fulfilling the condition are located on the plane which contains and is perpendicular to the --axis. On the other hand, in the Bloch picture a state has higher entropy the closer it is to the center of the sphere. Hence, the optimal final state when extracting work from while conserving the average energy of the system is the state projected to the --axis, i.e. .

## Appendix C Work storage system

In the previous section it was stated that work can be drawn from a quantum system when undergoing a thermodynamic projection process. But where has the work gone to?

There are two approaches of accounting for work that are mirror images to each other. One approach Aberg13 (); MT11 (); Brazil (); TLH07 (); Gemmer (); Esposito10 (); AG13 (); Seifert (); OSaira12 () focusses on the work that the system exchanges, as described above. Here it is often not explicitly mentioned where the work goes to, but the only place it can go to are the externally controlled energy sources, see Fig. 1. Another way of accounting is to explicitly introduce a work system to store the work drawn HO13 (); SSP14 (). One way of doing so in an average scenario is to introduce SSP14 () a ‘suspended weight on a string’, described by a quantum system , that could be raised or lowered to store work or draw work from it. Specifically, the Hamiltonian of the work storage system is defined as , representing the energy of a weight of mass in the gravitational field with acceleration at height . In addition, an explicit thermal bath is introduced PuszWoronowicz (); Lenard () consisting of a separate quantum system in a thermal (or Gibbs) state . Both, the explicit work storage system and the heat bath are illustrated in Fig. 1. In the latter approach the total system starts in a product state of system (e.g. spin), bath , and weight , , which together undergo average energy conserving unitary evolution with :

(13) |

The assumption is that the total Hamiltonian is the sum of local terms, . The average energy conservation constraint then reads and the average work extracted to the work storage system, , is identified with

(14) |

Both the implicit and the explicit treatment of work are equivalent in the sense that the results obtained in one language can be translated in the other and vice versa. In particular, the implicit description used in this text AG13 () has an equivalent explicit formulation SSP14 ().

In the next section we will discuss single-shot extractable work in a projection process. One possibility to define work in this context is to chose the explicit work storage system as a ‘work qubit’ with a specific energy gap which has to be in a pure energy eigenstate before and after the protocol HO13 (). This way it is guaranteed that full knowledge about its state is present at all times and the work is stored in an ordered form. In this scenario the allowed unitary operations on the whole system have to conserve the energy exactly, not only on average, which amounts to .

## Appendix D General three step process

It is straightforward to generalise the proof of optimality from the two-dimensional spin-1/2 example to thermodynamic projection processes in dimension . Again the projectors map onto the energy eigenspaces of the Hamiltonian, , where , , are the energy eigenvalues. A general initial state can be written as where are probabilities, , are rank-1 projectors on the corresponding eigenvectors , and . A unitary operation, , is now chosen such that it brings the initial configuration into the new diagonal and thermal configuration where and . The new energy eigenvalues, , are adjusted such that the probabilities are thermally distributed with respect to for the bath temperature . Adjusting the Hamiltonian eigenvalues while letting the state thermalise at all times now results in a isothermal quasi-static operation from to . Here the new energy eigenvalues, , are chosen to be thermal (at ) for the state’s probabilities which are given by . Finally, a quench brings the thermal configuration quickly into the non-equilibrium state . The average work for this overall process is where and because the first and third steps are unitary (Q0+T0). The quasistatic step’s work is AG13 (); Aberg13 () where is the thermal equilibrium free energy for Hamiltonian , and similarly, . Summing up and using , one obtains

(15) |

concluding the optimality proof of the process sequence.

## Appendix E Lower bound on entropy change

The entropy change during a projection with projectors can be lower bounded. In the following, denotes the Hilbert-Schmidt norm of a linear operator acting on a -dimensional Hilbert space describing the quantum system of interest. The lower bound reads acknowledgeWolf ()

(16) |

Here, is the von Neumann entropy, the initial state and the final state after the projection process. Furthermore, is the second smallest eigenvalue of the matrix where is the doubly stochastic matrix given by the entries and is the eigenbasis of the initial state .

Considering the two main terms on the right hand side of Eq. (16) separately, and , it becomes apparent that they characterise different properties of the initial state. The first term measures the distance of to the fully mixed state, , and quantifies the purity of . It is maximal for all pure initial states and zero if and only if . In the special case of a spin-1/2 system it can be directly related to the length of the Bloch vector describing in the Bloch representation, a link that will be established below. The second term, , is related to the overlap of the eigenbasis of , , and the projective basis, . It is zero if they are the same and maximal if they are mutually unbiased Appleby (); Durt (). This can be seen as follows: if the two bases are the same, then the matrix is a permutation and consequently is the identity. In this case, is the zero matrix and thus . If and are mutually unbiased, i.e. if they fulfil for all , the matrix and thus also is a rank-1 projector onto the space spanned by the vector . Hence, has eigenvalues . One finds that the second largest eigenvalue is , which is also the maximal eigenvalue the matrix can have Ando ().

In the special case of the spin-1/2 system shown in Fig. 2b, the bound reads , where is the Bloch vector of the initial state and is the angle between the eigenbasis of , , and the projective energy basis, . Let be the initial state of the qubit. Furthermore, let be the final state after the energy projection, where is the probability to obtain . As argued in Appendix B w.l.o.g. we can assume that . In the Bloch representation one can write and . Here we used a different notation for the Bloch vectors of , , and , , for readability. The Pauli matrices are self-adjoint and fulfil . Hence we find

(17) |

where is the Euclidean metric in . This proves the form of the first factor in the bound. For the factor notice that by assumption and thus we can write and . Therefore

(18) |

where summations over double indeces are assumed and is the angle between the two Bloch vectors of and , see Fig. 2b. By using orthonormality of both bases and it is shown that in the qubit case the matrices and have the form

(19) |

and

(20) |

Computing the eigenvalues of yields and . Therefore . In total, this concludes the proof of the bound for the special case of a spin-1/2 system when projected in the energy eigenbasis ,

(21) |

To further illustrate the bound consider the special case when the initial state is pure and its eigenbasis mutually unbiased with respect to the energy eigenbasis, . In this case the final state after the projection, , is maximally mixed and we find