Work estimation and work fluctuations in the presence of non-ideal measurements

From the perspective of quantum thermodynamics, realisable measurements cost work and result in measurement devices that are not perfectly correlated with the measured systems. We investigate the consequences for the estimation of work in non-equilibrium processes and for the fundamental structure of the work fluctuations when one assumes that the measurements are non-ideal. We show that obtaining work estimates and their statistical moments at finite work cost implies an imperfection of the estimates themselves: more accurate estimates incur higher costs. Our results provide a qualitative relation between the cost of obtaining information about work and the trustworthiness of this information. Moreover, we show that Jarzynski's equality can be maintained exactly at the expense of a correction that depends only on the system's energy scale, while the more general fluctuation relation due to Crooks no longer holds when the cost of the work estimation procedure is finite. We show that precise links between dissipation and irreversibility can be extended to the non-ideal situation.

From the perspective of quantum thermodynamics, realisable measurements cost work and result in measurement devices that are not perfectly correlated with the measured systems. We investigate the consequences for the estimation of work in non-equilibrium processes and for the fundamental structure of the work fluctuations when one assumes that the measurements are non-ideal. We show that obtaining work estimates and their statistical moments at finite work cost implies an imperfection of the estimates themselves: more accurate estimates incur higher costs. Our results provide a qualitative relation between the cost of obtaining information about work and the trustworthiness of this information. Moreover, we show that Jarzynski's equality can be maintained exactly at the expense of a correction that depends only on the system's energy scale, while the more general fluctuation relation due to Crooks no longer holds when the cost of the work estimation procedure is finite. We show that precise links between dissipation and irreversibility can be extended to the non-ideal situation.

I. INTRODUCTION
Energy is a resource and, as with any resource, it is of interest to understand how much of it is spent or can be obtained during a given process, or simply, how much of it is stored, for instance, in a battery. A quite different, but familiar, resource that one handles on a daily basis is money. Money does not usually come for free: it is exchanged for goods and services, and as a consequence it is in one's interest to know how much things cost and how much money is at hand, e.g., stored in a wallet or bank account. But while checking the exact amount of money (or lack thereof) in one's wallet is free, it is not unusual to expect that banks charge certain fees for storing and transferring money. Unfortunately, when it comes to energy, Nature is similarly unforthcoming. Fees apply to the storage and transfer of energy and an energy cost is incurred for obtaining estimates of the work transferred within any thermodynamic process, or stored in a quantum system. In this work, we show that obtaining these estimates with a finite amount of work implies an imperfection in the estimates themselves: estimates which are more accurate incur higher costs.
From a thermodynamic point of view, acknowledging the energetic cost of measurements is crucial, e.g., for a complete understanding of Maxwell's demon or Szilard's engine [1,2]. The work-cost of those measurements that are ideal and projective has been investigated by means of the work-value of measurement outcomes [3][4][5] or via Landauer's erasure bound for resetting the memory that stores these outcomes [6][7][8][9][10]. However, a common observation among Refs. [11][12][13] is that the benefits derived from using measurements as sources of free energy are either matched or surpassed by the corresponding costs.
The crux of our argument is that energy delivered by measurements is not free of charge and must be supplied to realise the measurement in the first place. As we show, this statement is bolstered by the first, second and, in particular, third law of thermodynamics. It was recently shown in [14] that ideal projective measurements require one to prepare the measurement apparatus in a pure initial state. The third law stipulates that such zero-entropy states can only be prepared asymptotically using infinite time, infinite energy, or operations of infinite complexity (see e.g., [15]). Consequently, ideal measurements do not exist, in a strict sense, since they always incur diverging costs. This implies that any realistic measurement using finite resources is non-ideal. It is precisely these considerations that become conceptually important when the purpose of the measurement is to assess the energy consumption itself.
Significant focus in quantum statistical mechanics has been dedicated to the quantification of work and its fluctuations in thermodynamic processes [16][17][18][19]. Studies have also looked at the two-point measurement (TPM) scheme (one of the most prominent approaches for estimating work in an out-of-equilibrium process) [20] in the context of Jarzynski's and Crooks' fluctuation relations [21]. In this work we revisit these concepts and investigate the consequences for these quantities when one does not assume ideal measurements. We explicitly show how the average work of the ideal TPM is modified and discuss the operational meaning of the corresponding estimates. We show that while Jarzynski's equality can be maintained exactly at the expense of a correction that only depends on the system's Hamiltonian, the more general relation due to Crooks (as well as related results linking irreversibility and dissipation [22,23]) no longer arXiv:1902.08568v3 [quant-ph] 4 Nov 2019 hold in the presence of non-ideal measurements. Our results provide a qualitative connection between the cost of obtaining information about work and the trustworthiness of this information.
The paper is structured as follows. In Sec. II we set the stage for our investigation: First, we review the usual TPM scheme in Sec. II.1 before discussing the key properties of ideal and non-ideal measurements following Ref. [14] in Secs. II.2 and II.3, respectively. In Sec. III we discuss a modified TPM scheme based on non-ideal measurements and the resulting work estimates, before investigating the implications for fluctuation relations of Jarzynski and Crooks in Sec. IV. Finally, we discuss our findings in Sec. V.

II.1. Two-point measurement scheme
To formulate our ideas we adopt a commonplace view in quantum thermodynamics, namely, that work is a central resource that is required to move systems away from freely available thermal equilibrium states [24] -an approach that has staged a diverse range of investigations within the broader field [25][26][27]. In this paradigm, previous research has investigated the work-cost (or gain) of quantum processes [28][29][30][31][32], refrigeration [33,34], or for establishing correlations [35][36][37][38].
In this so called 'resource-theoretic' approach, consider a quantum system with Hamiltonian i initially at thermal equilibrium with its environment at temperature T , described by a Gibbs state τ (0) = exp(−βH (0) ) Z (0) with partition function Z (0) = Tr exp(−βH (0) ) and β = (k B T ) −1 . Suppose the system is driven out of equilibrium by a process Λ resulting in a final Hamiltonian where U Λ is a unitary determined by Λ. The work that is performed on or extracted from the system during such a process can be estimated via the two-point measurement (TPM) scheme [20,21] consisting of two ideal projective measurements with respect to the eigenbases of H (0) and H (f) before and after the protocol Λ is implemented, respectively. After obtaining the outcomes labelled by "n" and "m" in these measurements one concludes that the system is left in the states E (0) n ⟩ and E (f) m ⟩, respectively. To any transition between these pure states one may associate a probability p n → m = ⟨ E (f) m U Λ E (0) n ⟩ 2 together with a work value W n → m = E (f) m − E (0) n , while the probability for obtaining the first outcome is p (0) n = exp(−βE (0) n ) Z (0) . The average work performed during the protocol is thus which equals the change in average energy during the protocol Λ, i.e., Estimates of ⟨W ⟩ Λ could thus be obtained from performing ideal measurements and collecting the corresponding outcome statistics. In the following, we will show how the quantity ⟨W ⟩ Λ in Eq. (2) and its estimate are modified when replacing the two ideal measurements in the TPM by more general non-ideal measurements (see Fig. 1).

II.2. Ideal measurements
The notion of perfect projective measurements that leave the system in pure states with certainty is of course idealized. To understand this idealization and its consequences, we review the framework for non-ideal measurements in Ref. [14]: Measurements are performed by coupling the measured system to a suitably prepared measurement apparatus (the "pointer") via an energy investment. Assuming that the initial system and pointer states are ρ S and ρ P , respectively, the measurement can be described by a physical process that correlates the system and pointer, resulting in a joint postmeasurement stateρ SP . For each of the states n ⟩ S (with n = 0, 1, . . . , d S −1) in the measurement basis { n ⟩ S } n , one assigns a corresponding outcome subspace of the pointer Hilbert space via a projector Π n , such that ∑ n Π n = 1 P and Π m Π n = δ mn Π n . We then define an ideal measurement to have the following three properties: (i) Unbiased: The (post-interaction) pointer reproduces the measurement statistics of the (preinteraction) system exactly, i.e., (ii) Faithful: The post-interaction pointer and the post-interaction system are perfectly correlated w.r.t. the measurement basis (projectors), that is, In other words, given a measurement outcome n, the probability that the system is left in the state n ⟩ S is 1.
(iii) Non-invasive: The diagonal entries (w.r.t. the measurement basis) of the pre-measurement system state and the unconditional post-measurement system state are the same, i.e., Tr n ⟩⟨ n S ρ S = Tr n ⟩⟨ n Sρ S ∀ n ∀ ρ S , whereρ S ∶= Tr P (ρ SP ).
A measurement that does not satisfy all three properties is called non-ideal. In particular, it was shown in Ref. [14] that ideal projective measurements are not exactly realizable in practise because they require the preparation of initially pure pointer states (at least in some nontrivial subspace) to satisfy condition (ii). However, the third law of thermodynamics prevents one from reaching the ground-state of any system with finite resources [15,33,34,[39][40][41][42]. Since any other (pure) state necessarily has higher energy than the ground state, the third law thus excludes ideal measurements.

II.3. Non-ideal measurements
In order to understand non-ideal measurements better, we consider how the laws of thermodynamics place constraints on the ability to perform measurements in quantum mechanics. To begin, we note that the first law establishes a lower bound on the work-cost of measurement when one explicitly considers the system and measurement apparatus in the physical description (note that work-costs in terms of lower bounds are sometimes assumed, even if the costs are not always explicitly considered [43][44][45]). The second law implies that any reduction of the system's entropy (e.g., by a projective measurement that leaves the system in a pure state) must be compensated by an entropy increase of at least the same magnitude in the environment or the measurement apparatus [11]. Finally, the third law provides the most severe constraint on the cost of measurement. From the above [14] an ideal measurement can only be implemented using a pure state measurement apparatus. By the third law, it is impossible to create pure states using finite resources (e.g., with finite time, energy or complexity), which implies that any physical measurement using finite resources is non-ideal. Nevertheless, it was shown that non-ideal measurements employing finite resources can approximate ideal projective measurements arbitrarily well.
To understand the sense in which a non-ideal measurement can be considered 'close' to ideal, we recall properties (i)-(iii). All three properties are independent -for a given measurement any one of them can be satisfied, while the other two are not [14,Appendix A.3]. At the same time, satisfying any two properties (for all ρ S ) also implies the third. Since the third law of thermodynamics prevents measurements from being exactly faithful (i.e., satisfying (ii) exactly), this means that any nonideal measurement can only be unbiased or non-invasive, but not both.
Consider a non-ideal measurement that is non-invasive. From the above we know it can be neither faithful nor unbiased. Then neither the individual measurement outcomes nor the statistics generated from many measurements allow reliable inferences about either the post-or pre-measurement system state, respectively. Such a measurement does not seem to reveal any information about the measured system. Instead we consider non-ideal measurements that are unbiased, and take this to be the relevant requirement to speak meaningfully about a measurement. For unbiased measurements one may then attempt to maximise the correlation between pointer outcomes and post-measurement system states to approach an ideal measurement.
To formalise this, we consider an arbitrary system state ρ S in finite dimension d S , measured in the energy eigenba- The system interacts with the measurement apparatus, represented as a finite-size pointer with and dimension d P . In order to account transparently for all resources from a thermodynamic point of view, we assume the pointer is initially in a thermal 1 state τ P = exp(−β P H P ) Z P . The interaction can be modelled by a suitable unitary 2 evolution U meas leading tõ The interaction between system and pointer is unitary but does not generally preserve energy, requiring an investment of energy in the form of work. For details see Appendix A.1. Following Ref. [14,Lemma 2], one may then construct U meas to realise an unbiased measurement with finite energy cost, as we illustrate for a 3-dimensional system in Appendix A.1.a. The probability p n to obtain the measurement outcome n in such a measurement is given by p n = Tr n ⟩⟨ n ρ S . To ensure this is the case for all ρ S , the unitary U meas must result in a final stateρ SP which satisfies the equivalence relation i.e., 1 S ⊗Π nρSP 1 S ⊗Π n are d P ×d P matrices with the same spectra as p n τ P , i.e., they are equivalent up to applications of arbitrary unitariesŨ (n) on the pointer Hilbert space, as we discuss in detail in Appendix A.1.a. This implies that ρ n , the conditional post-measurement system state for outcome n, is independent of the initial system state ρ S . Note that this is also the case for ideal measurements (which are unbiased by definition), where 1 If the system is assumed to be initially thermal as well, such as in the TPM scheme, there need not be a relation between the inverse temperatures of the pointer and the system in principle. 2 In principle, one may effectively model such processes by completely positive and trace preserving (CPTP) maps, see [14,Appendix A.4], but for an exact account of the invested work it is necessary to specify a corresponding dilation to a unitary acting on a larger space of the pointer and its environment.
the pure state after the measurement only depends on the measurement outcome, but not on the initial system state. In this regard, the difference with unbiased nonideal measurements is that the conditional state for the latter are not pure. The most general form of any postmeasurement mixed state conditioned on the outcome n is Each state is normalised ∑ l q ll n = 1, ∀ n and in general the coefficients q ll ′ n are independent of ρ S . In the rest of the paper we formulate our results as conditions and constraints on q ll ′ n . One should also bear in mind that for non-ideal measurements the pointer outcomes and post-measurement system states are not perfectly correlated. This can be quantified by the correlation function in Eq. (5), where Π i are the orthogonal pointer projectors associated to different outcomes. The value of C(ρ SP ) represents the average probability of correctly inferring the postmeasurement state upon observing the pointer. For ideal measurements C(ρ SP ) = 1. However, for non-ideal measurements there is an algebraic maximum, the maximal correlation C max < 1, which can be unitarily achieved. C max is given by the sum of the largest d P d S eigenvalues of τ P , see [14,Appendix A.7]. We call unbiased measurements that achieve C(ρ SP ) = C max unbiased maximally correlating (UMC) measurements, discussed in detail in Appendix A.1.b. In the same Appendix we also show that UMC measurements lead to the following constraints on the coefficients of the post-measurement state: q nn n = C max , ∀ n and q nl n = q ln n = 0 , ∀l ≠ n. As a consequence, the trace distance between the conditional post-measurement system state ρ n and the pure state E n ⟩ evaluates to D(ρ n , E n ⟩⟨ E n ) = 1 − C max .
By further restricting to UMC measurements of minimal energy (Appendix A.1.c) we obtain q ll ′ n = 0 ∀E l ≠ E l ′ , because any off-diagonal elements with respect to energy eigenstates with different energies would imply extractable work, see, e.g., [46]. Minimal energy UMC measurements thus imply a back-action on the measured system. Up to off-diagonal elements in degenerate subspaces, the unconditional post-measurement state for minimal energy UMC measurements is given byρ S = ∑ n p n ρ n = ∑ n,l q ll n p n E l ⟩⟨ E l . By (6) this would be non-invasive when ρ S =ρ S implying q ll n = δ ln ∀n.
At the same time, C max can be understood as an indicator of the resource cost of a measurement: Qualitatively, increasing C max requires more work, control over more complex pointers, more time to carry out operations, or combinations thereof [14]. In particular,  To estimate the work done on or extracted from a system during a process Λ, two measurements are carried out before and after the process occurs. The respective outcomes labelled "n" and "m" allow concluding that the system is left in states ρ (0) n and ρ (f) m n . In the TPM scheme [20], these states are (pure) eigenstates of the system Hamiltonian. For nonideal measurements modelled by unitaries U0 and U f coupling the system state to pointers originally in thermal states τS, ρ (0) n and ρ (f) m n are mixed states.
for fixed pointer systems, increasing C max can only be achieved by investing work in the preparation of the initial state of the pointer.

III. ESTIMATING WORK WITH NON-IDEAL MEASUREMENTS
It is hardly surprising that the procedure of checking how much work is spent or extracted during a protocol itself costs work. In other words, obtaining a work estimate is accompanied by an additional, non-negative work-cost. In Eq. (8) we saw that the specific (average) work ∆E meas of UMC measurements depends on the details of the Hamiltonians, the initial state ρ S , the temperature, and the association of the states E i ⟩ S with the projectors Π i . It has a finite positive minimum value ∆E min meas > 0 and as pointed out in Ref. [14] should not be taken for granted, as it may significantly outweigh the ideal expectation ⟨W ⟩ Λ in Eq. (2). Particular attention should be paid when it comes to machines using measurements as a means of injecting free energy into the system [43-45], as such costs need to be included in an evaluation of the machine's efficiency.
In this work, we do not wish to focus on the specific cost of the measurement, but rather on the consequences for the work estimate itself. The imperfection of measurements is unavoidable and has immediate and interesting consequences for work estimation. To investigate, we modify the ordinary TPM scheme and replace the ideal measurements by non-ideal (minimal energy UMC) measurements 3 (Fig. 1). This assumption can be interpreted as the desire to restrict to measurements that are as close as possible to ideal ones while choosing the energetically cheapest way of doing so. A guiding intuition for the following analysis is that work estimation requires two measurements. If the first is non-ideal but unbiased, it necessarily disturbs the system. In particular, the invasiveness of the first measurement changes the statistics of the second, leading to deviations in the work estimation from the ideal case.
Because the measurements are assumed to be unbiased, the probability p (0) n for obtaining the outcome n in the first measurement is unchanged w.r.t. to the ideal scenario. However, since the system is disturbed by the measurement-induced back action, the conditional postmeasurement state ρ (0) n is no longer an eigenstate E (0) n ⟩ of H (0) . In particular, the conditional probability that the system is left in the eigenstate E (0) l ⟩ after observing the pointer outcome n in the first measurement is q (0) ll n ≠ δ ln . Given the outcome n, the process Λ, thus acts on the state ρ (0) n = ∑ l q (0) ll n E (0) l ⟩⟨E (0) l via a unitary U Λ . Unbiasedness then implies that the conditional probability to obtain outcome m in the second measurement given outcome n in the first measurement is where n ⟩ 2 as before (for details of this scheme see Appendix A.2). For the work estimate ⟨W ⟩ non−id obtained within the non-ideal TPM scheme by (erroneously) associating outcomes n and m with energies E (0) n and E (f) m one obtains which generally does not match the ideal value in Eq. (2). In Appendix A.3.a we explicitly derive the corrected expression to be Thus, we find that between the modified and ordinary TPM schemes, the deviation of the estimated work ⟨W ⟩ non−id from the ideal value ⟨W ⟩ Λ 4 is characterised by two values: a modifying prefactor C max < 1, along with an additional term which may be either positive or negative. Despite the generally complicated dependence on the details of the initial state, the measurement, energy spectrum and on the process Λ, we show, in Appendix A.3.b, that this deviation can be bounded, 4 obtained in the scenario with minimal energy UMC measurements using finite resources. where each of the three qubits has the same Hamiltonian HP = −EP σz 2 and we assume EP = ES 10. The dashed lines show the deviation ⟨W ⟩ non−id − ⟨W ⟩ Λ in units of ES as a function of θ for different ratios of the system and pointer temperature, i.e., βP βS = 1, and from βP βS = 150 to 750 in steps of 150. The dotted black line shows the ideal work ⟨W ⟩ Λ (i.e., a pure state pointer). At θ = 0, the deviation is maxmial while the ideal work estimate vanishes, whereas for θ = π, the ratio ⟨W ⟩ non−id − ⟨W ⟩ Λ ⟨W ⟩ Λ approaches 1 2 (the precise value is 0.49875).
where A ∞ ∶= max i ∑ j a * ij 1 and A = (a ij ). In this sense, C max can be thought of as representing the trustworthiness of the work estimate, in addition to its resource cost. For a fixed process Λ, the closer C max is to 1, the smaller the potential distance of the work estimate from its ideal value, but also the higher the involved costs.
A principal purpose of this paper is to highlight that the difference ⟨W ⟩ non−id − ⟨W ⟩ Λ is non-negligible and in some cases, rather significant. Indeed, in Fig. 2 we plot this difference for a standard system-pointer Hamiltonian with realistic parameters and find that the difference between the estimated ideal and non-ideal work is at times more than twice as large.
One should be careful not to confuse ⟨W ⟩ non−id with the total work performed on the system or with the system's change in average energy ∆E non−id . The latter can be expressed as and generally contains contributions associated with both the work done on the system and heat transferred from the pointer to the system. Here, we make two observations. First, the work estimate ⟨W ⟩ non−id generally does not match the ideal work estimate ⟨W ⟩ Λ = ∆E Λ , the actual work done on the system, or the change in average energy ∆E non−id . Second, while ∆E non−id captures the average energy change of the system, the average energy change of the pointer is not yet included and has to be considered separately [14]. This contribution depends on the specific dimension of the pointer and the structure of its Hamiltonian, which in turn determine C max . Ideal measurements can be approached by increasing the pointer dimension (e.g., measuring a system with an N -qubit pointer and increasing N ), or by cooling the pointer to a smaller but non-vanishing temperature (using a desired refrigeration paradigm [33, 34, 47-49]); these measures all increase the work cost of the measurement [14, A.7]. Achieving the limit C max → 1, requires infinite time, infinite energy, or infinite control (e.g., N → ∞) and in this limit one also recovers ⟨W ⟩ non−id = ⟨W ⟩ Λ = ∆E Λ = ∆E non−id . When limited by finite resources, ⟨W ⟩ non−id = ⟨W ⟩ Λ can only be achieved for specific processes Λ, as we discuss in Appendix A.3.b.

IV. FLUCTUATION RELATIONS
Besides work estimates, higher statistical moments of work are relevant in many contexts, from the study of quenched quantum many-body systems [50,51]  The quantification of work fluctuations [16][17][18][19] in the context of Jarzynski's and Crooks' fluctuation relations using the ideal TPM scheme has been studied in Ref. [21]. Here we are interested in exploring whether these universal relations are recovered within the non-ideal TPM scheme. In particular we explore the statistical properties of the work estimate ⟨W ⟩ non−id . We first focus on the Jarzynski equality [59] for which the quantity of interest is the work functional ⟨e −βW ⟩. Using the properties of the non-ideal TPM scheme we obtain where we have introduced the correction term Here, the partition function is is the difference in Helmholtz free energies between the initial state and the thermal state When χ = 1 one has the original Jarzynski relation, ⟨e −βW ⟩ = e −β∆F , which is satisfied by all ideal measurements. We notice that the breakdown of the original Jarzynski equality is expected here, since the invasiveness of the first non-ideal measurement spoils the requirement that the system starts the process Λ in thermal equilibrium.
Nonetheless, we find that there exists a class of nonideal measurements for which χ = 1 as well. This is the case when ∑ n q (0) ll n = 1 ∀l. This implies that in order to recover Jarzynski's relation, the matrix in Eq. (18) needs to be doubly stochastic. We call these measurements minimally invasive UMC measurements, and they correspond to unital maps, whose average effect is to preserve the identity operator on the system (for details see Appendix A.1.d). Using Eq. (17) and Jensen's inequality, exp ⟨x⟩ ≤ ⟨exp x⟩, we can write the following second-lawlike inequality which provides a lower bound for the non-ideal TPM work estimate ⟨W ⟩ non−id . Since 0 ≤ χ ≤ d S , the extra term −k B T log χ can be either positive or negative. For non-ideal measurements that are unital (χ = 1) this term vanishes and the equation above reduces to the usual second-law inequality ⟨W ⟩ non−id ≥ ∆F . Interestingly, we observe that minimal energy UMC measurements do not, in general, correspond to minimally invasive measurements (except for the special case of a single-qubit system, see Appendix A.1.d). This can be understood in the following way: For minimal energy UMC measurements, all elements of the postinteraction stateρ SP that depend on the outcome probabilities Tr(Γ ij ) = ρ jj q ii j and maximal correlations are achieved when q ii i = C max is satisfied. Minimal energy means that the remaining q ii j for i ≠ j within each column are ordered such that q ii j ≥ q kk j ∀k ≥ i with k ≠ j. This is generally not compatible with row sums ∑ j q ii j = 1 required for q ii j to be doubly stochastic and thus correspond to a minimally invasive measurement.
At the end of the process, the system is left to thermalise to the equilibrium state τ (f) = exp(−βH (f) ) Z (f) , described by the Hamiltonian H (f) . In the time reversed protocol, the thermal state τ (f) is driven out of equilibrium to state One can, however, ensure that the measurement is minimally invasive and unbiased at the expense of moving away from the energy minimum. One can show that this additional cost only depends on the system Hamiltonian (and not the pointer Hamiltonian). Thus, by accepting this cost, non-ideal measurements can satisfy Jarzynski's relation.
To investigate the effect of non-ideal measurements on the irreversibilty of a process, we turn to Crooks' theorem [60]. This relates the probabilities P F (W ) of performing some work during a realisation of the TPM scheme and P B (−W ) for extracting the same amount of work when the time-reversed protocolΛ is implemented: The quantity W − ∆F is usually referred to as the dissipated work, the work which is lost when the final state of the TPM after the protocol, ρ (f) in Eq. (1), relaxes back to equilibrium at temperature T . As we discuss in Appendix A.6, Crooks' relation (20) is not recovered in the non-ideal TPM scheme, not even for minimally invasive UMC measurements (unlike the Jarzynski equality). This is in contrast to the ideal TPM scheme, where Crooks' theorem can be recovered for all unitary and unital maps [61-64]. The reason is that, here, both non-ideal measurements act as (independent) noise sources, disturbing the initial states of the forward and backward TPM processes, respectively. Reestablishing Crooks' fluctuation theorem may eventually require considering the work performed in the measurement processes and, therefore, taking into account the energy changes in the pointers.
Eq. (20) expresses the fact that finite-time processes that drive systems out of equilibrium are irreversible and thus the consumed work is unlikely to be recovered when reversing the protocol (See Fig. 3). This irreversibility can be captured [22,23] by the average of the dissipated work appearing in Eq. (20), and is related to the entropy production during a hypothetical relaxation of ρ (f) to the thermal equilibrium state τ (f) [64,65]. When the measurements for determining this dissipated work are non-ideal, additional entropy is produced, resulting in greater energy dissipation in the final relaxation. In Appendix A.6.b, we calculate the average estimated work performed in addition to the free energy change to be whereρ (f) is the unconditional final state after the process Λ, D(ρ (f) τ (f) ) ≥ 0 is the relative entropy quantifying the irreversibility in the ideal process [66, 67] and is the corresponding change in von Neumann entropy of the system due to the first non-ideal measurement. For non-ideal, minimally invasive measurements (⟨W ⟩ non−id − ∆F ) ≥ 0 in which case it may be interpreted as the entropy production. For these measurements, the von Neumann entropy of the system cannot decrease [67] and the entropy of the pointer during the measurement does not change (see, e.g., [64]). Thus, the total entropy produced in the measurement coincides with the entropy change in the system, ∆S (0) ≥ 0. When ideal projective measurements are considered, ∆S (0) = 0, and the usual expression for the entropy production is recovered. In this ideal case, Kawai, Parrondo and Van den Broeck [22, 23] derived an important result in nonequilibrium thermodynamics, which is closely related to Crook's fluctuation theorem Here, ρ F (t) and ρ B (t f − t) are the density operators in the forward and backward processes taken at the same instance of time t and Θ is the time-reversal operator in quantum mechanics. Θ is anti-unitary, satisfies Θi1 = −i1Θ and ΘΘ † = Θ † Θ = 1, and is responsible for changing the sign of odd variables under time reversal (momentum, magnetic field, etc.) [68]. Equation (22) establishes a deep relationship between the physical and information-theoretical notion of irreversibility. Namely, it connects the dissipated work (left-hand side), which is a physical measure of irreversibility, with the relative entropy at any snapshot of time (right-hand side), which is an information-theoretical measure. We are able to extend this result to the non-ideal TPM scheme by using the generalised dissipation relation in Eq. (21). In the modified scheme we get that is the state of the system at the same instance of time in the backward process 5 (see Appendix A.6). We have introduced the correction term whereby starting in τ (f) , the average system state ρ (f) B is obtained after the first non-ideal measurement in the backward process. The ideal case in Eq.
, making ∆D f = 0 and ∆S (0) = 0. Finally, we stress that, analogously to what happens with the result in Eq. (22) for the ideal TPM scheme, Eqs. (21) and (23) can be turned into inequalities for open system dynamics (see Appendix A.6.b).

V. DISCUSSION
We have studied the consequences of fundamentally unavoidable measurement imperfections on the estimation of work and its fluctuations in out-of-equilibrium processes. Non-ideal measurements lead to a mismatch between the obtained estimate ⟨W ⟩ non−id , the desired ideal estimate ⟨W ⟩ Λ , and the actual work performed on the system during the non-ideal TPM. In addition, an energy cost is incurred for operating the measurement apparatus. This leads to the conclusion that the process of estimating work itself has a work cost, which increases with increasing precision of the estimate. Moreover, we find that the statistical properties of the non-ideal estimate ⟨W ⟩ non−id are modified. While the celebrated Jarzynski relation may be recovered exactly by imposing specific conditions on the measurement scheme, the more general Crooks theorem no longer holds. In this context, we discussed the connection between the nonideal work estimate and the entropy production in the TPM scheme, and extended previous results for the relation between dissipation and irreversibility.
These results are of particular relevance for work extraction: When the costs for estimating the extracted work are of the order of the extracted work itself the usefulness of the procedure is dramatically limited. Conceptually, our results can be seen as a constructive resolution of the perceived shortcomings of the TPM discussed in [65]. It might also be interesting to consider work estimates as well as Jarzynski's equality and Crooks' theorem in more general contexts, such as including feedback control strategies [69,70].
Our results about the validity of the Jarzynski equality and Crooks' fluctuation theorem for the non-ideal TPM scheme are in agreement with very recent results reported

APPENDICES
In these appendices, we provide more details on the mathematical model for non-ideal measurements from Ref. [14] and its application for work estimation described in this paper. In Appendix A.1, we describe the properties of the important class of unbiased maximally correlated (UMC) measurements, as well as of minimal energy UMC measurements and illustrate them for the case of 3-dim quantum system. In Appendix A.2, we give a detailed derivation of the joint probability for the measurement outcomes in the TPM scheme [20, 21] using non-ideal measurements. We then derive the corresponding work estimate in Appendix A.3 and the change in average energy throughout the estimation process in Appendix A.4. Finally, we discuss the consequences for fluctuation theorems: In Appendix A.5, we discuss the modification of Jarzynski's relation, while Appendix A.6 explains why Crooks' theorem generally no longer holds in the presence of non-ideal measurements. In Appendix A.7 we present a physical model as an example of the methods discussed in this work.

Appendix A.1: Ideal and Non-Ideal Measurements
We consider a measurement of a system described by an unknown quantum state ρ S ∈ D(H S ), where D(H S ) represents the set of density-matrices over the Hilbert space H S . We model the measurement as an interaction between the system and a measurement apparatus (pointer) described by a quantum system with Hilbert space H P . We consider the pointer to be initially described by the thermal state τ P (β P ) = exp(−β P H P ) Z P at ambient temperature T P = (k B β P ) −1 and with Hamiltonian i . This ensures that the initial state of the pointer does not contain any extractable work with respect to an environment at temperature T P . Alternatively, one can consider the temperature T P to be lower than the environment temperature, assuming that work has been invested to prepare the pointer by cooling it down to T P . System and pointer are correlated by a unitary U meas on the joint space H S ⊗ H P such that all work supplied to the joint system can be identified with the overall change in average energy due to the unitary transformation, resulting in a post-measurement statẽ Within the pointer Hilbert space, different subspaces are assigned to represent the different measurement outcomes. More specifically, if the system of dimension d S is to be measured in the basis { n ⟩} n=0,...,d S −1 , then a set of orthogonal projectors {Π n } n=0,...,d S −1 on the pointer Hilbert space is chosen to represent these outcomes, such that ∑ n Π n = 1 P and Π m Π n = δ mn Π n and Tr(Π n ) P . d S for all n. The general setup is illustrated in Fig. A.1. The probability for obtaining a measurement outcome n is pn, and the post-measurement system state conditioned on having obtained outcome n is ρn.

A.1.a. Unbiased Measurements
As explained in Sec. II (following Ref. [14]), ideal measurements have three characteristic properties, they are (ii) faithful (perfect correlation between the pointer and system), (i) unbiased (pointer exactly reproduces the system statistics in the measured basis), and (iii) non-invasive (system diagonal is undisturbed by the interaction). However, satisfying property (ii) requires the preparation of pure pointer states, which is not possible with finite resources according to the third law of thermodynamics. At the same time, this implies that realistic non-ideal measurements cannot satisfy both properties (i) and (iii) simultaneously, see Ref. [14,Appendix A.3]. We hence focus on non-ideal measurement procedures that are unbiased, i.e., which satisfy Tr 1 S ⊗ Π nρSP = Tr n ⟩⟨ n S ρ S ∀ n ∀ ρ S . (A.1.2) Provided that the pointer cannot be prepared in a pure state (i.e., that the measurement uses finite resources according to the third law of thermodynamics), the corresponding unitary U meas can be separated into two consecutive unitaries U and V , such that U meas = VŨ , wherẽ Here, { ψ (n) i ⟩} i,n is an orthonormal basis of H P such that Π n = ∑ i ψ (n) i ⟩⟨ψ (n) i and theŨ (n) are arbitrary unitaries on H P , and we have assumed that the dimension d P of the pointer is an integer multiple of the system dimension d S (or is truncated to such a dimension). The intuition behind this decomposition is as follows. The operation V ensures unbiasedness by mapping the subspace corresponding to the system state n ⟩ S to the subspace corresponding to the pointer outcome n (i.e., Π n ), that is, V can be understood as a type of swap between these subspaces. The operatioñ U , meanwhile, adds additional freedom by allowing unitary transformations within each of the subspaces for the states n ⟩ S . To illustrate this transformation, let us consider an example of a 3-dimensional system with non-degenerate Hamiltonian, and a suitable pointer of dimension d P = 3λ for λ ∈ N. The initial state ρ S ⊗ τ P of system and pointer can be expressed in matrix form as where p i = ⟨ i ρ S i ⟩ and the dots indicate potentially nonzero off-diagonal elements of ρ S that are not shown here to keep the example simple, but could be included explicitly if desired. An unbiased measurement procedure realized by a unitary interaction with the pointer then leads to a final joint state of the form The colour coding corresponds to the projections on to the subspaces for fixed outcomes. That is, the operators 1 S ⊗ Π nρSP 1 S ⊗ Π n , can be written as In other words, the 1 S ⊗ Π nρSP 1 S ⊗ Π n for n ∈ {0, 1, . . . , d S − 1} have rank d P and can be understood as d P × d P matrices with the same spectra as p n τ P . They are in this sense unitarily equivalent [via application of the unitariesŨ (n) from Eq. (A.1. 3)] to p n τ P , such that the trace of these operators gives p n , as required by unbiasedness in Eq. (A.1.2). In terms of the indicated diagonal blocks of each subspace for fixed Π n (fixed colour), we have ∑ 2 i=0 Tr(Γ in ) = p n ∀ n. More specifically, since the measurement has to be unbiased independently of the initial system state ρ S , one has to have where ρ n ∈ D(H S ) is the post-measurement system state conditioned on observing the pointer outcome n. The conditional states ρ n correspond to coarse-grainings of the operatorsŨ (n) τ PŨ (n) † in the sense of the equivalence "=" of Eq. (A.1.6). The states ρ n are hence independent of ρ S . We write them as ρ n = ∑ l,l ′ q ll ′ n l ⟩⟨ l ′ with ∑ l q ll n = 1 ∀ n and

. Unbiased Maximally Correlated Measurements
Within the set of unbiased measurement procedures, one may then wish to select those measurements which maximise the correlation measure C(ρ SP ) that is used in property (ii) to define faithful measurements (for which C = 1). For unbiased measurements that are realised unitarily from an initially thermal pointer state, the maximal value C = C max for unbiased measurements is obtained when the d P d S largest eigenvalues of τ P appear as the eigenvalues of the matrices Γ nn for each n. This requires the off-diagonal elements inρ SP connecting the correlated subspaces defined by the projectors n ⟩⟨ n ⊗Π n with the uncorrelated subspaces defined by the projectors m ⟩⟨ m ⊗Π n for m ≠ n to vanish, resulting in a joint state of the form where the remaining blocks in the correlated subspace now satisfy Tr(Γ nn ) = p n C max , see Ref. [14,Eq. (5)]. From Eq. (A.1.7) we can then conclude that the coefficients of the conditional states for unbiased maximally correlated measurements (UMC) satisfy where we have assumed that the eigenvalues of the pointer Hamiltonian are ordered non-decreasingly, i.e., E (P ) i ≥ E (P ) j for i ≥ j, while some of the off-diagonals of ρ n are more restricted, q nl n = q ln n = 0∀l ≠ n. In particular, this last condition implies that the conditional post-measurement state of the system for UMC measurements takes the block-diagonal form where ρ error n is density operator on the Hilbert space spanned by the vectors { m ⟩ S } for m ∈ {0, 1, . . . , d S − 1} n such that ⟨ n ρ error n l ⟩ = ⟨ n ρ error l n ⟩ = 0 ∀ l. The maximal correlation value C max can further be used to quantify the distance between the conditional postmeasurement state ρ n of UMC measurements and the pure state n ⟩. Using the trace distance D(X, Y ) = 1 2 X − Y 1 ≡ 1 2 Tr (X − Y )(X − Y ) † between two operators X and Y , and the block-diagonal structure of ρ n we can calculate

c. Minimal Energy UMC Measurements
One can then further restrict the set of considered unitaries U meas by demanding minimal energy consumption. That is, that the measurement implemented by U meas achieves the algebraic maximum of correlations and spends the least amount of energy as compared with all other unitary operations achieving C max , i.e., A requirement in order to spend the minimum amount of energy in the measurement process is not to waste energy on creating coherences [72]. Conversely, any coherence with respect to energy eigenstate with different energies would imply that there exists a unitary transformation that shifts probability from higher energies to lower energies. In other words, such states would not be passive [46]. For the sake of illustrating the effect on the form of the final state for our example, let us assume that both the system and pointer Hamiltonians are non-degenerate. Then, the final state for a minimal energy UMC measurement must be of the form where all remaining diagonal blocks Γ mn must now be diagonal matrices themselves, and Tr(Γ nn ) = p n C max ∀ n as before. In addition, the energy minimisation imposes constraints on (I) the assignment of the remaining eigenvalues of τ P to the matrices Γ mn for m ≠ n in the uncorrelated subspaces, and (II) on the ordering of the eigenvalues within each specific block. What is crucial here is the observation that (I) corresponds to arranging the eigenvalues of τ P in descending order and splitting the resulting list into three (in general d S ) sets a (0) , a (1) , and a (2) that we can interpret as diagonal (d P d S ) matrices with diagonal elements for k = 1, . . . , d P d S and n = 0, . . . , d S − 1. Minimising the energy while maintaining a UMC measurement then means that the set a (0) of largest entries is assigned to the correlated subspaces, Γ nn = p n a (0) ∀ n, and the other a (i) with i > 0 are assigned to the blocks Γ mn with m ≠ n such that the lower energies are combined with the larger weights (higher values of i). At this point, it becomes useful to switch to a reduced description of the final state that captures only the diagonal blocks Γ ij . We therefore define a quantity we refer to as the correlation matrix Γ = (Γ ij ) in this context, where, as before, the Γ ij are the (d P d S ) × (d P d S ) matrices corresponding to i ⟩⟨ i S ⊗ Π jρSP i ⟩⟨ i S ⊗ Π j . With this notation, the correlation matrix of the final state for a minimal energy UMC measurement takes the form (A.1.16) Alternatively, we may write the correlation matrix elements Γ ij as Γ ij = p j a (π ij ) whereπ = (π ij ) is a d S × d S matrix with entriesπ ij ∈ {0, 1, . . . , d S − 1}. Unbiasedness requires that each element of {0, 1, . . . , d S − 1} appears exactly once in each column ofπ, that is, {π ij } i=0,1,...,d S = {0, 1, . . . , d S − 1}. Achieving maximal correlation C max for an unbiased measurement further fixes the diagonal ofπ, i.e.,π ii = 0 ∀ i. Finally, minimal energy of UMC measurements implies that the off-diagonal elements ofπ are arranged such that the lowest values fill up the top rows (for lowest row index i) ofπ first, that is, for a fixed jπ As we have discussed in Sec. II (following Ref. [14]), non-ideal measurement procedures cannot be both unbiased and non-invasive. However, while one cannot construct an unbiased measurement that is non-invasive for all initial system states ρ S , one can indeed construct unbiased measurements that leave (the diagonal of) certain system states invariant. One case that is of specific interest here (and goes beyond what is considered in Ref. [14]) is the case of UMC measurements, which leave the maximally mixed state ρ S = 1 S d S invariant. For this maximum entropy state, all initial probabilities are the same, p n = 1 d S ∀ n. At the same time, we observe that the diagonal elements ⟨ n Tr P (ρ SP ) n ⟩ of the post-measurement system state are obtained by taking the trace of the sum of the elements of the nth row of the correlation matrix Γ.
We thus observe that such a map, which we call minimally invasive UMC measurements, can be realized if each row of Γ features each superscript index i of a (i) exactly once. Together with the unbiasedness requirement we see that unbiased measurements are minimally invasive if and only ifπ is a Latin square. That is, each row and each column ofπ features each element once and only once. It is interesting to note that any minimal energy UMC measurement can thus be turned into a minimally invasive UMC measurement, and vice versa, by rearranging the entries of the Γ within its columns only. This implies that the additional energy cost for moving away from the energy minimum depends only on the spectrum of the system Hamiltonian, but not on the pointer Hamiltonian. At the same time, this can be done in such a way that the energy is only minimally increased with respect to the minimal energy UMC measurements, obtaining a minimal energy minimally invasive UMC measurement. For the example in d S = 3 discussed above, the correlation matrix for such a measurement takes the form (A.1.17) A property of minimally invasive UMC measurements that follows directly from the form described above is that the conditional probabilities q ll n for the system to be left in the lth energy eigenstate given a pointer outcome n form a doubly stochastic matrix, i.e., As we will see in Appendix A.5, minimally invasive UMC measurements allow satisfying the Jarzynski relation. Finally, a second projective measurement is performed in the eigenbasis { E (f) n ⟩} n=0,...,d S −1 of the final Hamiltonian H (f) , resulting in an outcome m. The aim of the protocol is to estimate the work performed (or extracted) by the process Λ based on the joint probability distribution p(n, m), which itself is estimated by repeating the procedure sufficiently many times. For ideal projective measurements, the joint probability distribution can be written as [21] p(n, m) = p (0) n p n→m , where p (0) n = 1 Z (0) exp(−βE (0) n ) are the diagonal elements of the initial thermal state τ (0) of the system, Z (0) = ∑ n exp(−βE (0) n ) is the partition function w.r.t. the initial Hamiltonian and inverse temperature β. Note that the inverse system temperature β need not match the initial inverse temperature β P of the pointer, which enters C max from Eq. (A.1.10). The symbol p n → m = ⟨ E (f) m U Λ E (0) n ⟩ 2 denotes the transition probability from an initial energy eigenstate E (0) n ⟩ to a final energy eigenstate E (f) m ⟩. The work distribution, i.e., the probability density for performing (or extracting) the work W given the process Λ is defined as On average the work spent or extracted by the process Λ is then obtained by integration, i.e., Let us now consider the TPM scheme when the ideal projective measurements are replaced by non-ideal measurements, more specifically, minimal energy UMC measurements as described in Appendix A.1. We discuss each step of the process in detail below.

A.2.a. First Measurement
First, note that the initial system state for the TPM scheme is a Gibbs equilibrium state at the ambient temperature. That is, here the system state to be measured during the first measurement is ρ S = τ (0) (β), given by n at time t 0 . Then, we assume that the first non-ideal measurement is performed in the eigenbasis of H (0) . We assume that this measurement, though non-ideal, is unbiased [property (i) described in Sec. II.2], such that a measurement result n is obtained with probability p (0) n = ⟨ E (0) n τ (0) E (0) n ⟩ = exp(−βE (0) n ) Z (0) . Moreover, from here on, we restrict our investigation to non-ideal unbiased measurements that achieve maximal correlation C max (UMC measurements) and either have minimal energy or are minimal energy minimally invasive measurements, as described in Appendices A.1.c and A.1.d, respectively, such that the post-measurement state of the system is diagonal w.r.t. the measurement basis, i.e., where q (0) ll n is the the probability to find the post-measurement system in the state E (0) l ⟩ given the measurement result n. In particular, the probability to correctly guess the energy eigenstate E (0) n ⟩, when the pointer shows n is given by q (0) nn n , which has the value for UMC measurements. The conditional probabilities q (0) ll n are functions of the inverse temperature β, and the pointer energies (since the initial pointer state is also a thermal state at ambient temperature T = 1 k B β), but because the measurement is unbiased, the conditional state ρ (0) n is independent of the system state τ (0) before the measurement.
In the scenario in which ideal projective measurements are not assumed, the change in the average energy of the system in the TPM process is also different from the work estimate. Once again, we therefore consider non-ideal minimal energy UMC measurements as described in Appendix A.1. To express the work estimate in this case, let us first define the difference between the energy ∆E non−id at the beginning and at the end of the TPM process where p (f) k is the probability to find the post-measurement system after the second measurement in the eigenstate . This probability can be expressed as where q (f) kk m is the conditional probability to find the system in the final energy eigenstate E (f) k ⟩ given the measurement result m. The conditional probability p(m n) is the probability to obtain outcome m in the second measurement given that the result of the first measurement was n, as in Eq. (A.2.8). Collecting all these expressions, we can rewrite the average energy difference between the initial system state and the system state after the non-ideal TPM scheme as We then split this expression into several sums, where the first collects all terms for which n = l and m = k, i.e., where we have used the shorthand p l → m = ⟨ E (f) m U Λ E (0) l ⟩ 2 and we note that q (0) nn n = q (f) mm m = C max for all n and m, since we are considering UMC measurements. For ideal projective measurements, C max → 1 and consequently q (0) ll n = δ l,n , and therefore one can notice that ∆E non−id (C max → 1) = ⟨W ⟩ Λ .
Appendix A.5: Jarzynski Equality for Non-Ideal Projective Measurements

A.5.a. Characteristic Function and Jarzynski Equality
In [21] it was shown that by taking the Fourier transform of the work probability distribution P (W ) one can define a following characteristic function, which we parametrise by u We can calculate this function explicitly for the non-ideal projective measurement by substituting for the probabilities p(n, m) from Eq. (A.2.10): where ∑ l q (0) ll n E (0) l ⟩ ⟨ E (0) l = ρ (0) n is the post measurement state of the pointer that indicates outcome n with probability p (0) n = exp (−βE (0) n ) Z (0) . Here, we have again restricted our analysis to minimal energy UMC measurements as described in Appendix A.1.
Let us then write which we then use to obtain the characteristic function To calculate the work average ⟨exp(−βW )⟩, we further calculate G(u = iβ) where σ(iβ) = 1 Consequently, Jarzynski's equality is satisfied if ∑ n q (0) ll n = 1, i.e., where ∆F is the free energy ∆F = 1 . The condition ∑ n q (0) ll n = 1 is not generally met for all unbiased measurements, and in particular not by any minimal energy UMC measurements beyond dimension 6 d S = 2. However, minimally invasive UMC measurements discussed in Appendix A.1.d satisfy exactly the desired condition, thus allowing to satisfy the Jarzynski equality, while providing the correct (unbiased) measurement statistics and achieving maximal correlation C max between the pointer outcomes and post-measurement system states.
2. The second step of the backward process consists of driving the system according to the time-reversed protocol parameterized by {λ t = λ t f −t ; 0 ≤ t ≤ t f }, where {λ t ; 0 ≤ t ≤ t f } is a parameterizsation of the forward process. In the time-reversed protocol, the system thus evolves according to where ρ (f) B = ∑ n p (f) n ρ (f) n is the average post-measurement state after the first measurement in the backward process.
3. The last step consists of the second non-ideal measurement in the eigenbasis { E (0) n ⟩} n of H (0) . We are then interested in determining the joint probability P B (m, n) to obtain outcome m in the first and outcome n in the second non-ideal measurement, before and after the backward process, respectively. Given outcome m in the first measurement, the probability for the system to be in an energy eigenstate E (f) k ⟩ is q (f) kk m , and the probability for the backward process to further map the system from the state For non-ideal projective measurements, Crook's relation can be satisfied if we make some changes to the probability distributions, as we shall explain now. To begin, let us consider the work probabilities of the forward and backward process, respectively, i.e., where P F (n, m) is given in Eq. (A.2.10). We then assume that the measurement apparatus in the forward and backward process operates in the same way. More specifically, this means that the pointer is prepared in the same initial state and the same unitary U meas is used to couple system and pointer. In this case, we have q (0) mm n = q (f) mm n ≡ q mm n . As in Ref.
[74], we write the ratio between the joint probabilities of a given transition between E (0) n to E (f) m in the forward and backward process as e −σ(n,m) ∶= P B (n, m) P F (n, m) . (A.6.7) The average of the quantity σ(n, m) defined by this ratio can be seen to be precisely the relative entropy between the probability of the forwards and backwards processes where the relative entropy of two random variables Q and P is defined D(P Q) ∶= ∑ x P (x) log P (x) Q(x) . In order to express the relation between performing or extracting the same amount of work in the forward and backward process, one can substitute (A.6.7) into (A.6. where ∆F = β −1 log(Z (0) Z (f) ) is the equilibrium free energy difference, and the conditional probability to find the state with energy n (m) after the backward (forward) process if initially it was m (n) is P B (n m) = ∑ k p k → n q kk m (P F (m n) = ∑ l p l → m q ll n ). Therefore, a Crook's-like relation for non-ideal projective measurements can be written as where γ(m, n) = log (P F (m n) P B (n m)). If ideal projective measurements are assumed in the estimation process (in other words, if an infinite amount of resources is available) no disturbance is created by the measurements on the system in the forward and backward processes, which implies that q mm ′ n = δ m,m ′ δ m,n , and γ(m, n) = 0. Therefore Eq. (A.6.11) results in the well known Crook's relation (A.6.13)

A.6.b. Irreversibility and Dissipation
Consider a thermal state τ (0) (β) of a system with Hamiltonian H (0) at time t 0 that is driven out of equilibrium by means of the unitary (A.6.14) At time t f , the system is in the (out-of-equilibrium) state ρ (f) = U Λ τ (0) U † Λ , and the Hamiltonian of the system is H (f) . Then the system is coupled again to a thermal bath at temperature T = 1 β, and left to thermalise to the equilibrium state τ (f) (β).
The work dissipated in the driving process, defined as ⟨W ⟩ Λ − ∆F , is the extra amount of energy that is transferred to the bath in the final thermalisation step, leading to entropy production. This energy cannot be reversibly recovered by reversing the protocol. A closed-form expression for this amount of work presented in Ref.
[23] is is the relative entropy between the state ρ F (t) = U Λ (t, 0)τ (0) U † Λ (t, 0) out of equilibrium at time t and ρ B (t f −t) = UΛ(t f −t, 0)τ (f) U † Λ (t f −t, 0) is the state of the system in the backward process. Here UΛ(t f −t, 0) is the unitary evolution generated by the time-reversed protocolΛ. If the process is reversible, ρ F (t) = Θ † ρ B (t f − t)Θ for any 0 ≤ t ≤ t f , and there is no work being dissipated in the process. In particular, the equilibrium state is reached at time t f , that is, ρ (f) = τ (f) . Now, consider non-ideal projective measurements used for work estimation, more specifically, minimal energy UMC measurements described in Appendix A.1. Here, we see that more energy is dissipated in the process because some entropy is produced during the measurement process.
Proposition A.6.1. For work estimation based on non-ideal minimal energy UMC measurements measurements, the work dissipated in the driving process is ) is the entropy change in the system due to the first non-ideal measurement.
Proof. For the TPM scheme with non-ideal measurements, the work estimate is as in Eq. Proposition A.6.3. Assuming non-ideal (minimal energy UMC) projective measurements for work estimation, the work dissipated in the driving process can be written as is the (inverted) state of the system at the same instant of time in the backward process, and we introduced the correction term (A.6.26) Proof. We start from Eq. (A.6.16), adding and subtracting the quantity D(ρ (f) ρ (f) B ) to arrive at Then we use the properties of the quantum relative entropy and the unitary evolution (A.6.14) to write (A.6.29) Proof. Let us consider our system of interest as before along with a thermal bath to which it is coupled. The joint system can be considered to be closed, and Eq. (A.6.25) hence holds for the joint system, i.e., The left-hand side is the same as before as long as work is performed by implementing the protocol Λ only involving system degrees of freedom, whereas the primed quantities on the right-hand side correspond to the global state of system and bath. Notice that assuming that non-ideal measurements are only performed on the system implies that we recover the same terms ∆S 0 and ∆D f . Finally, applying monotonicity of the relative entropy under the partial trace, i.e., S(ρ σ) ≥ S(ρ ′ σ ′ ) for any ρ = Tr bath [ρ ′ ] and σ = Tr bath [σ ′ ], the last inequality is obtained.
Appendix A.7: Two-level system driven by a classical field To illustrate the formalism presented in this work, let us consider a two-level atom driven out of equilibrium by a classical field, described by the Hamiltonian H = H S + H F , where H S = − E S 2 σ z is the atomic Hamiltonian with σ z = 0 ⟩⟨ 0 − 1 ⟩⟨ 1 , and the interaction Hamiltonian is is a classical field with real-amplitude ε F , polarization vector F , phase φ 0 and angular frequency ω F . The atomic dipole is D = d( * S σ + + S σ − ), with d being the dipole strength, and the vector S describes the atomic transition polarization given the energy transition operators σ + = 1⟩⟨0 and σ − = 0⟩⟨1 . After applying the Rotating Wave Approximation (RWA), the Hamiltonian describes a Rabi oscillation with angular frequencyΩ F , i.e., where σ = (σ x , σ y , σ z ) and n = (∆ F u z + Ω F u y ) Ω F with corresponding unit vectors (u x , u y , u z ), and we use units where ̵ h = 1. The angular frequency is defined in terms of atom and field variables as

H ≈Ω
where ∆ F = E S − ω F is the difference between the angular frequency of the field and the energy gap of the atom (recall that ̵ h = 1), and Ω F = 2dε F ( F ⋅ * S ) e iφ0 is the classical Rabi frequency of the atom-field interaction. The transformation generated by the Hamiltonian in Eq. (A.7.1) is a unitary of the form for θ =Ω F t, and t is the duration of the transformation. For the purpose of illustration, let us restrict our further analysis to the resonant case, where ∆ F ≈ 0. This implies n = u y and hence that the transformation U (θ) is a rotation around the y axis andΩ F = Ω F . Further details about this physical system, and a more complete and general scenario can be found in Ref. [77].
Let us now consider a process in which the atom is initially prepared in a thermal state at inverse temperature β S = 1 (k B T S ) with respect to the initial system Hamiltonian H (0) S = −E S σ z 2, i.e., (A.7.4) We then consider the TPM scheme with non-ideal measurements to estimate the work that is performed on the system by the transformation U (θ), where we assume the measurements to be non-ideal but minimal energy UMC measurements (see Appendix A.1.c). After the first measurement, the interaction with the field (H F ) is instantaneously switched on at t = 0, and the field evolves until time t = t f to an out-of-equilibrium state given by ρ S , and the second non-ideal measurement is performed. The work done by the field by means of U (θ) is the energy difference between the initial and final configurations, (A.7.5) However, when we estimate this work using non-ideal measurements, we obtain a different value ⟨W ⟩ non−id . For instance, let us consider minimal energy UMC measurements using a three-qubit pointer that is prepared in a thermal state where H P = − E P 2 σ z = E P 2 1⟩⟨1 − 0⟩⟨0 is the Hamiltonian of each single-qubit subsystem of the pointer and β P = 1 (k B T P ). As discussed before, the maximum correlation created between system and pointer depends only on the preparation of the measurement apparatus, which in this example is the sum of the d P d S = 4 biggest eigenvalues of the pointer, i.e., C max = (1 + 3 exp (−β P E P )) Z 3 P . (A.7.7) Following the approach developed in Sec. A.3, the non-ideal work estimate can be written as where the unconditional post-measurement system state isρ (0) S ∶= ∑ n p (0) n ρ (0) n . The conditional post-measurement system states are ρ (0) n = ∑ l q (0) ll n l⟩⟨l and p (0) 0 = 1 Z S and p (0) 1 = exp (−β S E S ) Z S and Z S = 1 + exp (−β S E S ). The probability q (0) ll n to find the post-measurement state ρ (0) n in a specific eigenstate l ⟩ of the system, depends only on the amount of correlation created between system and pointer, that is, q (0) nn n = C max = The non-ideal work estimate ⟨W ⟩ non−id and its deviation from the ideal work estimate ⟨W ⟩ Λ are shown in (a) and (b), respectively, as functions of θ = ΩF t ∈ [0, 2π], for selected initial temperatures of the pointer, represented by different ratios of the system and pointer temperature, i.e., βP βS = 1, and from βP βS = 150 to 750 in steps of 150. For θ = π 2 and θ = 3π 2 the non-ideal work estimate coincides with the work performed by the process U (θ), independently of the temperature of the pointer. For the purpose of the this illustration, the initial temperature of the system has been chosen to be room temperature TS = 300 K for an energy gap in the microwave regime such that βSES ≈ 1 30, and EP = ES 10.
Given the initial state of the atom in Eq. (A.7.4), the unconditional post-measurement system state evolves as (A.7.11) Figure A.2 (a) shows ⟨W ⟩ non−id as a function of θ = Ω F t for different temperatures of the pointer, where each of the three pointer qubits is assumed to have an energy gap E P = E S 10. The system is taken to be at room temperature T S = 300K initially, with an energy gap in the microwave regime, such that β S E S ≈ 1 30. The pointer is initially at the same temperature as the system, but the pointer can be cooled in order to obtain a better precision in the work estimation as illustrated in Fig. A.2 (b). For θ = Ω F t = π 2 and θ = 3π 2, the non-ideal work estimate coincides with the work realised by the process U (θ) independently of the temperature of the pointer. However, for θ = π one notices that the deviation ⟨W ⟩ Λ − ⟨W ⟩ non−id of the work-estimate from its ideal value ⟨W ⟩ Λ has the same order of magnitude as ⟨W ⟩ Λ for a pointer at temperature close to room temperature, β P β S = 1, where we find that ⟨W ⟩ Λ − ⟨W ⟩ non−id ⟨W ⟩ Λ = 0.49875. Indeed, for values of θ close to integer multiples of 2π, the non-ideal estimate can even be arbitrarily far away from the ideal estimate (which vanishes at these points) in the sense that ⟨W ⟩ Λ − ⟨W ⟩ non−id ⟨W ⟩ Λ diverges as θ → 2π. In other words, if the temperature of the pointer is not taken into account in the work-estimation, the imprecision of the estimate can be as bigger than the work performed or extracted by the process U (θ). In these cases U (θ) satisfies the condition in Eq. (A.3.9). At the same time, we note that, since we consider the special case of a qubit system, the minimal energy UMC measurements we consider are also minimally invasive, meaning that Jarzynski's relation is satisfied for all θ and β P β S .
Let us now consider the energy spent to perform the measurements in the TPM process in the first place, which is given by ∆E TPM ∶= ∆E (0) meas + ∆E (f) meas . The contributions from the two respective measurements are where H P i is the Hamiltonian for qubit i (for i = 1, 2, 3) and we have assumed that the pointer is prepared in the same initial state for both measurements. The statesρ (0) SP andρ (f) SP are the joint system-pointer post-measurement states after the two respective measurements, as in Eq. (A.1.14), for the initial state ρ (0) S at t = 0, and the final state at t = t f is ρ (f) S = ρ S (θ). In Fig. A.3 we plot ∆E TPM as a function of the initial temperature of the pointer for two distinct durations of the driving protocol. We notice that there is no discernible dependence of ∆E TPM on the duration of the protocol. Furthermore, we calculate the energy cost of cooling the pointer within the single-qubit refrigerator paradigm [33, 34]. The energy cost ∆E TPM to perform the (non-ideal) TPM measurements is shown in units of ES as a function of the ratio between the temperatures of the system and pointer βP βS = TS TP , where the system is assumed to be at room temperature TS = 300K initially, for two exemplary durations θ = ΩF t = π 2 and θ = ΩF t = π of the driving protocol. We see that there is no discernible dependence on θ = ΩF t. More importantly, the inset plot shows the energy cost ∆E Cool (in units of ES) for cooling the pointer from 1 βS to 1 βP ≤ 1 βS as a function of the ratio βP βS.
For a refrigerator with an energy gap E F , the energy needed to cool the pointer from a temperature 1 β S to the lower temperature 1 β P is at least where N is the number of qubits to be cooled, and E F = E P β P β S . In the example we consider N = 3 for each measurement and E P = E S 10. From Fig. A.2, we see that for θ = π and β P β S ≥ 750, the deviation of the nonideal work-estimate from the ideal one is nearly half as big as ⟨W ⟩ Λ , but ⟨W ⟩ Λ − ⟨W ⟩ non−id < 0.01E S . However, as illustrated in Fig. A.3, the energy cost for cooling the pointer such that β P β S = 750 is more than two times E S . In other words, the energy cost of cooling the pointer to the required temperature can outweigh ⟨W ⟩ Λ by orders of magnitude. That is, the cost of estimating the work done by a physical process can by far exceed the amount of work that is done or consumed during the process.