Generalized laws of thermodynamics in the presence of correlations

The laws of thermodynamics, despite their wide range of applicability, are known to break down when systems are correlated with their environments. Here we generalize thermodynamics to physical scenarios which allow presence of correlations, including those where strong correlations are present. We exploit the connection between information and physics, and introduce a consistent redefinition of heat dissipation by systematically accounting for the information flow from system to bath in terms of the conditional entropy. As a consequence, the formula for the Helmholtz free energy is accordingly modified. Such a remedy not only fixes the apparent violations of Landauer’s erasure principle and the second law due to anomalous heat flows, but also leads to a generally valid reformulation of the laws of thermodynamics. In this information-theoretic approach, correlations between system and environment store work potential. Thus, in this view, the apparent anomalous heat flows are the refrigeration processes driven by such potentials.

T hermodynamics is one of the most successful physical theories ever formulated. Though it was initially developed to deal with steam engines and, in particular, the problem of conversion of heat into mechanical work, it has survived even after the scientific revolutions of relativity and quantum mechanics. Inspired by resource theories, recently developed in quantum information, a renewed effort has been made to understand the foundations of thermodynamics in the quantum domain [1][2][3][4][5][6][7][8][9][10][11] , including its connections to statistical mechanics [12][13][14] and information theory [15][16][17][18][19][20][21][22][23][24][25] . However, all these approaches assume that the system is initially uncorrelated from the bath. In fact, in the presence of correlations, the laws of thermodynamics can be violated. In particular, when there are inter-system correlations, phenomena such as anomalous heat flows from cold to hot baths 26 , and memory erasure accompanied by work extraction instead of heat dissipation 24 become possible.
These two examples indicate a violation of the second law in its Clausius formulation, and the Landauer's principle of information erasure 15 respectively. Due to the interrelation between the different laws of thermodynamics, the zeroth law and the first law can also be violated (see Supplementary Note 4 for simple and explicit examples of these violations).
The theory of thermodynamics can be summarized in its three main laws. The zeroth law introduces the notion of thermal equilibrium as an equivalence relation of states, where temperature is the parameter that labels the different equivalence classes. In particular, the transitive property of the equivalence relation implies that if a body A is in equilibrium with a body B, and B is with a third body C, then A and C are also in equilibrium. The first law assures energy conservation. It states that in a thermodynamic process not all of energy changes are of the same nature and distinguishes between work, the type of energy that allows for "useful" operations as raising a weight, and its complement heat, any energy change which is not work. Finally, the second law establishes an arrow of time. It has several formulations and perhaps the most common one is the Clausius statement, which reads: No process is possible whose sole result is the transfer of heat from a cooler to a hotter body. Such a restriction not only introduces the fundamental limit on how and to what extent various forms of energy can be converted to accessible mechanical work, but also implies the existence of an additional state function, the entropy, which has to increase. There is also the third law of thermodynamics; we shall, however, leave it out of the discussion, as it is beyond immediate context of the physical scenarios considered here.
Although the laws of thermodynamics were developed phenomenologically, they have profound implications in information theory. The paradigmatic example is the Landauer erasure principle, which states: "Any logically irreversible manipulation of information, such as the erasure of a bit or the merging of two computation paths, must be accompanied by a corresponding entropy increase in non-information-bearing degrees of freedom of the information processing apparatus or its environment" 17 . Therefore, an erasing operation is bound to be associated with a heat flow to the environment.
An important feature in the microscopic regime is that the quantum particles can exhibit non-trivial correlations, such as entanglement 27 and other quantum correlations 28 . Thermodynamics in the presence of correlations has been considered only in limited physical situations. It is assumed, in nearly all cases of thermodynamical processes, that system and bath are initially uncorrelated, although correlations may appear in the course of the process. In fact, it has been noted that in the presence of such correlations, Landauer's erasure principle could be violated 15 . Even more strikingly, with strong quantum correlation between two thermal baths of different temperatures, heat could flow from the colder bath to the hotter one 26,29,30 .
The impact of inter-system correlations resulting from a strong system-bath coupling and its role in thermodynamics has been studied for some specific solvable models [31][32][33] , and for general classical systems 34,35 . It has been noted that the presence of correlations requires certain adjustments of work and heat to fulfil the second law and the Landauer principle. Also, from an information theoretic perspective, both extractable work from correlations and work cost to create correlations have been studied 25,[36][37][38] . However, in all these works, there is no explanation of how to deal with general correlated scenarios irrespective of where the correlations come from and in systems away from thermal equilibrium.
Here we show that the violations of the laws of thermodynamics (Supplementary Note 4) indicate that correlations between two systems, irrespective of the corresponding marginals being thermal states or not, manifest out-of-equilibrium phenomena. In order to re-establish the laws of thermodynamics, one not only has to look at the local marginal systems, but also the correlations between them. In particular, we start by redefining the notions of heat and work, then establish a generalized Landauer's principle and introduce the generalized Helmholtz free energy. The resulting laws are general in the sense that they rely on the least set of assumptions to formulate thermodynamics: a system, a considerably large thermal bath at well defined temperature, and separable initial and final Hamiltonians. The first two assumptions are obvious. The third assumption is basically required for system's and bath's energies to be well defined (see Supplementary Note 2 for details).

Results
Definition of heat. To reformulate thermodynamics, we start with redefining heat by properly accounting for the information flow and thereby restoring Landauer's erasure principle. In general, heat is defined as the flow of energy from the environment, normally considered as a thermal bath at certain temperature, to a system, in some way different from work. Work, on the other hand, is quantified as the flow of energy, say to a bath or to an external agent, that could be extractable (or accessible). Consider a thermal bath with Hamiltonian H B and at temperature T represented by the Gibbs state is the partition function. The degrees of freedom in B are considered to be a part of a large thermal superbath, at temperature T. Then, for a process that transforms the thermal bath ρ B ! ρ′ B with the fixed Hamiltonian H B , the heat transfer to the bath is quantified (see Supplementary Note 1) as where Heat expressed in Eq. (1) is the correct quantification of heat (for further discussion see Supplementary Note 1), which can be justified in two ways. First, it has a clear information theoretic interpretation, which accounts for the information flow to the bath. Second, it is the flow of energy to the bath other than work and, with the condition of entropy preservation, any other form of energy flow to the bath will be stored as extractable work, and thus will not converted into heat. The process-dependent character of heat as defined here can be seen from the fact that it cannot be written as a difference of state functions of the system. In the Supplementary Note 1, this issue is discussed and the sources of irreversibility, i.e., the reasons for not saturating the Clausius inequality, are re-examined.
The transformations considered in our framework are entropypreserving operations. More explicitly, given a system-bath setting initially in a state ρ SB , in which the reduced state of the system ρ S is arbitrary while ρ B is thermal, we consider The Hamiltonians of the system and the bath are the same before and after the transformation Λ(·). Note that we do not demand energy conservation, rather assuming that a suitable battery takes care of that. In fact, the work cost of such an operation Λ(·) is quantified by the global internal energy change ΔW = ΔE S + ΔE B . Another comment to make is that we implicitly assume a bath of unbounded size; namely, it consists of the part ρ B of which we explicitly track the correlations with S, but also of arbitrarily many independent degrees of freedom. Also, we are implicitly considering always the asymptotic scenario of n → ∞ copies of the state in question ("thermodynamic limit"). These operations are general and include any process and situation in standard thermodynamics involving a single bath. It is the result of abstracting the essential elements of thermodynamic processes: existence of a thermal bath and global entropy preservation operations.
In extending thermodynamics in correlated scenarios and linking thermodynamics with information, we consider the quantum conditional entropy as the natural quantity to represent information content in the system as well as in the correlations. For a joint system-bath state ρ SB , the information content in the system S, given all the information available in the bath B at temperature T, is quantified by the conditional entropy S SjB ð Þ ¼ S ρ SB ð ÞÀS ρ B ð Þ. It vanishes when the joint systemenvironment state is perfectly classically correlated and can even become negative in the presence of entanglement.
Generalized second law of information. With quantum conditional entropy, the generalized second law of information can be stated as follows. For an entropy-preserving operation ρ′ SB ¼ Λ SB ρ SB ð Þ, with the reduced states before (after) the evolution denoted ρ S ρ′ S ð Þ and ρ B ρ′ B ð Þ, respectively, we have where ΔS B ¼ S ρ′ B ð ÞÀS ρ B ð Þ is the change in (von Neumann) entropy of the bath, and ΔS SjB ð Þ ¼ S S′jB′ ð ÞÀS SjB ð Þ is the change in conditional entropy of the system. Note that in the presence of initial correlations, the informational second law could be violated if one considers only system entropy (see Supplementary Note 3).
Let us point out that the conditional entropy of the system for a given bath is also used in ref. 24 in the context of erasing. There, it is shown that the conditional entropy quantifies the amount of work necessary to erase quantum information. The formalism in ref. 24 considers energy preserving but non-entropy-preserving operations and that perfectly enables to quantify work. In contrast, in our formalism, as we attempt to quantify heat in connection with information flow, it is absolutely necessary to guarantee information conservation, thereby restrict ourselves to entropy-preserving operations. This leads us to quantify heat in terms of conditional entropy. Both approaches are different and complement each other. In one, the conditional entropy quantifies work, and on the other, it quantifies heat.
Generalized Landauer's principle. The Landauer principle is required to be expressed in terms of conditional entropy of the system, rather than its local entropy. Therefore, the dissipated heat associated to information erasure of a system S connected to a bath B at temperature T by an entropy-preserving operation Note that, in complete information erasure, the final conditional entropy vanishes, then ΔQ ¼ ÀkT S SjB ð Þ.
Generalized Helmholtz free energy. We address extraction of work from a system S possibly correlated to a bath B at temperature T. Without loss of generality, we assume that the system Hamiltonian H s is unchanged in the process. Note that the extractable work has two contributions: one comes from systembath correlations (cf. ref. 25) and the other from the local system alone, irrespective of its correlations with the bath. Here we consider these two contribution separately. By extracting work from the correlation, we mean any process that returns the system and the bath in the original reduced states, ρ S and ρ B = τ B . The maximum extractable work solely from the correlation, using entropy-preserving operations, is given by where I S : B ð Þ¼S S þ S B À S SB is the mutual information. This is illustrated in Fig. 1. The proof is given by the protocol described below.
Protocol 1: work extraction from correlations. Addition of an ancillary system: We attach to ρ SB an ancillary system A with trivial Hamiltonian H A = 0, consisting of I S : B ð Þ qubits in the maximally mixed state τ A ¼ I2 2 À Á I S:B ð Þ (which is thermal!).
Removing the correlations between S and B: By using a global entropy-preserving operation, we make a transformation and thereby turning the additional state into a pure state τ′ A ¼ ϕ j i ϕ h j of A, while leaving the marginal system and bath states unchanged. Clearly, the extractable work stored in the correlation is now transferred to the new additional system state τ′ L .
Work extraction: Work is extracted from τ′ L at temperature T, equal to W C ¼ I S : B ð Þ ρ SB kT. Disregarding the correlations with a bath at temperature T, the maximum extractable work from a state ρ s is given by is the corresponding thermal state of the system in equilibrium with the bath. Now, in addition to this "local work", we have the work due to correlations, and so the total extractable work ΔW S ¼ ΔW L þ kT I S : B ð Þ ρ SB . Note that, for the system alone, the Helmholtz free energy F ρ S ð Þ ¼ E S À kT S S . However, in the presence of correlations, it is modified to generalized Helmholtz Unlike the traditional free energy, the generalized free energy is not only a state function of the system S, but also of those degrees of freedom of the bath correlated with it. This is an unavoidable feature of the generalized formalism. Therefore, for a system-bath state ρ SB , maximum extractable work from the system can be given Then, for a transformation, for which initial and final states are ρ SB and σ SB , respectively, the maximum extractable work from the system, is We observe that all this is of course consistent with what we know from situations with an uncorrelated bath. Indeed, we can simply make the conceptual step of calling SB "the system", allowing for arbitrary correlations between S and B, with a suitable infinite bath B' that is uncorrelated from SB. Then, the free energy as we know it is where the first term is the modified free energy in Eq. (6), and the second term is the free energy of the bath in its thermal state. As the latter cannot become smaller in any entropy-preserving operation, the maximum extractable work is ÀΔF .
Generalized laws of thermodynamics. Now, equipped with the proper definition of heat (as in Eq. (3)) and work (based on generalized free energy in Eq. (6)) in the presence of correlations, we put forward the generalized laws of thermodynamics.
We start with generalized first law, which states: given an entropy-preserving operation ρ SB ! ρ ′ SB , the distribution of the change in the system's internal energy into work and heat satisfies where the heat dissipated to the bath is given by ΔQ ¼ ÀkT ΔS SjB ð Þ, the maximum extractable work from the system is ΔW S ¼ À ΔE S À kT ΔS SjB ð Þ ð Þ , and the work performed on the bath is The quantity ΔW S ¼ À ΔE S À kTΔS SjB ð Þ ð Þ was shown to be the maximum extractable work, as it is equal to ÀΔF S . The maximum work ΔW S is extracted by thermodynamically reversible processes. Irreversible processes require that some work is performed on the bath ΔF B > 0 followed by an equilibration process, which happens due to spontaneous relaxation of the bath. Such amount of work is transformed into heat and hence cannot be accessed any more. Note that such an equilibration process is not entropy preserving 12 which is not allowed in our setup. The entropy production of such relaxation is precisely ΔF B /T, and in that case heat flow from the bath is exactly equal to the decrease of its internal energy.
In this new approach, the second law is also modified. The Clausius statement of the generalized second law states that no process is possible whose sole result is the transfer of heat from a cooler to a hotter body, where the work potential stored in the correlations, as defined in Eq. (4), does not decrease. To prove it, consider a state transformation ρ′ AB ¼ Λ AB ρ AB ð Þwhere Λ AB is an entropy-preserving and an energy-non-increasing operation. As the thermal state minimizes the free energy, the final reduced states ρ′ S and ρ′ B have increased their free energy, i.e., ΔE A À kT A ΔS A ⩾ 0 and ΔE B À kT B ΔS B ⩾ 0, where T A/B , ΔE A/B and ΔS A=B are the initial temperatures, changes in internal energy and entropy of the baths, respectively. By adding the former inequalities and considering energy non-increasing, we get which implies Clausius statement of the generalized second law. Note that if the initial state ρ AB is correlated, then the change in mutual information could be negative, ΔI A : B ð Þ⩽ 0, and ÀΔQ A T B À T A ð Þ⩽ 0. Note that for T A ⩽ T B and ΔI A : B ð Þ⩽ 0, there could be a heat flow from the cold to the hot bath ΔQ A ⩾ 0, i.e., an apparent anomalous heat flow. From our new perspective, we interpret the anomalous heat flow as a refrigeration driven by the work potential stored in correlations. In this case, it is interesting to determine its coefficient of performance η cop , that from Eq. (8) leads, with the work performed on the hot bath ΔW C (T B ) = −kT B ΔI (A:B), to which is nothing else than the Carnot coefficient of performance (Fig. 2). Note that we have taken the work value of the correlations W C with respect to the hot bath T B . This is due to the fact that for this refrigeration process the hot bath is the one acting as a reservoir. Equation (9) is a nice reconciliation with traditional thermodynamics. The Carnot coefficient of performance is a consequence of the fact that reversible processes are optimal, otherwise the perpetual mobile could be build by concatenating a "better" process and a reversed reversible one. Hence, it is natural that the refrigeration process driven by the work stored in the correlations preserves Carnot statement of second law. Fig. 2 Anomalous heat flows. In the presence of correlations, spontaneous heat flows from cold to hot baths are possible 26 . This is an apparent violation of second law, if one ignores the work potential stored in correlation. Otherwise, it is a refrigeration process Fig. 3 Violation of the zeroth law. In the presence of correlations, the notion of equilibrium is not an equivalence relation. Consider 3-party state ρ B ⊗ρ AC with all marginals thermal states. The thermal equilibria A + ( B and B + ( C imply that A, B and C share the same temperature. But, in the presence of correlations between A and C, that does not assure the equilibrium A + ( C. Therefore, the transitive property of the equivalence relation is violated. This is justified, on the right, as F ρ AC ð Þ>F ρ A ρ C ð Þ . Thus, the generalized zeroth law has to overcome these limitations Now, we reconstruct the zeroth law which can be violated in the presence of correlations as shown in Fig. 3. To do this, we redefine the notion of equilibrium beyond an equivalence relation when correlations between systems are present. Thus, the generalized zeroth law states that, a collection {ρ X } X of states is said to be in mutual thermal equilibrium with each other if and only if no work can be extracted from any of their combinations under entropy-preserving operations. This is the case if and only if all the parties X are uncorrelated and each of them is in a thermal state with the same temperature.

Discussion
Landauer exorcised Maxwell's demon and saved the second law of thermodynamics by taking into account the work potential of information. In this work, we extend this idea to include also the information about the system that is stored in its correlations with the environment. With this approach, we easily resolve the apparent violations of thermodynamics in correlated scenarios, and generalize it by reformulating its zeroth, first, and second laws.
An important remark is that, our generalized thermodynamics is formulated in the asymptotic limit of many copies. A relevant question is how the laws of thermodynamics are expressed for a single system. In our forthcoming paper, we will address these questions by discussing consistent notions of one-shot heat, oneshot Landauer erasure, and of one-shot work extraction from correlations.
Data availability. Data sharing not applicable to this article as no data sets were generated or analyzed during the current study.