Leggett-Garg Inequalities for Quantum Fluctuating Work

The Leggett-Garg inequalities serve to test whether or not quantum correlations in time can be explained within a classical macrorealistic framework. We apply this test to thermodynamics and derive a set of Leggett-Garg inequalities for the statistics of fluctuating work done on a quantum system unitarily driven in time. It is shown that these inequalities can be violated in a driven two-level system, thereby demonstrating that there exists no general macrorealistic description of quantum work. These violations are shown to emerge within the standard Two-Projective-Measurement scheme as well as for alternative definitions of fluctuating work that are based on weak measurement. Our results elucidate the influences of temporal correlations on work extraction in the quantum regime and highlight a key difference between quantum and classical thermodynamics.


Introduction
Much like the celebrated Bell inequalities, which shed light on the deeply non-classical properties of spatial correlations encountered in entangled systems, quantum mechanics posseses a rich temporal structure that distinguishes it from classical physics. In 1985 Leggett and Garg explored this structure by introducing the concept of macrorealism [1]. In essence, macrorealism can be condensed into two main assumptions about the temporal properties of physical observables within any classical description of physics [1][2][3][4][5][6][7][8];

1.
Macrorealism per se: physical observables take on well-defined values at all times independent of the act of observation.

2.
Non-invasive measurability: in principle it is possible to measure the value of an observable without changing the subsequent evolution of the system.
Assumptions (i) and (ii) can be used to derive mathematical inequalities, the so-called Leggett-Garg inequalities, that serve to test the macrorealism of physical observables. Violations of these inequalities subsequently rule out what would be expected in a classical system, and this quantum behaviour has now been confirmed experimentally in a variety of settings [9][10][11][12][13][14].
In the quantum regime, thermodynamic quantities such as fluctuating work and heat cannot be represented by hermitian observables, but are conventionally defined via multi-time projective measurements performed on the system [15][16][17]. For a closed quantum system, one way of defining the fluctuating work done on the system driven out of equilibrium is by the difference in energy eigenvalues observed at the start and end of its evolution. This framework is commonly referred to as the two-projective-measurement scheme, and serves as a route to many of the known fluctuation theorems such as the Jarzynski equality [15,16] and Tasaki-Crooks relation [18]. Given that these results mirror the corresponding classical fluctuation relations [19,20], it is often assumed that work is simply a classical stochastic variable even within the quantum regime. However, the influence of non-classical temporal correlations that arise from two-time quantum measurements on the statistics of fluctuating work have yet to be fully understood. One aspect of this is the fact that work measurements remove coherences in the energy basis and can affect the future evolution of the quantum system, modifying the average work done during the process [21,22]. Alternative definitions of quantum work related to weak measurement have been proposed in order to circumvent this effect of measurement disturbance on the statistics of work [22][23][24]. However, it has been shown that the resulting quantum work distributions are not generally positive-definite [25]. The emergence of negative quasi-probabilities is a signature of quantum behaviour, and hints at a link to violations of the Leggett-Garg inequalities [6,26,27]. In a similar vein, violations of macrorealism have also been related to the presence of anomalous weak values in quantum systems [8]. Recent work by Blattmann and Mølmer [28] has successfully linked violations of macrorealism to quantum work in the standard TPM approach by utilising the entropic Leggett-Garg inequalities. In their approach one compares the Shannon entropy of the work distribution over different intervals of time. However, the Shannon entropy is not well-defined if the work distribution fails to be positive, and so the entropic Leggett-Garg inequalities cannot be applied to situations in which the work distribution becomes a quasi-probability.
In this paper we will utilise the assumptions of Leggett and Garg to demonstrate that there exists no general macrorealistic description of work for quantum systems driven out of equilibrium. In particular, we show that quantum temporal correlations between energy measurements performed at different times influence the statistical moments of the fluctuating work done on the system during a non-equilibrium process. This result is shown to hold for three different definitions of quantum work: the two-projective measurement (TPM) scheme [15], the full-counting statistics (FCS) [24] and the Margenau-Hill (MH) work distribution [23]. Crucially the inequalities that we derive can be used to test for violations of macrorealism in both strong and weak measurement schemes, regardless of whether or not the work distribution is positive or not.
The paper is organised as follows: we first introduce a set of Leggett-Garg inequalities for the moments of fluctuating work, and then consider a driven two-level system and show that the inequalities can be violated. Following that we introduce an alternative set of Leggett-Garg inequalities for the moment-generating function, and apply these inequalities to alternative definitions of quantum work that are based on weak measurement, namely the FCS and MH definitions, subsequently showing that violations of macrorealism can also occur. Finally we conclude with a discussion of our results.

Inequalities for Moments of Work
We first recall the setup for the original Leggett-Garg inequalities [1]. First consider performing three protocols in which the spin S(t i ) = S i = ±1 of a qubit is projectively measured at two times within a set of three times t 0 < t 1 < t 2 . For each of the three protocols one can obtain the temporal correlation function for the values of the spin at times t = t i and t = t j , denoted C ij = S i S j . The macrorealism assumptions (i) and (ii) imply that there exists a three-time probability distribution P(S 0 , S 1 , S 2 ) such that the distributions describing the statistics of each individual protocol can be obtained as marginals of this three-time distribution, eg. P(S 0 , S 2 ) = ∑ S 1 P(S 0 , S 1 , S 2 ) and so on [4]. Note that while assumption (i) implies the existence of a three-time probability with the correct marginals, assumption (ii) guarantees that this distribution is the same for all three separate experiments [4]. Finally, using the marginal properties of P(S 0 , S 1 , S 2 ) yields the following Leggett-Garg inequality relating the correlation functions for the three protocols [1]; This inequality holds for any dichotomic observable. For a simple qubit, the spin at time t i can be represented by a combination of Pauli matrices;Ŝ i = s i ·σ. By performing successive projective measurements of the spin, the correlation functions can be obtained for each of the three protocols. This leads to a violation the RHS of Equation (1) which can take a maximum value of 3 2 [4]. This example illustrates the failure of macrorealism for quantum systems.
It is also possible to derive a set of Leggett-Garg inequalities reminiscent of Equation (1) for the moments of fluctuating work in a closed quantum system driven in time. For simplicity we consider a system that can occupy one of two fixed energy states, which we denote by 2 and − 2 , at three points in time t = t 0 < t 1 < t 2 during the driving process. For the statistics of work measured during a particular time interval t ∈ [t i , t j ], the k'th moment of fluctuating work is defined as Here the energies occupied by the system at time t i are denoted by i and we assume that the possible work values are given by the energy changes W ij = j − i . The probability P( i , j ) governs the statistics of energy at times t i and t j , and we make no assumptions about the exact definition of P( i , j ) aside from assuming it is normalised and non-negative. As with the standard Leggett-Garg experiment described above, the aim is to compare the work statistics observed within different time intervals along the driving process, as shown in Figure 1. Thus in analogy with Equation (1) we will consider the following quantity; This quantity can be measured over many runs of the driving process during each of the three time intervals, where the system is prepared in same state at time t 0 for each experiment. For example M 1 is obtained by measuring the average work done on the system sequentially during intervals t ∈ [t 0 , t 1 ] and t ∈ [t 1 , t 2 ], and then subtracting the average work done during the total time interval t ∈ [t 0 , t 2 ]. We now seek to bound Equation (3) through the assumption that the fluctuating work is a macrorealistic variable, as defined by (i) and (ii).
These assumptions imply the existence of a global probability distribution P( 0 , 1 , 2 ) describing the energy statistics at all points in time along the driving process, where each two-time distribution can be obtained as a marginal; We can show that this condition immediately leads to the following Leggett-Garg inequality for the moments of work (see Appendix A); . This makes intuitive sense; in classical thermodynamics one would not expect to observe any difference between the sum of each intermediate average amount work done and the total average work done between the initial and final points in time. However, we will subsequently show that this does not generally hold for quantum systems, as the bounds in Equation (5) can be violated for certain driving processes. It should also be noted that while we have assumed a discrete energy spectrum for the time-dependent Hamiltonian, this is not crucial to the derivation of Equation (5). Indeed, so long as one assumes that the energy moments are always finite then inequalities of the form Equation (5) can be derived. However, we will restrict our attention to a two-dimensional quantum system throughout the paper for simplicity, as this is sufficient to demonstrate violations of macrorealism in the statistics of fluctuating work.  (5), one compares the statistics of the three experiments, with the same initial state chosen at time t 0 . Note that in experiment (c) no measurement is made at t 0 , thus the system evolves unitarily up to time t 1 .

Violations of the Leggett-Garg Inequalities for Work Moments
We will now utilise the inequalities Equation (5) to show that fluctuating work can not generally be described by a macrorealist theory for quantum systems. The relevant situation that we consider is a standard setup for the thermodynamics of work extraction; an isolated system is initially thermalised and then driven out of equilibrium via changing its Hamiltonian in time, extracting work in the process [15][16][17]. Suppose that we have a two-level system described by a time-dependent Hamiltonian H H (t) in the Heisenberg picture with initial stateρ such that; where |r| ≤ 1 and |a i | = 1 are vectors. Note that the time-dependence of the Hamiltonian is attributed only to each vector a i . In an experimental setup Equation (6) describes a spin-1/2 particle coupled to an external classical magnetic field, with the direction of the applied field adjusted by the experimenter in time. Without loss of generality we will set the initial Hamiltonian along the z-axis of the Bloch sphere, i.e., a 0 = {0, 0, 1}, and choose an initial thermal state with respect toĤ(t 0 ) at inverse temperature β; ρ ∝ exp(−βĤ(t 0 )). This in turn implies that r = {0, 0, −tanh(β /2)}. To obtain the moments of work in Equation (3) two projective energy measurements are performed at the start and end of the driving process within the fixed time intervals shown in Figure 1. This method is commonly referred to as the two-projective measurement scheme (TPM) [15,16,29]. The joint probability to observe energy i at t = t i and then j at t = t j is given by Here we have denotedP ± a i as the projector onto the relevant energy state of the Hamiltonian at time t i . Substituting Equation (7) into Equation (2) gives the moments of work from successive projective energy measurements (see Appendix B): To identify the conditions under which fluctuations in work violate Equation (5), we substitute the above expression into Equation (3) and parameterise the driving process by introducing cos(θ ij ) = a j · a i . For even k we have the following quantum bound for M k after minimising over all normalised vectors {a i } for i = 0, 1, 2 (see Appendix B); ; (even k).
which is saturated by choosing θ 10 = θ 21 = π/3. Secondly, for odd k we find that maximising over where the bound is saturated by choosing θ 10 = θ 21 = π/2. From Equations (9) and (10) it is now apparent that there exists unitary protocols that violate the bounds in Equation (5). Given that the bounds Equation (5) necessarily follow from assumptions (i) and (ii), we conclude that quantum fluctuating work generally lacks a macrorealistic description. Let us note that Equation (5) cannot be violated for odd k in the high temperature limit. However, Equation (8) shows that the even work moments are independent of β, and so Equation (5) can indeed be violated for even k regardless of temperature. This is not surprising, as the standard Leggett-Garg inequality can be violated in the case of an initially maximally mixed qubit [4]. Violations of the work Leggett-Garg inequality, Equation (5), can still occur at all temperatures since the system may acquire coherences in energy at intermediate times due to the unitary driving.

Inequalities for the Characteristic Function of Work
While the inequalities Equation (5) provide a simple identification of non-classicality for the moments of work, we will show in this section that it is possible to condense this information into two inequalities related to the characteristic function for work rather than the moments themselves. A similar method has previously been applied to investigate the non-classical properties of electron-transport through conductors [30]. The benefit of this approach is two-fold. While the projective energy measurements used to obtain the moments in Equation (2) may be difficult to implement in practice, measurements of the characteristic function for work can be performed via ancilla-assisted measurement as shown in [31][32][33][34]. Secondly, inequalities for the characteristic function allow us to consider alternative non-invasive measurement schemes such as the full-counting statistics approach to the quantum work distribution proposed in [24], as we later show in the next section.
The characteristic function uniquely defines the probability distribution for work in a unitarily driven system, and is obtained through the Fourier transform of the work distribution; with work values j − i . Assuming the same protocol given by Equation (6), we can consider a linear combination of characteristic functions for the three intervals of time shown in Figure 1; The assumptions (i) and (ii) for macrorealism imply the following upper bound on the real part of Equation (12) for the qubit system (see Appendix C); whilst the imaginary part of Equation (12) becomes an equality; The bounds Equations (13) and (14) now constitute a pair of Leggett-Garg-type inequalities for any classical characteristic function for fluctuating work, assuming that the energy is given by either 2 or − 2 at all times along the driving protocol.
Within the TPM scheme the characteristic function for work is given by [15,16]; whereη i is the initial state ρ decohered in the basis ofĤ(t i ). The quantum upper bound for the real part of Equation (12) is as follows (see Appendix D); Consequently the upper bound exceeds the classical inequality Equation (13) for all λ. Secondly, the upper bound for the imaginary part of Equation (12) is with a maximum violation of Im(L G λ ) = 1 2 tanh(β /2) for λ = π/2 . As one would expect, the quantum bounds Equations (16) and (17) are obtained by choosing the same protocol-dependent parameters used to obtain Equations (9) and (10) respectively.
To summarise this section we have presented a Leggett-Garg inequality for the characteristic function of fluctuating work, and shown that the non-classicality observed in the moments of work is also exhibited in the characteristic function itself for the TPM scheme.

Generalisation to Weak Measurements of Work
In the previous section we simply recast the original violations of the Leggett-Garg inequality Equation (5) into the form relevant to the characteristic function for the work statistics of a qubit. While this was applied to the TPM protocol, the inequalities Equations (13) and (14) apply to any qubit with a fixed energy spectrum, and this ultimately allows us to investigate alternative measurement schemes and their resulting non-classical violations. Due to the invasive nature of projective measurements, some have argued that the definition of fluctuating work is thermodynamically inconsistent when applied to states with initial coherences in energy [21,[23][24][25]. In turn this has inspired formulations of non-invasive work statistics that remain consistent with energy conservation in closed systems [22][23][24]. In particular, we will consider the full-counting statistics for fluctuating work [24,26,30,[35][36][37]. To obtain the full-counting statistics for work, one couples the system's Hamiltonian to the momentum of an external detector, and subsequently measures the phase change acquired by the detector's momentum during the driving process given by the system's time-dependent Hamiltonian H(t) [36]. In turn this allows one to reconstruct a characteristic function of the following form [24,38]; For example, as shown in [24] the first moment of Equation (18) yields W(t i , t j ) = H(t j ) − H(t i ) ; in other words the average work done on the system is simply the difference in average energy evaluated in the Heisenberg picture. Consequently one can easily see that the first moment in this measurement scheme still obeys the Leggett-Garg inequality Equation (5). However, we demonstrate that the same is not true for the higher order moments contained in the characteristic function Equation (18). Considering again the quantum two-level system described by Equation (6), it can be shown that the real part of Equation (18) is equal to the real part of Equation (15) obtained via the TPM scheme (see Appendix E); This is a surprising result, as it suggests that the same violations of Equation (13), i.e., the upper bound Equation (16), can be obtained non-invasively. It is only the imaginary part of G FCS λ (t i , t j ) that differs from the TPM scheme, in which we find the following upper bound for Equation (12); which is again obtained by choosing θ 10 = θ 21 = π/2. The full-counting statistics are not the only way to characterise non-invasive measurements of work. As proposed by Allahverdyan [23], an alternative characteristic function describing the statistics of work derived from the Margenau-Hill distribution for successive energy measurements [39,40] is as follows (see Appendix F): whereÂ B = 1 2 [ÂB +BÂ] denotes the symmetric Jordan product. Notably the corresponding probability distribution can be obtained via sequential weak measurement [41]. While the first and second moments, W and W 2 , are the same as those obtained from the full-counting statistics, in general higher order moments differ. However, for the isolated driven qubit we again find precisely the same violations of Equation (13) because the real part of G MH λ (t i , t j ) is also equivalent to the real part of G FCS λ (t i , t j ). On the other hand the inequality for the imaginary term, Equation (14), cannot be violated in our setup (Appendix F).

Discussion
In the paper we have demonstrated a violation of macrorealism in the statistics of fluctuating work for a quantum system unitarily driven out of thermal equilibrium for three different characterisations of the work statistics. As with the original Leggett-Garg inequalities, these violations stem from the absence of a global three-time probability distribution of the form Equation (4) for both strong and weak measurement schemes. This emphasises the fact that quantum fluctuations in work are manifestly different from the stochastic fluctuations encountered in classical non-equilibrium thermodynamics due to the influence of temporal correlations on the work moments. These findings compliment recent results showing that fluctuating work cannot always be assigned a well-defined probability distribution when quantum coherence is taken into account [22][23][24][25]42,43]. Ultimately our analysis shows that the Leggett-Garg inequalities provide a useful tool for understanding the difference between quantum and classical thermodynamics, and the inequalities Equations (5), (13) and (14) may find an application in identifying quantum behaviour in thermal machines [44].

Acknowledgments:
We would like to thank Paolo Solinas for suggesting a link between quantum work and the Leggett-Garg inequality, and Clive Emary and Alexander Friedenberger for insightful discussions. H.M. is supported by EPSRC through a Doctoral Training Grant. J.A. acknowledges support from EPSRC, grant EP/M009165/1, and the Royal Society. This research was supported by the COST network MP1209 "Thermodynamics in the quantum regime". Data access statement: This research is of analytical nature and there are no underlying data.
Author Contributions: H.M. conceived the work and performed the analytical calculations. J.A. supervised the work. Both authors analysed and discussed the results.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A. Derivation of Equation (5)
By using the condition Equation (4) for the marginal probabilities describing the statistics of the three experiments displayed in Figure 1, one can express the following linear combination of work, Equation (3) as; Note here that P(+, −, +) refers to the sequence 0 = + /2, 1 = − /2, 2 = + /2 and similarly for P(−, +, −). The last line in Equation (A1) is reached by using the fact i = ± /2, ∀i and that all other sequences drop out of the above summation regardless of the probability. Given that one is free to choose any arbitrary distribution P( 0 , 1 , 2 ), we arrive at a Leggett-Garg inequality for fluctuating work; where the lower bound is achieved by choosing P(+, −, +) = P(−, +, −) = 0 and the upper bound by setting P(+, −, +) = P(−, +, −) = 1 2 .

Appendix B. Derivation of Equation (8)
We begin with the standard formula for the joint probability to observe energy i = ± 2 at time t i and then energy j = ± 2 at time t j from projective measurements of the Hamiltonian; The above formula can be simplified by using the fact that each projector can be written aŝ P ± a i = 1 2 (Î ± a i ·σ), and then applying the identity Tr[(a ·σ)(b ·σ)] = 2a · b. This leads to and similarly Finally from the definition of the moments for work, Equation (2), we arrive at Equation (8); Now the moments can be substituted into Equation (3). For even k the inequality is state independent and can be rewritten in terms of the angles between each Bloch vector, denoted a i · a j = cos(θ ij ); where we have used the trigonometric relation θ 10 + θ 21 = θ 20 . The lower bound, Equation (9) is obtained by setting the angles to θ 10 = θ 21 = π/3. To bound Equation (3) for odd k we note the following relation; r · a 1 = tanh(β /2)cos(θ 01 ). In this case Equation (3) can be be written as follows; The bound Equation (10) is obtained by setting θ 10 = θ 21 = π/2.

Appendix D. Maximal Violations for the Characteristic Function
Here we derive the quantum bounds for Equation (12). The moments of work obtained by successive projective measurements are given by Equation (8), and can be substituted into Equation (15) by using where we have used the series expansion for the complex exponential function in terms of the work moments. This leads to an expression for the real part of the characteristic function; Substituting Equation (A16) into Equation (12) yields the following; Re(L λ ) = Re G λ (t 1 , t 2 ) + G λ (t 0 , t 1 ) − G λ (t 0 , t 2 ) , = 1 + cos(λ )−1 2 1 + a 2 · a 0 − a 2 · a 1 − a 1 · a 0 , To bound Equation (A17) we denote a i+1 · a i = cos(φ i ) and use the trigonometric relation a 2 · a 0 = cos(φ 0 + φ 1 ). This leads to the following inequality; where the upper bound is obtained by choosing θ 10 = θ 21 = π/3, as with the Leggett-Garg inequality for even moments of work in Equation (9). Turning to the imaginary part of Equation (15) and using the expression Equation (8) for the work moments we find the following; For the bounds on the imaginary term, we substitute Equation (A19) into Equation (12) and choose the same set of parameters that were applied to Equation (10), namely θ 10 = θ 21 = π/2, ending with Equation (17).
Firstly, note that the Margenau-Hill distribution can be used to define a joint probability for the successive energy outcomes i , j at times t i and t j respectively [40]; The corresponding characteristic function of work is then as follows; G MH λ (t i , t j ) = e iλW(t i ,t j ) , = ∑ i , j P( i , j )e iλ( j − i ) , = Tr ρe iλa j ·σ e −iλa i ·σ . (A30) Taking the expansion e −iλa i ·σ = cos(λ)Î − isin(λ)a i ·σ, we obtain the following operator expression; e iλa j ·σ e −iλa i ·σ = cos 2 (λ /2)Î + isin(λ )(a j − a i ) ·σ + sin 2 (λ /2)(a j ·σ). (A31) Substituting this into Equation (A30) and applying the same identities used throughout Appendix E gives an expression for the characteristic function; G MH λ (t i , t j ) = cos 2 (λ /2) + sin 2 (λ /2)(a j · a i ) + isin(λ )(a j − a i ) · r. (A32) We can immediately see that the real part of G MH λ (t i , t j ) is again equivalent to Equation (19). As for the imaginary term, a straightforward substitution of Equation (A32) into Equation (12) reveals that for all choices of θ ij .