Gauge-Invariant Quantum Thermodynamics: Consequences for the First Law

The universality of classical thermodynamics rests on the central limit theorem, due to which, measurements of thermal fluctuations are unable to reveal detailed information regarding the microscopic structure of a macroscopic body. When small systems are considered and fluctuations become important, thermodynamic quantities can be understood in the context of classical stochastic mechanics. A fundamental assumption behind thermodynamics is therefore that of coarse graining, which stems from a substantial lack of control over all degrees of freedom. However, when quantum systems are concerned, one claims a high level of control. As a consequence, information theory plays a major role in the identification of thermodynamic functions. Here, drawing from the concept of gauge symmetry—essential in all modern physical theories—we put forward a new possible intermediate route. Working within the realm of quantum thermodynamics, we explicitly construct physically motivated gauge transformations which encode a gentle variant of coarse graining behind thermodynamics. As a first application of this new framework, we reinterpret quantum work and heat, as well as the role of quantum coherence.


I. INTRODUCTION
Classical thermodynamics and quantum thermodynamics rely on very different paradigms.Classical thermodynamics is based on a fundamental fact that we do not have access to microscopic degrees of freedom of a macroscopic system.Measurements reveal an average over space and time since our clocks and rules are not able to follow the underlying complex dynamics of the system.This is referred to here as low ability of controlling the system at hand, also known as coarse graining, and it constitutes the well-known thermodynamic limit from which the thermodynamic variables emerge [1].Leaving such limit and diving towards smaller and smaller scales where fluctuations become important, we still expect classical thermodynamics to hold on average, and statistical mechanics can be employed in order to properly describe the system [2][3][4][5].
Diving even deeper, we enter the realm of quantum mechanics, where thermodynamics acquires a different flavor.Here, the focus is often on systems with a few degrees of freedom, subject to a high level of control.By this we mean that in order to compute or measure thermodynamic quantities in this regime we do need to know the state of the system and, most of the times, also the state of the environment.In contrast to classical thermodynamics, we can perform sharp measurements in the quantum realm.It is under this context that information theory starts playing a crucial role [6][7][8][9] in the sense that thermodynamic quantities are operationally defined in terms of informational ones [9].
Here, we propose a new route towards quantum thermodynamics, which at the same time aims to keep the spirit of classical thermodynamics.From the point of view of thermodynamics, the quantum state caries too much information, introducing a redundancy that should be eliminated, in the same spirit that in classical thermodynamics, the complete knowledge of the positions and velocities of all particles constituting the system is redundant and washed away by the average process discussed above (see Figure 1 for an illustration).There is a fundamental principle in physics, named gauge invariance, that does precisely this [10].The basic idea behind this principle is that physical quantities are invariant under certain symmetry transformations of the system.
The main goal of the present work is to build a gauge group for quantum thermodynamics that is able to remove the aforementioned redundant information stored in a quantum system and then define the relevant physical quantities, like work and heat, based on the gauge invariance principle.In other words, we propose a new framework, based on the gauge principle, from which quantum thermodynamic quantities emerge.
It is important to observe that there is a crucial difference between the gauge symmetry of classical and quantum field theories, and the one we identify behind thermodynamics.In the former case, the fundamental gauge transformations take us from potentials (e.g., vector potential in electrodynamics) to physically meaningful quantities such as scattering amplitudes [10].As already mentioned, in our theory, the gauge takes us from information theory to the thermodynamic quantities.In other words, the principle of gauge invariance is employed here exactly to wash away information which is "too detailed".However, this redundancy is not fundamental, as in the case of classical and quantum field theories, but is redundant only in the context of thermodynamics and not, for instance, in the context of information theory.That is why we speak about an emergent gauge theory.Figure 2 illustrates this idea.
Although our theory is built with reference to mean energy, which is always unambiguously defined, it provides a general framework to define every thermodynamic quantity.As an application, we infer conclusions relevant for the first law of quantum thermodynamics.Quantum description of systems and their dynamics, taken together with the limited access to the details, characteristic to thermodynamics, do form an intermediate theory: quantum thermodynamics subject to an emergent gauge symmetry.Note that full quantum description is richer than full classical description.This means that while for the classical description it seems enough to employ averaging, for the quantum description it is not sufficient.This is because in quantum physics we also carry information about bases of the Hilbert space, in particular, the eigenbasis of the Hamiltonian.That is the reason we do need something more than just an average process to wash away all the redundancy of the quantum description.Importantly, this redundancy is truly redundant only while discussed from a more classical point of view on thermodynamics.From the information theory point of view (quantum dynamics, e.g., Schrödinger equation), this is not redundant at all.
In particular, we construct notions of invariant work and heat.Moreover, our framework allows us to clarify the role of quantum coherences, because the resulting gaugeinvariant notion of heat covers delocalized energy, thus being present even in closed quantum systems.Note that in classical thermodynamics, when a system is taken out of equilibrium, energy fluxes (in the form of heat) can be generated inside the system.Thus, the concept of heat in closed classical systems is well-known [1], even in relativistic systems [11].In the context of quantum thermodynamics, the notion of heat in closed systems contains some subtleties -as well as the notion of work-but it is not a new issue and has been considered in terms of the generation of quantum coherences in the energy eigenbasis (see Refs. [12][13][14][15], just to mention a few).However, it is important to observe here that our theory goes far beyond such results.It is just a coincidence that these earlier definitions agree with our theory.Actually, as such notions naturally emerge from the gauge group proposed here, our results put these earlier definitions under the umbrella of gauge symmetry.Note that the more frequently adopted approach, in which heat does not exist in closed quantum systems, does not agree with our theory in general, as explained in detail in the text.
The paper is organized as follows.The next section is devoted to the definition of the emergent thermodynamic gauge, where it is explicitly built and motivated.Based Such transformations take us from the set of timedependent information carriers ρt, that convey no thermodynamic meaning, to the set of thermodynamically meaningful quantities.The gauge emerges from the coarse-graining nature of thermodynamics, being, in this sense, not fundamental as the one behind field theories.In other words, the information here is only redundant from the thermodynamic point of view, in the same sense that the positions and velocities of individual molecules of a gas are redundant in the context of classical thermodynamics.
on the gauge invariance principle, the new definitions of average work and heat are presented in Sections III and IV, respectively.After presenting illustrative examples in Section V, we finish with a discussion in Section VI, where we also outline some consequences of our approach for the statistical definitions of work and heat.

II. EMERGENT THERMODYNAMIC GAUGE
In field theories, the potentials do not have physical meaning in the sense that they cannot be measured.The gauge transformations enter here as fundamental symmetries of the system, coming from the redundancy in the description of the relevant degrees of freedom.Considering thermodynamics, carriers of quantum information-the physical states of the systemplay the same role as the potentials do, while thermodynamic quantities are considered as the physically relevant ones.The gauge, in this sense, is not fundamental since all thermodynamic quantities emerge from a microscopic description by a process of coarse graining.The gauge emerges from this process.At the same time, the microscopic description is physically meaningful, and experimentally accessible.Though, not from the perspective of standard thermodynamics.
The main goal of this section is to propose a gauge for-malism that is able to extract relevant information from a quantum state of the system.Relevant only in the context of thermodynamics.Therefore, the primary connection between the gauge theory proposed here and the one in field theories is that in both cases, the gauge invariance principle is employed to eliminate redundant information.
To be precise, let H t be a (possibly time-dependent) Hamiltonian of our system, and let ρ t be a density matrix describing it, which, considered in its entity, is here ascribed to the domain of information theory.In the present analysis, we restrict the attention to these two fundamental objects, however, the developed formalism can easily be extended to include more observables, such as the total number of particles.
In a thermodynamic, coarse-grained description, we are only interested in a particular set of quantities, such as the mean energy which is essential for the first law of thermodynamics In our notation, the mean energy is a functional depending on the density matrix, with the latter being a function of time.
The next crucial quantity is work associated with a given process that takes place during the time interval t ∈ [0, τ ], defined as [18] W We add a subscript "u", derived from a word "usual", to emphasize the fact that we start the discussion with standard notions met in quantum thermodynamics.Later on, we construct gauge transformations which lead us to the corresponding invariant quantities, later being denoted with the subscript "inv".
From now one we shall use the dot to denote time derivatives, so that the integrand in (2) becomes Tr ρ t Ḣt .The functional W u , even though we do not write that explicitly, depends on the time derivative of the Hamiltonian.We omit this dependence because the Hamiltonian does not belong to the set of dependent variables of the theory.
Furthermore, we consider an associated functional which is the usual notion of heat [18,19].This functional apparently depends on the time derivative of the density matrix.However, due to energy conservation Q u = U − W u , the heat defined in (3) can be expressed solely by ρ t .
In fundamental physics, gauge is realized as an action of a gauge group.Elements of this group act on variables describing a given theory (potentials).In our parallel, the role of the potentials is played by the carriers of quantum information, namely, the density matrix ρ t .
Therefore, emergent gauge transformations need to be represented as (some) unitary matrices V t acting as follows The emergent gauge is allowed to be time-dependent, the same way as the standard one in field theories depends on space and time.As a consequence, the time derivative of the density matrix transforms as again resembling familiar transformation patterns.
From a more operational perspective we can think about the transformation (4) as about a choice of a (timedependent) basis in which we wish to describe the state of the system.On the other hand, the eigenbasis of the Hamiltonian plays the role of a fixed reference frame.Therefore, a more general transformation rule in which together with (4) the Hamiltonian is being "covariantly" transformed as t , is not the route followed here.While such a transformation not only preserves the mean energy but, more importantly, resembles Lorentz transformations in Special and diffeomorphisms in General Relativity, the resulting theory assuming invariance with respect to it is void.This happens because the associated gauge group contains all unitary transformations, simply being too large.As we will convince ourselves soon, the gauge group stemming from ( 4) is more gentle.
We now observe that, in field theories, only the quantities which are gauge-invariant are considered as being measurable and physically meaningful.Within our framework of the emergent gauge in thermodynamics, we adopt the same philosophy, namely, we require thermodynamically meaningful quantities to be invariant with respect to the proposed emergent gauge defined in Equation (4).Clearly, not all unitary transformations can be allowed to render the emergent gauge transformations, as otherwise the theory would be trivial.To select a desired set of transformations we will build on the primary notion of our framework, namely, the mean energy which has to be unambiguously gauge-invariant.We therefore define: Definition 1 (Emergent thermodynamic gauge) Unitary transformations are admissible gauge transformations if they preserve the mean energy, independently of a particular state of the system, i.e., for all ρ t .
Such a definition splits the state space into equivalence classes, under the mean energy.Inside each element of this set, all the density operators lead to the same mean energy, although they can hold very different informational meanings.That is precisely the sense in which we say that the gauge is emergent and not a fundamental one.It is based on our lack of control over the system and not on a fundamental redundancy in the description of the system.This is very natural when we talk about quantum systems since, in general, we are only able to perform a limited set of measurements and the complete reconstruction of the density matrix is not practical.For instance, in the experiment described in Ref. [32], although dealing with a closed quantum system, quantum state tomography is prohibitive due to the dimension of the Hilbert space, and only energy measurements are allowed.If we consider continuous quantum systems, not even sharp energy measurements are allowed and energy measurements encompass a finite size energy window.
By virtue of the above definition we are in position to explicitly construct the gauge.The invariance of the mean energy of any state requires that Tr ρ t V † t H t V t − H t = 0 independently of ρ t , which simply means that the unitary operations need to commute with the Hamiltonian, i.e., [V t , H t ] = 0 = V † t , H t .Therefore, thermodynamic gauge transformations are simply unitary channels which commute with the Hamiltonian.It is important to observe that our emergent gauge is not equivalent to the well-known thermal operations employed in the resource theory of thermodynamics as free transformations [20,21].The gauge group we built involves trivial thermal operations in which there is no interaction between the system and a potentially present bath.Consequently, the bath can be traced out, as it plays no role in defining the gauge process.The emergent gauge rather forms a very particular subclass of the latter operations which, importantly, are not attributed to additional physical interpretation.
While exploring the structure of the gauge, we first assume that we work with a d-dimensional system.Then, V t ∈ U (d), with U (d) representing the set of d × d unitary matrices.In fact, unitaries which commute with H t , by definition form a subgroup of U (d).In this way we again obtain a very close contact with the fundamental gauge in field theories, as this subgroup can be called the emergent gauge group.Now, since the Hamiltonian is Hermitian, we can conveniently parametrize all the members of the emergent gauge group.To this end we express the Hamiltonian as where p is the number of its distinct eigenvalues, n k is the multiplicity of each ε k (t), such that p k=1 n k = d, and u t ∈ U (d).For the sake of clarity, we assume that the degeneracy of the Hamiltonian does not change in time, however, below and whenever appropriate, we pinpoint the consequences of an alternative scenario.A detailed mathematical account of the latter is left for future work.
Every complex d × d matrix M commutes with (7) if and only if it is of the form where each M k is an n k × n k block with arbitrary matrix elements.The constraint [V t , H t ] = 0 therefore enforces with v k ∈ U (n k ).From a topological point of view, the emergent gauge group is isomorphic to As long as the degeneracy of H t does not change in time, the above structure remains intact.If this is not the case, it just means that the topological structure in Equation (10) does change as well.Moreover, we observe that even in the non-degenerate case, i.e., when p = d and , the group is more than just a d-fold tensor product of trivial phases just being U (1) elements.
For example, all time-dependent unitary operations generated by H t belong to G.
On the group G there is an invariant Haar measure induced from that on U (d).Therefore, the group averaging allows one to assign to each relevant quantity its gauge-invariant version: Definition 2 (Gauge-invariant quantities) Given a functional F [ρ t ], its counterpart invariant with respect to the emergent gauge is where V t is given in (9) and dG is the Haar measure on the group G defined in Equation (10).
It is important to remember that the Haar measure is normalized, i.e., dG = 1.When the degeneracy of H t is not fixed, this normalized measure just needs to be replaced by an appropriate (still normalized) functional measure DG t where G t is a counterpart of (10), with all {n k } and p being time-dependent.Before proceeding to a particularly relevant case of work and heat, let us point out that there is a natural class of quantities which are gauge-invariant by construction.These are all quantities solely defined on the equilibrium manifold, or even on a family of instantaneous equilibrium operators ρ β t ∼ e −βHt , with β being the inverse temperature.Also, other states which solely depend on the Hamiltonian, e.g., the microcanonical state, are preserved.
As a final comment, it is important to make it clear that we have two transformations here.First, we have the unitary transformations that are elements of the gauge group G.These are only symmetry transformations, not dynamical processes.Their role is to identify the set of states, at every instant of time, that cannot be distinguished by measuring thermodynamic variables.The other set of transformations are the physical processes, which can be any completely positive and trace preserving map, including adiabatic (reversible) transformations.These are the ones governing the time evolution of the physical system.Therefore, our theory applies to both equilibrium and non-equilibrium transformations.

III. GAUGE-INVARIANT WORK
It is an easy task to recognize that the average work defined in (2) transforms as with the last term being not invariant with respect to the emergent gauge.This transformation rule has a deep physical meaning, as the work functional defined in Equation ( 2) turns out to be gauge-invariant only when [H t , ρ t ] = 0 for all t.The latter means that the process is adiabatic in the sense that no coherences are generated during time evolution (no transitions between energy eigenstates are allowed).Such a restriction is required since we want the invariance to hold for all choices of V t ∈ G.It is interesting that such a notion of adiabatic transformation was already considered in literature [12,13].We will comment more on this when discussing the invariant heat.However, the general formalism presented in the preceding section allows us to provide the notion of work which is invariant with respect to the emergent gauge.
Theorem 1 (Gauge-invariant work) Let h t = u † t H t u t be the diagonal form of the Hamiltonian H t , with u t unitary.Then the notion of work which is invariant with respect to the emergent thermodynamic gauge is given by It is straightforward to recognize that the right hand side is indeed invariant.Nevertheless, we make a formal proof in the Appendix A. Importantly, the above result does also hold if the degeneracy of H t changes in time, as potential contribution coming from that fact is of zero measure with respect to the time integral.It is a bit more involved to show that the invariant notion of work is the same as would be given by Equation (11).This fact is also demonstrated in the Appendix A, with the help of the group averaging techniques.
In order to make closer contact with the usual gauge theory, let us introduce a Hermitian potential A t defined by the relation A t = i ut u † t .Using this definition, we can rewrite the invariant work as with •] being a covariant derivative.Note that we have the same functional form of the usual work defined in Equation ( 2) but with the covariant derivative instead of the regular one.Our covariant derivative transforms as where can be recognized to be the standard non-abelian gauge transformation of the potential.Note that since the notion of work obtained in Theorem 1 is invariant, we obtain the relation

IV. GAUGE-INVARIANT HEAT
Taking the invariant notion of work together with primordial invariance of the energy, the gauge-invariant notion of heat Q inv immediately follows from energy conservation.The explicit form of the heat is given below, after the role of quantum coherence is discussed in light of our findings.
We represent the invariant heat as consisting of two independent contributions, Q inv = Q u + Q c , where the usual heat has already been defined in (3), while the coherent heat is now defined as The quantity Q u has very frequently appeared in the literature as a natural definition of heat [17][18][19]22].It is important to note that this term is zero for any closed evolution since Tr [ ρt H t ] = 0 via the von Neumann equation.Therefore, such a definition of heat is associated only with the energy exchanged between the system under consideration and some other system, like and environment for instance.However, as mentioned earlier, thermodynamics is a theory about closed systems and well-defined notions of heat in closed systems are established both for classical and quantum systems.While in classical systems heat is associated with the energy transferred to the fast oscillating modes of the system (in a normal mode description) [1], in quantum systems, it is linked with the uncertainty in the energy measurement, which is caused by the generations of quantum coherences in the energy eigenbasis [12,13].Therefore, adiabatic transformations are those that do not allow for the generations of coherences, implying Q inv = 0 and all the energy transferred to the system being equal to the invariant notion of work.In this case, the usual notion of work clearly coincides with the invariant one proposed here.
Indeed, the additional term Q c , the presence of which distinguishes the invariant heat with respect to the usual one, contains only contributions from the coherences.This fact can be seen after writing it in the energy eigenbasis.
Let {|a k (t)⟩} and {ε k } be the set of time-dependent energy eigenstates and eigenvalues, respectively.For simplicity, we for a moment assume that the Hamiltonian is non-degenerate, i.e., all n k = 1.Qualitatively, however, the same results can be obtained without this assumption.Since we are talking about work, heat and thermodynamics in general, the energy eigenbasis seems to be the most appropriate one.At any instant of time, the density matrix of the system can be represented in this basis as ρ t = jl c jl (t) |a j (t)⟩ ⟨a l (t)|.
In Appendix A we show that Q c depends only on the differences ε j (t) − ε k (t) and, consequently, all the terms containing the diagonal coefficients of the density matrix, c ii (t), do vanish.This is a universal result stating that the development of internal coherences are part of the heat.This result provides a gauge flavor to earlier definitions of heat in closed quantum systems [12][13][14][15].It is important to mention here that, although these studies consider heat and work in the context of quantum coherences, their definitions are not mathematically or physically equivalent to ours.All of these references considered distinct set of transformations or distinct physical motivations in order to define their notions of thermodynamic quantities.Our work builds a symmetry group that is able to implement a sort of (information) coarsegraining procedure from which the thermodynamic quantities uniquely emerge.
In terms of the covariant derivative introduced earlier, we can rewrite the heat simply as which, again, takes the same form as the usual definition of heat, but with the covariant derivative replacing the standard one.
It is interesting to observe that work and (total) heat are independent of the coherences in the energy eigenbasis, contrary to the standard quantum definitions.The average total energy can be written as and the heat is written as Such results are intuitively expected and are fully compatible with our classical notions of work and heat, in agreement with the strategy adopted while proposing the gauge-invariant theory of quantum thermodynamics.This does not imply that the coherences play no role in the transfer of energy.The generation of coherences are related to the rate at which energy is being transferred to the system in the form of work and/or heat, thus affecting all thermodynamic processes, including work extraction and the efficiency of heat engines.We will come back to this discussion while presenting some examples in the next section.

V. APPLICATIONS
As explained in the last section, deviations between the two approaches appear together with quantum effects.This can be seen in the examples discussed in this section, where the role of coherences is being exposed.
Let us first discuss a single qubit, described by the Hamiltonian H t = α t σ z , undergoing a non-unitary evolution described by the generalized amplitude damping or the phase damping channels.These processes can be described by Lindblad master equations of the general form with D being the non-unitary part of the dynamics (dissipator).
For the dephasing channel the dissipator is given by with σ s being the s-th Pauli matrix, while Γ dec represents the decoherence rate.The generalized amplitude damping is described by the dissipator where σ + and σ − are the usual spin ladder operators while n = e βω − 1 −1 stands for the mean excitation number of the bath mode with frequency ω. β stands for the inverse temperature while Γ a is the decoherence rate.Since the Hamiltonian is already diagonal we take u t = 1, implying that ḣt = αt σ z .This leads to the following result for the invariant work for both channels.Of course, W inv = 0 if α t is time independent.Note that the above calculations do not assume any specific form of the driving.What matters is the power, i.e, the rate of energy transfer which is, as expected, influenced by the generation of coherences.
Let us now move to the invariant heat.Since u t is time independent, we have For the case of the dephasing channel we obtain Q deph inv = 0.There is no heat in this case due to the fact that the coherences are destroyed by the decoherence process induced by the action of the bath.The final state is diagonal in the energy eigenbasis and there is no energy flux from the system to the environment (the interaction Hamiltonian is diagonal).Therefore, all the energy transferred to the system by the driving must be in the form or work.
In the case of the generalized amplitude damping the invariant heat takes the form Q gad inv = τ 0 dtΦ t E , with Φ t E being the instantaneous energy flux.In this case, the final state of the system is also diagonal.However, beyond the decoherence process induced by the bath, there is also an energy exchange between the system and the environment.This energy is the heat.Since the dephasing channel only involves the exchange of phase information between the system and the environment, while the amplitude damping is characterized by energy exchange, the above results agree with what is expected from classical thermodynamics.It is therefore important to stress that our gauge-invariant approach agrees with the standard one in cases which are consistently described from a point of view of classical thermodynamics, but may differ when this is not the case.
Let us now consider the unitary evolution of an externally driven single qubit whose Hamiltonian can be written as H t = σ z + γ t σ x , where γ t is a time-dependent driven frequency.In this case we will have coherences being generated during the evolution.In the appendix we show that the invariant heat is directly linked with the generations of coherences while the invariant work comes from the changes in the eigenenergies of the system.Figure 3 shows (see Appendix B for details) the invariant heat and work, along with the relative entropy of coherence.The latter quantity is a well-behaving measure of quantum coherence defined as [23] C = S(ρ diag ) − S(ρ), (23) where ρ diag is the density operator with the off-diagonal (in the the energy eigenbasis) elements removed, while S stands for the von Neumann entropy.Note that this example is in deep contrast with the usual understanding met in quantum thermodynamics, where it is assumed that a unitary evolution does not involve heat [17][18][19]22].However, as mentioned, this is in perfect agreement with the notion of heat introduced for closed systems and the definition of quantum adiabatic processes [12,13].Therefore, our results provide a firm physical ground-the gauge invariance principleupon which we can justify why heat in closed quantum systems is linked with the delocalization of energy, explaining its oscillations for a closed evolution, where coherences change in time.
As our last example, let us consider a driven LMG model [33] where λ(t) = (1/4) (tanh [α(t − 1)] + tanh[α]), α is a constant while J i denotes the i-th component of the angular momentum operator, whose value is j [so the dimension of the associated Hilbert space is (2j + 1)].This choice has two advantages.First, the intensity of the squeezing parameter λ is in the interval [0, 0.5], which assures that the energy spectrum is not degenerated and we also avoid the critical points of the model.Secondly, we can consider situations from a very slow driving, when α ≪ 1, to sudden quenches, when α → ∞.The details of the numerical calculations are given in Appendix B and in Figure 4 we present the invariant heat as well as the quantum coherence, considering distinct values of α.This example shows how the heat scales with the generation of coherences.As we can see, as time passes, we transition from an adiabatic transformation of the Hamiltonian (too slow to create coherences) towards a regime where coherences are indeed generated and we also observe the increase in the generation of heat.In this regime, transitions between energy eigenstates are inevitably induced by the fast changes in the Hamiltonian and such transitions are associated with heat.
Beyond the fundamental relevance, the above results are important for the thermodynamic analysis of heat engines.For instance, let us consider an Otto cycle consisting of four stages, two non-unitaries (equilibration with thermal baths) and two controlled unitary transformations.In general, heat is associated with the non-unitary dynamics while all the energy transferred to/from the system during the unitary transformations is regarded as work.Since the efficiency is defined as the ratio between the extracted work and the heat absorbed from the hot bath, under the present approach, where part of the energy during the unitary stages is heat, the efficiency of the engine will decrease as we increase the speed at which these transformations are performed (see Figure 4).This is in complete agreement with the expected behavior of a heat engine, since fast processes take us far from equilibrium and, thus, more entropy must be produced and the engine efficiency must decrease, in accord with the second law of thermodynamics.Our theory naturally encompasses such behavior.

VI. DISCUSSION
Concerning the first law of thermodynamics, the usual notions of heat and work are based on the Clausius theorem.Heat is associated with the change in the thermodynamic entropy while work is linked with the changes in some externally controlled parameter.Such notions cannot be simply extended to the quantum world, thus leading to several definitions of work and heat that are, in general, nonequivalent, but operationally welldefined [24].The theory proposed here leads to gaugeinvariant definitions of thermodynamic quantities, in particular, heat and work that are not solely related with the change in the information entropy.Work is associated with the eigenvalues of the Hamiltonian while heat is connected with the change in the eigenbasis of the Hamiltonian, thus being deeply linked with energy delocalization.This implies that we can have heat even in a closed quantum system, which is in sharp contrast with the usual notions of quantum heat [17][18][19]22].However, we must remember that such a notion is well-understood in classical physics, where heat is associated with energy transferred to the degrees of freedom that are averaged out due to the coarse-grained nature of macroscopic measurements [1].In quantum physics, things are trickier and, when considering closed systems, heat is usually associated with transitions (generation of coherences) in the energy eigenbasis [12,13].In the adopted perspective, coherences in the energy eigenbasis indicate that the energy variance does not vanish and this uncertainty is here interpreted as heat.Therefore, our work shows that this notion naturally emerges from the framework of gauge invariance, a physical principle lying in the basis of all modern physics.
Regarding the notion of statistical work (and heat), the most considered definition is based on the two-point measurement [16,25].This protocol has been considered both theoretically [16,17,26] and experimentally [27][28][29][30][31][32]34] in distinct contexts within quantum thermodynamics.Although widely accepted, such scheme does not take into account the coherences, which are destroyed by the measurements.Therefore, statistical work is gaugeinvariant by construction.Fully quantum fluctuation theorems were developed in order to take into account this contribution [35][36][37][38][39][40].A naturally arising question is to scrutinize or generalize/modify the fluctuation theorems from the perspective of the invariant work and heat presented in this work.The implications of such definitions for the irreversible entropy production will certainly deepen our understanding of quantum coherence in nonequilibrium thermodynamics.
Another question that can be addressed under this theory is the local thermalization of closed quantum manybody systems and how this is linked with the eigenstate thermalization hypothesis [41] and irreversible entropy production [17].
Perhaps the most important and broad message of the current work is relevant for all aspects of quantum technologies associated with operational principles behind potential quantum engines, batteries or refrigerators.Our approach might in the future allow for the delineation of the boundaries between controlled quantum systems and their thermodynamic behavior, forming a bridge between classical and quantum thermodynamics, which starts in the latter paradigm and expands towards the former one.The invariant heat can be written as Note that the only contribution that we have here comes from the coherences of the density operator in the energy eigenbasis.However, it is important to stress that, if the eigenbasis is constant, the coherences does not matter and the heat is zero.The important thing here is the change in the eigenbasis of the Hamiltonian.The invariant work takes the form

Figure 1 .
Figure1.Emergent gauge theory of quantum thermodynamics.Quantum description of systems and their dynamics, taken together with the limited access to the details, characteristic to thermodynamics, do form an intermediate theory: quantum thermodynamics subject to an emergent gauge symmetry.Note that full quantum description is richer than full classical description.This means that while for the classical description it seems enough to employ averaging, for the quantum description it is not sufficient.This is because in quantum physics we also carry information about bases of the Hilbert space, in particular, the eigenbasis of the Hamiltonian.That is the reason we do need something more than just an average process to wash away all the redundancy of the quantum description.Importantly, this redundancy is truly redundant only while discussed from a more classical point of view on thermodynamics.From the information theory point of view (quantum dynamics, e.g., Schrödinger equation), this is not redundant at all.

Figure 2 .
Figure2.Emergent thermodynamic gauge.The panel on the left illustrates the fundamental gauge behind field theories, both classical and quantum.The set of potentials Aµ(x) does not have any physical meaning and the gauge transformations take us from this set to the scattering amplitudes that can be experimentally investigated.The right panel represents the emergent thermodynamic gauge G proposed in this work.Such transformations take us from the set of timedependent information carriers ρt, that convey no thermodynamic meaning, to the set of thermodynamically meaningful quantities.The gauge emerges from the coarse-graining nature of thermodynamics, being, in this sense, not fundamental as the one behind field theories.In other words, the information here is only redundant from the thermodynamic point of view, in the same sense that the positions and velocities of individual molecules of a gas are redundant in the context of classical thermodynamics.

Figure 3 .
Figure 3. Energies and coherence.The red dashed line represents the invariant work Winv while the solid black line is the coherence and the dotted blue line is the invariant heat.We considered γt = cos(t) and we start from the ground state of the initial Hamiltonian.It is clear that the heat dynamics are perfectly correlated with the coherence, as can be seen from the calculations shown in Appendix B.

Figure 4 .
Figure 4. Heat and coherence.From left to right we show the relative entropy of coherence C and the invariant heat Qinv as functions of time, for distinct values of the speed of the protocol α.The blue arrow in the top panel shows the direction in which α is increasing, from α = 1 to α = 10.We choose j = 50 for all curves and the starting point was the energy ground state for t = 0.