Conditional work statistics of quantum measurements

In this paper we introduce a consistent definition for conditional energy changes due to generalised quantum measurements. This uses the concept of weak values to quantify the initial energy of the system conditioned on observing a given outcome. Our definition generalises well-known notions of distributions of internal energy change, such as that given by stochastic thermodynamics. By determining the conditional energy change of both system and measurement apparatus, we obtain the full conditional work statistics of quantum measurements, and show that this vanishes for all measurement outcomes if the measurement process conserves the total energy. Additionally, by incorporating the measurement process within a cyclic heat engine, we quantify the non-recoverable work due to measurements. This is shown to always be non-negative, thus satisfying the second law, and will be independent of the apparatus specifics for two classes of projective measurements.

Introduction Measurements play an important role in thermodynamic processes. This has been established ever since Maxwell's eponymous demon [1] and the subsequent insights gained in the thermodynamic role of information [2][3][4][5][6][7]. In the quantum regime, measurements are even more intimately linked to thermodynamics [8][9][10]. On the one hand, energy measurements are essential to extend the laws of thermodynamics in the form of fluctuation theorems [11][12][13][14][15][16][17]. On the other hand, measurement processes typically involve the exchange of energy between a system and detector, and the fundamental energy cost of quantum measurements is a subject of intense study [18][19][20][21][22].
In quantum mechanics, measurements induce an unavoidable stochastic change in the state of a system, which will generally modify its energy. How the energy will change on average is well understood, and is simply given by the difference in the system's average energy, evaluated before and after the measurement. Quantifying the change in energy, conditional on observing a given measurement outcome, however, is still lacking a general answer. A well known method used to establish the energetic fluctuations due to dynamical processes, such as measurement, is the Two-Point-Measurement (TPM) protocol, which uses projective energy measurements before, and after, the dynamical process in question [11]. This protocol, however, is known to break down when the system initially has coherences with respect to its Hamiltonian [13,17]. An alternative approach is that used in quantum stochastic thermodynamics [23][24][25][26][27][28][29], wherein the system follows a trajectory of states that are not necessarily eigenstates of the Hamiltonian. The change in energy is thus defined as the difference in expected values of the Hamiltonian at the start and end of the trajectory in question. Such an approach, however, implicitly assumes that we know which pure state the system initially occupies.
In the present paper, we provide a general definition for conditional energy changes due to general quantum measurements and initial system states, using weak values [30,31] to consistently define conditional values of energy prior to performing the measurement. The ener-getic statistics obtained by the proposed definition generalizes existing results in the literature, which are valid in specific circumstances: (i) if the system is initially prepared in an incoherent ensemble of energy eigenstates, we obtain the energy statistics of the TPM protocol; (ii) if the measurement process first projects the system onto one of its pure state components, we obtain the definition for internal energy change along a quantum trajectory used in stochastic thermodynamics; (iii) if the observable measured is the Heisenberg-evolved Hamiltonian, the energy statistics is equivalent to the quasiprobability distribution over the random variable of work introduced in [13,17].
By evaluating the conditional energy change of both system and measurement apparatus, we obtain the full conditional work statistics of quantum measurements. Finally, by incorporating the measurement process within a cyclic heat engine involving a single heat bath of temperature T , we define the non-recoverable, or irreversible, work due to measurement. This is shown to be non-negative, thus satisfying the second law of thermodynamics. While the non-recoverable work will generally depend on the specifics of the measurement apparatus, it becomes a system-only property in the case of repeatable projective measurements.

General Measurements
The simplest description of an observable on a quantum system S, with Hilbert space H S , is given by positive operator valued measures (POVMs) M := {M x } x∈X . Here X denotes the outcome set (readouts) of the measurement, and M x are positive operators (referred to as effects or POVM elements) acting on H S that sum to the identity, and give the probability of observing outcome x via the Born rule [32][33][34]. The POVM description of measurements, however, is insufficient for energetic considerations. Measurement, seen as a physical process, is implemented by coupling the system to a detecting apparatus, which is then subjected to projective measurements. Indeed, each POVM M admits infinitely many physical implementations, or measurement models, described by the tuple M := (H A , , U, Z A ) [34]. Here H A is the Hilbert space of apparatus A, and is the state in which the appara- tus is initially prepared; U is a "premeasurement" unitary operator acting on H S ⊗H A due to the system-apparatus coupling; and Z A = x∈X xP x A is a self-adjoint operator defining a projective valued measure (PVM) on A, such that each outcome x is associated with the same for the POVM M on S. The measurement model is depicted in Fig. 1. For each measurement outcome x, the measurement model defines an instrument [35] on S, given as The instrument describes how the state of the system changes due to measurement, and can be decomposed In the case of PVMs where M x are projection operators, a Lüders instrument is one where At the end of the measurement process, the compound system S + A will be in the state is the state of A after premeasurement, are orthogonal states of A representing outcome x. As ρ S+A offers an ignorance interpretation, the projective measurement of A by the observable Z A , after premeasurement, is often referred to as the "objectification" process [37].

Energy change conditional on measurement outcome
The conditional increase in the energy of S, given that outcome x of the POVM M has been observed with the measurement model M, seems to be quite naturally de- Here H S is the Hamiltonian of S, and the first term corresponds to the average energy of S after outcome x has been observed, while the second term corresponds to the average energy of S before the measurement. While this definition has been used successfully in some instances [23][24][25][26][27][28][29], it breaks down in general. Consider the simple case where the system is initially prepared in a probabilistic mixture of energy eigenstates, where P S [ψ k ] ≡ |ψ k ψ k | are projections on energy eigenstates with energy E k . If we projectively measure the Hamiltonian, the conditional state of S, given outcome x, will be ρ( This is the result compatible with the TPM work statistics distribution. The problem with the above definition is the use of the unconditional energy of the initial state, tr[H S ρ], instead of the conditional one for a given measurement outcome. Provided a consistent expression for such a conditional energy, which we denote as E M x (ρ), the conditional energy increase can be given by We require the following properties for E M x (ρ): (ii) For all ρ and M, and all ensembles {p k , ρ k } satis- . Condition (i) is the natural requirement that the unconditional average energy of ρ be tr[H S ρ]; condition (ii), meanwhile, is required so that the conditional energy of ρ is not dependent on the state preparation. Finally, condition (iii) rests on the fact that a PVM that commutes with the Hamiltonian is jointly measurable with it. Consequently, the average energy of ρ, conditional on observing outcome x of M at a later time, would only be determined by the component of ρ that has support on the subspace projected onto by M x , as illustrated in the example above.
In quantum mechanics, an expression for the expectation value of a self-adjoint operator A on a state |ψ , conditional on the post-selected pure state |φ , is provided by the so-called weak value A w := φ|A|ψ / φ|ψ [30,38]. This expression is universal (i.e. independent on the detection process) in the limit of a vanishingly small coupling strength between the detector and the observable A, which preserves the state coherence. We therefore define the conditional energy of the initial state ρ by using the concept of weak values, generalized to the case where post-selection is given by an outcome x of a general POVM M [31,39]: This definition satisfies conditions (i) -(iii) and can be operationally implemented as shown in Fig. 1.
The proposed definition of energy change is rather general, and it encompasses and generalizes known protocols. First, if the initial state ρ commutes with the Hamiltonian, then ∆E M ρ (x) reduces to the well known expression for the TPM protocol [11], conditioned on observing outcome x of the POVM M [40]. Secondly, the energy change of a system with Hamiltonian H S = m m P m S , initially in a state ρ and unitary evolved via U , can be obtained by a single measurement of the Heisenberg evolved Hamiltonian U † H S U . Within our formalism, this measurement is given by the instrument is a quasi-probability distribution introduced in [13], which becomes a real probability distribution if ρ commutes with H S , and x − m is the random variable of energy difference or, in this instance, work [40]. Finally, if ρ is a mixture of pure states |ψ m , and the POVM M defines a sequence of measurements with outcomes x = (m,n,...), with the first outcome m being due to a projective measurement with respect to the orthonormal basis |ψ m , then the conditional initial energy of ρ will be E M ρ (x) = ψ m |H S |ψ m [40]. This coincides with the definition of initial internal energy of a system along a quantum trajectory [23][24][25][26][27][28][29].
As an illustrative example, let us consider a system with Hamiltonian H S = ( ω/2)(|e e| − |g g|). The system, initially prepared in the pure state |ψ = |θ 1 , + , with |θ, ± := ± cos(θ/2)|g/e + sin(θ/2)|e/g , is first projectively measured with respect to the angle θ 2 and then with a POVM M n so that, when n = e (g), the system is brought to the pure state |e (|g ). In Fig. 2 we plot the conditional change in energy for the sequence of outcomes x = (+, e), ∆E M ρ (+, e), when θ 1 = π/2. This is generally different to the unconditional energy change ∆Ẽ M ρ (+, e), with the two definitions coinciding only when θ 2 = θ 1 . This is the limit implicitly used in stochastic thermodynamics, which corresponds to the energy change conditional on knowing that the initial state is |θ 1 , + and the POVM outcome is (+, e).
Work statistics for measurements In order to define the work statistics for a measurement model M, we must extend the above defined conditional energy increase to the measurement apparatus. The premeasurement and objectification steps of the measurement process can be defined by the following instrument on the compound Therefore, by Eq. (3) and Eq. (5), the conditional increase in energy of the compound system S + A, given outcome x of the POVM M , is In order to identify ∆E M ρ (x) as the conditional work, W M ρ (x), we must ensure that the Lüders measurement of A by the observable Z A is carried out in an energy conserving fashion; if this were not the case, we would need to also consider the energy change of a secondary apparatus used to measure this observable. By the Wigner-Araki-Yanase theorem [41][42][43], this requires that Z A commutes with H A .

With this restriction on Z A , Eq. (6) becomes
The above expression implies that, if U commutes with the total Hamiltonian H S + H A , then W M ρ (x) = 0 for all outcomes x. This strengthens previous results, which only established that the average work vanishes when U and Z A commutes with the total Hamiltonian [44]. In the inset of Fig. 2 we plot W M ρ (x) for a specific implementation of the sequential measurement introduced in the previous section [40]. The work statistics vanishes when U commutes with the total Hamiltonian, achieved at θ 2 = 0.

Non-recoverable work and the second law of thermodynamics
In order to relate the obtained work statistics of measurement with the second law of thermodynamics, we make the measurement process cyclic by use of a single thermal bath of temperature T . Namely, at the end of each measurement, we return both the system and the apparatus to their initial state by coupling to the thermal bath. The average work The minimum work cost of returning both S and A to their initial states, by use of a single thermal bath of temperature T , is −∆F S − ∆F A , obtained in the limit when the process is quasi-static [45]. Therefore, the average non-recoverable (or irreversible) work of measurement will be The non-recoverable work is always non-negative, since I S:A 0 and 0 X A H [46,47]. Therefore, the work statistics of measurement as defined by Eq. (7) will obey the Kelvin statement of the second law [48]. We note that the non-recoverable work of measurement is related to the work cost of measurement, E cost , discussed in [18,21]. Here, only the apparatus is returned to its initial configuration by interacting with the bath. Consequently, it is related to the non-recoverable work by the equality E cost = W M irr (ρ) + ∆F S . Non-recoverable work of projective measurements In 21 it was shown that the work cost of ideal projective measurements is given as E proj it only depends on the observable measured and the system states; quantities pertaining to the apparatus do not appear (unlike the case for general observables). The same holds for the corresponding non-recoverable work given by Eq. (9) as W proj irr (ρ) = k B T (H + S(ρ ) − S(ρ)). This is because here we have X A = − , and so I S: . This observation allows us to extend the result of 21, for ideal projective measurements implemented by the Lüders instrument ρ → M x ρM x , to instruments of the where V i are unitary operators acting non-trivially only on the subspace projected onto by M x [40]. Though not necessarily ideal, this measurement is still repeatable because, conditional on observing outcome x, a subsequent measurement will yield x with certainty.
As discussed in [22], repeatable measurements require that the initial apparatus state not have full rank. By the third law of thermodynamics [49], therefore, repeatable measurements will require infinite resources. To account for this, [22] introduced thermal measurement models of a PVM, where the apparatus is initially in a thermal state of finite temperature. Such measurements will necessarily be unrepeatable. We show that the nonrecoverable work for such measurement models [40] is of the form If M is a non-degenerate observable, the simplest form that the premeasurement unitary U can take is a SWAP map. Consequently, S( ) − S( ) will vanish, and we will be left with W thm irr (ρ) = k B T (H − S(ρ)). The non-recoverable work for the thermal measurement of a non-degenerate observable, therefore, will also be independent of the apparatus, and will be smaller than that of a repeatable measurement by a factor of S(ρ ).

Conclusions
In the present work we have introduced a consistent definition of energy change, conditional on a given measurement outcome, based on the weak value of energy. Within the formalism of the quantum theory of measurement, we have shown that our definition fulfills natural physical requirements and it newly extends previous results for the work statistics of unitary evolutions and for stochastic quantum trajectories. We use our definition to determine the work statistics of a general measurement and show that it fulfills the second law of thermodynamics. In the case of repeatable projective measurements, or thermal measuremernts of a nondegenerate observable, we find that the non-recoverable work is independent of the apparatus specifics.

Supplementary material
In this supplementary material, we extend the results in the manuscript and present some technical details of the calculations therein. First we consider the relation between our newly introduced definition of conditional energy changes and existing definitions which apply to specific cases. Then, we provide detailed calculations for the nonrecoverable work, both for general observables, and for projective measurements. Finally, we present a detailed apparatus model for the example discussed in Fig. 2.

Connection to the TPM protocol
The Two Point Measurement (TPM) protocol determines the probability distribution of energy change in a system during a process, by performing projective energy measurements at the start and end of this process. We shall show that our definition for conditional energy change is compatible with the TPM protocol if ρ commutes with the Hamiltonian. Let us denote the Hamiltonian as H S = m m P m S , and the initial state of S as ρ = m P m S ρP m S . By Eq. (3) and Eq. (5), the conditional change in energy can thus be written as . (S1) Here, the conditional energy change is given as a probability distribution tr[P m S I M x (P n S ρP n S )] which quantifies the probability of energy transition m − n , conditional on observing outcome x of the POVM.
Therefore, the conditional initial energy of the system, along the quantum trajectory x = (m, n), is the expected energy of the system when it is in the pure state |ψ m that defines the starting point of the trajectory in question.

Connection to quasi-probability distributions of work
It has previously been suggested that work, given a unitary evolution of a closed quantum system, can be determined by measuring the Heisenberg evolved Hamiltonian to provide a quasi-probability distribution over the energy eigenvalue differences [S13]. We shall show that this is a special case of our more general definition.
Let us denote the Hamiltonian as H S = m m P m S . The Heisenberg evolved Hamiltonian, meanwhile, isH S := We may projectively measure the system, with respect to the Heisenberg evolved Hamiltonian, if we act on it by the instrument I M x (ρ) = P x S U ρU † P x S . The corresponding conditional energy change given outcome x, weighted by the probability of observing this outcome, is thus given by Eq. (3) and Eq. (5) as On the left hand side, we have a real probability distribution p M ρ (x), and a possibly complex value of energy change ∆E M ρ (x). Meanwhile, on the right hand side, the energy change of S is defined with respect to the real random variable x − m , which is sampled by the quasi-probability distributionp x,m := tr[P x S P m S ρ] that may be complex.

NON-RECOVERABLE WORK DUE TO MEASUREMENT
The average state of S after the measurement process has been completed is ρ := x∈X I M x (ρ), which may equivalently be written as ρ = tr A [U (ρ ⊗ )U † ]. The average state of A after premeasurement, meanwhile, is := tr S [U (ρ ⊗ )U † ], whereas its state after the objectification process is where (x) are states of A, on orthogonal subspaces of H A , which correspond to the measurement outcomes x. Using the fact that x∈X P x A = 1 A , then by Eq. (7) the average work, over all measurement outcomes, can be expressed as In the last line, we have used the fact that Z A commutes with H A to infer that and have the same expected energies.
The free energy of a quantum state ρ, with respect to the Hamiltonian H and temperature T , is defined as In other words, cannot have full rank.
For repeatable measurements, it is simple to verify that the apparatus states storing the measurement outcomes x are given as Therefore, the Holevo information of the apparatus, with respect to the state and observable Z A , is Therefore the non-recoverable work is, by Eq. (9), given as (S14) Note that this only depends on the observable M and system states ρ, ρ . The non-recoverable work for repeatable projective measurements, therefore, is independent of the apparatus used.
It has recently been suggested that, by the third law of thermodynamics, the preparation of the apparatus in a non-full rank state requires infinite resources and, as such, ideal (or repeatable) measurements are thermodynamically impossible [S22, S49]. To account for this, we may simply demand that is a thermal state, such that r = dim(H A ) = |X |, and, for all i, |φ x,i = |φ x . By preservation of the inner product by unitary operators, this demands that for any i = j, ψα x,i |ψ α x,j = 0. In this case, we have S( (x)) = 0 and, consequently, X A = S( ). The non-recoverable work for thermal measurements, therefore, will be W thm irr (ρ) = k B T (H + S(ρ ) − S(ρ) − S( )). (S15) In the specific case where M is a non-degenerate observable, a thermal measurement can be implemented if U is a generalized SWAP operation. As such, we have S(ρ ) − S( ) = 0, leading to a non-recoverable work of k B T (H − S(ρ)). Here too the non-recoverable work is independent of the apparatus, and is smaller than that of repeatable measurements by a factor of S(ρ ).