Quantum Coherences and Classical Inhomogeneities as Equivalent Thermodynamics Resources

Quantum energy coherences represent a thermodynamic resource, which can be exploited to extract energy from a thermal reservoir and deliver that energy as work. We argue that there exists a closely analogous classical thermodynamic resource, namely, energy-shell inhomogeneities in the phase space distribution of a system’s initial state. We compare the amount of work that can be obtained from quantum coherences with the amount that can be obtained from classical inhomogeneities, and find them to be equal in the semiclassical limit. We thus conclude that coherences do not provide a unique thermodynamic advantage of quantum systems over classical systems, in situations where a well-defined semiclassical correspondence exists.


Introduction
This paper considers the question: How much work W is extracted when a quantum system S undergoes a cyclic thermodynamic process? The answer depends on details such as the duration of the process; whether or not the system exchanges energy with heat baths along the way; how the system is driven during the process; and the system's initial state, ρ i . We are specifically interested in the potential thermodynamic consequences of energy coherences-non-zero matrix elements m|ρ i |n for eigenstates of different energies-in the initial state. The thermodynamic utility of such coherences has been investigated in recent years [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19], using a variety of approaches. Of particular relevance to the present paper, Kammerlander and Anders [9], using the definition of work [20,21] that we will use, have argued that ifρ i contains coherences in the system's energy basis, then more work can be extracted than would be possible in the absence of coherences. In this sense, quantum energy coherences represent a thermodynamic resource.
It seems natural to view the presence of energy coherences inρ i as a uniquely quantum thermodynamic resource, with no classical counterpart-in much the same way that superpositions of qubit states represent a quantum computational resource unavailable to classical computers [22]. We will argue otherwise. We will identify a classical analogue of quantum energy coherences, namely energy-shell inhomogeneities in the initial classical phase space distribution ρ i (Γ). We will show that the presence of such inhomogeneities in ρ i (Γ) allows more work to be extracted than would be possible in their absence. Thus, both quantum energy coherences and classical energy-shell inhomogeneities can be viewed as thermodynamic resources from which work can be extracted. We will further argue that for systems that support a well-defined semiclassical limit, a fair comparison reveals that equal amounts of work can be extracted from the two resources. We therefore conclude that quantum energy coherences do not provide a quantum "thermodynamic advantage", as the same gain can be obtained from classical energy-shell inhomogeneities.
In Section 2, we introduce the framework and notation we will use to study a quantum system undergoing a cyclic thermodynamic process, in the presence of a thermal reservoir, and we analyze the work that can be extracted from energy coherences during such a process. In Section 3, we introduce the analogous classical framework and analyze the work that can be extracted from energy-shell inhomogeneities. In Section 4, we argue that when a fair comparison is made, the maximum amount of work that can be extracted in the quantum case is the same as that in the classical case. In Section 5, we extend these results to a broader class of processes. We conclude with a brief discussion in Section 6.
Throughout this paper, we will adopt an ensemble perspective, in which the state of an open quantum system is specified by a density matrixρ, and the state of a classical system is specified by a phase space distribution ρ(Γ) rather than a phase point Γ.

Quantum Setup and Notation
Let S denote a quantum system of interest, andĤ its Hamiltonian. We consider the following situation, illustrated schematically in Figure 1: S is prepared in an initial stateρ i at time t = 0, then from t = 0 to τ it evolves in time as its Hamiltonian is varied according to a schedule, or protocol,Ĥ(t). We take this process to be cyclic, in the sense that whereĤ 0 is a fixed reference Hamiltonian. We then ask the question: How much work is extracted during this cyclic process? Figure 1. Schematic illustration of the quantum process described in the text. The system begins in stateρ i , then evolves in contact with a thermal bath to a final stateρ f as the Hamiltonian is driven through a cycle fromĤ(0) =Ĥ 0 toĤ(τ) =Ĥ 0 . We impose the constraint diagρ i = diagρ f , which indicates that the initial and final energy distributions are identical, while the coherences may differ.
We assume the reference HamiltonianĤ 0 has a discrete, non-degenerate spectrum with eigenstates |n and eigenvalues n . The assumption of non-degeneracy ensures an unambiguously defined energy basis in which coherence can be considered. It further implies that no operators commute withĤ 0 , aside from ones that are functions ofĤ 0 itself: for some scalar function k(·) of a single variable. During the cyclic process described above, the system is in contact with a thermal bath B, at temperature β −1 . As a result, the evolution of S is not unitary, rather, we will say that S evolves under isothermal dynamics. This terminology is not meant to suggest that the system's temperature is constant, or even well-defined, merely that the system is in contact with a bath whose bulk temperature β −1 is well-defined. We will not specify the equations of motion for the system, as our discussion will be relatively insensitive to the exact dynamics used to model the system's evolution. However, we will demand that the isothermal dynamics of S satisfy the following thermodynamically motivated conditions: (1) ifĤ is held fixed then the system relaxes to the canonical equilibrium state, and (2) the dynamics support a generalized second law linking suitably defined notions of free energy and work.
More precisely, condition (1) means that ifĤ is fixed, then the isothermal dynamics cause the system to relax to the equilibrium statê where Z q (Ĥ) = Tr e −βĤ , F q,eq (Ĥ) = −β −1 ln Z q (Ĥ) (4) are the partition function and free energy associated with this state. (The superscript q stands for "quantum" and distinguishes this case from the classical setup that will be introduced later. The dependence of Z q and F q,eq on β is notationally suppressed.) We assume this relaxation occurs over a finite characteristic timescale τ rel . As a consequence, if the system Hamiltonian is varied quasistatically, then the state of S tracks the instantaneous equilibrium state:ρ(t) =π(t), whereπ(t) is the canonical state associated withĤ(t). In this quasistatic limit, the system's evolution is isothermal in the strong sense of the word: its temperature is well-defined and constant at all times. A system that evolves under a detailed balanced Lindblad master equation satisfies condition (1) [23]. By condition (2), we mean that the system obeys a generalized second law where the work extracted, non-equilibrium free energy, internal energy, and entropy are respectively defined by the following functional and functions ofρ(t) andĤ(t): For convenience, as in Equation (5), we will often use the shorthand X (t) ≡ X (ρ(t),Ĥ(t)), or the even more concise X i = X (0) and X f = X (τ), where X stands for F q , U q , or S q , or the classical counterparts of these quantities, defined below in Section 3. Equations (7)-(9) generalize familiar equilibrium notions [24] of free energy, internal energy, and entropy to non-equilibrium statesρ [25]. They reduce to the usual equilibrium values whenρ =π. The bound given by Equation (5) is not restricted to transitions between equilibrium states, and has been derived using a variety of approaches for modeling the dynamics of a quantum system in contact with a thermal reservoir, see, e.g., Refs. [26][27][28][29][30]. Note that we follow engineering convention and work extraction is positive. While Equation (6) should be interpreted as the average work extracted from an ensemble, fluctuations will not be considered in this paper, hence we will simply refer to Equation (6) as extracted work.
The non-equilibrium free energy defined by Equation (7) can equivalently be written as whereπ and F q,eq are given by Equations (3) and (4), and is the quantum relative entropy, or Kullback-Leibler divergence [31], between arbitrary statesρ 1 andρ 2 . For a cyclic process, as defined above, Equation (5) becomes whereρ i, f are the states of the system at t = 0, τ, andπ 0 is the equilibrium state associated with the reference HamiltonianĤ 0 . Although relative entropy D(ρ 1 |ρ 2 ) is not a proper distance measure, it vanishes whenρ 1 =ρ 2 and is strictly positive otherwise, and can be viewed as quantifying the degree to whichρ 1 differs fromρ 2 . In this sense, Equation (12) implies that the extracted work is bounded from above by the degree to which the system is brought closer to the equilibrium stateπ 0 , during the cyclic process. This interpretation is in agreement with the intuition, from classical thermodynamics, that non-equilibrium states represent a thermodynamic resource: work can be extracted by cleverly facilitating a system's evolution toward equilibrium. We take Equation (6) as our definition of work for several reasons. First, it is an established notion of thermodynamic work in quantum systems [20,21,32]. Moreover, it agrees with the notion of average work derived from the quantum work (quasi)distribution in Ref. [33], which satisfies a fluctuation theorem. Finally, this definition closely resembles those used in classical stochastic thermodynamics [34,35] and, as we will see in later sections, it allows us to establish connections with results from classical statistical physics. For the special case of isolated quantum systems, the definition given by Equation (6) is called "untouched work" in Ref. [36]. We will not discuss here how (or whether) Equation (6) connects to the traditional thermodynamic concept of raising a mass against gravity, or otherwise delivering energy to a work reservoir [24]; this question involves subtle issues related to backaction as well as potential quantum coherences in the work reservoir.
We note that other definitions of work are also commonly used in quantum thermodynamics, particularly when fluctuations in work are of interest. For instance, defining a work distribution according to the two-time energy measurement protocol [37][38][39] leads to a mean value that differs from Equation (6) whenever the initial stateρ i has non-vanishing energy coherences. Additionally, some definitions of work developed in quantum resource theory [40] have a so-called work-locking property [41] which prevents the extraction of work from coherence. These resource theory definitions, which explicitly model the heat bath and demand that work be transferred deterministically, also differ from Equation (6).

Removing Coherences
To this point, we have discussed subjecting the system S to a cyclic process under isothermal dynamics. Now, following Ref. [9], we impose an additional condition: is the density matrix obtained fromρ by setting to zero its off-diagonal elements, in the reference energy basis. In other words, we now restrict ourselves to processes that alter the system's energy coherences m|ρ|n , m = n, while leaving the probabilities n|ρ|n unchanged. We will refer to Equation (13), and to its classical counterpart, Equation (42), as the isoenergetic constraint. As in Ref. [9], our motivation for imposing this condition is to isolate and accentuate the thermodynamic implications of quantum energy coherences. From Equation (13), it follows that Tr[Ĥ 0ρi ] = Tr[Ĥ 0ρ f ], i.e., which in turn implies that the generalized second law, Equation (5), becomes This bound relates the maximum extractable work to the change in the system's entropy. The thermodynamic interpretation is clear: since the system's energy undergoes no net change (Equation (15)), the only way to extract work is to withdraw energy from the bath, causing the entropy of the bath to decrease by an amount βW q . This decrease in the bath's entropy must be compensated, or over-compensated, by an increase in the entropy of the system, as reflected by Equation (16).
We are now in a position to investigate the maximum amount of work that can be extracted from energy coherences. For a given reference HamiltonianĤ 0 and initial statê ρ i , let W q denote the maximum extracted work, over all protocolsĤ(t) that begin and end inĤ 0 , subject to the isoenergetic constraint (13). Since the right side of Equation (16) is a function ofρ i andρ f , we can place a bound on W q by maximizing that function with respect toρ f : For fixed diagonal elements of a density matrixρ, the value of S q = −Trρ lnρ is maximized when the off-diagonal elements are all zero. We therefore obtain This result does not yet tell us whether the bound can be saturated, that is, whether there exist protocols for extracting this amount of work. Rather, it states that under no circumstances can we extract more than this much work, in a cyclic, isothermal process satisfying Equation (13). Moreover, if a protocol for saturating this bound exists, then that protocol will result in the system ending in the state diagρ i at t = τ. In other words, the saturating protocol (if it exists) removes all energy coherences from the system's initial state, and effectively converts these coherences into extracted work.
In fact, protocols for saturating the bound given by Equation (18) do exist [9,28]. A simple example is given by: where λ ≡ t/τ varies from 0 to 1 during the process, and τ is taken to be sufficiently large that the process is quasistatic. This protocol can be understood as follows. At the start of the process, there is a sudden change, or quench, in the system's Hamiltonian, fromĤ 0 at t = 0 to −β −1 lnρ i at t = 0 + . Thus, at t = 0 + the system's stateρ i is in equilibrium with respect to the immediate post-quench Hamiltonian. (The term "quench" is often used in situations in which the system is in equilibrium before the quench, and out of equilibrium after it. Thus, the first step of this protocol (19) might be viewed as an anti-quench.) From t = 0 + to τ − , the Hamiltonian is varied quasistatically from −β −1 lnρ i to −β −1 ln(diagρ i ), and the system is dragged through the corresponding sequences of equilibrium states, from ρ i to diagρ i -see comments after Equation (4). At t = τ, a second quench abruptly returns the Hamiltonian toĤ 0 , completing the cycle. The evolution of the system's state is thus given byρ We show in Appendix A that the work extracted during this process is given by the right side of Equation (18), that is the bound is saturated. Hence, under the isoenergetic constraint (13), work extraction is optimized by removing all coherences from the system's state, and the value of this optimized work is: This result is equivalent to Equation (1) of Kammerlander and Anders [9].

Classical Setup and Notation
Now, imagine a classical system with N degrees of freedom and phase space variables Adopting (as in the quantum case) an ensemble perspective, let the system's state at time t be described by a phase space density ρ(Γ, t). We will consider a thermodynamic process in which the system begins in a state ρ(Γ, 0) = ρ i (Γ), then evolves from t = 0 to τ as its Hamiltonian is varied according to a cyclic protocol H(Γ, t), with where H 0 (Γ) specifies a reference Hamiltonian; see Figure 2. We assume that no observables commute with H 0 (Γ) under the Poisson bracket, except those that are functions of H 0 : for some function k(·) (compare with Equation (2)). This assumption implies that energy is the only non-trivially conserved quantity along all trajectories Γ(t) obeying Hamiltonian dynamics dΓ/dt = {Γ, H 0 }. (This conclusion follows from the identity (d/dt)A(Γ(t)) = {A, H 0 }, which applies to any observable A(Γ) and any trajectory Γ(t) obeying dΓ/dt = {Γ, H 0 }). This is a necessary but not sufficient condition for the dynamics to be ergodic on constant-energy surfaces in phase space-an assumption often made in statistical physics.
(Roughly speaking, ergodicity means that a generic Hamiltonian trajectory of energy E visits all regions of the surface H 0 = E, given sufficient time.) For our purposes, we do not need the assumption of ergodicity, only the weaker assumption given by Equation (24).
indicates that the initial and final energy distributions are identical, while inhomogeneities may differ.
If the system were thermally isolated, then its state ρ(Γ, t) would evolve under the Liouville equation, ∂ρ/∂t = {H, ρ}. However, we assume that the system is in contact with a thermal bath as it undergoes the cyclic process, hence its evolution follows classical isothermal dynamics, rather than Hamiltonian dynamics. As in the quantum case, we will not specify the equations of motion that describe the isothermal dynamics, but we will make the following assumptions.
(1) If the system's Hamiltonian is held fixed, then the isothermal dynamics drive the system to the equilibrium state with partition function and free energy Here, h is a constant with dimensions of action that ensures the argument of the logarithm is dimensionless. We choose h to coincide with Planck's constant as this will facilitate comparisons of quantum and classical work extraction in Section 4. We assume this relaxation takes place over a finite timescale τ rel . As a consequence, if H(Γ, t) is varied quasistatically, then the system's state follows the instantaneous equilibrium state, ρ(Γ, t) = π(Γ, t).
(2) When the system evolves over a time interval 0 ≤ t ≤ τ under isothermal dynamics and a time-dependent Hamiltonian H(Γ, t), it obeys a generalized second law Unlike the quantum von Neumann entropy (9) which is always non-negative, the classical Shannon differential (or continuous) entropy (31) can become arbitrarily negative for probability distributions that are highly concentrated in phase space, as we will see in Section 4.1. (For brevity, we will henceforth refer to the Shannon differential entropy simply as the Shannon entropy.) As with the quantum bound (Equation (5)), Equation (27) is not restricted to transitions between equilibrium states, and has been derived under a variety of modeling approaches, see, e.g., Refs. [26][27][28][29][30][42][43][44].
The classical non-equilibrium free energy (29) can be rewritten as where is the classical relative entropy or Kullback-Leibler divergence. Thus, for a cyclic process, where ρ i (Γ) = ρ(Γ, 0) and ρ f (Γ) = ρ(Γ, τ) are the system's initial and final states, and π 0 (Γ) is the equilibrium state for the reference Hamiltonian. As in the quantum case (Equation (12)), the right side of Equation (34) provides a measure of the degree to which the process brings the system closer to equilibrium.

Energy-Shell Inhomogeneities
The evident similarity between the quantum framework for cyclic isothermal processes described by Equations (1)- (12) and the classical framework of Equations (23)- (34) motivates us to seek a classical analogue of the statement that quantum energy coherences represent a thermodynamic resource. As a step in this direction, we note that in the quantum case, density matrices that are stationary under the unitary evolution generated byĤ 0 are exactly those that lack energy coherences in the eigenbasis ofĤ 0 : In the classical case, phase space densities that are stationary under the Hamiltonian dynamics generated by H 0 (Γ) are exactly those that are functions of H 0 (Γ): for some function k(·). (Equations (2) and (24) are needed for the "only if" parts of Equations (35) and (36).) These observations suggest that we ought to view phase space distributions of the form ρ = k(H 0 ) as analogues of density matrices that are diagonal in the eigenbasis ofĤ 0 .
To pursue this idea, let η(E) denote the distribution of energies associated with a phase space density ρ(Γ): In addition, let ω E (Γ) denote the classical microcanonical density of energy E: where and is the classical density of states. The microcanonical density ω E (Γ) is singular, uniformly distributed over the energy shell E (the level set H 0 = E), and zero elsewhere. Here, "uniformly distributed" is defined by Equation (38): as ∆E approaches zero, the phase space density remains uniform, with respect to the Liouville measure d N x d N p, in the region between shells E and E + ∆E, and zero elsewhere. Using Equations (37)-(39), a phase space density of the form ρ = k(H 0 ) can be written as with η(E) = k(E)Ω(E). Such a density is a statistical mixture of microcanonical ensembles (just as a diagonal density matrix is a mixture of energy eigenstates:ρ = diagρ = ∑ n p n |n n|), hence ρ(Γ) is uniform, or homogeneous, over any specific energy shell E, while its value differs from one shell to another. By contrast, a phase space density that is not of the form ρ = k(H 0 ) is inhomogeneous on energy shells: there exist points Γ and Γ such that H 0 (Γ) = H 0 (Γ ) but ρ(Γ) = ρ(Γ ). We will henceforth use the terms homogeneous/inhomogeneous to distinguish between phase space densities that can/cannot be written as ρ = k(H 0 ). For instance, the equilibrium distribution π 0 (Γ) ∝ exp −βH 0 (Γ) is a homogeneous density. By the stationarity argument given above (Equations (35) and (36)), homogeneous phase space densities will be viewed as classical counterparts of diagonal density matrices, and inhomogeneous densities as counterparts of quantum states with energy coherences. In other words, for our purposes the counterparts of quantum energy coherences are classical energy-shell inhomogeneities.
We introduce the notation with η(E) given by Equation (37), to denote the phase space density obtained by "homogenizing" ρ(Γ). That is, diag ρ is the homogeneous density that has the same energy distribution as ρ.

Removing Inhomogeneities
Let us now focus our attention on classical, cyclic isothermal processes that satisfy the isoenergetic constraint (compare with Equation (13)): where ρ i, f denote the system's initial and final states. Such processes leave the energy distribution undisturbed, η i (E) = η f (E), while allowing energy-shell inhomogeneities to change. Equation (42) implies hence, Equation (27) becomes Let W c denote the maximum amount of work that can be extracted, over all conceivable cyclic protocols, for a given reference Hamiltonian H 0 (Γ) and initial state ρ i (Γ). Equation (44) implies since, among all states with a given energy distribution, the Shannon entropy is maximized by the homogeneous state (This follows from the fact that Shannon entropy increases under coarse-graining, which in turn is a consequence of Jensen's inequality, ln x ≤ ln x ).
Similarly to the quantum case (Equation (19)), the bound given by Equation (45) is saturated [27,28] by the protocol with λ = t/τ, and τ sufficiently long that the process is effectively quasistatic. The protocol begins with a classical quench at t = 0. Immediately after this quench, the system's state ρ i (Γ) is in equilibrium with its instantaneous Hamiltonian, H(Γ, 0 + ) = −β −1 ln ρ i (Γ). During the interval t ∈ (0, τ), the quasistatic switching of the Hamiltonian drags the system through a sequence of equilibrium states from ρ i to ρ f = diag ρ i , and at t = τ the cyclic process is completed by suddenly returning the Hamiltonian to H 0 . The evolution of the system's state ρ(Γ, t) is entirely analogous to that given by Equation (20). Summing over the work extracted during the initial quench, the quasistatic driving, and the final quench, we find (see Appendix A) that the total extracted work is i.e., the bound in Equation (45) is saturated. By Equation (44), any protocol satisfying Equation (42) that would bring the system to a final state ρ f = diag ρ i would necessarily result in less work extracted.

Quantum-Classical Comparison
We have seen that the maximum work extracted in the quantum case, subject to the isoenergetic constraint, diagρ i = diagρ f , is achieved by quasistatically removing all energy coherences from the system's initial state:ρ i → diagρ i . Similarly, the maximum work extracted in the classical case is achieved by quasistatically removing all energy-shell inhomogeneities. The optimized work values W q and W c are given by Equations (21) and (47). The close similarity between these results supports our view that classical energy-shell inhomogeneities are thermodynamic counterparts of quantum energy coherences. Both are resources that can be leveraged to extract work.
While the expressions for W q and W c are nearly identical, it still remains to compare them quantitatively. Ideally, we would like to compare the values of W q and W c for a given quantum reference HamiltonianĤ 0 and initial stateρ i , and appropriately defined classical counterparts H 0 (Γ) and ρ i (Γ). To this end, throughout this section and the next we assume thatĤ 0 is a function of position and momentum operators (x 1 , · · ·x N ) and (p 1 , · · ·p N ), and we further assume thatĤ 0 has a well-defined counterpart H 0 (Γ). This condition is satisfied, for instance, by Hamiltonians of the kinetic-plus-potential form H 0 = K(p 1 , · · ·p N ) + V(x 1 , · · ·x N ), for which H 0 (Γ) is obtained by replacing momentum and position operators with classical momentum and position variables.
Identifying a correspondence between quantum and classical statesρ and ρ(Γ) is trickier. Common approaches that map density operators into phase space distributions [45,46] suffer from undesirable properties. For instance, neither the Wigner [47] nor Husimi [48] function representation of the quantum thermal state corresponds to the classical thermal phase space distribution. Additionally, the Wigner function in general can become negative while the Husimi function depends on the choice of coherent states.
To circumvent such issues, we will compare quantum and classical energy distributions rather than individual states. Instead of focusing on the maximum work that can be extracted from a particular initial state, we will consider the maximum work that can be extracted given a particular initial energy distribution. We begin by defining energy equivalence classes in Section 4.1, then in Sections 4.2 and 4.3 we compare maximum work values for corresponding quantum and classical energy equivalence classes.

Energy Equivalence Classes
We define a quantum energy equivalence class to consist of all statesρ that share a particular energy distribution, that is, a particular set of diagonal density matrix elements, with respect toĤ 0 . An example is the thermal energy equivalence class given by whereπ 0 = exp(−βĤ 0 )/Z q is the thermal equilibrium state. In addition to the stateπ 0 , the set Π q includes exotic non-equilibrium states with significant energy coherences such as the pure state |π 0 π 0 |, where Examples of this state arise in quantum optics [49,50]. More generally (that is, not restricting ourselves to the thermal energy equivalence class, Equation (48)), every quantum stateρ belongs to a unique energy equivalence class Σ q defined by the diagonal elements ofρ in theĤ 0 basis. Within this class, the von Neumann entropy is maximized by the stateσ ≡ diagρ = ∑ n p n |n n|: max ρ∈Σ q S q (ρ) = S q (σ) = − ∑ n p n ln p n ≥ 0 (50a) where p n = n|ρ|n . The von Neumann entropy is minimized within Σ q by pure states such as |ψ ψ|, where |ψ = ∑ n √ p n |n , and for these states the entropy vanishes: A classical energy equivalence class contains all phase space distributions ρ(Γ) with a given energy distribution η(E). An example is the thermal energy equivalence class where π 0 (Γ) = exp[−βH 0 (Γ)]/Z c . While the state π 0 (Γ) is homogeneous, the class Π c contains states with substantial energy-shell inhomogeneities. For instance, if the system is a one-dimensional harmonic oscillator, the thermal equivalence class Π c includes the state where E and T are the canonical energy and tempus (angle-like) coordinates [51] defined by x = √ 2E/mω 2 cos(ωT) and p = √ 2mE sin(ωT), with ωT ∈ (−π, +π]; δ is a non-negative parameter; and I 0 is the modified Bessel function of order zero. For this example, it is convenient to use (E, T) rather than (x, p) to identify a point in classical phase space. ζ(T) is the von Mises distribution [52], an analogue of a Gaussian distribution for an angular coordinate. In Equation (52), the mean of ζ(T) is zero and its variance is controlled by δ. For δ = 0, ρ(E, T) reduces to the canonical distribution, which is homogeneous over every energy shell. With increasing δ, the distribution becomes more and more concentrated on the positive x-axis of phase space (where T = 0) and as a result its Shannon entropy S c [ρ] decreases, with no lower bound. Specifically, for large δ, we have Every classical state ρ(Γ) belongs to a unique energy equivalence class Σ c , defined by its energy distribution η(E) (Equation (37)). Within this class, the Shannon entropy is maximized by the diagonal state σ(Γ) = diag ρ(Γ) = η(H 0 )/Ω(H 0 ), but there is no lower bound on the minimum entropy, as the phase space distribution can be concentrated to an arbitrary degree without affecting the energy distribution: These extrema are illustrated by the values δ = 0 and δ → ∞ in the example in the previous paragraph. To take another illustrative example-which will prove useful in the next sectionconsider an ideal gas of n particles inside a three-dimensional cubic box of volume V = L 3 , oriented parallel to the x-, y-, and z-axes, with one corner at the origin-see Figure 3. A point in phase space is given by Γ = (r 1 · · · r n ; p 1 · · · p n ). For 0 < α ≤ 1, let ρ α (Γ) denote the distribution for which the momenta p k are sampled from the Maxwellian distribution at temperature β −1 , and the positions r k are sampled uniformly within the region defined by 0 < x, y < L and 0 < z < αL. This distribution belongs to the thermal energy equivalence class Π c , and ρ α=1 (Γ) is exactly the (homogeneous) thermal distribution, whereas ρ α<1 (Γ) is an inhomogeneous, non-equilibrium distribution, in which the gas is entirely located within a fraction α of the volume of the box. For arbitrary α ∈ (0, 1], we have where λ th = βh 2 /2πm is the thermal de Broglie wavelength. The value S c [ρ α ] is maximized at α = 1, that is, for the homogeneous state, and it has no lower bound as α → 0. In both of the above examples, by "squeezing" ρ(Γ) into an arbitrarily small region of phase space (δ → ∞, α → 0) we obtain a distribution with arbitrarily large, negative entropy.

An Unfair Comparison
We now determine the maximum amount of work that can be extracted in a cyclic isoenergetic process where all states in the quantum equivalence class Σ q are considered. Using Equations (21) and (50b), we have whereσ = diagρ i is the unique diagonal state belonging to Σ q . The minimal value of S q (ρ i ) on the second line is achieved for any pure state |ψ ψ| ∈ Σ q , an example of which can always be constructed using the same argument as in Equation (50b). Hence, the maximum work is obtained by starting in a pure state, then quasistatically removing the coherences (e.g., following the protocol given by Equation (19)) so as to end in the diagonal stateσ.
This result has a simple interpretation in terms of the bound W q ≤ β −1 S q f − S q i (see Equation (16)): we maximize the extracted work by starting in a state with the lowest entropy and ending in the state of highest entropy, within Σ q . By Equation (50) these are, respectively, any pure state and the unique diagonal state in Σ q . Equivalently (since U q f = U q i by Equation (13)), the maximum extracted work is obtained when starting in the state of highest free energy and ending in the state of lowest free energy. We emphasize that, here, free energy and entropy are defined by Equations (7) and (9), which apply to generic (not necessarily equilibrium) quantum statesρ.
The analogous classical calculation, using Equations (47) and (55), gives where σ(Γ) = diag ρ i (Γ). In other words, for a given classical energy distribution, there is no upper bound on the amount of work that can be extracted, as there is no lower bound on the entropy of the initial state. By "squeezing" a given phase space distribution within each energy shell, without altering the distribution of probability among energy shells, we can construct a distribution ρ i (Γ) that is compressed within an arbitrarily small volume of phase space, hence we can make the value of S c [ρ i (Γ)] arbitrarily small. This idea is illustrated by Equation (52) for the harmonic oscillator example of the previous section: as δ → ∞, the von Mises distribution ζ(T) becomes ever more concentrated around T = 0, and the entropy of the distribution becomes arbitrarily large and negative. The example of the ideal gas discussed at the end of Section 4.1 provides further intuition for Equation (58). For that example, consider the thermal equivalence class Π c , and imagine an initial inhomogeneous distribution ρ i (Γ) = ρ α (Γ) at t = 0, with α < 1, that is, with all gas particles initially located in the region 0 < z < αL. To maximize the extracted work, we first suddenly insert a partition at the location z = αL, and then quasistatically move this partition to the location z = L, while the system remains in contact with a thermal bath at temperature β −1 . The process ends with the system in the homogeneous, thermal state ρ f (Γ) = ρ α=1 (Γ). The total work extracted during this process of removing inhomogeneities is which follows from a well-known expression for the reversible isothermal expansion of an ideal gas: It is easy to see why there is no upper bound on the extractable work: at t = 0 + , just after the insertion of the partition, the gas is an equilibrium state, confined within a volume αV, with free energy F c (t = 0 + ) = −nβ −1 ln(αV/λ 3 th ). The smaller the value of α, the larger the initial free energy and therefore the greater the amount of work that can be extracted through reversible, isothermal expansion. In this idealized example, we can begin with an arbitrarily dense initial state, i.e., arbitrarily small α > 0.
In both the quantum and classical cases, the extracted work is maximized by evolving quasistatically from the state of lowest entropy to the state of highest entropy, within the equivalence class Σ q or Σ c . Thus, there appears to be an inherent quantum thermodynamic disadvantage, since S q is bounded from below by 0, while S c is unbounded from below.
The comparison, however, is unfair. Quantum mechanics obeys the Heisenberg uncertainty principle, a loose semiclassical interpretation of which states that every quantum state occupies a cell of volume h N in phase space. If we view classical mechanics as an approximate model of an underlying quantum reality, then when considering initial distributions ρ i (Γ) we should allow only such distributions as are consistent with the uncertainty principle. To impose this constraint, let us imagine dividing phase space into cells of volume h N . A distribution ρ(Γ) that is consistent with the uncertainty principle is one that is uniform within any such cell, but whose value differs from cell to cell: any finer-grained structure is offensive to the uncertainty principle. For such a distribution, we have p k = h N ρ(Γ k ), where Γ k is a representative point in cell k and p k = Γ∈cell k dΓ ρ(Γ) is the probability to find the system in that cell. The Shannon entropy of this distribution is given by where S c = 0 if and only if p k = δ kl for some cell l.
If we thus reject distributions with negative entropy as being incompatible with the uncertainty principle, then Equation (55) is replaced by min ρ∈Σ c S c [ρ(Γ)] = 0, and Equation (58) becomes Thus, after imposing consistency with the uncertainty principle (in an admittedly heuristic fashion), we conclude that for both the quantum equivalence class Σ q and the classical equivalence class Σ c , the maximum extractable work is given by the entropy of the diagonal or homogeneous state, multiplied by β −1 (Equations (57) and (61)).
Throughout the following section, and in Section 5, we impose the constraint S c [ρ] ≥ 0 on the initial classical phase space distribution, to exclude states that are incompatible with the uncertainty principle.

A Fair Comparison
The final step in making a fair comparison between quantum and classical work extraction is to establish a correspondence between equivalence classes Σ q and Σ c . That is, we want to establish a correspondence between quantum and classical energy distributions. There is no unique way to do this, as energy takes on discrete values in one case and continuous values in the other. As a reasonable way to proceed, let us choose a real function κ(·) ≥ 0 with the property that both K q = Tr κ(Ĥ 0 ) and K c = dΓ κ(H 0 (Γ)) are finite. We then define the diagonal quantum and homogeneous classical stateŝ along with the associated energy equivalence classes The equivalence class Σ q [κ] contains all quantum states with diagonal density matrix elements ρ nn = κ( n )/K q , whereas Σ c [κ] contains every classical state with energy distribution Thus, a given choice of κ(·) specifies both a quantum and a classical energy distribution. As an example, for the choice κ(x) = e −βx , the reference states areσ κ =π 0 and σ κ (Γ) = π 0 (Γ), and the energy equivalence classes are the thermal sets defined earlier: Σ q [κ] = Π q and Σ c [κ] = Π c .
In the semiclassical limit h → 0, as the level spacing between adjacent energy eigenvalues approaches zero, the normalized energy distribution associated with Σ q [κ] is conveniently written as ξ(E) = κ(E)g(E)/K q , where g(E) = ∑ n δ(E − n ) is the quantum density of states. In turn, g(E) dE is approximated by the number of cells of volume h N that fit into the classical phase space volume between E and E + dE, for small dE. Equivalently, where Ω(E) is the classical density of states, Equation (39). Hence, the quantum energy distribution is, semiclassically, Since both the classical and quantum energy distributions η(E) and ξ(E) (Equations (64) and (66)) are normalized to unity, we have From Equations (64), (66) and (67), we conclude that in the semiclassical limit h → 0, the discrete energy distribution associated with the equivalence class Σ q [κ] approaches the continuous distribution associated with Σ c [κ]. In this sense, we view Σ q [κ] and Σ c [κ] as having equivalent energy distributions. Now, finally, for a given quantum reference HamiltonianĤ 0 and its classical counterpart H 0 (Γ), and for a given choice of the function κ(·), let denote the maximum quantum and classical work that can be extracted during a cyclic, isoenergetic (in the sense of Equations (13) and (42)) process, for initial energy distributions determined by κ(·). We assert that by comparing the values of W q max [κ] and W c max [κ], in the semiclassical limit h → 0, we make a fair comparison between quantum work that can be extracted from coherences, and classical work that can be extracted from inhomogeneities.
From Equations (57), (61) and (63), we have therefore, let us inspect the difference between these two values, in the limit h → 0. Following the semiclassical approach used above, we obtain Here, Equation (62) has been combined with the expressions for von Neumann and Shannon entropy (Equations (9) and (31)) on the first line; the sum over energy eigenstates and the integral over phase space have been replaced by energy integrals on the second line; and Equations (65) and (67) have been used to get to the third line.
For κ(x) = e −βx , Equation (71) can alternatively be established from the result (see Equations (4) and (26)) where Z q and Z c are equilibrium partition functions. Taking the limit h → 0 and using the known result [47,[53][54][55] that (for kinetic-plus-potential Hamiltonians) h N Z q can be expanded in a power series of h whose first term is exactly the classical partition function Z c , the right side of Equation (72) vanishes.
From Equation (71), we conclude that in the semiclassical limit, the maximal work that can be extracted from the energy coherences of a quantum stateρ i ∈ Σ q [κ] is the same as the maximal work that can be extracted from the energy-shell inhomogeneities of a classical state ρ i (Γ) ∈ Σ c [κ]. In both situations, the work is maximized by starting in the state of least entropy within Σ q or Σ c , then quasistatically removing the coherences or inhomogeneities. This result leads us to conclude that, within our framework for comparing quantum and classical systems, quantum coherences offer no particular thermodynamic advantage over classical inhomogeneities.

Dropping the Isoenergetic Constraint
In the previous sections, we have imposed the isoenergetic constraint, namely that the initial and final energy distributions are identical (Equations (13) and (42)). Let us now drop this constraint and pose the following question. For a quantum or classical system described by an initial HamiltonianĤ 0 or H 0 (Γ), in the presence of a thermal bath at temperature β −1 , what is the maximum work that can be extracted during a cyclic process if the energy distribution of the initial state is determined by a given function κ(·)?
In the quantum case, we first let W q † (ρ i ) denote the maximum work extracted for a given initial stateρ i -this quantity is analogous to W (ρ i ) (Section 2) but without the constraint diagρ f = diagρ i . From Equations (5) and (10) and the non-negativity of the Kullback-Leibler divergence, we have where the inequality on the first line is valid for any final stateρ f , and F q,eq 0 ≡ F q,eq (Ĥ 0 ). As shown in Appendix A, the bound obtained in Equation (73) is saturated by the protocol where λ ≡ t/τ and the process is quasistatic: τ → ∞. (Note that there is no quench at t = τ.) Since the bound can be saturated, and W q † (ρ i ) was defined as the maximum work that can be extracted, we simply write Now, maximizing this quantity over allρ i ∈ Σ q [κ], we have where U q [κ] ≡ (1/K q ) ∑ n κ( n ) n is the average energy for every stateρ i ∈ Σ q [κ], and we have used Equation (50b) to arrive at the third line. As a consistency check, we combine Equations (69) and (76) with Equations (7) and (10) to obtain , which makes sense: the maximum work that we can extract without imposing the constraint diagρ f = diagρ i must be no less than the maximum work we can extract with the constraint.
In the classical case, essentially identical calculations-which we do not reproduce here-lead to the result is the maximum work that can be extracted over all initial states ρ i (Γ) ∈ Σ c [κ], without imposing Equation (42), and U c [κ] = (1/K c ) dΓ κ(H 0 )H 0 is the average energy for every state in Σ c [κ]. Following steps similar to those of Section 4.3, we obtain and which is the counterpart of Equation (71), after abandoning the constraint of equal initial and final energy distributions. We again conclude that quantum coherences provide no inherent thermodynamic advantage over classical inhomogeneities, in the semiclassical limit.

Conclusions
In Sections 2 and 3 of this paper, we argued that quantum energy coherences (as shown earlier [9]) and classical energy shell inhomogeneities represent thermodynamic resources, which can be leveraged to deliver work. In Sections 4 and 5, we argued that a fair comparison shows these resources to be equivalent: in the semiclassical limit, and for a given initial energy distribution, the amount of work that can be extracted from quantum coherences is the same as the amount that can be extracted from classical inhomogeneities.
Our study has focused on processes during which the system of interest is in contact with a thermal reservoir, and here (as we have seen) the free energy F plays an important role. Sone and Deffner [18] have recently carried out a similar investigation for isolated quantum and classical systems, in which case ergotropy (defined in Ref. [1] for quantum systems and in Ref. [18] for classical systems) plays a role analogous to free energy in our paper. In Ref. [18], as in our paper, energy-shell inhomogeneities are classical counterparts of quantum energy coherences.
In making our comparison in Sections 4 and 5, we invoked a quantum-classical correspondence based on canonical quantization, in which the system of interest is described by coordinates x 1 , x 2 , · · · and conjugate momenta p 1 , p 2 , · · · , which are either quantum operators or classical observables. For such systems, the classical phase space is unbounded and the quantum Hilbert space is infinite-dimensional.
However, in the quantum thermodynamics literature one often encounters systems with finite-dimensional Hilbert spaces, such as the illustrative qubit example analyzed in Ref. [9]. It then seems natural to take, as the quantum system's counterpart, a discrete-state classical system of equal dimensionality. Thus, a qubit's counterpart may be taken to be a classical bit. For such discrete-state systems there is no opportunity to introduce a classical analogue of quantum coherences, as the statistical state of a classical D-state system is specified entirely by the probabilities P 1 , · · · P D , and these are in one-to-one correspondence with the diagonal elements of the corresponding quantum system's density matrixρ. In this situation, it seems that quantum coherences really do provide a unique thermodynamic resource that is unavailable to classical counterparts.
This conclusion, however, is misleading, as an apparently discrete-state classical system is in reality a coarse-grained version of a more microscopically detailed system. For example, an effective classical bit can be obtained by coarse-graining a classical particle in a double-well potential, such that the location x of the particle in the left (right) well indicates a bit value of 0 (1). The apparent quantum thermodynamic advantage-due to coherences-arises in this case because potentially useful classical information (e.g., how the particle's potential energy depends on its location x) has been thrown out in the process of coarse-graining from the double well to the bit. Comparing a qubit-an intrinsically twostate quantum system-with an effective classical two-state system obtained by discarding microscopic information, is an apples-to-oranges comparison.
There is no generally applicable procedure for identifying a proper classical counterpart of a quantum system with a finite-dimensional Hilbert space. It is instructive, however, to consider the simplest case of a spin-1/2 particle (qubit) in a magnetic field, governed by a HamiltonianĤ = g B ·ŝ, whereŝ = (h/2)(σ x ,σ y ,σ z ). In the absence of a thermal bath, the unitary dynamics in the Heisenberg representation are given by the equations of motion where the right side is evaluated using the commutation relations and ε jkl is the Levi-Civita symbol. Kammerlander and Anders [9] showed how work can be extracted from energy coherences in such a system, using a protocol involving quenches and the quasistatic variation of B, along with coupling to a thermal bath. As a possible classical counterpart, instead of a two-state bit let us consider a system whose microscopic state is described by a vector S = (S x , S y , S z ) of fixed magnitude, governed by a Hamiltonian H = g B · S, evolving under the Poisson bracket formulation of Hamiltonian dynamics, d dt S = {S, H} with {S j , S k } = ε jkl S l .
The phase space for this classical system is bounded: it is the two-dimensional surface of a sphere of radius |S|. An energy shell is represented by a circle on that sphere, oriented along the B-direction. The dynamics given by Equation (84) describe an isolated system, and would have to be supplemented by appropriate terms in order to include the effects of contact with a thermal bath. It would then be interesting to investigate classical protocols designed to extract work from an initial distribution that is inhomogeneous on the energy shells, and to compare this classical situation with the quantum case of Ref. [9].
We note that the approach described in the previous paragraphs is readily extended to a system composed of N > 1 spins, interacting both with external fields and among themselves, e.g., through Hamiltonian terms of the form c mnŝm ·ŝ n or c mn S m · S n . Thus, comparisons between quantum and classical work extraction can be extended to multi-spin systems, within this framework. For example, it has been demonstrated that quantum correlations within a many-body system can be utilized for extracting work [56][57][58][59], and it would be pertinent to study whether one can leverage classical correlations and inhomogeneities in a similar way. Such comparisons may further elucidate whether thermodynamic advantages can be identified that are unique to quantum systems.
During the quasistatic stage of the protocol, the system evolves through a sequence of equilibrium states,ρ(t) =π(t)-see Equation (20). Applying Equation (A1), the resulting work is for the Hamiltonian quench at t = τ. Thus, the total work over the entire process is (using U q i = U q f ), as claimed at the end of Section 2. Similar calculations for the protocol appearing in Equation (74) give hence, as claimed in Section 5, just after Equation (74). In the classical case, for a Hamiltonian H(Γ, t) we have the identity d dt F c,eq (t) = dΓ ∂H ∂t (Γ, t)π(Γ, t).
For the protocol given by Equation (46), calculations essentially identical to those appearing above in Equations (A2)-(A4), but with quantum traces replaced by integrals over classical phase space, give hence, as claimed at the end of Section 3.2.