Entropy production and the arrow of time

We present an exact relationship between the entropy production and the distinguishability of a process from its time-reverse, quantified by the relative entropy between forward and backward states. The relationship is shown to remain valid for a wide family of initial conditions, such as canonical, constrained canonical, multi-canonical and grand canonical distributions, as well as both for classical and quantum systems.


Introduction
Providing a microscopic expression for the entropy production has been one of the grand aims of statistical mechanics, going back to the seminal work of Boltzmann. However, both the range of validity of the second law and of its proposed derivations have, from the very beginning, generated discussion and controversy. The recent discovery of the fluctuation and work theorems [1,2,3,4,5,6] has re-invigorated the debate. These intriguing results provide equalities involving the probability distributions for work or entropy production, and appear to be of specific interest for the study of small systems [7,8,9]. With respect to the average value of work or entropy production, they are consistent with the second law, but provide no additional information beyond it. In a recent work [10] (see also [11]) we have derived, from first principles, the exact value of the average dissipated work W diss upon bringing a system from one canonical equilibrium state at a temperature T into another one at the same temperature. The dissipated work is defined as the extra amount of work, on top of the difference of free energy ∆F , that is required for making this transition. Its expression reads: Here k is the Boltzmann constant and ρ = ρ(Γ; t) is the probability density in phase space to observe the system to be in a micro-state Γ = (q, p) specified by a set of positions q and momenta p at an intermediate time t. The averaging brackets denote an average with respect to the density ρ. The other densityρ =ρ(Γ; t) represents the distribution in the time-reversed process observed at a corresponding time-reversed phase point Γ = (q, −p) at the same time as the forward process. As an example, consider compression and expansion of a gas in a cylinder, a forward experiment corresponding to the expansion of a gas by moving a piston from an initial to a final position; the backward experiment corresponds to performing the motion of the piston in the timereversed manner. The statistics of the micro-states are taken at the same intermediate position of the piston. Both forward and backward experiment are assumed to start in canonical equilibrium at the same temperature. The dissipated work (1) can also be written in terms of a well known and powerful concept from information theory, the relative entropy or Kullback-Leibler distance between two probability densities [12]: where D(ρ ρ) = dΓ ρ(Γ, t) ln ρ(Γ, t) ρ(Γ, t) = dΓρ(Γ, t) ln ρ(Γ, t) − dΓρ(Γ, t) lnρ(Γ, t) .
is the relative entropy between ρ andρ. Written in this way, the result reveals its deep meaning, linking the dissipation directly to the irreversibility of the underlying experiment. Indeed the relative entropy between probability densities is expressing the difficulty of distinguishing samplings from these densities [12]. In the present case, it measures the difficulty of distinguishing whether observed data of the microstate correspond to those from a forward or backward experiment. Therefore, the relative entropy (4) can be considered as a quantitative measure of the arrow of time [13,14,15,16,17,18,19,20,21,22,23,24,25]. At the end of the forward process, the system is generally speaking in a nonequilibrium state, for which the entropy is not well defined. Hence, to make the connection with the entropy production, we introduce an idealized heat bath at temperature T , with which the system is put in contact at the end of the forward experiment, without extra work. The system thus relaxes back to canonical equilibrium, which is also the starting state of the backward process. During the relaxation, the system transfers an average amount of heat Q to the bath. We can now evaluate the total entropy production. On the one hand, the entropy change in the bath, assuming it operates quasi-statically, is given by Q/T . On the other hand, the entropy change between the canonical equilibrium state of initial and final states in the system reads: Here we used the relation F = U − T S, where U = H is the equilibrium internal energy, calculated with respect to the prevailing canonical distribution, and S the thermodynamic entropy of the system. The total entropy production (in the total device, system plus heat bath) in the forward process, ∆S, is thus equal to the dissipated W diss divided by temperature, hence: This result goes right to the core of the second law, as it provides an exact explicit microscopic expression for the total entropy production in the considered scenario. This scenario is very specific: the system is initially at canonical equilibrium, and disconnected from any heat bath during the perturbation [10]. These assumptions greatly simplify the derivation, but also generate the misleading impression that they are essential. The aim of this paper is to further clarify the status of the basic results (5), and to show that it has a wider range of validity.
Our discussion will be based on a general and exact mathematical identity for the relative entropy, derived in Sec. 2, which is valid for arbitrary initial conditions in the forward and backward process. In Sec. 3, this identity is applied to different scenarios, including various types of initial equilibrium states, such as grand canonical ensembles, constrained equilibrium states, and multi-canonical distributions at different temperatures. In each of these cases, the entropy production is (aside a factor k) equal to the relative entropy of the phase space density between the forward and the backward states, provided some idealized relaxation process is assumed at the end of the forward process. In Sec. 4, we present the quantum analogue of the above result, expressed in terms of the quantum relative entropy [26,27,28].

General Formulation
We consider a system described by the Hamiltonian H(Γ; λ), with λ a control parameter that describes the energy exchange with an external device. For simplicity, we will assume that the Hamiltonian is an even function with respect to inversion of momenta. As is well known, the probability density in phase space ρ(Γ, t) to observe the system in a specific micro-state Γ at time t obeys the Liouville equation: In a classical system, the Liouville operator L is given by Poisson brackets: Lρ = {H, ρ} = ∂ q H∂ p ρ − ∂ p H∂ q ρ (summation convention over all positions and momenta is assumed). An important implication of the Liouville theorem is that the Shannon entropy associated to ρ, namely: is constant in time, as can be easily proven by applying the Liouville equation followed by partial integration [16]. This appears to be in contradiction with the second law of thermodynamics, or at least precludes the use of this expression as a microscopic definition for the entropy. In fact, we share the general opinion that entropy is not defined at the microscopic level except when the system is at equilibrium. The Shannon entropy (7) reduces to the proper thermodynamic entropy only for systems at equilibrium. An essential remark for the further discussion is that the above property remains valid for a smooth time-dependent Hamiltonian or Liouvillian. We will henceforth focus on scenarios where the control parameter λ is changed from an initial value λ A to a final value λ B , according to a specific protocol λ(t), t ∈ [0, τ ]. We also consider a time-reversed experiment, starting at the final value λ B of the control parameter, and performing the time-reversed perturbation. The quantities appearing in this setting will be indicated by a superscript tilde. We will always use the forward time t to designate time in both forward and backward experiment, keeping in mind that the corresponding real time in the backward experiment is equal to τ − t. The initial conditions for both forward and backward experiments are for the moment left unspecified. The above setup is reminiscent of the one introduced by Jarzynski in his derivation of the Jarzynski equality [4], although the scope of our derivation extends, as we will see, well beyond the validity of the Jarzynski equality.
The key observation is that the phase space density of backward evolution with reversed momenta, namelyρ(Γ, t), obeys the same Liouville equation (6) with respect to the forward time variable t: The transition from Eq. (6) to Eq. (8) is based on micro-reversibility: trajectories retrace their steps upon reversing the schedule of λ and inverting momenta.
Mathematically, the result follows easily by writing the Liouville equation forρ in its proper time τ − t. When switching to the forward time t, the negative sign, due to the time derivative in the l.h.s. of the Liouville equation, is canceled by another one in the r.h.s., appearing upon inverting the momenta. As a particular example, for the case of a time-independent Hamiltonian, the above statement reduces to the fact that ρ(Γ, t) and ρ(Γ, τ − t), obey the same Liouville equation, when the time-derivative is with respect to t.
We can now invoke a remarkable property for probability distributions that obey the same Liouville equation: their relative entropy is invariant in time [16,29]. In particular, the following quantity: is time-invariant, as can again be easily verified by applying Liouville's equation followed by partial integration. The invariance in time of (7) and (9) now allows us to rewrite the quantity of central interest, namely the relative entropy (4), as follows. Since each term in the r.h.s. of Eq. (4) is invariant under time translation, we can shift time in the first term back to t = 0, and in the second term forward to t = τ : We stress again that this is an exact result, valid for any initial conditions for ρ andρ. For specific choices of these states, we proceed to make the connection with the entropy production in a variety of scenarios. Note also that the above result will only be usefull if the support ofρ includes the support of ρ, i.e., there are no phase points for which ρ = 0 and ρ = 0. Otherwise D(ρ ρ) diverges.

Explicit entropy production in different scenarios
Along this section, we apply Eq. (10) for specific choices of equilibrium initial conditions ρ(Γ, 0) andρ(Γ, τ ) in forward and backward process, respectively. We will see that in all the considered cases, the resulting relative entropy is equal to the entropy production along the forward process. If ρ(Γ, 0) is an equilibrium distribution or the product of independent equilibrium distributions, Shannon entropy is equal to the thermodynamic entropy: This equality holds for different equilibrium ensembles, such as canonical and grand canonical. With this choice of initial condition for the forward process the first term in Eq. (10) is minus the initial equilibrium entropy. In the following, we will prove that the second term can be identified with the final entropy. As mentioned in previous sections, in this paper we only consider as meaningful the entropy of equilibrium states. On the other hand, after the forward process is completed at time τ , the resulting state ρ(Γ, τ ) is not at equilibrium. In order to have a well defined expression for the entropy production, we need some relaxation mechanism to equilibrium after the forward process has been completed. The function of this mechanism is twofold: it allows us to have a meaningful definition of entropy production, and also drives the system from the non equilibrium final state ρ(Γ, τ ) to the equilibrium oneρ(Γ, τ ), which is the initial condition for the backward process. ‡ Notice that the relaxation from ρ(Γ, τ ) toρ(Γ, τ ) in an isolated system is incompatible with the Liouville theorem. Our derivation does not touch on this old and unresolved problem. Instead, for the relaxation toρ(Γ, τ ), we invoke the presence of one or several ideal (super)baths, to which the system is weakly coupled. This relaxation can, in principle, be performed without any extra energy input, since coupling the superbath with just one degree of freedom of the system is enough to induce thermalization [30]. Moreover, if this degree of freedom is chosen to have zero mean (for instance, one of the momenta of the bath), then the average work done by switching on the coupling is strictly zero. Finally, we will assume that the entropy production in the superbaths, due to exchange of energy and/or particles with the system, is given by the standard expressions from statistical mechanics and thermodynamics. Note that such or similar assumptions also appear in the various derivations of both fluctuation and work theorems, and in the study of nonequilibrium steady states. They are also intrinsically present in the formulations via mesoscopic stochastic descriptions.

Canonical distributions
In our first example, we start the forward process with a canonical distribution at temperature T and, after the process is completed at time τ , we connect the system with a thermal bath at a different temperature T ′ . The initial condition for the backward process is in this case a canonical distribution at temperature T ′ : Z(T, λ) = dΓe −βH(Γ,λ) being the partition function. Recalling that we consider Hamiltonians even functions of the momenta, we obtain from Eq. (10) and (11): where averages · t are taken over the forward time density ρ(Γ, τ ) and ‡ This relaxation will take some time τ rel . However, recall that our time variable t inρ(Γ, t) denotes the stage of the process, using the forward one as reference, rather than the real physical time t phys . In a complete forward-backward cycle, the time variable inρ(Γ, t) will be t = 2τ + τ rel − t phys , soρ(Γ, τ ) is the state of the system at t phys = τ + τ rel ).
is the usual equilibrium free energy. After relaxation to equilibrium with the bath at temperature T ′ , the average energy of the system becomes H eq,τ , which is only a function of λ B and T ′ . In the relaxation, the system transfers an amount of energy to the thermal bath Q = H τ − H eq,τ . Therefore: where S(τ ) is the final entropy of the system (in equilibrium at temperature T ′ ), and ∆S bath is the increase of the entropy in the bath. Therefore, the relative entropy is equal to the total entropy production along the forward process plus the final relaxation: ∆S = kD(ρ||ρ). Notice that all entropies have been calculated only for equilibrium states. In fact, this example illustrates that it makes no sense to talk about the entropy produced along the process if one does not specify the final equilibrium state and how is reached. In our case, the total entropy production depends on the final temperature T ′ . Hence, the same forward process λ(t) can have different entropy production depending on the final temperature T ′ .

General equilibrium distribution
The above example can be easily generalized to an arbitrary equilibrium distribution defined over some conserved quantities A i (Γ) (i = 1, . . . , r), with conjugated variables α i = T ∂S/∂A i and the corresponding thermodynamic potential U(T, α) = H + i α i A i − T S. After the forward process, the system is coupled to a reservoir characterized by temperature T ′ and certain values α ′ i of the conjugated variables. The initial condition for the backward process reads: Hence During relaxation, there is a transfer of energy and of the conserved quantities A i from the system to the reservoir given, respectively, by Q = H τ − H eq,τ and ∆A i = A i τ − A i eq,τ . The final entropy of the system is and the entropy increase in the reservoir is ∆S bath = (Q + i α ′ i ∆A i )/T ′ . The cross term (18) is then equal to S(τ ) + ∆S bath . If, along the forward process, the external agent moving λ(t) does not undergo any change of entropy, we again find Eq. (5): ∆S = kD(ρ||ρ).
Notice that the cross entropy (18) contains precisely the non equilibrium average values, H τ and A i (Γ) τ , yielding the correct expression for the final equilibrium entropy of the system S(τ ) plus the entropy increase in the bath ∆S bath .
As a particular case, consider A = N the number of particles. Then, −α = µ, the chemical potential. In equilibrium, the thermodynamic potential is the so-called grand canonical potential, where the averages · eq are taken with respect to the grand canonical ensemble We now choose as initial condition for the forward process a grand canonical ensemble characterized by temperature T and chemical potential µ. We proceed with the forward process by changing λ(t) (N remaining constant to avoid change of entropy in the external agent moving λ). After the process is completed we connect the system with a particle and energy reservoir at temperature T ′ and chemical potential µ ′ . In the relaxation, there will be an exchange of energy and particles between the system and the bath, as explained above. Finally, the total entropy production along the forward process plus the relaxation is given by the relative entropy between forward and backward states, Eq. (5).

Multicanonical distribution
The above examples can be extended to the product of several equilibrium states. We consider the special case where systems at different temperatures are brought into contact with each other. This case is of particular interest since thermal exchange is another standard example of entropy production. Also, the present scenario produces in the appropriate limit, e.g., the limit of infinitely large thermal reservoirs, a stationary nonequilibrium state. We will thus show that our formula of entropy production as a relative phase space entropy also applies in this example of a nonequilibrium steady state. Consider n systems i = 1, · · · , n, at the initial time decoupled, and each one at canonical equilibrium at temperature T i : We will assume a similar initial state for the backward process, decoupled systems but with arbitrary temperatures T ′ i , i.e.: While the systems are decoupled both at initial and final times, thermal contact with each other can be established during intermediate stages of the process by an appropriate choice of the time-dependent Hamiltonian. One possibility is adding to the original decoupled Hamiltonians a coupling term inducing energy exchange and multiplied by the control parameter λ(t), set equal to zero at initial and final times. Eq. (10) gives us the following result: As in our previous examples, each subsystem transfers to their corresponding thermal baths an energy eq,τ being the equilibrium energy of each subsystem after the relaxation toρ(Γ, τ ). Therefore: Hence, the total entropy produced in the entire forward process (plus relaxation) is again given by the relative entropy, Eq. (5). Similar arguments can be applied to multi-grand canonical distributions, allowing chemical reactions and exchange of particles between the system and the final reservoirs.

Constrained canonical distributions and filters
Finally, we now apply the general result Eq. (10) to the case of canonical states restricted to subdomains of the phase space. One can imagine two scenarios leading to such restricted initial states, namely: (a) the system is subject to constraints in the initial and/or final states, or (b) one selects (or restricts the observation to) that specific set of trajectories that lie within a prescribed subdomain of phase space; this selection can, in principle, be performed at any intermediate time of the process. In both cases, the relevant initial condition for the forward process can be written as follows: where the characteristic function is defined as for any subset D in the phase space. The partition function is then defined as Z(β, λ; D) = D dΓ e −βH(Γ;λ) . As initial condition for the backward process we consider: The prescriptions for D A and D B are as follows. For case (a), the subsets D A and D B reproduce the imposed initial constraints for the forward and backward processes, respectively. For case (b), the set of filtered forward trajectories equals D A at the initial time t = 0 and D B at the final time τ . For simplicity, we will assume that D B is invariant under inversion of momenta p → −p.
The relative entropy (10) now reads: There are two possible interpretations of this result. If the restriction of microstates to D A and D B is due to a filter, as in scenario (b), the initial and final free energies must be calculated over the whole phase space. In this case, we have The ratios between the restricted and the non-restricted partition functions are precisely the probability that an arbitrary trajectory passes the filter in the forward (p D A ) and backward processes (p D B ), respectively. Therefore, we obtain the following exact equality: In particular, the non-negativeness of the relative entropy yields the following inequality: which was derived in [10] using the Liouville theorem and applied to a Brownian version of the Szilard engine and the restore-to-zero process introduced by Landauer.
On the other hand, if the restriction is due to constraints in the system at t = 0 and τ , the logarithm of the restricted partition functions can be considered as the actual initial and final free energies. Hence, we recover the same result as in the canonical case: It is worthwhile to illustrate the last case on a concrete example, especially since the Jarzynksi and Crooks equalities are failing for this kind of scenario [31]. We consider the case of free expansion of a gas from a volume V /2 to a final volume V . The Hamiltonian in this case is time-independent, but we can still apply our theory to this process consisting of a free relaxation from a restricted initial condition. In the forward process, the gas is initially in canonical equilibrium, but confined to one half of the container, with vacuum in the other half. It is subsequently allowed to expand and fill the entire container. Since the Hamiltonian is time independent, the backward process starts with the gas at equilibrium filling the whole volume V of the container, and obviously remaining so for all times. We thus have where the characteristic function χ V (Γ) is 1 for microstates with all the particles in the volume V and 0 otherwise. Now the relative entropy is since the energy is conserved along the evolution (H has no explicit time-dependence).
There is no work performed in this experiment, W = 0, and thus −∆F is the dissipative work (the work that we waste compared to a reversible expansion). Therefore, Eqs.
(1) and (5) remain valid, even though the Jarzynski and Crooks relations no longer hold.

Quantum version
Just as the Jarzynski equality has been shown to remain valid for quantum processes [32,33,34,35,36,37,38,39,40,41,42], we now show that our approach can easily be extended to the quantum. Time evolution in quantum mechanics is ruled by unitary transformations. In particular the density operator obeys the following quantum version of the Liouville equation: Under this unitary evolution, the Von Neumann entropy S N (ρ) = −kTr(ρ ln ρ) is preserved. For the time-reversed process, the time-reversed density operatorρ = ΘρΘ −1 satisfies the same quantum Liouville equation if the forward time t is used (the actual time is τ − t in the same sense as in the classical case). Here Θ is the anti-linear timereversal operator and a fundamental symmetry of the Hamiltonian ΘH(t) = H(t)Θ is assumed [45]. Noting that ΘpΘ −1 = −p, the commutation of H and Θ is, in the present context, equivalent to the assumption that the classical Hamiltonian is symmetric with respect to the inversion of momenta. Then, we can prove that Tr(ρ lnρ) is also time invariant. In general, both von Neumann entropy and the quantum relative entropy are invariant under any unitary transformation [28]. Hence, each term in the quantum version of the relative entropy [26]: can again be shifted to the initial and final time, respectively: which is analogous to the classical result (10). By using the appropriate choices of initial and final equilibrium density matrices, one can easily derive the quantum versions of all the aforementioned classical results. As an illustration, we present the quantum version of Eq. (1). Substituting canonical equilibrium density operators where the partition function is Z(T, λ) = Tr e −βH(λ) . into Eq. (37), we again obtains

Measuring the relative entropy
While our general formula for entropy production is exact and may be useful as the starting point for other theoretical investigations, the experimental or even numerical measurement of the phase space density may practically not be feasible. As shown in Ref. [10], one can still have a good estimate of the relative entropy through the measurement of a limited number of physical quantities. With this partial information, it is clear that the distinction between the forward and backward processes becomes harder. Mathematically, this is tantamount to saying that the relative entropy decreases when only partial information of the system is used: where p andp are the probability distributions of the quantities used to describe the system in the forward and backward process, respectively. We have checked the accuracy of this inequality in different situations [10,43,24]. It is remarkable that, in the canonical scenario with T = T ′ , the variables coupled with λ(t) are enough to saturate the inequality [24]. The quantum case is more involved. One can lose information about the state of the system in different ways: by performing specific measurements or by tracing out the degrees of freedom of a subsystem, such as a thermal bath. In any of these two cases, we can derive an inequality similar to (40).
Consider first a measurement of the observableΩ = i ω i P i where the projection operator satisfies the closure relation: i P i = I. The probability to obtain ω i is given by p i = Tr(ρP i ) andp i = Tr(ρP i ) for the forward and backward processes, respectively. Then, from the joint convexity of the relative entropy [28], we have where the discrete version of classical relative entropy is defined as It should be stressed that the corresponding von Neumann entropy shows the opposite inequality, namely, Since some information is lost, the Shannon information entropy increases. However, this result should not be interpreted as the increase of thermodynamic entropy due to the quantum measurement since the quantum states after measurement are not in thermal equilibrium and the Shannon entropy does not correspond to thermodynamic entropy. The inequality merely indicates that an estimate of von Neumann entropy using the probability distribution of measured quantities provides an upper bound.
Next we consider compound systems. For simplicity, we consider a bipartite system consisting of two subsystems a and b. The total Hilbert space is the product space H a+b = H a ⊗ H b . If we are interested in the state of the subsystem a, the other subsystem can be traced out to obtain a reduced density operator ρ a = Tr b ρ a+b . The monotonicity of the relative entropy states [26]: Since we lose some information about the system, again we cannot find the exact amount of the dissipation. However, the relative entropy of reduced densities provides its lower bound.
While the quantum version of the relative entropy shows the same properties as the classical version, it is, again, worth mentioning that the von Neumann entropy satisfies an unusual inequality: This property of sub-additivity is quite remarkable since, unlike the classical Shannon entropy, the entropy of a subsystem can be larger than that of the whole system. This observation plays an important role in quantum information theory. Furthermore, the role of such specific quantum features on the foundations of statistical mechanics is the object of an ongoing debate [46,47,48,49].

Conclusions
We have shown that the relative entropy or Kullback-Leibler distance between the forward and backward state is equal to the entropy production along the forward processes in different scenarios, both classical and quantum. Stein's lemma [12] gives a precise meaning to the relative entropy D(ρ A ||ρ B ) between two distributions ρ A and ρ B : if n data from ρ B are given, the probability of guessing incorrectly that the data come from ρ A is bounded by 2 −nD(ρ A ||ρ B ) , for n large. Therefore, the relative entropy is a quantitative measure of the distinguishibility between the two distributions. In the case of the forward ρ(t) and backwardρ(t) states of a system, the relative entropy D(ρ(t)||ρ(t)) measures the distinguishibility of the direction of time. Therefore, our main result ∆S = kD(ρ(t)||ρ(t)), is a quantitative relationship between entropy production and the arrow of time.
We have proven this identity in a number of scenarios, by choosing the appropriate initial conditions for the forward and the backward process. The identity is valid whenever ρ(0) andρ(τ ) are given by equilibrium states or factorized equilibrium states (such as in the multicanonical case).
From a fundamental point of view, one can of course argue, as we already mentioned in the introduction, that we have merely shifted the issues of relaxation and entropy production to the purported properties of the bath. While this is, strictly speaking, indeed the case, the resulting expression of the entropy production in terms of relative entropy, Eq. (5), incorporates two fundamental properties, namely time-translational invariance (Liouville equation) and time-reversibility of the laws of physics. Hence, our explicit expression for the entropy production quantified as the statistical time asymmetry, is very much in the spirit of Onsager's work on the symmetry of the Onsager coefficients, resulting from the same ingredients, Liouville's theorem and microreversibility.
Finally, in the quantum case, while the extension of our results to quantum processes looks straightforward, at least mathematically, there are intriguing fundamental questions. For example, how do decoherence, quantum measurement and quantum entanglement contribute to the fluctuation theorems and ultimately to the second law? On the other hand, the von Neumann entropy and the quantum relative entropy can detect such processes through the change in the density operators. In fact, these entropies are used to quantify the degree of entanglement in quantum information theory [28,27]. Therefore, our novel approach for irreversibility in quantum processes allows one to investigate quantum non-equilibrium thermodynamics involving entanglement and decoherence from a novel perspective.