Thermodynamics as a Consequence of Information Conservation

Thermodynamics and information have intricate interrelations. Often thermodynamics is considered to be the logical premise to justify that information is physical - through Landauer's principle -, thereby also linking information and thermodynamics. This approach towards information has been instrumental to understand thermodynamics of logical and physical processes, both in the classical and quantum domain. In the present work, we formulate thermodynamics as an exclusive consequence of information conservation. The framework can be applied to the most general situations, beyond the traditional assumptions in thermodynamics: we allow systems and thermal baths to be quantum, of arbitrary sizes and possessing inter-system correlations. Here, systems and baths are not treated differently, rather both are considered on an equal footing. This leads us to introduce a"temperature"-independent formulation of thermodynamics. We rely on the fact that, for a fixed amount of information, measured by the von Neumann entropy, any system can be transformed to a state with the same entropy that possesses minimal energy. This state, known as a completely passive state, acquires Boltzmann-Gibbs canonical form with an intrinsic temperature. We introduce the notions of bound and free energy and use them to quantify heat and work, respectively. Guided by the principle of information conservation, we develop universal notions of equilibrium, heat and work, Landauer's principle and universal fundamental laws of thermodynamics. We demonstrate that the maximum efficiency of a quantum engine with a finite bath is in general lower than that of an ideal Carnot engine. We introduce a resource theoretic framework for our intrinsic temperature based thermodynamics, within which we address the problem of work extraction and state transformations. Finally, the framework is extended to multiple conserved quantities.


I. INTRODUCTION
Thermodynamics constitutes one of the most basic foundations of modern science. It not only plays an important role in modern technologies, but offers also basic understanding of the vast range of natural phenomena. Initially, thermodynamics was developed in a phenomenological way to address the question on how, and to what extent, heat could be converted into work. But, in the later course with the developments of statistical mechanics, quantum mechanics and relativity, thermodynamics along with its fundamental laws has attained quite a formal and mathematically rigorous form [1]. It finds applications in ultra-large large systems, where it describes relativistic phenomena in astrophysics and cosmology, in microscopic systems, where it describes quantum effects, or in very complex systems in biology and chemistry.
The inter-relation between information and thermodynamics [2] is very intricate, and has been studied in the context of Maxwell's demon [3][4][5][6], Szilard's engine [7], and Landauer's principle [8][9][10][11][12]. In the recent years, classical and quantum information theoretic approaches help us to understand thermodynamics in the domain of small classical and quantum systems [13][14][15]. That stimulated a whole new perspective to tackle and extend thermodynamics beyond the standard classical domain. In fact, information theory has recently played an important role in understanding thermodynamics in the * mnbera@gmail.com presence of inter-system and system-bath correlations [16][17][18], equilibration processes [19][20][21][22], or foundations of statistical mechanics [23]. One of the most paradigmatic examples of this success is the formulation of quantum thermodynamics within the, so called, resource theoretic framework [24], which allows to reproduce standard thermodynamics in the asymptotic limit, when one processes infinitely many copies of the system under consideration. In the finite copy limit, commonly known as one-shot limit, the resource theory reveals that the laws of thermodynamics have to be modified to dictate the transformations on the quantum level [25][26][27][28][29][30][31][32][33].
In this work, elaborating in the inter-relations between information and thermodynamics, we make an axiomatic construction of thermodynamics and identify the "information conservation" as the crucial underlying property of any theory that respects it. The corner-stone of our construction is the notion of bound energy, which we introduce as the amount of energy locked in a system that cannot be accessed (extracted) given a set of allowed operations. The bound energy obviously depends on the set of allowed operations: the more powerful the allowed operations are, the smaller the bound energy. We prove that, by taking (i) global entropy preserving (EP) operations as the set of allowed operations and (ii) infinitely large thermal baths initially uncorrelated from the system, our formalism reproduces standard thermodynamics.
In information theory, the Von Neumann entropy is the quantity that measures the amount of information hidden in a system. In this sense, entropy preserving operations are transformations that keep this information constant. All fundamental physical theories, such as classical and quantum mechan-ics, share the property of conserving information. That is, they have dynamics, which are deterministic and they bijectively map the set of possible configurations between any two instants of time. Thus, non-determinism can only appear, when some degrees of freedom are ignored, leading to apparent information loss. In classical physics this information loss is due to deterministic chaos and mixing in nonlinear dynamics. In quantum mechanics this loss is intrinsic, and occurs due to measurement processes and non-local correlations [34]. One can well argue that the set of entropy preserving operations is larger than the reversible operations (unitaries) in the sense that they conserve entropy but, unlike unitaries, not the individual probabilities. This is the reason why we denote them as coarse-grained information conservation. In the limit of many copies both coarse-grained and fine-grained information conservation become equivalent (see Sec. II). While it is known that linear operations that are entropy preserving for all states are unitary [40], it is an open question to what extent coarse-grained information conserving operations can be implemented in the single-copy limit.
The resource theory of thermodynamics can then be seen as a sharpener of the condition (i), i. e. an extension of thermodynamics from coarse-grained to fine-grained information conservation, where the operations are global unitaries but still constrained to infinitely large thermal baths with a well defined temperature. Fluctuation theorems can also be seen from this perspective. There, the second law is obtained as a consequence of reversible transformations on initially thermal states or states with a well defined temperature [35,36]. In contrast, the aim of our work is instead to relax condition (ii), that is, to generalize thermodynamics to be valid for arbitrary environments, irrespective of being thermal, or much larger than the system. This idea is illustrated in the table below. The main obstruction against this generalization relies on the fact that, when allowing for arbitrary states as environment, large amounts of resources can be pumped into the system leading to trivial "resource" theories. We are able to circumvent this problem thanks to the notion of bound energy, which intrinsically distinguishes accessible and non accessible energy. Our formalism results in a theory, in which systems and environments are treated in equal footing, or in other words, in a "temperature"-independent formulation of thermodynamics. Our work is complementary to other general approaches, where thermodynamics are obtained after inserting some form of thermal state(s) in general mathematical expressions, e.g. [37]. While in these works the mathematical expressions for arbitrary states have no a priori thermodynamic meaning, our construction is build on a physically motivated quantity, the bound energy.
This "temperature"-independent thermodynamics is essential in contexts in which the state of the bath can be affected by the system after exchange of heat (see [38] for a review on the notion of temperature). This can both be due to the fact of having a relatively small environment compared to the system, or an environment simply not being thermal. In fact, in the current experiments, environments do not have to be necessarily thermal, but can even possess quantum properties, like coherence or correlations.
The power of the entropy preserving operations makes all the states with equal energies and entropies thermodynamically equivalent. This allows for representing all the states and thermodynamic processes in a simple energy-entropy diagram. We exploit this geometric approach and give a diagrammatic representation for heat, work and other thermodynamic quantities. In this way we are able to reproduce several results of the literature, e.g. the resource theory of thermodynamics applicable for arbitrary quantum systems and environments [39]. Our formalism is naturally extended to scenarios with multiple conserved quantities. Finally, we summarize our findings and discuss the main obstructions towards an extension of thermodynamics that is valid both in the single-shot limit and for non-thermal environments.

II. ENTROPY PRESERVING OPERATIONS, ENTROPIC EQUIVALENCE CLASS AND INTRINSIC TEMPERATURE
The set of operations that we consider in this framework is the set of, so called, entropy preserving (EP) operations. Given a system initially in a state ρ, the set of entropy preserving operations are all the operations that arbitrarily change the state, but keep its entropy constant where S (ρ) −Tr (ρ log ρ) is the von Neumann entropy. Importantly, an operation that acts on ρ and produces a state with the same entropy, not necessarily preserves entropy when acting on other states. In fact, such entropy preserving operations are in general not linear, since they have to be constraint to some input state. It was shown in Ref. [40] that a quantum channel Λ(·) that preserves entropy and, at the same time, respects linearity, i. e. Λ(pρ 1 +(1− p)ρ 2 ) = pΛ(ρ 1 )+(1− p)Λ(ρ 2 ), has to be a unitary. However, the entropy preserving operations can be microscopically described by global unitaries in the limit of many copies [39]. Given any two states ρ and σ with equal entropies S (ρ) = S (σ), there exists an additional system of O( n log n) ancillary qubits and a global unitary U such that lim n→∞ Tr anc Uρ ⊗n ⊗ ηU † − σ ⊗n where the partial trace is performed on the ancillary qubits. Here X 1 Tr √ X † X is the one-norm. As shown in Theorem 4 of Ref. [39], the reverse statement is also true. In other words, if two states are related as in Eq. (2), then they also have equal entropies.
As we see later it is important to restrict entropy preserving operations that are also be energy preserving. The energy and entropy preserving operations can also be implemented using a global energy preserving unitary in the many copy limit. More explicitly, in Theorem 1 of Ref. [39], it is shown that having two states ρ and σ with equal entropies and energies, i.e. (S (ρ) = S (σ) and E(ρ) = E(σ)), is equivalent to the existence of some energy preserving U and an additional system A with O( n log n) of ancillary qubits with Hamiltonian H A O(n 2/3 ) in some state η, for which (2) is fulfilled. The operator norm X of a Hermitian operator X corresponds to the largest of its eigenvalues in absolute value. Note that the amount of energy and entropy of the ancillary system per copy vanishes in the large n limit.
We expect entropy preserving operations to be also implemented in other ways than taking the limit of many copies. For instance, in Refs. [41,42], thermal operations are extended to a class of operations, in which a catalyst is allowed to build up correlations with the system. For these operations, the standard Helmholtz free energy singles out as the monotone that establishes the possible transitions between states, in contrast to the case of strict thermal operations, in which all the Rényi α-free energies are required. This suggests that entropy preserving operations could also be implemented with a single copy by means of a catalyst that can become correlated with the system. Further investigation in this direction is needed.
Once the the entropy preserving operations have been motivated and introduced, let us classify the set of states of a system in different equivalence classes depending on their entropy. Thereby, we establish a hierarchy of states according to their information content. More formally, Definition 1 (Entropic equivalence class). Two states ρ and σ on any quantum system of dimension d are equivalent and belong to the same entropic equivalence class if and only if both have the same Von Neumann entropy, Assuming that the system has some fixed Hamiltonian H, one can take as a representative element of every class the state that minimizes the energy within it, i.e., where E(σ) Tr (Hσ) is the energy of the state σ.
The maximum-entropy principle [43,44] identifies the thermal state as the state that maximizes the entropy for a given energy. Conversely, one can show that, for a given entropy, the thermal state also minimizes the energy. We refer to this complementary property as min-energy principle [16,45,46]. Thus, the min-energy principle identifies thermal states as the representative elements of every class, which is The inverse temperature β(ρ) is the parameter that labels the equivalence class, to which the state ρ belongs. We denote β(ρ) as the intrinsic inverse temperature associated to ρ. The state γ(ρ) is, often, termed as the completely passive (CP) state [16] with the minimum internal energy, for the same information content. The CP state, with the form γ(H S , β S ), has the following interesting properties [45,46]: (P1) For a given entropy, it minimizes the energy.
(P2) Both energy and entropy monotonically increase (decrease) with the decrease (increase) in β S , and vice versa.

III. BOUND AND FREE ENERGIES
Let us now identify two relevant forms of internal energy: the free and the bound energy. The bound energy is defined as the amount of internal energy that cannot be accessed in the form of work. Note that it is a notion that is depending on the set of allowed operations. For the set of entropy preserving operations, in which the entropic classes and CP states emerge, it is quantified in the following.
Definition 2 (Bound energy). For a state ρ with the system Hamiltonian H, the bound energy in it is where γ(ρ) is the CP state, with minimum energy, within the equivalence class, to which ρ belongs.
Indeed, B(ρ) is the amount of energy that cannot be extracted further, by exploiting any entropy preserving operations, as guaranteed by the min-energy principle. The above definition of bound energy also has strong connection with information content in the state. It can be easily seen that one could have access to this energy (in the form of work) only, if it allows an outflow of information from the system and vice versa.
In contrast to bound energy, free energy is the part of the internal energy that can be accessed with entropy preserving operations: Definition 3 (Free energy). For a system ρ with system Hamiltonian H S , the free energy stored in the system is given by where B(ρ) is bound energy in ρ.
Note that the free energy as defined in Eq. (7) does not have a preferred temperature, unlike the standard out of equilibrium Helmholtz free energy F T (ρ) E(ρ) − T S (ρ), where the temperature T is decided beforehand with choice of a thermal bath. Nevertheless, our definition of free energy can be written in terms of both the relative entropy and the out of equilibrium free energy as for the intrinsic temperature T (ρ) β(ρ) −1 that labels the equivalence class that contains ρ. Here the relative entropy is defined as D(ρ||σ) = Tr ρ log ρ − ρ log σ . Let us mention that the standard out of equilibrium free energy is also denoted by F β (ρ) E(ρ) − β −1 S (ρ) in the rest of the manuscript, wherever we find it more convenient.
The notions of bound and free energy, as we consider above, can be extended beyond single systems. If fact, in multi-particle (multipartite) systems they exhibit several interesting properties. For example, they can capture the presence and/or absence of inter-party correlations. To highlight these features, we consider a bipartite system below.
Lemma 4 (Bound and free energy properties). Given a bipartite system with non-interacting Hamiltonian H A ⊗ I + I ⊗ H B in an arbitrary state ρ AB and a product state ρ A ⊗ ρ B with marginals ρ A/B Tr B/A (ρ AB ). Then, the bound and the free energy fulfill the following properties: (P4) Bound energy and correlations: (P5) Bound energy of composite systems: (P6) Free energy and correlations: (P7) Free energy of composite systems: In Eqs. Proof. To prove (P4), we have used the fact that, for a fixed Hamiltonian, the bound energy is monotonically increasing with entropy, i.e.
together with the subaddivity property The proof of (P5) relies on the definition of the bound energy, where one exploits entropy preserving (EP) operations to minimize energy. For composite systems, the set of joint EP operations when applied on product states ρ A ⊗ ρ B are strictly larger than the independent local EP operations, i.e.
This immediately implies Eq. (10). To see that the inequality (10) is saturated iff the states pose identical internal temperature, i.e., β(ρ A ) = β(ρ B ), we refer the reader to Definition 6 and Lemma 7.
The other properties can be easily proven by noting that the total internal energy is sum of individual ones and E(ρ AB ) = E(ρ A ) + E(ρ B ), irrespective of inter-system correlations. Then with the definition of free energy is F(ρ X ) = E(ρ X ) − B(ρ X ), (P4) and (P5), we could easily arrive at properties (P6) and (P7).
The above properties allow us to give an additional operational meaning to the free energy F(ρ). Let us remind first that the work that can be extracted from a system in a state ρ when having at our disposal and infinitely large bath at inverse temperature β and global entropy preserving operations is given by where F β (ρ) = E(ρ) − β −1 S (ρ) is the standard free energy with respect to the inverse temperature β and γ(β) is the thermal state, at which the system is left once the work has been extracted.
Lemma 5 (Free energy vs. β-free energy). The free energy F(ρ) corresponds to work extracted by using a bath at the worst possible temperature, The inverse temperature achieves the minimum is the inverse intrinsic temperature β(ρ).
Proof. The proof is a corollary of Lemma 14 together with (P7).

IV. ENERGY-ENTROPY DIAGRAM
Let us describe here the energy-entropy diagram which appears often in thermodynamics literature and in particular has recently been exploited in Ref. [39]. Given a system described by a Hamiltonian H, a state ρ is represented in the energy-entropy diagram by a point with coordinates x ρ (E(ρ), S (ρ)), as shown in Fig. 1. All physical states reside in a region that is lower bounded by the horizontal axis (i.e., S = 0) corresponding to the pure states, and upper bounded by the convex curve (E(β), S (β)) which represents the thermal states of both positive and negative temperatures. Let us denote such a curve as the thermal boundary. The inverse temperature associated to one point of the thermal boundary is given by the slope of the tangent line in such a point, since In Fig. 1, the free energy and the bound energy are plotted given a state ρ. Its free energy F(ρ) can be seen from the diagram as the horizontal distance from the thermal boundary. This is the part of internal energy which can be extracted without altering system's entropy. The slope of the tangent line of the thermal boundary in that point is the intrinsic temperature, β(ρ), of the state ρ. The bound energy B(ρ) is the distance in the horizontal direction between the thermal boundary and the energy reference and it can no way be extracted with entropy preserving operations.
Note that in general a point in the energy-entropy diagram represents multiple states, since different quantum states can have identical entropy and energy. As it is pointed out in [39], the energy-entropy diagram establishes a link between the microscopic and the macroscopic thermodynamics, in the sense that, in the macroscopic limit of many copies all the thermodynamic quantities only rely on the energy and entropy per particle. More precisely, all the states with same entropy and energy are thermodynamically equivalent and, as it was shown in [39], they can be unitarily transformed into each other in the limit of many copies n → ∞ with an ancilla at our disposal, which is of sub-linear size O( n log n) with a Hamiltonian upper bounded by sub-linear bound O(n 2/3 ).

V. EQUILIBRIUM AND ZEROTH LAW
The zeroth law of the thermodynamics establishes the absolute scaling of temperature, in terms of thermal equilibrium. It says that if a system A is in thermal equilibrium with B and again, B is in thermal equilibrium with C, then A will also be in thermal equilibrium with C. All the systems that are in mutual thermal equilibrium can be classified to thermodynamically equivalent class and each state in the class can be assigned with a unique parameter called temperature. In other words, at thermal equilibrium, temperatures of the individual systems will exactly be equal to each other and also to their arbitrary collections, as there would be no spontaneous heat or energy flow in between. Further, when a non-thermal state is brought in contact with a large thermal bath, then the system tends to acquire a thermally equilibrium state with the temperature of the bath. In this equilibration process, the system could exchange both energy and entropy with bath and thereby minimizes its Helmholtz free energy.
However, in the new setup, where a system cannot have access to considerably large thermal bath or in absence of a thermal bath, the equilibration process is expected to be considerably different than that of the cases of large baths. In the following, we introduce a formal definition of equilibration, based on information preservation and intrinsic temperature. Definition 6 (Equilibrium and zeroth law). Given a collection of systems A 1 , . . . , A n with non-interacting Hamiltonians H 1 , . . . H n in a joint state, ρ A 1 ...A n , we call them to be mutually at equilibrium if and only if they "jointly" minimize the free energy as defined in (7), i.e., Let us consider the states ρ A and ρ B , with corresponding Hamiltonians H A and H B respectively. The equilibrium is achieved when they jointly attain an iso-informatic state with minimum energy. Then the corresponding equilibrium state is a completely passive (CP) state γ(H AB , β AB ) with the joint where the local systems also assume the completely passive states but with same β AB . Here we recall that γ( . It also says that if two arbitrary CP states γ(H A , β A ) and γ(H B , β B ) have β A β B , then their combined equilibrium state γ(H AB , β AB ) can, still, jointly reduce boundenergy without altering the total information content. Therefore joint CP state acquires a unique β AB , i.e., which is immediately followed from min-energy principle and (P5). Moreover if β A ≥ β B , then Eq. (19) dictates a bound on β AB , as expressed in Lemma 7: Lemma 7. Any iso-informatic equilibration process between γ(H A , β A ) and γ(H B , β B ), with β A ≥ β B , leads to a mutually equilibrium state γ(H AB , β AB ), irrespective of non-interacting systems' Hamiltonians, where β AB satisfies Proof. Note for β A = β B , (P3) and (P5) immediately lead to β A = β AB = β B . What we need to show is that, for initial β A > β B , the equilibration leads to β A > β AB > β B . It can be seen from information preservation condition on the equilibration process. Say after the equilibration the final temper- changed to a state with higher entropy as a consequence of (P2). Therefore, it de- , which is forbidden by the information preservation condition. Same is also true for the case with β AB > β A ≥ β B . Now consider the other extreme where one has β A > β B = β AB . Then the (P2) In both the cases the information preservation condition is not respected. Therefore only possibility would be β A > β AB > β B . Now with the clear notion of equilibration and equilibrium state which has minimum internal energy for a fixed information content, we could restate zeroth law in terms of internal temperature. By definition, the global CP state has minimum internal energy and one cannot extract free energy by using global EP operations. Further a global CP state not only assures that the individual states are also CP but also confirms that they share the same intrinsic temperature, i.e., β and vanishing inter-system correlations. Therefore we may argue that the individual systems are in mutual equilibrium, but determined by an intrinsic temperature.
We may recover the traditional notion of thermal equilibrium, as well as, zeroth law. In traditional thermodynamics, the thermal bath is considerably large (compared to the systems under consideration), and assumes CP state with a predefined temperature. Mathematically a thermal bath, with bath Hamiltonian H B , can be expressed as Hamiltonian H S is brought in contact with thermal bath, then the global thermal equilibrium state will be a CP state, i.e.,

VI. MAX-ENTROPY PRINCIPLE VS. MIN-ENERGY PRINCIPLE
Let us mention that our framework based on information conservation is suited for the work extraction. It assumes that the system has mechanisms to release energy to some battery or classical field, but it cannot interchange entropy with it. This contrasts with other situations in spontaneous equilibration, in which the system is assumed to evolve keeping constant the conserved quantities. In such scenario, the equilibrium state is described by the principle of maximum entropy, that is, the state the maximizes the entropy given the conserved quantities.
In the context of the maximum entropy principle, let us introduce the absolute athermality as: Definition 8 (Athermality). The athermality of a system in a state ρ and Hamiltonian H is the amount of entropy (information) that the system can still accommodate without increasing its energy, i. e.
where the maximization is made over all states σ with energy E(ρ).
The state σ that maximizes (21) is obviously a thermal state. In particular, it is the equilibrium state of an equilibration process guided by the maximum entropy principle. Let us call the temperature of such thermal state as the spontaneous equilibration temperature and denote it byβ(ρ). The athermality corresponds to the amount of entropy produced during such equilibration.
Note that the spontaneous equilibration temperatureβ(ρ) always differs from the intrinsic temperature β(ρ) unless ρ is thermal. In other words, the maximum entropy and minimum energy principles lead to different equilibrium temperatures. As both entropy and energy are monotonically increas-ing functions of temperature, the equilibrium temperature determined by the minimum energy principle is always smaller than the one determined by the maximum entropy principle. This is represented in the energy entropy diagram of Fig. 2, where the athermality can be seen as the vertical distance from a state ρ to the thermal boundary. The point in which the thermal boundary intersects with the vertical line E = E(ρ) represents the equilibrium thermal state given by the max-entropy principle. Its temperatureβ(ρ) corresponds to the slope of the tangent line of the thermal boundary at that point. Figure 2. Representation of the free energy F(ρ) and the athermality A(ρ) of a state ρ in the energy-entropy diagram. The intrinsic temperature β(ρ) and the spontaneous equilibration temperatureβ(ρ) fulfill β(ρ) >β(ρ) due to the concavity of the thermal boundary.
We have chosen the name "athermality" for the quantity defined in (8) in agreement with Ref. [39]. There, a quantity called β-athermality and defined by with Z β = Tr (e −βH ) the partition function, is introduced to characterise the energy-entropy diagram as the set of all points with positive entropy S (ρ) ≥ 0 and positive β-athermality A β (ρ) ≥ 0 for all β ∈ R.
Lemma 9 (Athermality vs. β-athermality). The athermality of a state ρ can be written in terms of the β-athermalities as where the minimum is attained by the spontaneous equilibration temperatureβ(ρ).
Proof. We prove the lemma by giving a geometric interpretation to the β-athermality in the energy-entropy diagram. In the energy entropy diagram represented in Fig. 3, let us consider the tangent line to the thermal boundary with slope β. Such straight line is formed the set of all points which fulfill where S β and E β are respectively the entropy and the energy of the the point in the thermal boundary that belongs to the line. The vertical distance (difference in entropy) of such line from a point with coordinates (E(ρ), S (ρ)) reads where S * is the entropy of the line at E = E(ρ) and T = β −1 . By noticing that log Z β = β(E β − T S β ), we get that the βathermality of ρ, A(ρ), is the vertical distance of x ρ from the line with slope β tangent to the thermal boundary. Equation (23) trivially follows from this.
) and the β-athermality A β (ρ) for a state ρ with coordinates x ρ in the energy-entropy diagram.
By identifying the β-free energy in Eq. (22), the βathermality can be written as that is, it is β times the work that can be potentially extracted from a state ρ when having an infinite bath uncorrelated from the system at temperature β (see Eq. (14)). From Eq. (26), we see that the difference in β-free energies F β (ρ) − F β (γ(β)) can be represented in the energy-entropy diagram as the horizontal distance from the point x ρ to the tangent line with slope β. This is represented in Fig. 3. Hence, given an infinitely large bath at some inverse temperature β, all the states with the same work potential lie on a line with slope β in the energy-entropy diagram. The work extracted from a state ρ can be decomposed into its free energy F(ρ), the part of energy that could have been extracted without bath, and the rest, that is, the part of energy that has been accessed thanks to the bath. This latter part is closely related to heat. The definition of work and heat are discussed in the next section. Furthermore, thanks to Lemmas 5 and 9, both the free energy and the athermality can be expressed in terms of a minimization over standard β-free energies where the minimum is respectively attained by the intrinsic temperature β(ρ) and the spontaneous equilibration temperatureβ(ρ). Note that, while for positive temperatures both the athermality and the free energy are a measure of out of equilibrium, for negative temperatures, states with small athermality are highly active and have huge free energies.
Let us finally show that in situations as the equilibration of a hot body in contact with a cold one, the intrinsic temperature Figure 4. Energy-entropy diagram of a system with Hamiltonian H. Two systems with the same Hamiltonian H and initially at different temperatures β A and β B equilibrate to different temperature depending on the approach taken: minimum energy principle vs. maximum entropy principle. The equilibrium temperature when entropy is conserved β −1 S is always smaller than the equilibrium temperature when energy is conserved β −1 E , i. e. β S > β E . and the spontaneous equilibration one are not so much different. In Fig. 4, we represent in the energy-entropy diagram for the particular case of the equilibration of a system composed of two identical subsystems initially at different temperatures β A and β B . As expected and due to the concavity of the thermal boundary, the equilibrium temperature given by the constant energy constrain (max. entropy principle) β −1 E is larger that the one given by the constant entropy constrain (min. energy principle) β −1 S , i. e. β E < β S . The difference in bound energies of these two thermal states corresponds precisely to the work extracted in the constant entropy scenario.

VII. WORK, HEAT AND THE FIRST LAW
In thermodynamics, the first law deals with the conservation of energy. In addition, it dictates the distribution of energy over work and heat, that are the two forms of thermodynamically relevant energy transfer.
Let us define a thermodynamic process involving a system A and a bath B as a transformation ρ AB → ρ AB that conserves the global entropy S (ρ AB ) = S (ρ AB ). In standard thermodynamics, the bath is by construction assumed to be initially in a thermal state and completely uncorrelated from the system. In such scenario, the heat dissipated in a process is usually defined as the change in the internal energy of the bath AB is the reduced state of the bath. This definition, however, may have some limitations and an alternative definitions have been discussed recently [18]. In particular, in [18], an information theoretic approach suggests heat to be defined as ∆Q = T B ∆S B with T B being the temperature and ∆S B = S (ρ B ) − S (ρ B ) the change in von Neumann entropy of the bath. Note that ∆S B = −∆S (A|B) is also the conditional entropy change in system A, conditioned on the bath B, defined as S (A|B) = S (ρ AB ) − S (ρ B ), which can be understood as the information flow from the system to the bath in the presence of correlations.
In the present approach, we go beyond the restriction that the environment has to have a definite predefined temperature, and be in the state of the Boltzmann-Gibbs form. For an arbitrary environment, which could even be athermal, the heat transfer is defined in terms of bound energies, as in the following.
Definition 10 (Heat). Given a system A and its environment B, the heat dissipated by the system A in the process ρ AB Λ ep − − → ρ AB is defined as the change in the bound energy of the environment B, i.e.
where B(ρ ( ) B ) is the initial (final) bound energy of the bath B. Note that heat is a process dependent quantity in the sense that there might be different processes with the same initial and final marginal state for A, but different marginals for B. Because the global process is entropy preserving, processes that lead to the same marginal for A, but different marginals with different entropies for B, necessarily imply enabling a different amount of correlations between In the case that the initial state of the environment is thermal ρ B = e −H B /T /Tr (e −H B /T ) with Hamiltonian H B at temperature T , then the heat definition is lower and upper bounded by where the three quantities have been represented in the energy-entropy diagram in Fig. 5. If, on top of that, the process slightly perturbs the environment ρ B = ρ B +δρ B , then, the three definitions of heat coincide, in the sense that That is, in the limit of large thermal baths, the three definitions become equivalent.
Proof. Equation (29) is a consequence of the definitions of heat (28) and bound energy (6), together with Eq. (5). Equation (30) is proven by using the mean value theorem for the function T (s). The lower bound in (31) is due to the concavity of the thermal boundary together with the reminder theorem of a first order Taylor expansion of the thermal boundary (see Fig. 5). The upper bound in (31)  Once the heat has been introduced and related to the standard definitions of heat, let us define work.
Definition 12 (Work). For an arbitrary entropy preserving transformation involving a system A and its environment B, ρ AB → ρ AB , with fixed non-interacting Hamiltonians H A and H B , the worked performed on the system A is defined as, where W = ∆E A + ∆E B is the work cost of implementing the global transformation and ∆F B = F(ρ B ) − F(ρ B ).
Now equipped with the notions of heat and work, the first law takes the form of a mathematical identity.

Lemma 13 (First law).
For an arbitrary entropy preserving transformation involving a system A and its environment B, ρ AB → ρ AB , with fixed non-interacting Hamiltonians H A and H B , the change in energy for A is distributed as Proof. The proof follows from the definitions of work and heat.
Clearly, in a process, −∆W A is the amount of "pure" energy that can be transferred and stored in a battery. While, the ∆Q A is the change in energy due to flow of information from/into the system.

VIII. SECOND LAW
The second law of thermodynamics is formulated in many different forms: an upper bound on the extracted work, the impossibility of converting heat into work completely etc. In this section we show how all these formulations are a consequence of the principle of entropy conservation.

A. Work extraction
Major concern in thermodynamics is to convert any form of energy into work, which can be used for any application with certainty.
Lemma 14 (Work extraction). For an arbitrary composite system ρ, the extractable work by any entropy preserving process ρ → ρ , W = E(ρ) − E(ρ ) is upper-bounded by the free energy where the equality is saturated if and only if ρ = γ(ρ).
If the system has the particular structure ρ = ρ A ⊗ γ B (T B ) with γ B (T B ) being thermal at temperature T B , then where F T (·) is the standard out of equilibrium free energy and the equality is saturated in the limit of an infinitely large bath (infinite heat capacity).
When the system has a composite structure ρ = ρ A ⊗γ B (T B ), then where T AB is the intrinsic temperature of the joint state ρ A ⊗ γ B (T B ). By considering that thermal states have zero free energy, E(γ) = B(γ), and reshuffling the terms above, we recover the first law of thermodynamics where we have identified ∆E A = E(γ A (T AB )) − E(ρ A ) and ∆Q A = B(γ B (T AB )) − B(γ B (T B )). From Eq. (31) in Lemma 11, we have that ∆Q ≥ T B ∆S B . By using now that the whole process is entropy preserving and that initially and finally the subsystems A and B are in a product state, we have that ∆S A = −∆S B , and thus, which proves (36). Finally, in the limit of an infinitely large bath, the intrinsic temperature T AB tends to the bath temperature T B and ∆Q = T B ∆S B , which saturates the bound in Eq. (40).
To see that the intrinsic temperature T AB tends to T B in the limit of large baths, let us increase the bath size by adding several copies of it. The entropy change of such bath reads By considering the bound ∆S B = −∆S A ≤ |A|, we get which, together with the the continuity of S (γ(T )), proves lim n→∞ T AB = T B .
One of the most important questions in thermodynamics is if heat can be converted into work. It was very much fundamental to understand, not only qualitatively but also quantitatively, to what extent and efficiency the heat can be transformed into work. These quests led to various other formulations of second law in standard thermodynamics, like Clausius statement, Kelvin-Planck statement and Carnot statement, to mention a few.
Similar questions can be posed in the frame-work considered here, in terms of bound energy. In the following, analogous forms of second laws that consider these questions qualitatively as well as quantitatively.

B. Clausius statement
Second law, in thermodynamics, not only dictates the direction of state transformations, but also put fundamental bound on extractable work from such transformations. Here we first concentrate on the bounds on extractable work and introduce analogous versions of second law in our setup.

Lemma 15 (Clausius statement). Any iso-informatic process involving two bodies A and B in an arbitrary state with intrinsic temperatures T A and T B respectively fulfills the following inequality
where ∆F A/B is the change in the free energy of the bodyA/B, ∆I(A : B) is the change of mutual information and W = ∆E A + ∆E B is the amount of external work performed on the global setting. In absence of initial correlations between two bodies A and B, the states being initially thermal, and no external work bein performed, meaning that no iso-informatic equilibration process is possible whose sole result is the transfer of heat from a cooler to a hotter body.
Proof. The definition of free and bound energy implies that where have used the definition of heat as the change of bound energy of the environment. From Eq. (31), one gets, where T A/B is the initial intrinsic temperature of the body A/B. Due to the conservation of the total entropy, the change in mutual information can be written as ∆I(A : B) = ∆S A + ∆S B . Putting everything together and noting that sign(∆B) = sign(∆S ) completes the proof.
The terms in the right hand side of Eq. (43) show the three reasons for which the standard Clausius statement can be violated. Either because of the process not being spontaneous (external work is performed W > 0), or due to initial states having free energy which is consumed, or the presence of correlations [18]. An alternative formulation of Clausius statement, for initial and final equilibrium states, is considered in the Appendix A.

C. Kelvin-Planck statement
If the Clausius statement tells us that spontaneously heat cannot flow from a hotter to a colder body, the Kelvin-Plank formulation of second law states that, when heat going from a hotter to a colder body, it cannot be completely transformed into work.

Lemma 16 (Kelvin-Planck statement). Any iso-informatic process involving two bodies A and B in an arbitrary state satisfies the following energy balance
where ∆F A/B is the change in the free energy of the body A/B, ∆Q A/B the heat dissipated by the body A/B, and W = ∆E A + ∆E B is the amount of external work performed on the global setting.
In the case of the reduced states being thermal, and for a work extracting process W < 0, the above equality becomes Finally, in absence of initial correlations, Eq. (48) implies that no iso-informatic equilibration process is possible whose sole result is the absorption of bound energy (heat) from an equilibrium state and its complete conversion into work.
Proof. Equation (47) is a consequence of the the energy balance (45). Equation (48) follows from (47) by considering reduced states that are initially thermal and thereby ∆F A/B 0. To prove the final statement is sufficient to notice that entropy preserving processes on initially uncorrelated systems fulfill ∆S A + ∆S B 0, which together with (48) implies that sign(∆Q A ) = −sign(∆Q B ).
An alternative formulation of Kelvin-Planck statement, for initial and final equilibrium states, is considered in the Appendix B.

D. Carnot statement
A heat engine extracts work from a situation in which two baths A and B have different temperatures T A and T B . The work extraction is usually implemented in practice by means of a working body S which cyclically interacts with A and B.
Here we do not mind on how the working medium interacts with the baths A and B, but just assume that at the end of every cycle the working body is left in its initial state and uncorrelated with the bath(s). In other words, the working body only absorbs heat from a bath and releases to the other one, and at the end of the cycle it comes back to its initial state. From this perspective, the analysis of a heat engine can be made by studying the changes of the environments A and B. In contrast to the standard situation, here we will not assume that baths are infinitely large, but that can have a similar size as the system, and their loss or gain of energy changes their (intrinsic) temperature.
Let us consider that initially the environments A and B are uncorrelated and at equilibrium with temperatures T A and T B respectively, where without loss of generality T A < T B , i. e. ρ AB = γ A ⊗ γ B . After operating the machine for one or several complete cycles, the environments change to ρ AB → ρ AB .
We define the efficiency of work extraction in a heat engine as the fraction of energy that is taken from the hot bath which is transformed into work where −∆E B = E B − E B > 0 is the energy absorbed from the hot environment, and W is the work extracted. In the following, we upper-bound the efficiency of any heat engine.
Lemma 17 (Carnot statement). For an engine working with two initially uncorrelated environments γ A ⊗γ B each in a local equilibrium state with intrinsic temperatures T B > T A , the efficiency of work extraction is bounded by where ∆B A and ∆B B are the change in bound energies of the systems A and B respectively. In the limit of large baths and under global entropy preserving operations, the Carnot efficiency is recovered, Proof. Here the systems could be small in size. Then the maximum extractable work due to the transformation ρ AB → ρ AB is given by The efficiency then reads The condition of A being initially at equilibrium implies that ∆F A 0, from where it follows ∆E A > ∆B A , and analogously for B. Thus, In the limit of large environments in which ∆B A ≪ B A , the change in bound energy becomes ∆B A = T A ∆S A . Hence, If the process is globally entropy preserving, i. e. S AB = S A + S B , then ∆S A + ∆S B 0 or alternatively ∆S A −∆S B , which together with (55) implies (51).

IX. THIRD LAW
The third law of thermodynamics establishes the impossibility of attaining the absolute zero temperature, or according to Nernst, is stated as: "it is impossible to reduce the entropy of a system to its absolute-zero value in a finite number of operations". The third law of thermodynamics has been very recently proven in Ref. [47]. The unattainability of absolute zero entropy is a consequence of the unitarity character of the transformations considered. For instance, consider the transformation where ρ B is a thermal state of the bath B and S is the system to be cooled down (erased), initially in a state ρ S with rank(ρ S ) > 1. Here the dimension of the Hilbert space of the bath, d B , is considered to be arbitrarily large but finite. As ρ B is a full-rank state, the left hand side and the right hand side of Eq. (56) have different ranks, and they cannot be transformed via a unitary transformation. Thus, irrespective of work supply, one cannot attain the absolute zero entropy state. The zero entropy state can only be achieved for infinitely large baths and a sufficient work supply. Assuming a locality structure for the bath's Hamiltonian, this would take an infinitely long time. However, in the finite dimensional case, a quantitative bound on the achievable temperature given a finite amount of resources (e. g. work, time) is derived in [47].
Note that our set of entropy preserving operations is more powerful than unitaries. In this case, transformation (56) is possible given that the the required work to do so will be W = F(|0 0| ⊗ ρ B ) − F(ρ S ⊗ ρ B ). As it has been discussed in Sec. II, entropy preserving operations can be implemented as global unitaries acting on infinitely many copies. Thus, the attainability of the absolute zero entropy state by means of entropy preserving operations is in agreement with the cases of infinitely large baths and unitary operations [47].
In conclusion, the third law of thermodynamics is a consequence of the microscopy reversibility (unitarity) of the transformation and is not respected by entropy preserving operations.

X. A TEMPERATURE INDEPENDENT RESOURCE THEORY OF THERMODYNAMICS
In this section we connect the framework developed above with the standard approach of thermodynamics as a resource theory. The main ingredients of a resource theory are the state space, which is usually compatible with a composition operation -for instance, quantum states together with the tensor product-and a set of of allowed state transformations. In a first attempt to have a resource theory of thermodynamics from our framework, we look like to be bounded to transformations within an equivalence class, that is, between states with equal entropies and same Hilbert spaces. In that case, the set of allowed operations seem reasonable to be defined by the non-increasing energy transformations and the monotone to be given by both energy and entropy. To compare and explore inter-convertibility between states with different entropies or dimensions, it is necessary to extend the set of operations, and in particular to add a composition rule. In order to be able to connect states with different entropies and/or number of particles it is natural to consider different number of copies.
Let us restrict first to the case in which the set of operations is entropy preserving regardless the energy. We wonder what is the rate of transforming ρ into σ and consider without loss of generality that S (ρ) ≤ S (σ). Then, there is a large enough n such that With such a trick of considering a different number of copies, we have brought ρ and σ which had different entropies into the same manifold of equal entropy. There is a subtlety here which is that ρ ⊗n and σ ⊗m live in general in spaces of different dimension. This can be easily circumvented by adding some product state, i. e.
where ρ ⊗n and σ ⊗m ⊗ |0 0| n−m lie now in spaces of the same dimension. Equation (59) can also be understood as a process of randomness compression in which the information in n copies of ρ is compressed to m < n copies of σ and n − m systems have been erased. Thus, in the case of having only an entropy preserving constraint, the transformation rate can be determined from (58) In thermodynamics, however, energy must also be taken into account. When one does that, it could well be that the process (59) is not energetically favorable since E(ρ ⊗n ) < E(σ ⊗m ). In such a case, we would need more copies of ρ, in order for the transformation to be energetically favorable. This would force us to add an entropic ancilla, since otherwise, the initial and final state of such a process would not have the same entropy Figure 6. Representation in the energy-entropy diagram of how the energy and entropy conservation constraints in the transformation ρ ⊗n → σ ⊗m ⊗ φ ⊗n−m imply x ρ , x σ and x φ to be aligned and x ρ to lie in between x σ and x φ .
where the number of copies n and m have to fulfill the energy and entropy conservation constraints The above conditions can be easily written as a geometric equation of the points x ψ = (E(ψ), S (ψ)) with ψ ∈ {ρ, σ, φ} in the energy-entropy diagram where r m/n is the conversion rate, and we have only used the extensivity of both entropy and energy in the number of copies, e.g. E(ρ ⊗n ) = nE(ρ). Equation (63) implies that the three points x ρ,σ,φ need to be aligned. In addition, the fact that 0 ≤ r ≤ 1 implies that x ρ lies in the segment x σ and x φ (see Fig. 6). The conversion rate r has then a geometric interpretation. It is the relative Euclidean distance between x φ and x ρ over the total distance x σ − x φ , or in other words, is the fraction of the path that one has run when going form x φ to x σ and reaches x ρ (see Fig. 6).
In order for the conversion rate r from ρ and σ to be maximum, the state φ needs to lie in the boundary of the energyentropy diagram, that is, it needs to be either a thermal or a pure state. This allows us to quantitatively determine the conversion rate r by first finding the temperature of the thermal state φ which satisfies and then See the geometrical interpretation in Fig. 6. Note how (65) becomes (60) in the case of φ being pure. Let us also mention that, although at the first sight the interconvertibility rate (65) looks different from the one obtained in [39], it can be proven that they are the same. Equation (65) is more compact than the one given in [39] and its derivation much less technical.

XI. THERMODYNAMICS WITH MULTIPLE CONSERVED QUANTITIES
The formalism for thermodynamics developed above can be easily extended to situations with multiple conserved quantities.

A. The charges-entropy diagram
The energy-entropy diagram then is extended to include the additional conserved quantities. Let us introduce the chargesentropy diagram as: Definition 18 (Charges-entropy diagram). Let us consider a system with q conserved quantities (not necessarily commuting)Q k for k = 0, . . . , q − 1 andQ 0 = H the Hamiltonian. The charges-entropy diagram is the subset of points in R q+1 produced by all the states ρ ∈ B(H) with coordinates with Q k (ρ) Tr (Q k ρ) for k = 0, . . . , q − 1.
In the case of mutually commuting conserved quantities, we can easily show that the charges-entropy diagram forms a convex set in R q+1 . To do so, let us first prove convexity for the zero entropy hyper-surface, which corresponds to the base of the diagram. The zero-entropy hyper-surface of the charges-entropy diagram is the set of points in R q with coordinates x ψ = (Q 0 (ψ), Q 1 (ψ), . . . , Q q−1 (ψ)) for all pure states ψ = |ψ ψ| with norm one ψ|ψ = 1. Let us consider in R q the family of hyper-planes perpendicular to the unit vector µ = (µ 0 , . . . , µ q−1 ) where Q = (Q 0 , . . . , Q q−1 ) is a point in R q and C determines the hyperplane. All the points with coordinates Q that fulfil Eq. (67) belong to the hyper-plane defined by µ and C. Given a direction µ, there is an hyper-plane that is particularly relevant, since it corresponds to the minimum possible value of C The minimum is reached by the eigenstate with smallest eigenvalue of the Hermitian operator µ ·Q that we denote by |ψ( µ) , Let us consider now that there is a unique ground state of µ· Q . This means that the hyper-plane defined by C min ( µ) is tangent to the charges entropy-diagram since it passes through one point of the diagram (the corresponding to the single ground state |ψ( µ ) leaving the rest of the diagram on the same side, i.e. µ · Q(ψ) C min ( µ) for all |ψ ∈ H.
In case that there is a degenerate ground space described by a basis whose elements have different coordinates, the contact between the hyper-plane C = C min and the zero entropy hypersurface is not a point but a simplex of dimension equal to the dimension of ground space (e. g. a segment in dimension 2, triangle in dimension 3). As the conserved quantities are mutually commuting, there is a common eigenbasis for all the q charges. Then, there is a basis of the ground space of µ · Q which is also eigenbasis of all the charges Q k individually. If |ψ and |ψ are two elements of that basis with different coordinates Q and Q , the state |ψ(θ) = cos θ|ψ + sin θ|ψ with θ ∈ [0, π/2] has coordinates ψ(θ)| Q|ψ(θ) = cos 2 θ Q + sin 2 θ Q , that is, the coordinate of |ψ(θ) in the diagram are simply the corresponding convex combination of Q and Q .
Property (70) holds for any two eigenstates of Q , in particular, for any two states |ψ and |ψ that lie in the boundary of the zero-entropy hyper-surface. Hence, as any point in the bulk of the zero-entropy hyper-surface can be gotten as a convex combination of two points of the boundary, all the points in the bulk belong to zero entropy surface. Altogether, this proves that the zero-entropy surface is a convex set for which any point within it there exists at least a quantum state that reproduces its expectation vales.
Once we understand the zero entropy hyper-surface of the charges-entropy diagram, let us study its upper boundary. The upper boundary of the charges-entropy diagram is described by the Generalized Gibbs Ensemble (GGE) instead of the canonical ensemble, i. e.
where Z β Tr (e − k β k Q k ) is the generalized partition function. These states are precisely the states of maximum entropy among all with prescribed expectation values for Q k , x σ A(σ) Figure 8. Transverse section of the charges-entropy diagram in the plane Q k − S . The normal vector to the tangent plane has coordinates ( β, −1), which in the section appears as (β k , −1). The βathermality, A β (ρ), and the absolute athermality, A(σ), are respectively represented for two states ρ and σ. k = 0, ..., q − 1. We call this boundary the equilibrium boundary.
The equilibrium boundary is mathematically described by all the points Q(ρ) for which there exists a β ∈ R q such that Note that, given some β, the points Q(ρ) that fulfil belong to a hyperplane of dimension q. The hyperplane with C = − log Z β is the one that is tangent to the equilibrium boundary. The normal vector to this family of hyperplanes (73) is precisely ( β, −1). This agrees with the fact that the tangent plane has a slope β k in the k-th direction, i. e.
where here the Q k need to be understood as coordinates in the charges-entropy diagram (not matrices). This is shown in Fig. 8. Equation (74) can also be written in a vectorial form as and β corresponds to the direction of maximal variation of the entropy. Note that in order to microscopically justify the chargesentropy diagram, it must be shown that states with the same expectation values for the conserved quantities can be unitarily connected in the limit of many copies. We extensively study this particular issue in a separate forthcoming work for the cases of both commuting and non-commuting conserved quantities.

B. Athermality and free entropy
Proceeding as above, let us introduce some quantities that will be relevant in the following.
Definition 19 ( β-athermality). The β-athermality of a state ρ is defined as The β-athermality of a point with coordinates ( Q(ρ), S (ρ)) can be interpreted geometrically in the charges-entropy diagram as the vertical distance from the hyperplane tangent to the equilibrium boundary with normal vector ( β, −1). This is represented in Fig. 8. Note that the β-athermality is also introduced in [48] as as the free entropy.
The β-athermality can also be written as with D(ρ||σ) Tr (ρ log ρ − ρ log σ) being the relative entropy. Hence, because of the positivity of the relative entropy D(ρ||σ) 0, we have that Note now that the right hand side corresponds to the entropy coordinate of the hyperplane with normal vector β tangent to the equilibrium boundary. Thus, any tangent hyperplane with normal vector β leaves all the points of the charges entropy diagram below it. This proves that the charges entropy diagram is a convex set.
In a similar way we define the absolute athermality or simply athermality in the following.
Definition 20 (Absolute athermality). The absolute athermality of a state ρ is defined as The athermality of a state ρ can geometrically be understood as the vertical distance from the thermal boundary (see Fig. 8).

C. Charge extraction
A first relevant scenario of thermodynamics with multiple conserved quantities is the extraction of a charge of the system while keeping constant the other charges. For such set of operations the system is restricted to move along a straight line in the direction of the extracted charge within the iso-entropic hyperplane (see Fig. 9).
The bound charge for such scenario is given by Figure 9. Constant entropy section of a charges-entropy diagram with 2 charges E and L. (Left) Scenario of extraction of a single charge while keeping constant the other charges. The system is constrained to move in one dimensional line and free-charge F(ρ) of a state ρ is the distance from the boundary in such direction. (Right) Scenario in which the charges are allowed to change and the aim is the extraction of a potential Vμ(ρ) = q−1 k=0 µ k Q k (ρ). The parallel purple lines represent equipotential surfaces of Vμ. The GGE state γ is the state which minimizes V and belongs to the hyperplane which is tan tangent to the equilibrium boundary.
where γ k (ρ) is the GGE state that attains the minimum and corresponds to the point of the equilibrium boundary which is intersected by the straight-line with direction k which passes through ρ. This is represented in Fig. 9 (left). The β corresponding to γ k can be geometrically determined by the normal vector of the tangent plane to the equilibrium surface in that point.
The free charge F k (ρ) is then defined by and corresponds to the maximum amount of charge that can be extracted given the restrictions of constant entropy and charges. This is represented in Fig. 9 (left) for a case of 2 conserved quantities. A detailed and full rigorous analysis of the charge extraction by means of unitary conserving operations in the many copy limit for both commuting and non-commuting charges will be made in our forthcoming work.

D. Extraction of a Generalized Potential
An alternative but also relevant scenario is when the set of operations allow for the variation of the charges and the aim is the extraction of a generalized potential whereμ (µ 0 , . . . , µ q−1 ) specifies the weight µ k of every charge Q k in the generalized potential Vμ. For convenience, µ is assumed to be normalized μ = 1 in the Euclidean norm and its components to be positive µ k 0. An alternative normalization could be to take the coefficient of the Hamiltonian µ 0 = 1 as it is usually made in the Grand-canonical ensemble.
In this setting, the bound potential is defined as where γμ(ρ) is the state that attains the minimum which is again a GGE. Note that the β values of the state γμ(ρ) need to be proportional to the unitary vectorμ with β a scalar that is determined by the equal entropies condition S (ρ) = S (γμ(ρ)). This can be seen geometrically in Fig. 9 (right) or analytically by making the simple observation that, given a new HamiltonianH = Vμ, the min energy principle singles out e −βH as the state that attains the minimum. Analogously, the free potential is given by and corresponds to the maximum amount of generalized potential Vμ that can be extracted under entropy preserving operations. This situation has been diagrammatically represented in Fig. 9.
The scenario with a generalized potential Vμ is analogue to the single charge situation. Both first and second laws can be stated as in Secs. VII and VIII but replacing the free energy F(ρ) by Fμ(ρ).

E. Second law
In order to give express the second law irrespective of a particular choice of the generalized potential, let us formulate it as an inequality that Any process (not necessarily entropy preserving) that brings an initial generalized Gibbs state γ B ( β) out of equilibrium fulfills where the inequality is only saturated in the limit of large baths (small variations of entropy) and when final state is also at equilibrium (GGE). Geometrically (86) is a trivial consequence that the charges entropy diagram is upper bounded by any of its tangent planes. In the particular case of an entropy preserving process on an initial bipartite state ρ A ⊗ γ B ( β), the change in mutual information between the subsystems A and B

∆I = ∆S
which together with Eq. (86) implies Note that the above equation (88) is equivalent to the second law formulated in [48]. We see here that such a law is also valid for baths of arbitrary small sizes. Equation (88) is only saturated in the limit of large system sizes and in absence of correlations in the final state ρ AB = ρ A ⊗ γ B .

F. Inter-convertibility rates
The convertibility rate from a quantum state ρ's to a state σ given the constraints on the conservation of the entropy and the charges Q k The above conditions can be again written as a geometric equation of the points x ψ = (Q 0 (ψ), . . . , Q q−1 (ψ), S (ψ)) with ψ ∈ {ρ, σ, φ} in the energy-entropy diagram where we have merely used the extensivity of both entropy and the conserved quantities in the number of copies, e.g. S (ρ ⊗n ) = nS (ρ). Thus, by means of the same argument used in the previous section, the convertibility rate from ρ to σ reads where the state φ is determined from the following set of q equations The state φ can be found geometrically in the charges-entropy diagram as the point in the equilibrium boundary that is intersected by the straight line that goes from σ to ρ (see Fig. 6 for the single charge example).

XII. DISCUSSION
In the recent years, thermodynamics, and in particular work extraction from non-equilibrium states, has been studied in the quantum domain, giving rise to radically new insights into quantum thermal processes. However, in standard endeavor of thermodynamics, be it classical or quantum, thermal baths are considered to be considerably large in size. That is why if a system is attached with a bath, and allowed to exchange energy and entropy, the bath stays intact and its temperature remains unchanged. That is also why the equilibrated system finally acquires the same temperature of the bath. However, if one goes beyond this assumption and considers bath to be a finite and small system, then traditional thermodynamics breaks down. This situation is very much relevant for thermodynamics in the quantum regime, where both system and bath may be small. The first problem that appears in such a situation is the notion of temperature itself, since the finite bath may go out of thermal equilibrium due to the exchange of energy with the system. Therefore, it is absolutely necessary to develop a temperature independent universal thermodynamics, in which the bath could be small or large, and would not get any special status.
In this work, we have formulated temperature independent thermodynamics as an exclusive consequence of information conservation. We have relied on the fact that, for a given amount of information, measured by the von Neumann entropy, any system can only be transformed to states with the same entropy. Given this constraint of information conservation, there is a state that singles out within the constant entropy manifold which is the state that possesses minimal energy. This state is known as a completely passive state and acquires a Boltzmann-Gibb's canonical form with an intrinsic temperature. We call the energy of the completely passive state as the bound energy, since no further energy can be extracted by means of entropy preserving operations. Thus, for a given state, the difference between its energy and bound energy corresponds to the maximum amount of energy that can be extracted in form of work and we have denoted it as free energy. In fact, in this framework, two states that have the same entropy and energy are thermodynamically equivalent [39]. The thermodynamic equivalence between equal entropy and energy states has allowed us to use of the energy-entropy diagram to illustrate the notions of bound and free energies in a geometric way. We have introduced a new definition of heat for arbitrary systems in terms of bound energy.
We have seen that the laws of thermodynamics are a consequence of the reversible dynamics of the underlying physical theory. In particular: • Zeroth law emerges as the consequence of information conservation.
• First and second laws emerge as the consequence of energy conservation, together with information conservation.
• Third law emerges as the consequence of "strict" information conservation (microscopic reversibility or unitarity). Therefore there is no third law if one considers "average" information conservation.
We have demonstrated that the maximum efficiency of a quantum engine with a finite bath is in general lower than that of an ideal Carnot's engine. We have introduced a resource theoretic framework for our intrinsic thermodynamics, within which we address the problem of work extraction and interstate transformations. All these results have been illustrated by means of the energy-entropy diagram. Furthermore, we give a geometric interpretation in the diagram to the relevant thermodynamic quantities as well as the inter-convertibility rate between quantum states under entropy and energy preserving operations.
The information conservation based framework for thermodynamics, as well as the resource theory and the energyentropy diagram, is also extended to multiple conserved quantities. In this case, the energy-entropy diagram becomes the charges-entropy diagram and allows us to understand thermodynamics in a geometrical way. In particular, we have studied the extraction of a single charge while keeping the other charges conserved as well as the extraction of a generalized potential. In the first scenario, we have seen that the maximum work extractable from any state by operations that asymptotically conserve the given charges is the difference between the free energy of the state and that of the iso-entropic generalized grand canonical Gibbs state. Concerning the extraction of a generalized potential (a linear combination of charges), we have shown that it is analogous to the work extraction (the single charge case). Finally, we have determined the interconvertibility rates between states with different entropy and charges.
In general, thermodynamics can be studied in three different scenarios: • One-shot or single-copy limit, where only one copy of joint system-environment is available. Albeit, in this case, even the notion of expectation value is not meaningful, as well as von Neumann entropy.
• Limit of many-runs, where there are many copies but operation are restricted to one-copy operations. In this scenario, the notions of expectation value and von Neumann entropy are well defined.
• Limit of many-copies, where one has access to arbitrarily many copies of the system and an ancilla sub-linear in the number of copies that can globally be processed.
A first observation is that our formalism cannot be applied in the single-shot limit, since the notion of expectation value (say energy) cannot in general be used.
A relevant point to discuss is what happens when operations are not EP but unitaries. In the limit of many copies, unitaries converge to EP operations and our formalism is recovered. The limit of many runs is a bit more subtle. On one hand, all the thermodynamic inequalities of our formalism are respected, since unitaries form a subset of EP operations. On the other hand, these thermodynamic inequalities will not be in general saturated. For instance, our formalism states that the work that can be extracted per system in a state ρ is upper bounded by its free energy W F(ρ). In the many run case with fine-grained information conservation, the law will be respected, but there will not be in general a unitary for which W = F(ρ).
A natural open question is to what extent our formalism can be extended from considering coarse-grained information conservation operations as the set of allowed operations to unitaries. In that case, the notion of bound energy would be different and many more equivalence classes of states would appear. Something similar already happens in the resource theory of thermodynamics, where instead of having a single monotone as an "if and only if" condition for state transformation, infinitely many are required [29]. It is far from clear whether under fine-grained information conservation restriction the energy-entropy diagrams (or a generalization of them) would still be useful.
Let us finally point out that, in the extension of our work to unitary operations in the settings of single-shot and manyruns, a consistent formulation of zeroth law would not be possible. Note that zeroth law states that a collection of systems are in mutual thermal equilibrium if and only if their arbitrary combinations are also in equilibrium. It is well known that passive states that are not thermal do not remain passive when sufficiently many copies are considered. Hence, for establishing a consistent zeroth law, one has to consider operations beyond unitaries on a single copy.