The role of quantum measurement in stochastic thermodynamics

This article sets up a new formalism to investigate stochastic thermodynamics in the quantum regime, where stochasticity and irreversibility primarily come from quantum measurement. In the absence of any bath, we define a purely quantum component to heat exchange, that corresponds to energy fluctuations caused by quantum measurement. Energetic and entropic signatures of measurement-induced irreversibility are then explored for canonical experiments of quantum optics, and the energetic cost of counter-acting decoherence is studied on a simple state-stabilizing protocol. By placing quantum measurement in a central position, our formalism contributes to bridge a gap between experimental quantum optics and quantum thermodynamics, and opens new paths to characterize the energetic features of quantum processing. Measuring a quantum system is an ultimately random operation. It induces a genuinely quantum time arrow, increasing the system’s entropy. But because it perturbs its state, quantum measurement also provides energy to the quantum system. These energetic quantum fluctuations play the same role as thermal fluctuations in thermodynamics, while being of quantum nature. Building on such “Quantum Heat”, a group of scientists from france provided a thermodynamic analyzis of canonical experiments of quantum optics. They show that quantum heat is a major concept to evaluate the performances of a basic protocol to counteract the decoherence of a quantum bit. The findings pave the way towards a new generation of quantum engines, powered by quantum measurement. They bring new tools to investigate the energetic cost of quantum protocols performed at ultra-low temperature, in the presence of decoherence.


INTRODUCTION
Thermodynamics arose in the 19th century as a powerful theory to optimize thermal engines, 1 i.e. the extraction and storage of energy from thermal baths into batteries, by exploiting the transformations of a driven working fluid (Fig. 1a). This initially applied area of physics gave rise to fundamental concepts like thermodynamic time arrow: The irreversibility of a transformation is quantified by the entropy production, which must be positive according to the second law of thermodynamics. In this classical framework, irreversibility and work extraction are tightly related, optimal work extraction being reached for reversible transformations.
Later on, stochastic thermodynamics extended these results at the microscopic level; heat, work and entropy are now defined for single trajectories followed by the system in its phase space. 2,3 In particular, this framework accounts for the robustness of thermodynamic irreversibility, despite the reversibility of the physical laws at the microscopic scale; 4, 5 because of the coupling to a stochastic entity like the thermal bath, the system's evolution is randomly perturbed, which breaks its reversibility. Time reversal leads to define the entropy produced in a single trajectory Δ i s, and to the central Fluctuation Theorem (FT) he ÀΔis i¼ 1. The second law of thermodynamics and other celebrated FTs such relations in refs 6, 7 then appear as particular cases of this central FT, highlighting the unifying strength of stochastic thermodynamics.
Recently, these results have started being revisited in the quantum regime, where the working fluids, baths and batteries of thermodynamics are quantum entities. This emerging framework brings out new questions, e.g. related to the work value of quantum coherence and entanglement, [8][9][10][11] or the nature of irreversibility at the quantum scale. 12,13 Extensions of the second law, especially of FTs, to the quantum regime, have been studied in various situations, 14,15 while quantum trajectories were proposed as a promising operational tool to record such quantum FTs. [16][17][18] In this picture, quantum measurement most often plays an informational role, such as in Maxwell's demon setups. 19 However quantum measurement is also a stochastic process that randomizes a quantum system's evolution, causing irreversibility. 20 While in classical thermodynamics, irreversibility has a clear energetic imprint, e.g. that alters the efficiency of heat engines, in quantum thermodynamics, energetic signatures related to measurement induced irreversibility and to the erasure of quantum coherences have remained elusive so far.
Here we suggest a new framework for quantum thermodynamics, where energetic aspects of such genuinely quantum irreversibility become easily understandable in terms of operational quantities. Our approach is based on the idea that a thermal bath in classical thermodynamics and a measuring apparatus in quantum mechanics play similar roles, i.e. are sources of stochasticity and irreversibility in the system's evolution. Our first goal is thus to build a "thermodynamics without bath", where stochasticity primarily comes from quantum measurement: This corresponds to the textbook situation of quantum mechanics where a driven system is solely coupled to a measuring device (Fig. 1b). We introduce new definitions for stochastic thermodynamic quantities, and especially introduce the key concept of quantum heat, which is identified with stochastic energy fluctuations taking place during a quantum measurement. Building on this analogy, we then extend our framework to the case of quantum open systems (Fig. 1c), where quantum thermodynamics was originally developed. Finally, we exploit this formalism to analyze energy, entropy and information transfers in two standard situations of quantum optics: The spontaneous emission of a Qubit and a state-stabilizing protocol.

Measurement based stochastic thermodynamics
We first introduce new definitions for thermodynamic quantities, considering the ideal situation pictured in Fig. 1b: A quantum system S is studied between the initial time t 0 and the final time t N . S is driven by the Hamiltonian H s (t), and undergoes projective measurements from the device M of eigenbasis f m K j ig and eigenvalues fm K g. The set of eigenvalues is taken as discrete and their number is bounded by the dimension of the system's Hilbert space N s . The measurements are performed at discrete times {t n } 1≤n≤N , defining a set of stochastic records fm KγðtnÞ g. Finally, the measurement basis can change in time, but we shall not explicitly write this time-dependence. Let us suppose the initial state is a known pure state |ψ 0 〉. If the measurement outcomes are read, the system remains in a pure state |ψ γ (t)〉 at any time: At time t n , the system's state is stochastically projected on the pure state ψ n j i ¼ jm KγðtnÞ i, and until time t n+1 , the system follows a Hamiltonian evolution ψ γ ðtÞ ¼ Gðt; t n Þ ψ n j i. We have introduced Gðv; uÞ ¼ T expðÀ i h R v u dtH s ðtÞÞ as the evolution operator between time u and v, T being the time-ordering operator. |ψ γ (t)〉 features an elementary quantum trajectory γ, that is perfectly defined by the measurement outcomes and the knowledge of the applied Hamiltonian. This trajectory is the quantum analog of the classical trajectories studied in stochastic thermodynamics, but in the present case the stochasticity primarily comes from quantum measurement.
If the measurements are not read, the system's state is described by the density matrix ρ s (t), which is recovered by averaging the system's stochastic states over all possible trajectories, at any time: ρ s ðtÞ ¼ hjψ γ ðtÞihψ γ ðtÞji γ ¼ P γ P d ½γ ψ γ ðtÞ ψ γ ðtÞ . We have introduced the probability of the trajectory γ: jhψ nþ1 jGðt nþ1 ; t n Þjψ n ij 2 . p d (ψ 0 ) stands for the probability of the pure initial state, and equals 1 if the state is known. It fulfils p d (ψ 0 ) < 1 if the state is picked from a statistical mixture of orthogonal states fψ k g N s À1 k¼0 ¼ B 0 : Such mixture can be prepared, e.g. by performing some projective measurement of an unknown state in the basis B 0 before the transformation starts. After a measurement has been performed at time t k , the system's mean density matrix is diagonal in the eigenbasis of M. In particular at t = t N , it writes Measurement induced irreversibility The quantum trajectory picture highlights the irreversible character of a quantum measurement: Starting from the pure state |ψ 0 〉 and applying the above protocol, we end up in the final state |ψ γ (t N )〉 = |ψ N 〉. Other trajectories can lead to the same final state, whose final probability equals π KγðtNÞ . Reciprocally, we consider the reverse protocol defined by picking the initial state |ψ N 〉 with probability p r ðψ N Þ ¼ π KγðtNÞ , applying the time-reversed Hamiltonian H s (t N −t) of corresponding evolution operator G r , and performing discrete measurements at times t N−n : Such reverse protocol generally does not prepare back the state |ψ 0 〉. The irreversibility associated to γ is quantified by the entropy Δ i s[γ] produced along the trajectory: Denoting P r [γ r ] the probability of the time-reversed trajectory γ r : |ψ γ (t N −t)〉 in the reverse protocol, the entropy production is defined as Averaged over all trajectories, Eq. 2 obeys by construction the central FT he ÀΔis½γ i γ ¼ P γ P d ½γe ÀΔis½γ ¼ 1, and consequently the Second Law by convexity of the exponential 〈Δ i s[γ]〉 γ ≥ 0. Such entropy production can always be split into two components involving a boundary term Δ b i s½γ and a conditional term Δ c i s½γ, with a) b) c) Fig. 1 a The scenery of thermodynamics: A system S deterministically exchanges work W with an operator/battery O and stochastically exchanges heat Q with a bath/reservoir R. The system's evolution is randomly perturbed by the thermal bath, which is symbolized by the dice k b . b "Thermodynamics without bath": a driven quantum system undergoes projective quantum measurements at discrete times. Here the evolution of the system is randomized by the measuring device M, which is symbolized by the dice ħ. Energetic fluctuations induced by quantum measurement are identified with some heat exchange of quantum nature Q q . In the case of a stabilizing protocol, this quantum heat exchange must be exactly compensated by the work W fb performed by a feedback source F . c Quantum open systems: a driven system S is coupled to a Markovian reservoir R, itself monitored by a measuring device M. The exchanges of heat can be of classical (Q cl ) or of quantum nature (Q q ), and respectively correspond to the classical and quantum energy fluctuations induced by the coupling to the reservoir and Δ c i s½γ ¼ log We have introduced the conditional probability P r [γ r |ψ N ] = P r [γ r ]/ p r (ψ N ). As jhψ nþ1 jGðt nþ1 ; t n Þjψ n ij 2 ¼ jhψ n jG r ðt n ; t nþ1 Þjψ nþ1 ij 2 , the conditional term reduces to 0. As stated above, p d (ψ 0 ) = 1 as the initial state is known, while p r ðψ N Þ ¼ π KγðtNÞ . We get eventually Δ i s½γ ¼ À logðπ KγðtNÞ Þ. The expression for the mean entropy production writes where S VN ½ρ s ðt N Þ ¼ À P K π K logðπ K Þ is the Von Neumann entropy of the final mixed state. 20 By relating the change of the system's Von Neumann entropy to a well-defined, thermodynamic entropy production, Eq. 5 allows quantifying the degree of irreversibility of a given measurement process. Contrary to the entropy produced during the relaxation in some heat bath, which can diverge as temperature approaches zero, here the measurement entropy is bounded by Δ i S max ¼ À ln N s . From this study, it appears that quantum measurement is reversible, solely if the measurement process preserves the Von Neumann entropy of the system. If the outcomes are recorded, this means that measuring should not have any effect on the system's pure state. If the outcomes are not recorded, measuring should not induce any decoherence in the system's state. From an information-theoretic point of view, this result suggests that measuring a given quantum state is all the more irreversible as the measurement outcomes are less predictable. Reciprocally, a measurement is reversible if its result is certain.

Thermodynamic quantities
We now investigate the energetic implications of measurementinduced irreversibility. To do so, we introduce the quantum analog to the system's internal energy, as the expectation value of the system's Hamiltonian if the system is in the pure quantum state |ψ γ (t)〉 This quantity is generally understood as the average of some energy measurement performed on identical copies of the system. Energy fluctuations of quantum nature appear if the system is in a superposition of energy eigenstates. Consequently, the energy is said to be well defined, solely if the system's state is an energy eigenstate, to which the above definition is thus usually restricted. 14,15 Here we extend this definition to any quantum state of the system's Hilbert space. It is still an operational quantity, as it can be fully reconstructed provided that the system's quantum trajectory and the applied Hamiltonian are known. In what follows, we use this quantity as our thermodynamic potential: As U γ (t) is homogeneous to an energy and characterizes the system alone, we shall simply call it internal energy. Let us underline that reconstructing quantities is often required in stochastic thermodynamics, e.g. heat and work exchanged during classical trajectories are inferred from the record of the system's evolution. 21 Using Eq. 6, the system's internal energy is defined for any quantum superposition of energy eigenstates, at any time of the quantum trajectory. In particular, it now takes a definite value after and before a quantum measurement, a mandatory condition to observe any energetic imprint related to the measurement process.
"Heat" and "work" are then defined by analogy with the classical situation: The work exchanged along the trajectory W[γ] (resp. the heat Q[γ]) is identified with deterministic energy changes during the Hamiltonian evolution (resp. stochastic energy changes induced by measurement): Q½γ ¼ t þ n (resp. t À n ) stands for the time immediately after (resp. before) the time t n of the measurement. Work quantifies the energy exchanged with the driving source and vanishes if the Hamiltonian is time-independent. The elementary work performed during time dt corresponds to a system's Hamiltonian variation dH s (t) and writes: On the other hand, "heat" solely appears if the measurement process induces some evolution of the system's state, such that Note that this quantity has no classical equivalent, it is solely due to genuinely quantum energy fluctuations, which can take place at zero temperature. Therefore we shall simply call it "quantum heat", denoted in the following Q q [γ]. This quantity already appears in, 20 its physical origin being qualified as "obscure". Actually, each situation can give rise to a detailed energy balance accounting for the quantum heat contribution (see the Supplementary for an example of such analysis). But more simply, the quantum heat appears as a natural byproduct of the standard quantum formalism, as soon as Eq. 6 is used. In this sense, it can be seen as a straightforward thermodynamic consequence of the measurement postulate, by which a quantum system coupled to a measuring device is actually an open system. In what follows, we shall therefore not search for further microscopic justifications of the quantum heat, but rather treat it as an energetic imprint of measurement induced wave-function collapse, and a key concept to reveal genuine quantum features.

Properties of quantum heat
For the sake of clarity we consider the case where the driving source is switched off, such that the system's Hamiltonian H s is constant and no work is exchanged. A two-points trajectory γ is defined by preparing the system in the arbitrary state |ψ 0 〉 of internal energy U 0 and measuring it in the basis f m K j ig. During the measurement, the system eventually jumps to the state m Kγ of energy U Kγ ; provided that the eigenstates f m K j ig have different internal energies, a jump can give rise to different quantum heat contributions Q q ½γ ¼ U Kγ À U 0 . Repeating this experiment many times allows reconstructing a normalized distribution of quantum heat P½Q q ¼ P γ P d ½γδ D ðQ q À Q q ½γÞ where δ D stands for the Dirac distribution. The example of a Qubit is pictured in Fig. 2. The distributions of quantum heat P[Q q ] and entropy production P½Δ i s ¼ P γ P d ½γδ D ðΔ i s À Δ i s½γÞ have non zero components, solely if |ψ 0 〉 has coherences in the basis f m K j ig, such that quantum measurement induces some finite evolution of the system's state. On the contrary, both distributions are delta-peaked at zero if |ψ 0 〉 is randomly picked from a statistical ensemble of eigenstates f m K j ig. Non zero components in the distributions of quantum heat and entropy production are therefore contemporary phenomena, that can be seen as the energetic and entropic signatures of measurement induced irreversibility. Formal relations between the two distributions can be drawn, e.g. in the case of the quantum Jarzynski's equality (See Supplementary).
If the measured observable M commutes with the system's Hamiltonian, we obviously have hU Kγ i γ ¼ U 0 , such as the average quantum heat vanishes: hQ q ½γi γ ¼ P γ P d ½γQ q ½γ¼ 0. On the contrary, if M and H do not commute, performing a measurement changes the system's average internal energy (Fig. 2d). Remarkably The role of quantum measurement C Elouard et al here, measuring can provide energy to the system, strengthening the analogy between a heat bath and a measuring apparatus. Such mechanism can be further exploited, e.g. to develop genuinely quantum engines, driven by quantum measurement. 22 Generalized measurements and quantum open systems The framework presented above can be extended to generalized measurements, such as weak or destructive measurements. Here the number of measurement outcomes is not bounded by the dimension of the system's Hilbert space, in particular their set can be continuous. Recording the outcome m K results in applying the so-called Kraus operator M K on the system's quantum state |ψ〉. 23 This event occurs with a probability p K ¼ hψjM y K M K jψi, and the set of Kraus operators fM K g satisfies P K M y K M K ¼ 1. If the outcomes are not read, the system's state becomes mixed, and its evolution under the measurement process is described by the completely positive trace-preserving map ρ s ! P K M K ρ s M y K . Generalized measurements provide fruitful insights into the physics of quantum open systems. Such systems are at the core of most physical situations currently studied in quantum thermodynamics, e.g. the coupling of a quantum system to a thermal bath, 14,15 or the continuous measurement of a Qubit, 24 on which we shall focus from now on. The most general equation describing the average evolution of such open system is the Lindblad master equation We have introduced the Lindbladian superoperator k¼1 Γ k ðL k ρ s L y k À 1 2 fρ s ; L y k L k gÞ expressed in term of at most N 2 s À 1 Lindblad operators {L k } acting on the system's Hilbert space and rates γ k . Because of the driving source, the Lindbladian may also depend on time, 25-27 but we shall not systematically write this time-dependence in the following. It is always possible to rewrite the evolution generated by Eq. 10 as some generalized measurement performed on the quantum system at each time step dt, that involves a set of Kraus operators fM K g: This process can be interpreted as the result of some unrecorded, continuous measurement performed on a Markovian reservoir weakly coupled to the system, with stochastic outcomes m K (Fig. 1c). The choice of a given detection scheme unambiguously fixes the set of Kraus operators and the so-called unraveling of the master equation. For a Quantum Jump (QJ) unraveling, the set of measurement outcomes is discrete and bounded to N 2 s . In this case the set of Kraus operators consists of at most N 2 s À 1 "jump" operators, corresponding to a macroscopic evolution of the system's state, i.e., a QJ. Each jump is described by one of the Lindblad operator L k and fulfils: The set of Kraus operators also contains a "no-jump" Fig. 2 Distributions of quantum heat P[Q q ] for simple protocols defined by the preparation and measurement of a Qubit in arbitrary bases {|+ θ 〉;|− θ 〉}, with þ θ j i ¼ cosðθ=2Þ e j i þ sinðθ=2Þ g j i and À θ j i ¼ À sinðθ=2Þ e j i þ cosðθ=2Þ g j i. |e〉 and |g〉 are the excited and ground states of the Qubit of respective internal energies U e ¼ ħω 0 =2, and U g ¼ Àħω 0 =2. a, b Energetic and entropic signatures of quantum measurement. a The Qubit is either prepared in the pure state |ψ 0 〉 = | + θ 〉 of internal energy U þ θ ¼ ħω0 2 cos 2 ðθÞ (dark blue arrow) or picked from a mixture ρ 0 of the states |e〉 and |g〉 with respective probabilities cos 2 ðθ=2Þ and sin 2 ðθ=2Þ (red arrow). The Qubit is then measured in the {|e〉;|g〉} basis. b Normalized distribution of entropy production P[Δ i s] and of quantum heat P[Q q ] for θ = π/3. P[Q q ] has non zero components if the initial state is |ψ 0 〉, corresponding to U e À U þθ ¼ sin 2 ðθ=2Þ (if the Qubit is measured in |e〉), and to U g À U þθ ¼ Àcos 2 ðθ=2Þ (if the Qubit is measured in |g〉). In the same case, entropy production distribution also features two peaks. P[Q q ] and P[Δ i s] are delta-peaked at zero (red bar) if the initial state is randomly picked from ρ 0 . In both cases, the average quantum heat 〈Q q 〉 γ is zero. c The Qubit is prepared in the pure state |ψ 0 〉 = |e〉 (dark blue arrow) and measured in the {|+ θ 〉, |− θ 〉} basis. d Average quantum heat 〈Q q 〉 γ (solid blue) and average entropy production 〈Δ i s〉 γ as a function of θ. The mean quantum heat is null, solely if the measurement and Hamiltonian eigenbases commute (θ = 0). In all plots, we took h ¼ 1 k¼1 Γ k L y k L k is the effective (non-hermitian) system's Hamiltonian.
Reciprocally, the readout of some continuous observable of the reservoir corresponds to the quantum state diffusion (QSD) unraveling. In this case, the set of Kraus operators is also continuous: The record of some outcome between K and K þ dK gives thus rise to some infinitesimal evolution of the system's state captured by M K : 28, 29 In this situation, all the jumps described by L k take place with a weight determined by the so-called Wiener increment dw K k ðtÞ, whose distribution over all possible trajectories satisfies Whatever the unraveling, knowing the initial state |ψ 0 〉 of the system and the complete measurement record m KγðtÞ allows the full reconstruction of the system's quantum trajectory |ψ γ (t)〉: The state |ψ γ (t + dt)〉 is obtained by applying the operator M KγðtÞ to the system's state, and then renormalizing. The evolution of |ψ γ (t)〉 can be formulated in terms of a stochastic Schrödinger equation (see Methods). Again the density matrix solution of Eq. 10 is recovered by averaging over the trajectories: ρ s (t) = 〈|ψ γ (t)〉 〈ψ γ (t)|〉 γ . Such interpretation is the historical way in which quantum trajectories were introduced. 30 Remarkably in this picture, the reservoir is seen as a part of some monitoring channel extracting information on the system, and the stochasticity in the system's evolution primarily comes from quantum measurement, just like in the ideal situation presented above. Owing to impressive progresses in detection efficiencies, experimental reconstruction of quantum trajectories is nowadays state of the art, as demonstrated by series of pioneering results obtained with trapped ions, 31 and later on in Cavity Quantum ElectroDynamics ref. 32 and circuit QED. [33][34][35][36] Thermodynamic quantities for quantum open systems The system's internal energy U γ (t) and work increment δW γ (t) during time dt are still defined by Eq. 6 and 9, respectively, while the heat increment is defined as δQ γ (t) = dU γ (t)−δW γ (t). Both the work and the heat increment can be expressed as the expectation value of some work/heat operator, taken in the system's quantum state ψ γ ðtÞ ¼ P N s i¼1 ψ i ðtÞ i j i (see Methods). The choice of a specific basis B ¼ f i j ig to write |ψ γ (t)〉 allows splitting the heat and work increments into a classical and a quantum contribution, the later vanishing if the coherences ψ Ã i ψ j of the system's state are zero. While the work component still quantifies the energy exchanged with the driving source, the heat contribution now involves two mechanisms by which the system's energy can change: The deterministic non-Hermitian evolution and the stochastic QJs. These two mechanisms catch an essential difference with respect to classical thermodynamics, namely, that the reservoir plays a double role: it does not only exchange energy with the system like a regular bath, but it also extracts information on the system's state, erasing its coherences like a measuring apparatus. In this spirit, B can always be chosen, such that the classical and quantum heat respectively reflect the classical and quantum energy fluctuations induced by the reservoir.
To fix the ideas, let us consider a QJ unraveling, where each jump operator M K ðK ! 1Þ is defined as The set of orthogonal states f iðKÞ j ig of respective internal energies ϵ iðKÞ defines a natural basis B. Each jump consists in a projection on the state iðKÞ j i, followed by the transition iðKÞ j i! jðKÞ j i, such that the whole process can be seen as a destructive measurement of the state iðKÞ j i. In this spirit, let us consider the pure initial state |ψ 0 〉 of internal energy U 0 . The jump K occurs with a probability Γ K dtjhiðKÞjψ 0 ij 2 and gives rise to a total heat exchange Q ¼ ϵ jðKÞ À U 0 . This heat exchange can always be rewritten as Q cl ðKÞ þ Q q , where Q q ¼ ϵ iðKÞ À U 0 is the quantum energy fluctuation induced by the projection on the state iðKÞ j i, and Q cl ðKÞ ¼ ϵ jðKÞ À ϵ iðKÞ is usually interpreted as the classical energy exchange with the reservoir. The value of Q cl ðKÞ is fixed by the jump, while Q q can take any value. Just like in the ideal situation, the quantum heat solely shows up if the initial state |ψ 0 〉 carries coherences in the basis B.

Irreversibility of quantum trajectories
The entropy produced by the trajectory γ is still defined by Eq. 2, where the reverse protocol consists in applying the time-reversed Hamiltonian H s (t N −t) while the reservoir is continuously monitored. The conditional terms P d [γ|ψ 0 ] and P r [γ r |ψ N ] now equal the probability of the sequence of jumps corresponding to the direct/reverse protocol respectively: 28 We have discretized the time interval and defined the times t n = t 0 + ndt at which the measurements are performed on the reservoir. |ψ N 〉 stands for the final state of the direct trajectory. So far quantum FTs have systematically involved protocols including some final projective measurement, 14,20 where |ψ N 〉 is the corresponding eigenstate. In the present framework, the considered trajectories do not necessarily end up with such a projective measurement: Then |ψ N 〉 is the final state of the stochastic quantum trajectory.
We have introduced the time-reversed Kraus operators M r K . Their definition is well established in the case of thermal fluctuations induced by some heat bath of inverse temperature β. This situation is usually described by a QJ unraveling. Introducing the thermal equilibrium state π s ¼ Z À1 expðÀβH s Þ where Z is the canonical partition function, the time-reversed Kraus operators giving rise to a jump ðK ! 1Þ write ref. 37 which simplifies into The time-reversed Kraus "no-jump" operator is These expressions guarantee that if the system is at equilibrium, a sequence of two consecutive jumps in the direct protocol occurs with the same probability as the reverse sequence of timereversed jumps in the reverse protocol. If the temperature is finite, this set of time-reversed operators allows deriving the quantum Jarzynski's equality for quantum open systems (see Supplementary). In what follows we rather focus on the less investigated zero temperature case: In this case only the jumps giving rise to a negative classical heat contribution can occur, and lead to a divergence of entropy production. This characterizes for instance the spontaneous emission of a Qubit (see below).
The role of quantum measurement C Elouard et al Equation 19 can also be used to derive the time-reversed operators corresponding to the continuous monitoring of some system's observable X, in the absence of any thermal bath. Here π s is a state invariant under the measurement process, verifying [π s , X] = 0. Such continuous measurement is described by a QSD unraveling involving a single Lindblad operator X = L 1 characterized by the Wiener increment dw(t) = dw 1 (t). 38 The direct and reverse Kraus operators corresponding to the outcome K write and We have introduced the decoherence rate Γ * , which quantifies the strength of the measurement per unit of time. These expressions allow in particular quantifying the irreversible character of a continuous measurement. Just like in the case of projective measurements, the conditional term Δ c i s½γ appearing in Eq. 2 vanishes. In the standard case where projective measurements are performed in the beginning and at the end of the protocol, the mean entropy production writes We now exploit our formalism to analyze two typical situations of quantum optics: The spontaneous emission of a Qubit prepared in a coherent superposition of energy eigenstates, and the stabilization of a quantum state by feedback protocol.
Thermodynamics of spontaneous emission At the initial time t 0 , a Qubit of respective ground and excited states |g〉 and |e〉 with transition frequency ω 0 is prepared in the quantum superposition þ x j i ¼ ð e j i þ g j iÞ= ffiffi ffi 2 p . The Qubit is coupled to a zero temperature reservoir monitored with a photo-counter. This corresponds to a QJ unraveling involving a single jump operator M 1 ¼ ffiffiffiffiffiffi ffi Γdt p σ À , where σ − = |g〉〈e| is the lowering operator and Γ the spontaneous emission rate. 23 The effective Hamiltonian writes H eff ¼ ħðω 0 À iΓ=2Þσ þ σ À , where σ þ ¼ σ y À . The Qubit's trajectories are computed between t 0 = 0 and t N = t, the typical monitoring time dt verifying dt ( Γ À1 . There are two classes of trajectories giving rise to two possible final states |ψ N 〉. In the "jump" trajectories, the Qubit relaxes to the ground state by emitting a photon, such that |ψ N 〉 = |g〉, which happens with a probability p j (t) = (1−e −γt )/2. Reciprocally the "no-jump" trajectory occurs with the probability p nj (t) = (1 + e −γt )/2: The Qubit deterministically evolves under H eff until t = t N , such that the final state writes . Remarkably for t ) Γ À1 , the Qubit also ends up in the ground state, while no photon has been emitted: Just like recording a click, not detecting a photon increases the knowledge on the system's state. Eventually, the whole process of spontaneous emission at large times t ) Γ À1 can be seen as a measurement of the Qubit in its energy basis, recording (resp. not recording) a click boiling down to measuring the Qubit in |e〉 (resp. |g〉). Such measurement process is destructive as the Qubit always ends up in |g〉. Remarkably at finite times the measurement is performed between two non-orthogonal states, i.e. |e〉 (if a click is recorded) and |ψ nj (t)〉 (if no click is recorded).
We have analyzed the energetic and entropic signatures of this non-ideal measurement process (See Methods and Fig. 3). The jump induces an exchange of classical heat Q cl ¼ Àħω 0 , which remains null for the no-jump trajectory. After the jump, the quantum heat equals Q q ¼ ħω 0 =2, which is consistent with the Qubit being measured in |e〉. Reciprocally along the no-jump trajectory, Q q converges towards Àħω 0 =2 for t ) Γ À1 , which corresponds to a measurement in |g〉. Entropy production is computed using Eqs 2, 3 and 4. As long as no jump takes place, the conditional term Δ c i s½γðtÞ defined by Eq. 4 equals 0 as the evolution is deterministic. It diverges as soon as a click is recorded, which is typical of spontaneous emission as argued above.
Interestingly, the boundary term remains finite in any case, verifying Δ b i s½γðtÞ ¼ À log½p nj ðtÞ (resp −log[p j (t)]) for the no-jump trajectory (resp. for any jump trajectory). The average boundary term for entropy creation therefore writes Δ b i SðtÞ ¼ hΔ b i s½γi γ ðtÞ ¼ H½p nj ðtÞ, where H½p ¼ Àp logðpÞ À ð1 À pÞ logð1 À pÞ stands for the Shannon's entropy. This entropy quantifies the information acquired at time t, i.e. the measurement into one of the two non-orthogonal states |e〉 or |ψ nj (t)〉. For t ) Γ À1 , |ψ nj (t)〉 converges towards |g〉 and the two states become orthogonal, such that Δ b i S converges towards S VN ½ρ s ðtÞ ¼ logð2Þ.
Work cost of a feedback protocol We now investigate the energetic requirements to perform a state-stabilization protocol. A Qubit prepared in |+ x 〉 is weakly monitored in the {|e〉, |g〉} basis, giving rise to a continuous, stochastic measurement record y γ (t). Under the monitoring, the system's state evolves by infinitesimal QJs towards |e〉 or |g〉 within a typical decoherence time Γ *−1 . Here the coupling to a thermal bath is neglected and we solely consider the stochastic perturbation induced by the decoherence process. This situation is described by a QSD unraveling involving a single Lindblad operator L z ¼ ffiffiffiffi ffi Γ Ã p σ z . 39 Introducing the Wiener increment dw γ ðtÞ ¼ y γ ðtÞ ffiffiffiffiffiffiffi 4Γ Ã p dt, 38 the system's evolution is ruled by the stochastic Schrödinger equation: During a time step, the increment of internal energy writes (See Methods) Such energy fluctuations are all the larger as the measurement strength Γ * and the Qubit's coherences |〈σ − 〉| are large. They vanish when the Qubit's state has converged into one of the stable points |e〉 or |g〉 where measurement is completed. Once integrated between 0 and t ) Γ ÃÀ1 , the quantum heat and internal energy change converge towards ΔU½γ ¼ Q q ½γ ¼ ± ħω 0 =2 as the Qubit's state is approaching |e〉 or |g〉.
In order to counteract decoherence, the measurement record is continuously sent to a feedback source F , which subsequently stabilizes the state ψ þ ðtÞ ¼ e Àiω0tσz=2 þ x j i by driving the Qubit with the Hamiltonian H fb = g(t)σ y . We assume the response time τ fb of the feedback loop is much shorter than the typical monitoring time, τ fb ( dt. We have studied the trajectories followed by the Qubit under monitoring and feedback, between the initial time t 0 = 0 and t N = t. Each jump at time t k gives rise to a quantum heat increment δQ q [γ](t k ), which must be compensated by some work increment δW fb [γ](t k ) for the state to be stabilized. The trajectory γ thus gives rise to two normalized distributions and P γ ½δW fb ¼ which perfectly match if the feedback is optimal. Just like the energy fluctuations (Eq. 26), the quantum heat distribution quantifies the strength of the measurement performed by the reservoir: Its typical support |δQ| max is all the larger as the rate of The role of quantum measurement C Elouard et al decoherence Γ * or the Qubit's coherences 〈σ − 〉 are increased. This puts physical constraints on the feedback source, which must be able to provide a power P = |δQ| max /τ fb to stabilize the state. Reciprocally, a finite source power P max leads to a cutoff in the work distribution's support |δW fb | max = P max τ fb , eventually altering the stabilization (See Fig. 4). In this spirit we have also studied the dependence of the feedback's performances, as a function of the state to stabilize |ψ targ. 〉. As expected, the support of the quantum heat distribution is all the smaller as the state approaches the poles of the Bloch sphere, which are stable under the monitoring process. Therefore the feedback requires less and less power (See Fig. 5). Just like the response time (here taken as infinitely short), the quantum heat distribution appears as an essential tool to evaluate the quality of a feedback loop.

DISCUSSION
It has for long been known that quantum measurement is an essential cause of stochasticity and irreversibility in a quantum system's evolution, just like the coupling to a thermal bath randomizes the evolution of classical systems. Building on this analogy, we have identified the energetic quantum fluctuations induced by measurement with a genuinely quantum component of heat exchanges, and suggested a consistent framework for quantum thermodynamics, that is entirely based on standard quantum formalism. We have then used this framework to investigate energetic aspects of measurement induced irreversibility, and to provide a new thermodynamic perspective on textbook situations of quantum optics. By the way, we have shown that the concept of quantum heat is a real, physical quantity having  As it focuses on the energetic aspects of quantum measurement and decoherence, this framework brings new tools to understand and investigate the energetic cost of quantum processes, which have systematically involved a thermal bath so far. In particular, we have addressed the work cost of fighting against decoherence on a simple physical example, that can be generalized to more complex algorithms of quantum computing. The analogy between a measuring device and a Markovian bath can also be fruitfully exploited in the context of quantum engines, where the measuring apparatus can be treated as some genuinely quantum energy source. 22 In such engines, work extraction is altered by measurement induced irreversibility, just like classical irreversibility decreases the efficiency of classical heat engines.

Expressions of work and heat increment operators
The work increment operator is defined by δW γ ¼ hψ γ ðtÞj dŴðtÞjψ γ ðtÞi. For any unraveling, it corresponds to the Hamiltonian variation during dt: dŴðtÞ ¼ dH s ðtÞ: The heat increment operator is defined as δQ γ ¼ hψ γ ðtÞj dQðtÞjψ γ ðtÞi ¼ dUðtÞ À δW and depends on the unraveling. For QJ, it reads:

Spontaneous emission of a qubit
Heat. As the system Hamiltonian is time-independent, the work increment is null at any time: δW = 0. Using the heat operator for QJ unraveling, we find that during a jump (measurement outcome m KðtÞ ¼ m 1 ), the heat increment is δQ ¼ Àħω 0 P e ðtÞ, with P e (t) = 〈ψ γ (t)|σ † σ|ψ γ (t)〉 the population of the excited atomic level. Using the decomposition presented under Eq. 16, we can write δQ=ħ ¼ Àω 0 þ ω 0 ð1 À P e ðtÞÞ, where the first term is the classical heat Q cl (1) carried by the emitted photon, and the second quantifies the energy fluctuation (quantum heat) due to the Qubit's measurement in |e〉. When no jump occurs ðm KðtÞ ¼ m 0 Þ, we find δQ ¼ Àħω 0 dtP e ðtÞð1 À P e ðtÞÞ ¼ δQ q .