(Non) equilibrium dynamics: a (broken) symmetry of the Keldysh generating functional

We unveil the universal (model-independent) symmetry satisfied by Schwinger-Keldysh quantum field theories whenever they describe equilibrium dynamics. This is made possible by a generalization of the Schwinger-Keldysh path-integral formalism in which the physical time can be re-parametrized to arbitrary contours in the complex plane. Strong relations between correlation functions, such as the fluctuation-dissipation theorems, are derived as immediate consequences of this symmetry of equilibrium. In this view, quantum non-equilibrium dynamics -- e.g. when driving with a time-dependent potential -- are seen as symmetry-breaking processes. The symmetry-breaking terms of the action are identified as a measure of irreversibility, or entropy creation, defined at the level of a single quantum trajectory. Moreover, they are shown to obey quantum fluctuation theorems. These results extend stochastic thermodynamics to the quantum realm.


Contents
1 Introduction

Motivations
Encoded in the equilibrium dynamics of any system, there is a universal symmetry which entails fundamental consequences on equilibrium and out-of-equilibrium physics. This strong assertion was demonstrated in the context of all classical systems. General properties of equilibrium dynamics, such as fluctuation-dissipation or Onsager reciprocal relations follow directly from this symmetry. For systems out of equilibrium, this symmetry is broken and this is intimately related to entropy production, as perhaps best epitomized by the Gallavotti-Cohen fluctuation theorems [1,2].
More often than not, symmetries are easier to identify in a field-theory language as an invariance of an action, or more generally at the level of a generating functional. In the framework of the Martin-Siggia-Rose-Janssen-deDominicis (MSRJD) path-integral formulation of classical stochastic dynamics [3,4,5], the idea of an equilibrium symmetry of the action was first introduced by Janssen in the late 70s [6,7,8]. Recently, the authors showed that the (zero-source) MSRJD generating functional of equilibrium Langevin processes is invariant under a model-independent discrete field transformation combining time reversal with a thermal translation in the complex plane [9,10,11]. The above-mentioned consequences of this equilibrium symmetry (and its out-of-equilibrium breaking) were derived within this path-integral formalism, and they were generalized with little cost to virtually any type of classical equilibrium dynamics: from simple deterministic Newtonian dynamics, or basic Markov processes, to complex stochastic processes with colored and multiplicative noise.
Since then, the goal has been to generalize this fundamental symmetry to the case of quantum equilibrium dynamics, especially given the recent upsurge of activity on out-ofequilibrium quantum systems [12]. This is straightforward for those many-body systems the dynamics of which can be effectively described by classical stochastic processes (of quantummechanical origin) [13,14,15]. Related local symmetries have been proposed in the context of quantum hydrodynamics, i.e. for quantum systems that can be described by effective field theories for a few slow modes in local equilibrium with their environment, once the fast modes have been integrated out [16,17]. However, the generalization to fully quantum-mechanical dynamics is an arduous challenge. In Ref. [18] this problem was solved in a setup in which the system is prepared in the far past and initial conditions can be neglected. This important progress provided a first identification of the fundamental symmetry encoded in quantum equilibrium dynamics. However, a full characterization of the symmetry taking into account the initial condition was still missing. This problem, whose solution is the main result of our work, was the main obstacle to address entropy production and quantum fluctuation theorems for which one needs to start from a given initial condition, drive the system out of equilibrium and break the symmetry.
In the last decades, classical thermodynamics was extended to systems with only a few degrees of freedom, for which fluctuations matter. One of the early successes in the field of stochastic thermodynamics has been to generalize usual thermodynamics quantities such as work, heat, or entropy creation, to single classical trajectories. Another resounding success is the discovery of the fluctuation theorems [1,2]. The extension of the latter to the quantum realm was addressed starting from the early 2000s [19,20,21] and important progress has been achieved [22,23,24]. However, the thermodynamics of small quantum systems is still a subject of intense research. For instance, the notion of a continuous measurement and the precise definition of work performed along a single quantum trajectory are questions which are still debated. Experimentally, studying those topics is hard given that very few setups offer sufficient precision in the control of the system and its measurements. In this regard, a promising architecture is circuit quantum-electrodynamics with which the quantum trajectories of transmon qubits have already been monitored, and the first law of thermodynamics was verified along individual trajectories [25]. Our theoretical approach by-passes (the subtle) issues concerning the correct definition of work and entropy creation. By focusing on time-reversal symmetry and its breaking, it directly yields general relations-free of any presupposed definition-and important results on the entropy creation in quantum-mechanical systems.
The primary aim of our work is to generalize the classical approach of Ref. [9] and unveil the quantum version of the symmetry that encodes equilibrium dynamics in complete generality. Out of equilibrium, the symmetry is broken and we use this mechanism to derive the corresponding quantum fluctuation theorems. Incidentally, we solve a longstanding problem: the measure of the irreversibility generated along a single quantum trajectory is identified un-ambiguously. Unlike most previous results in the literature, the expressions obtained within our broken-symmetry approach are quite similar, in content and form, to the well-known classical results, thus shining a new light on modern quantum thermodynamics.
The derivation of our fundamental results relies on a prior overhaul of the conventional Schwinger-Keldysh path-integral formalism of quantum non-equilibrium dynamics. The main novelty brought by our approach is the possibility to re-parametrize the physical time with times that take values along generic contours in the complex plane. Developing a consistent way to change the time contour within a path integral is an old issue that already emerged in several field-theoretical problems [26,27] and that we resolve here.

Physical framework
Concretely, we consider a generic quantum-mechanical system prepared, at the initial time t = −t 0 , in an equilibrium state at temperature β −1 with respect to the Hamiltonian 1 H(−t 0 ). The subsequent unitary evolution is governed by the Hamiltonian H(t), the time-dependence of which is assumed to be continuous and differentiable. Note that this does not exclude the case of a quantum quench as long as it can be seen as the limit of a continuous protocol performed on a time scale much smaller than any other time scale involved.
To present our results in the clearest manner, we simplify the discussion by considering the case of a system described by a non-relativistic real scalar field ψ(t). We deliberately drop any spatial dependence of the field as it does not play any particular role in the derivation, and we choose to work within a symmetric time interval t ∈ [−t 0 , t 0 ]. We also assume that the initial state is prepared within the canonical ensemble. However, for the sake of completeness, we display the bosonic (respectively fermionic) version of our main results for systems described by a complex scalar (respectively Grassmann) field. We also briefly discuss the case of a grand-canonical initial state. Moreover, we assume that the system is neither subjected to magnetic fields nor coupled to any quantity that is odd under time-reversal: ΘH(t)Θ = H(t) where Θ(t) is the antilinear time-reversal operator. The generalizations to time intervals that are not symmetric, fields that are fully space-and time-dependent, or vectors fields, are straightforward. Unless otherwise stated we set k B = = 1 throughout the manuscript. In Sect. 5 we restore to take the classical limit.

Main results
Let us outline the key steps followed in the presentation and point to the main results presented in this manuscript.
Formalism. In Sect. 2, we start from the operator formulation of the Kadanoff-Baym generating functional Z[J + , J − ] and we modify it to construct a path-integral representation where time can now run on a generic contour in the complex plane rather than on the real line. This flexibility of the formalism is crucial to identify the symmetry of equilibrium dynamics. The final expression for Z[J + , J − ] is given in Eq. (26). Compared to the conventional Kadanoff-Baym construction, the most important step is the generalization of the resolution of the identity which is usually inserted at the time slice t to derive the path integral from the operator formalism: where θ(t) is a complex function that appears in the re-parametrization of time as τ (t) ≡ t + θ(t).
Note that within a real-time path integral over a field ψ(t) with t ∈ [−t 0 , t 0 ], it is important to realize that expressions of the type ψ(−t + iβ/2) have a priori no meaning, and that they cannot be given one by an infinite Taylor expansion ψ . . because (i) this would require ψ(t) to be analytic at all times, whereas the functional integral is performed over all fields, continuous or not, differentiable or not; (ii) the left-hand side of the above expansion is real whereas its right-hand side is not for most trajectories of ψ(t). Having said that, this proviso can be relaxed inside the source term of a generating functional. Indeed, since sources are set to zero at the end of any physical computation, the fields to which they couple only appear at the level of expectation values, and can therefore be attributed the regularity properties of typical quantum-mechanical observables. See the discussion below Eq. (34). In Ref. [18], these issues were solved by working in the frequency domain, where the expression ψ(−t + iβ/2) corresponds to e βω/2 ψ(ω) * . However, working with Fourier modes is possible only for equilibrium systems that have been prepared in the far past, −t 0 → −∞. In order to obtain an expression of the symmetry valid in the time domain and with initial conditions at a finite time-an essential ingredient to discuss its breaking in out of equilibrium settings-one has to give a direct meaning to ψ(−t + iβ/2), which we do through a re-parametrization of time allowing the deformation of the time contour in the complex plane.
Equilibrium dynamics. In Sect. 3, we specialize the discussion to the case of equilibrium dynamics. We propose a time contour C β , represented in Fig. 3, that is suitable for identifying the equilibrium symmetry. The corresponding generating functional Z β [J + β , J − β ] is given in Eq. (43), and the equilibrium symmetry is presented around Eq. (46). The fluctuationdissipation theorem is derived as a corresponding Ward-Takahashi identity in Eq. (69).
Out-of-equilibrium dynamics. In Sect. 4, we break the symmetry by driving the system out of equilibrium with a time-dependent protocol controlled externally via the parameter λ(t). We exploit the symmetry-breaking terms of the action to derive the quantum Jarzynski equality in Eq. (101) and the quantum Crooks fluctuation theorem in Eq. (104). We also generalize the approach to derive novel relations for multi-time correlation functions. As a by-product, we identify in Eq. (92), the general expression of the entropy production along a single trajectory of a quantum driven system, Σ. It involves the operatoṙ σ(t) = −2 e βH(t)/4 ∂ t e −βH(t)/2 e βH(t)/4 which quantifies the rate of production of irreversibility. The corresponding measure of irreversibility generated along a single trajectory, S irr , is given in Eq. (106). The physical results are presented in such a way to be accessible to the reader unfamiliar with the Keldysh formalism. To illustrate our findings, we present the case of a two-level system driven out of equilibrium by a time-dependent Zeeman field. The dynamics are solved numerically. This simple quantum-mechanical example can be relatively simply implemented within a superconducting-qubit architecture, where the two-level system may be monitored and manipulated via its coupling to a photonic cavity mode, see for instance Ref. [25].
Classical dynamics. In Sect. 5, we take the classical limit of our formalism and we recover, after a mere redefinition of the response field iψ(t) → iψ(t)− β∂ t ψ(t), the Martin-Siggia-Rose-Janssen-deDominicis formalism and the classical results of Ref. [9].
Conclusions. Finally, we present our conclusions and an outlook in Sect. 6.

Deformation of the Kadanoff-Baym time contour
In this Section, we first briefly recall the Keldysh path-integral formalism, in particular the Kadanoff-Baym construction where fields are integrated over an initial Matsubara-like imaginary-time branch followed by a close contour in real time. As we shall see, there is a degree of arbitrariness in the choice of the Kadanoff-Baym time contour. For example, one often finds in the literature that the Matsubara-like branch follows the real-time evolution rather than preceding it. Those are of course equivalent formulations. In this Section, we generalize and formalize this flexibility by constructing a path-integral representation of the generating functional which allows us to define and integrate the fields over generic complextime contours rather than over the conventional Kadanoff-Baym contour. The reader eager to have a concise illustration of this idea may consult the Appendix A where we discuss it in the context of the operator formalism.

Recap of the Keldysh formalism
Let us start with a quick reminder of the derivation of the conventional path-integral formulation of the Keldysh generating functional [28,29]. We recommend Ref. [30] for a detailed and pedagogical presentation of this technique. In the operator formalism, the so-called Kadanoff-Baym generating functional reads where T C is the time-ordering operator along the Kadanoff-Baym contour C represented in Fig. 1. It has an initial Matsubara-like imaginary-time branch C ′ from −t 0 + iβ to −t 0 that generates the initial density matrix e −βH(−t 0 ) /Z(−t 0 ), a forward real-time branch C + from −t 0 to t 0 , and a backward real-time branch C − from t 0 back to −t 0 . The trace enforces equal boundary conditions at −t 0 +iβ and −t 0 . Altogether, C ≡ C ′ ∪C + ∪C − . Objects defined on the forward and backward branches are indicated by the superscripts + and −, respectively. The sources J + (t) and J − (t) are coupled to the field ψ on the forward and backward branches, respectively. The initial partition function Z(−t 0 ) ≡ Tr e −βH(−t 0 ) ensures that the zero-source generating functional is system-independent, Z[J + = J − = 0] = 1.
In order to obtain the path-integral representation of Z[J + , J − ], one slices the real-time branches C + and C − in infinitesimal time steps dt, inserts the following resolution of the identity at each time step and uses the usual Feynman construction where L is the Lagrangian corresponding to the Hamiltonian H. In this way, one ends up with the following well-known path-integral representation of the Kadanoff-Baym generating functional: In the above procedure, the number of degrees of freedom was doubled: the functional integral over the field ψ + (t) corresponds to the time evolution on the forward branch C + , while the integral over ψ − (t) corresponds to the evolution on the backward branch C − . All irrelevant prefactors were included in the functional measure D[ψ + , ψ − ]. Notice the presence of the matrix element ψ − (t 0 )|ψ + (t 0 ) in Eq. (5). It couples the two copies of the system at the final time t 0 . It is bound to play a role as crucial as the one of the initial density matrix element Proceeding similarly, one can slice e −βH(−t 0 ) in infinitesimal imaginary time steps and introduce a path integral where the Lagrangian is integrated over the contour C ′ running from −t 0 + iβ to −t 0 . Note that there is some degree of arbitrariness in the choice of C ′ : the cyclic property of the trace in Eq. (2) also allows us to define it between −t 0 and −t 0 − iβ. Below, we further discuss the different forms that the complete contour can take.

Time-dependent resolution of the identity
Let us start with the operator expression of the Kadanoff-Baym generating functional given in Eq. (2). Rather than using the resolution of the identity given in Eq. (3), let us transform it to an energy-dependent rotating frame and use the following time-dependent identity: where a is either a = + or a = − and θ a (t) is a generic complex function, continuous and differentiable on t ∈ [−t 0 , t 0 ]. The identity in Eq. (6) the newly defined contour 2 C θ , see whereas the instantaneous component of the unithermal Lagrangian, L a θ , simply boils down to the original Lagrangian L: This can easily be checked for a simple massive particle of coordinate ψ and conjugate momentum π in a time dependent potential V (ψ; t). The Hamiltonian

Generating functional
For simplicity, we restrict the analysis to functions θ a (t) satisfying the boundary conditions 3 Re θ + (−t 0 ) = Re θ − (−t 0 ) and Re θ + (t 0 ) = Re θ − (t 0 ). We represent the t = ±t 0 matrix elements in Eq. (7) by the following path integrals: together with the boundary conditions (24) and (25) correspond to integrating the original Lagrangian L along four new purely imaginary (vertical) branches that we gather Fig. 2, so as to express the generating functional in Eq. (7) in the form with the action The expression above has three contributions: (i) the instantaneous component, originating from H a θ (t), where L is the original Lagrangian (we omitted the branch superscripts); (ii) the varying component, originating from H a θ (t), where L a θ is expressed in Eq. (21); and (iii) the source term where we redefined Bosonic and fermionic versions. In the case of a bosonic (respectively fermionic) path integral, where the field ψ(t) is complex-valued (respectively Grassmann-valued), generating functionals of similar form are obtained. The resolution of the identity analogous to the one in Eq. (6) uses the coherent-state representation, and reads where ψ * denotes the complex (respectively Grassmann) partner and N = 2πi (respectively N = 1) for bosons (respectively fermions). The resulting Lagrangian reads where : H a θ : denotes the normal ordered form of H a θ defined in Eq. (15). Note that when working with initial conditions in the grand-canonical rather than canonical ensemble, i.e. ρ(−t 0 ) ∼ e −β(H(−t 0 )−µN ) where N is the operator counting the total number of particles (assumed to be conserved by the dynamics) and µ is the chemical potential, we need to replace H(t) in the resolution of the identity above with H(t) − µN . While we leave the derivation of the corresponding generating functional as an exercise for the reader, we mention that it now involves the Lagrangians L → L + µ ψ a * ψ a on the Matsubara-like branches C + ′ θ and C − ′ θ , and that its source term reads with 3 The fundamental symmetry of equilibrium dynamics In this Section, we restrict the analysis to the case of equilibrium dynamics. Equilibrium dynamics are guaranteed provided that the system is prepared in equilibrium, i.e. described by a Gibbs-Boltzmann thermal density matrix ρ(−t 0 ) ∼ exp(−βH) in the canonical ensemble, or ρ(−t 0 ) ∼ exp(−β(H − µN )) in the grand-canonical ensemble, and time-evolved with the same time-independent Hamiltonian H. In case the system were not isolated, its environment must also remain in equilibrium at the same temperature β −1 and chemical potential µ.

Generating functional on a generic contour
where we used the shorthand notation θ a (τ ) ≡ θ a (t a (τ )).
It is important to note that within a path integral, the summation is performed over all field trajectories, including configurations that are not continuous. Therefore, in principle, ψ a θ (τ ) cannot be analytic as the expression in Eq. (36) seems to suggest. Time derivatives such as ∂ n τ ψ a θ (τ ) are ill-defined. However, given that the source term of the generating functional is set to zero at the end of any physical computation, ψ a θ (τ ) will only appear at the level of observables, i.e. not in the path measure but in averaged quantities of the type ψ a θ (τ ) ψ b θ (τ ′ ) . . . for which analyticity is restored and time derivatives can be properly de- . . . . In practice, we can therefore formally treat ψ a θ (τ ) in the source term as having the same regularity properties (continuity and differentiability) as any time-dependent quantum-mechanical observable. Moreover, we can use the on-shell Heisenberg evolution, namely see the Appendix A, to obtain Introducing the following shorthand notations for the above derivative expansion, Using once again that sources are set to zero at the end of any physical computation, we integrate by parts the source term of the generating functional in Eq. (26) and safely discard the resulting boundary terms (provided that the dynamics are not probed at t = ±t 0 ). Finally, the generating functional is now expressed as where the action simply reads (omitting the branch superscripts) and where we introduced the sources J a θ (τ ), defined on the new complex-time contour, and related to the original real-time sources through

Equilibrium contour
We now choose to work with the following constant and purely imaginary θ a (t): This corresponds to the complex-time contour C β represented in Fig. 3. In the rest of this manuscript, we replace the subscript θ with the subscript β to make it clear that we are working with the particular θ a (t) given in Eq. (42). The choice of less symmetric contours, such as the one represented in Fig. 4 (bottom), is also possible but less convenient. Interestingly enough, we note the striking similarity of this "equilibrium" contour C β with the contour appearing in the thermo-field double formalism [31].
The generating functional reads with the action and where the sources on the contour C β are related to the original real-time sources through J a β (τ ) = J a (τ − aiβ/4) τ ∈ C a β , a = +, − .

Equilibrium symmetry
Below, we prove that the zero-source generating functional, Z β [J + β = J − β = 0], is invariant under the following transformation of (real) fields: For bosonic fields, the transformation includes a field conjugation: and for fermionic fields, it also includes a change of sign to accommodate for their anticommuting nature: Unless otherwise stated, we work with real scalar fields and use the transformation in Eq. (46). At the level of the "sourced" generating functional, we obtain the relation with J a β (τ ) ≡ J a (τ − aiβ/4) and τ ∈ C a β . The second equality in Eq. (49) is one of the main results of the manuscript. We explore a number of its consequences, namely, fluctuationdissipation theorems in Sect. 3.4 below.

Remarks.
1. The transformation T β given in Eq. (46) is universal in the sense that it is system independent. In particular, it only depends on a single parameter, the temperature.
3. It is interesting to see T β as the combination of time reversal with a Kubo-Martin-

Schwinger (KMS) transformation [18]
where the time-reversal transformation reads, with the notationā ≡ −a T : together with a field conjugation in the case of complex bosonic or fermionic fields. The KMS-like transformation reads Both T and K β map the action leaving the zero-source generating functional, Z β [J + β = J − β = 0], invariant given that it is a real quantity. 4. In cases in which the system is coupled to an equilibrium environment, the equilibrium symmetry naturally extends to the latter, as already found in Ref. [18] when initial conditions are in the far past and can be neglected. This implies that, when integrating out the environmental degrees of freedom, the corresponding hybridization kernels (or self-energies) that appear in the reduced theory for the non-unitary dynamics of the system are also symmetric under T β .
5. Importantly, the time contour C β is by itself invariant under T β . Only in this case T β is a symmetry of the field theory. If one chooses to work with another contour, such as the standard Kadanoff-Baym contour C represented in Fig. 1, T β maps a theory where fields are defined on C to another theory where fields are defined on another contour, hence it is not a field-theoretical symmetry. This is the case for the transformation proposed in Eq. (1) of Ref. [18]. It is only when initial and final times are at infinity such that the initial conditions can be forgotten, that C and C β become equivalent (see the discussion in Sect. 3.5), and that Eq. (1) in Ref. [18] becomes a field-theoretical symmetry. This subtlety explains the difference we find with the approach of Ref. [18] when considering the grand-canonical ensemble (i.e. in the presence of a chemical potential µ), or when taking the classical limit.
6. T β is uniquely defined on the contour C β . However, other equivalent contours such as the one represented in Fig. 4 (bottom) are associated with a different equilibrium transformation. In the example of Fig. 4 (bottom), it reads ψ

Proof.
To prove the relation in Eq. (49), (i) we prove the invariance of the action under the transformation T β ; (ii) we discuss the transformation of the source term; (iii) we show the invariance of the integration measure.
(i) The action transforms as hence proving that it is invariant. In the second step above, we simply performed a change of (dummy) integration variable, τ → −τ + aiβ/2, and in the last step we exchanged the boundaries of integration.
(ii) The source term transforms as (iii) The functional integration measure is invariant under the transformation T β for two reasons: T β is involutive and it therefore has unit Jacobian, and the integration domain corresponds, before and after the transformation, to integrating over real-valued fields.

Ward identities and fluctuation-dissipation theorem
The symmetry of the action under T β translates to discrete Ward-Takahashi identities at the level of correlation functions. Let us investigate the immediate consequences of this symmetry on the Keldysh Green's functions iG ab (t, and a, b = +, −. In order to express them in our modified formalism, we use the equivalence with J a β (τ ) = J a (τ − aiβ/4) and τ a = t + aiβ/4. . . . indicates the average with respect to Z[J + = J − = 0], the zero-source Kadanoff-Baym generating functional expressed in Eq. (5), and . . . β is the average with respect to Z β [J + β = J − β = 0] given in Eq. (43). This yields Using the analyticity of Green's functions, followed by the symmetry under T β and, later, the commutativity of real fields, we obtain the relation which reads, equivalently, Using the time-translational invariance of equilibrium dynamics, which makes Green's functions depend on the time difference t − t ′ , we get the following Ward-Takahashi identities corresponding to the discrete equilibrium symmetry: In particular, setting a = −, b = +, this reads Rather than working in the ±-basis, it is more natural to perform a Keldysh rotation and work with the Keldysh (G K ), retarded (G R ), and advanced (G A ) Green's functions. They are related to the greater and lesser Green's functions through Expressed in the Keldysh basis, Eq. (66) is the quantum fluctuation-dissipation theorem, which relates the linear response (right-hand side), to the equilibrium correlation function (left-hand side). This real-time expression of the quantum FDT, is one of the important immediate consequences of the symmetry unveiled above. Note that while we used the invariance of the action under T β = K β • T, the sole invariance of the zero-source generating functional Z β [J + β = J − β = 0] under K β is enough to prove the FDT. Bosonic and fermionic versions. In the case of bosonic or fermionic fields, the derivation closely follows the previous steps. For bosons, one obtains the same expression as in Eq. (69), while for fermions, the anti-commutation of the fields yields Note that when working with initial conditions in the grand-canonical rather than canonical ensemble, i.e. ρ(−t 0 ) ∼ e −β(H(−t 0 )−µN ) , the corresponding equilibrium generating functional can be obtained rather straightforwardly and is quite similar to the one in Eq. (43). See also the discussion around Eq. (31). We simply mention that its source term reads a=± C a β dτ J a β (τ ⊕ aiβ/4) * e aβµ/4 ψ a (τ ) + e −aβµ/4 ψ a (τ ) * J a β (τ ⊕ aiβ/4) .
Importantly, the equilibrium transformation T β that leaves the zero-source generating functional invariant is unchanged. In particular, T β does not involve the chemical potential µ. This is different from the transformation T β proposed in Ref. [18]. Ultimately, the constant factors e ±βµ/4 in the above expression enter the fluctuation theorems in Eqs. (69) and (70) through simply replacing the derivative operator

Schwinger-Keldysh limit
When systems thermalize (either by being in contact with a thermal bath, or self-thermalizing through many-body interactions), their subsequent dynamics cannot depend on the initial conditions. In the limit −t 0 → −∞, one can therefore safely drop the Matsubara-like imaginarytime branches C + ′ β ∪ C − ′ β from the path integral. This yields a time contour that is simply composed of infinite forward and backward branches. Their vertical position in the complex plane is now irrelevant, making our equilibrium contour completely equivalent to the so-called Schwinger-Keldysh real-time contour, see Fig. 5.
Given the time-independence of the Hamiltonian, and the infinite time axis, it is convenient to work with the Fourier modes of the fields, ψ(ω), with the correspondence ψ(τ ) = dω 2π e −iωτ ψ(ω). In this language, the transformation T β that leaves the action invariant reads which reads just as in Ref. [18]. In the Keldysh basis defined by the rotation it becomes for ω ∈ R. The transformation T β can be seen as a hyperbolic rotation in Keldysh space with an energy dependent angle βω/2 (i.e. a KMS transform) combined with a field conjugation (i.e. time reversal). In accordance with Eq. (70), the resulting quantum fluctuationdissipation theorem reads The real part of the retarded Green's function can be computed using the Kramers-Kronig relation.

Non-equilibrium dynamics: breaking the symmetry
In this Section, we relax the assumption of equilibrium dynamics made in Sect. 3, and consider cases in which the system is driven out of equilibrium by time-dependent potential forces: where λ(t) ∈ R is a time-dependent protocol controlled externally. Although equilibrium considerations lead us to introduce the complex time re-parametrization τ a (t) ≡ t + aiβ/4, and its corresponding equilibrium contour C β represented in Fig. 3, we continue working in this framework since it will prove to be handy. There has been a long debate in the literature concerning the appropriate definition of work and entropy production along a single non-equilibrium quantum trajectory. Starting from unquestionable definitions of the average work W , i.e. once averaged over all quantum trajectories, different propositions for single-trajectory definitions were put forward. In the case of isolated systems, the conservation of energy yields W = Tr[ρ(t 0 )H(λ(t 0 ))] − Tr[ρ(−t 0 )H(λ(−t 0 ))]. This lead to propose a definition of work along a single trajectory as a two-time projective measurement of the total energy of the system: W = E(λ(t 0 )) n − E(λ(−t 0 )) m where the E(λ) n 's are the instantaneous eigenvalues of H(λ). While successful in many ways, e.g. in deriving the quantum work fluctuation relations, this prevents from giving a concrete meaning to work until the second projective measurement is performed. Other proposals started from systems which can exchange heat with an environment. In these cases, the first law yields W = t 0 −t 0 dt ∂ t λ(t) Tr[ρ(t)∂ λ H(λ(t))]. In particular, this approach recently inspired Deffner to propose an expression for the quantum entropy production along a single path in phase space [32], see also Ref. [33] for an earlier similar proposition.
Below, we shall follow the same procedure developed in Ref. [9] for classical systems. We identify the symmetry-breaking term that is generated in the transformation of the zero-source generating functional under T β . This quantity turns out to be a fundamental measure of the degree of irreversibility, defined at the level of a single Keldysh trajectory. Considering many limits, we find that it displays all the properties one would expect of a quantum version of the dissipated work, if ever such a notion exists. To the best of our knowledge, this is the first time that the framework of stochastic thermodynamics [34], i.e. classical thermodynamics at the level of individual trajectories, is successfully generalized to the quantum realm.

Variation of the action under T β
We compute the variation of Z[J + = J − = 0; λ], the zero-source non-equilibrium generating functional derived in Eq. (26), under the transformation T β given in Eq. (46). We recall that where the initial partition function has been written in terms of the free energy F λ (−t 0 ) = −β −1 ln Z λ (−t 0 ). The action can be rewritten as the sum to two terms with where L a β [ψ a (τ a (t)); t] = − a iβ/4 The terms involving L 0 [ψ(t)] are automatically invariant under T β , see Sect. 3. Therefore, we are left with the transformation of L 1 , where we introduced the time-reversed protocolλ(t) ≡ λ(−t). Altogether, we obtain dx ψ a (t + aiβ/4)|e axβ/4 Ad H(λ(t)) ∂ t H(λ(t))|ψ a (t + aiβ/4) Therefore, we find that the action transforms as where, for reasons that will soon become evident, we introduced the real quantity Altogether, adding the contribution of the initial partition function, the exponent of Z[J + = J − = 0; λ] in Eq. (77) transforms as Remarks.
1. In the absence of a non-equilibrium drive (e.g. for λ(t) =λ(t) = constant), the transformation in Eq. (88) naturally boils down to the symmetry of the action discussed in Sect. 3: 2. The first two terms in the right-hand side of Eq. (88) directly supersede their equilibrium counterparts recalled in Eq. (89). They correspond to the expression of Z[J + = J − = 0;λ], i.e. to the dynamics of the same system under a time-reversed protocolλ(t) = λ(−t).
3. The last two terms in the right-hand side of Eq. (88), namely β∆Fλ − Σ β [ψ + , ψ − ;λ], do not have an equilibrium counterpart. They are symmetry-breaking terms generated by the transformation T β , and more precisely by the time reversal T (recall that T β = K β •T). β∆Fλ simply corresponds to the free energy difference between the initial and the final "virtual" equilibrium states. We characterize Σ β [ψ + , ψ − ;λ] below. 5. Re-writing the transformation T β as the combination of time reversal with a KMS transformation, T β = K β • T [see Eq. (50)], it is interesting to note that K β has the same effect as in equilibrium:
In the second line, we made use of the assumption that the Hamiltonian is even under the time-reversal operator, i.e. ΘH(t)Θ = H(t), hence M = e −xβ/4 Ad H(λ(t)) ∂ t H(λ(t)) is also even, ensuring that ψ|M |ψ is a real quantity where M can therefore be replaced by its Hermitian component: ψ|M |ψ = ψ|(M + M † )/2|ψ . In the conventional Kadanoff-Baym formulation, i.e. deforming back the formalism to the original contour C and therefore dropping the subscript β, Σ β [ψ + , ψ − ; λ] corresponds to where we introduced the Hermitian rate operatoṙ σ a (t) ≡ aβ/2 ∂ t λ(t) where the cosh in Eq. (93) has to be understood as a sum of exponentials and we recall that e Ad Y X = e Y Xe −Y . We shall see below that, (i) the classical limit of Σ[ψ + , ψ − ; λ] corresponds to the work performed by the external protocol λ(t) on a given trajectory of the system (cf. Sect. 5.4); (ii) its average over all quantum trajectories, Σ , yields the average work only when the process in reversible; (iii) the quantity Σ −β∆F λ is a measure of the irreversibility generated in the process (cf. Sect. 4.3); (iv) the statistics of Σ[ψ + , ψ − ; λ] obey the fluctuation relations. This leads us to conclude that the functional Σ[ψ + , ψ − ; λ] − β∆F λ is a measure of irreversibility per individual Keldysh trajectory, and can be seen as a quantum generalization of the notion of dissipated work. Although we prefer to remain cautious before giving a name to the operatorσ a (t) introduced in Eq. (94), it surely plays a role physically equivalent to the long-sought entropy production rate operator.
Average value. Performing the average over all trajectories, after a rotation back to the original basis, and the use of the analytic properties of time-dependent observables, we obtain where H(t; λ(t)) = Tr [ρ(t)H(λ(t))] is the average energy at time t. This expression for the average measure of irreversibility is one of the main results of this manuscript. It is a true physical quantity which does not involve prior knowledge of our formalism, and which can, in principle, be measured in experiments. For example, if the time-dependent Hamiltonian is of the form H(t) = H 0 + λ(t) V and λ(±t 0 ) = 0, this reads In the second line, we displayed the first correction to the average work defined as W = ]. Aside boundary terms, the higher corrections involve an infinite series of the odd derivatives of λ(t).
Reversible process. In case of a slowly-varying external protocol, if the system is able to relax fast enough such that its average energy depends on time only through the control parameter, i.e. H(λ(t)) , then Σ in Eq. (95) simply reduces to the average quantummechanical work (in units of β): Note that for an infinitely arge many-body system, the above assumptions typically require the system to be coupled to a fast-relaxing heat bath. Consider, for example, the interacting electrons of a Hubbard model accelerated by a constant electric field [35,36]. Clearly, in the absence of a heat bath, even the tiniest electric field will make the average energy monotonically increase in time (until an infinite effective temperature steady state is eventually reached). Reversing or turning off the electric field will not reduce the average energy that has accumulated in the system.
Simple example: driven two-level system. To illustrate the physical content of the novel quantity Σ, we consider a simple quantum-mechanical system driven out of equilibrium and we follow its dynamics by means of exact numerical integration. We choose a two-level system, prepared in thermal equilibrium at temperature β −1 , and evolved with respect to the Hamiltonian where σ x and σ z are the usual Pauli matrices. The time-dependent protocol λ(t) = λ 0 [1 + exp(−2t/t λ )] −1 , represented in the inset of Fig. 6, continuously passes from 0 to λ 0 > 0 on a timescale set by t λ . In Fig. 6, we represent the evolution of Σ(t) =

Quantum fluctuation theorems
Beyond its average value, more information on Σ β [ψ + , ψ − ; λ] defined in Eq. (91) -or equivalently on Σ[ψ + , ψ − ; λ] in Eq. (92) -can be obtained by studying its asymmetric statistics. These are the so-called fluctuation theorems. Within our approach, they simply and naturally result from the generation of symmetry-breaking terms when the zero-source generating functional is transformed under T β . While quantum fluctuation theorems were already associated to the breaking of time-reversal symmetry [37], we believe it is the first time that a proof is given using a path-integral formalism. The main difference with the previous quantum fluctuation theorems is that we do not rely on a two-time measurement projecting the system onto eigenstates at the initial and final time.
To illustrate this novel measure of irreversibility, let us consider the two-level system introduced around Eq. (99). The time evolution of S irr (t) is numerically computed and displayed in Fig. 7. As expected, it is a positive quantity which reduces to the classical creation of entropy, β W(t) − β∆F, in the limit of a reversible process or in the high-temperature regime.
Crooks fluctuation theorem. Let us consider the probability that Σ β [ψ + , ψ − ; λ] be Σ under the protocol λ. When transformed under T β , it immediately yields a Crooks fluctuation theorem, whereλ(t) ≡ λ(−t) is the time-reversed protocol. Notice that Eq. (104) is different from the well-known quantum work fluctuation theorem that characterizes the statistics of work W, computed (in a closed system) as the energy difference between the final and initial time [19,22]. In fact, Eq. (104) focuses on a different quantity, Σ, which does not rely on such a two-time projective measurement. Let us now introduce the following quantity defined on a single Keldysh trajectory on the contour C β , that corresponds, on the conventional Kadanoff-Baym contour C, to and is such that its average matches S irr β [ψ + , ψ − ; λ] β = Σ − β∆F λ ≡ S irr . It is straightforward to derive a fluctuation relation for this fluctuating quantity: This relates the amount of irreversibily generated/destroyed between the initial and final time under the protocol λ(t) with the one generated/destroyed under the time-reversed protocol.
In the absence of a time-dependent protocol, we simply obtain P (S irr ) = P (−S irr ) e S irr , expressing the exponentially small probability that irreversibility decreases on a given trajectory.
Generalized fluctuation theorems. The above fluctuation theorems can be systematically generalized to any physical quantity X . The strategy is the following: (i) first, start from the conventional path-integral expression of X in the Kadanoff-Baym formulation; (ii) next, deform the Kadanoff-Baym contour C to the equilibrium contour C β ; (iii) then, apply the transformation T β ; (iv) finally, deform back the contour to the original contour C. For example, let us start with the Green's function iG ab where the left subscript λ indicates that the average is computed with respect to the protocol λ(t). We have where in the last two lines, the average is computed with respect to the time-reversed protocol λ(t) = λ(−t). The properties that we used are, in the first line, in the second line, and in the last line, Σ β [ψ + , ψ − , λ] deform.

Classical limit
We have in mind the case of a classical particle of mass m and coordinate ψ in a timedependent potential V (ψ; λ(t)), with Lagrangian L[ψ(t); t] = 1 2 m∂ 2 t ψ(t) − V (ψ(t); λ(t)). The generalization to more complex systems is straightforward. The classical limit of our real scalar field theory is obtained by taking the limit → 0. Let us therefore re-introduce the factors of and work in the Keldysh basis, i.e. rotate the forward and backward fields to the so-called classical and quantum fields,

Generating functional
In the classical limit, the terms of the unithermal Lagrangian that contribute to the action are at most of order , i.e.
The classical limit of the action in Eq. (78), where H[ψ(t); t] is the energy of a given configuration ψ(t) at time t. We used the boundary conditionsψ(−t 0 ) =ψ(t 0 ) = 0 that follow from those discussed in Sect. 2 in the quantum case. In the last term of the action above, one recognizes the Euler-Lagrange equation of motion. It is strictly enforced by the overall integration overψ(t) which acts as a Lagrange multiplier. The classical generating functional reads where iψ β (t) = iψ(t) + β/2 ∂ t ψ(t) .
The following classical Kubo formula expresses the linear response function as a two-point correlation function: Thermal bath. If the system is in contact with a thermal bath at temperature β −1 during the whole evolution, the action S cl is supplemented by a dissipative contribution of the form (here for an additive white noise) with the friction coefficient η ≥ 0.

Equilibrium symmetry
The classical version of the equilibrium transformation in Eq. (46) reads Note that, similarly to the quantum case, both ψ andψ remain real after the transformation. Once in the MSRJD language, we recover the equilibrium symmetry discussed in Ref. [9] T eq : Similarly to the quantum case, the classical version of T β in Eq. (126) can be seen as the composition of a time-reversal transformation T : Note that in Ref. [18] the transformation (127) is obtained directly as the classical limit of the transformation (Eq. (27) in Ref. [18]), without any additional field transformation. As noticed previously, this is due to the difference in the contour chosen to set up the field theory, see the discussion in Sec. 3.3, and shows the difference between the two approaches.
Therefore R(t, t ′ ) transforms as The proof of the fluctuation-dissipation theorem is immediate after we assume time-translational invariance and we use the causality of the response function. In this way we obtain where ϑ(t) is the Heaviside step function. Generalized fluctuation-dissipation theorems, involving responses of more complex quantities to generic linear perturbations, or higher-order multi-time correlation functions, can be derived in a similar fashion [9].

Broken symmetry: fluctuation theorems
In the same spirit as in the quantum case, fluctuation theorems are immediately obtained from the symmetry-breaking terms that are spontaneously generated by the transformation of the action under T β . In the classical limit, the functional Σ β [ψ + , ψ − ; λ] identified in Eq. (91) simplifies to the work W[ψ; λ] performed by the protocol λ(t) along a trajectory ψ(t), Transforming the left-hand side of 1 = 1, we obtain the Jarzynski equality [42,43] e β∆F λ e −βW[ψ;λ] = 1 .
Starting from P λ (W) = δ(W[ψ; λ] − W) , the probability of the work to be W under the protocol λ, we obtain the Crooks fluctuation theorem on the statistics of the work [44,45,46,47],

Conclusions
In this manuscript, we contributed to a program that started half a century ago in the context of the stochastic dynamics of classical systems coupled to a thermal environment: we managed to identify the symmetry corresponding to quantum equilibrium dynamics within a Keldyshlike path-integral formalism. It is a universal (model-independent) discrete symmetry of the action which encodes the dynamics. It combines a time reversal and a KMS transformation of the fields. At the level of observables, the corresponding Ward-Takahashi identities provided a new derivation of the well-known quantum fluctuation-dissipation theorem in terms of a path-integral formulation. This progress was made possible by our extension of the Keldysh field theory to arbitrary re-parametrization of time in the complex plane.
More importantly, we understood how non-equilibrium conditions, such as a time-dependent potential, break this symmetry and we interpreted the symmetry-breaking terms that are generated in terms of production of irreversibility. This allowed us to derive what is, we believe, the first proof of the quantum fluctuation theorems within a path-integral formulation, and to generalize the approach to derive new relations between multi-point correlation functions, a result not only physically but also technically important for quantum field theory. As a by-product, we identified the measure of the irreversibility S irr [ψ + , ψ − ; λ] generated at the level of a single non-equilibrium quantum trajectory, thus solving a longstanding problem and bringing the field of stochastic thermodynamics to the realm of quantum physics.
The reformulation of equilibrium and non-equilibrium dynamics in terms of symmetry and symmetry breaking promises to be a powerful approach to analyze the non-equilibrium properties of quantum many-body systems. Indeed, these systems are typically intractable either analytically or numerically, and light-weight symmetry-based arguments could unlock some of the hard problems, especially in the context of thermalization.