Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Thermodynamics of quantum systems with multiple conserved quantities

## Abstract

Recently, there has been much progress in understanding the thermodynamics of quantum systems, even for small individual systems. Most of this work has focused on the standard case where energy is the only conserved quantity. Here we consider a generalization of this work to deal with multiple conserved quantities. Each conserved quantity, which, importantly, need not commute with the rest, can be extracted and stored in its own battery. Unlike the standard case, in which the amount of extractable energy is constrained, here there is no limit on how much of any individual conserved quantity can be extracted. However, other conserved quantities must be supplied, and the second law constrains the combination of extractable quantities and the trade-offs between them. We present explicit protocols that allow us to perform arbitrarily good trade-offs and extract arbitrarily good combinations of conserved quantities from individual quantum systems.

## Introduction

Thermodynamics is one of the most successful theories of nature that we have. Since its inception almost 200 years ago it has survived the transition from classical mechanics to relativistic and quantum mechanics, with its conceptual basis unchanged. The realm of thermodynamics has also been considerably extended, with recent years witnessing the extension of thermodynamics from dealing with macroscopic systems to individual quantum systems and black holes. From its earliest days, thermodynamics was also generalized to deal not only with energy but also with various conserved quantities, introducing grand canonical ensembles, chemical potentials and so on. Again, its conceptual basis remained unchanged.

In more detail, the idea of the grand canonical ensemble, where not only energy, but also the number of particles, is a conserved quantity, goes all the way back to Gibbs1. A milestone was the work in 1957 of Jaynes2,3, who, coming from a Bayesian perspective, suggested the generalization of thermodynamics to arbitrary conserved quantities through the principle of maximum entropy. The idea of the ‘generalized Gibbs ensemble’ is by now commonly used in quantum statistical mechanics (see for example, refs 4, 5, 6, 7, 8). More recently, refs 9, 10 considered Landauer erasure given access to an ‘angular momentum bath’ instead of a thermal bath, and demonstrated that information can be erased without an energy cost, provided the analogous cost is paid in angular momentum.

Very recently, there has been much renewed interest in the foundations of thermodynamics coming from the field of quantum information. On the one hand, the so-called ‘single-shot information theory’, which was developed initially to study finite-size effects in quantum cryptography, has proven useful for studying finite-size effects and fluctuations in quantum thermodynamics, which has lead to the development of ‘single-shot quantum thermodynamics’11,12,13,14,15,16,17. On the other hand, inspired by so-called ‘resource theories’, which have proved to be very powerful for studying quantum information tasks, such as the theory of entanglement18, purity19 or asymmetry20, the ‘resource theory of quantum thermodynamics’21 was developed that, in combination with single-shot framework, has generated a lot of interest and already shown itself to be a fruitful approach to quantum thermodynamics22,23,24,25,26,27,28,29,30,31,32,33,34,35,36. Our work proceeds along the lines of single-shot thermodynamics and resource theories, where a number of initial results concerning the thermodynamics of multiple conserved quantities were presented in refs 37, 38.

Here we present a generalized version of thermodynamics that deals with individual quantum systems and multiple—commuting or non-commuting—conserved quantities. What we will show is that unlike standard thermodynamics, where the second law constrains how much of the conserved quantity (energy) can be extracted from a non-equilibrium system, in the form of work, here there is no constraint on the amount of a single conserved quantity that can be extracted. In fact, we can extract as much of any individual conserved quantity as we like, if we supply an appropriate amount of other conserved quantities. What the second law constrains is the combination of conserved quantities that can be extracted—that is, the second law is seen to limit the trade-off of extractable quantities, which for the standard case of a single conserved quantity reduces to constraining how much can be extracted. At the same time, this generalized version of thermodynamics suggests that it may be worthwhile revisiting the basic concepts of the subject. Indeed, to understand the above phenomena we present an alternative viewpoint, which reinterprets some of the standard thermodynamics quantities, and is perhaps more natural and compelling. Closely related, independent work was performed by Lostaglio et al.39 and Halpern et al.40. In contrast to here, these works focus more on the nature of the thermal state itself when there are multiple conserved quantities.

## Results

### Overview

Here we consider the standard general framework of thermodynamics that consists of a thermal bath, an external system out of equilibrium with respect to the bath and a number of batteries, in which we will store various conserved quantities, which are extracted from the system and bath. In our case, following Jaynes2,3, we take the ‘thermal bath’ to be simply a collection of particles, each described by a generalized thermal state

where Ai are various conserved quantities, βi are the associated inverse temperatures and is the generalized partition function. Two things are important to note: first, the quantities Ai may or may not commute, and even when they commute they may or may not be functionally dependent on one another. Second, and most importantly, energy need not be one of the conserved quantities or indeed play any role. Since energy is the generator of time evolution, such a thermal bath may not arise naturally by thermal equilibration, but have to be created externally (for example, if the Hamiltonian is zero, then no evolution occurs). Yet, as we will see, the thermodynamic flavour of the theory remains.

The batteries are systems that can each store one of the conserved quantities Ai. In our paper we will consider the batteries either explicitly or implicitly, as explained later. The system can be an individual quantum particle. Finally, the actions that we allow to be performed must conserve either exactly or on average each of the quantities Ai, which is the content of the first law.

A central result of standard thermodynamics—the content of the second law—is that if we have access only to a single thermal bath, it is impossible to extract energy, in the ordered form of work, out of it, that is W:=ΔEbatt≤0, where ΔEbatt is the change in the average energy of the battery. We show that, in our case, there is no limit on how much of any single conserved quantity Ai can be extracted, even though we have access only to a single generalized bath. More precisely, there is no limit on . There is, however, a global limit.

In particular, to each conserved quantity we can associate an entropic quantity βiAi (the entropic nature of this quantity will be explained later). We will show that these quantities can be almost perfectly interconverted for one another inside the bath. As a result, because of the first law (conservation of Ai between bath and battery) the only constraint on the given just a thermal bath is that

In standard thermodynamics the second law also says that if we have access to a system out of equilibrium with respect to the bath, then we can extract work, but we are limited by the change in free energy of the system, W≤−ΔFs. In our case, we define an entropic quantity, the ‘free entropy’ of the system relative to the generalized bath, ,

where Ss is the system entropy and show that

We will show, with a minimal number of assumptions, that we can implement any trade-offs between conserved quantities satisfying equation (2) using the bath, and extract any combination of satisfying equation (4) from a system, up to an arbitrarily small deficit because of the finite nature of the protocols. In particular, if all the conserved quantities commute, we will give explicit protocols that works for both implicit and explicit batteries, assuming exact conservation of the Ai. For more general non-commuting quantities, we will obtain the same results for implicit batteries, or explicit batteries with average conservation, but leave open the question of how to deal with strict conservation of non-commuting quantities when considering explicit battery systems.

### The generalized thermal state

Here we consider in more detail the generalized thermal state given in equation (1)2,3.

We begin by recalling that there are two ways to define the thermal state—by maximizing the von Neumann entropy, given appropriate constraints, or by minimizing the free energy. We start with the former. Consider a system in state σ with Hamiltonian H and average energy . There are many states σ that have this particular average energy; the thermal state is the state that maximizes the entropy S(σ)=−tr(σ ln σ), subject to the average energy constraint. Solving the maximization problem we get , where is the partition function and the inverse temperature β is implicitly determined by the average .

In our framework we need the generalization of this idea to the case of multiple conserved quantities. In particular, we consider k quantities Ai,i{1,, k} and place no restrictions on the relations between them: they may or may not commute; when they commute they may or may not be functionally dependent on one another. An example of two commuting and functionally dependent quantities are the Hamiltonian H and angular momentum L, where H=L2/2I. In this case the average of one does not uniquely determine the average of the other; however, the range of admissible values is constrained, that is, such that . An example of two non-commuting conserved quantities is Lx and Ly. The generalized thermal state τ(β1,…,βk) is then the state, which maximizes the entropy S subject to the constraint that the conserved quantities Ai have average value . It is found to be

Definition 1. Generalized thermal state

where, βi is the inverse temperature conjugate to Ai, and the generalized partition function is .

Note that, in general, each βi is a function of all of the averages . In the case that the Ai commute, the proof is a simple generalization of the standard proof. For non-commuting observables, the proof is more involved41.

The second way to define the thermal state (when only energy is conserved) is to fix the inverse temperature and ask for the density matrix that minimizes the free energy F(ρ)=〈H〉−TS(ρ). The state that solves this optimization has exactly the Gibbs form . Since β is given, the average energy is now implicitly defined, in contrast to the case above, where the average energy was given and the inverse temperature derived.

The idea is to do the same in the case of multiple conserved quantities, and recover the generalized thermal state via a generalized free energy. However, in the standard definition of free energy the temperature is the constant multiplying the entropy. Since we have no notion of multiple entropies, we are not afforded a way of coupling all the inverse temperatures. This is easily overcome if instead of the free energy we define , and it is trivial to generalize this quantity to the case of multiple conserved observables.

Definition 2. Free Entropy. The free entropy of a system ρ is

The free entropy is always defined with respect to a set of inverse temperatures βi. The generalized thermal state is then the state that minimizes with fixed βi. For a complete proof of this fact, see the Supplementary Note 1.

### Conceptual viewpoint

As noted in the introduction, the effects presented in this paper suggest that it may be worthwhile to revisit the basic concepts of thermodynamics. A key aspect of this is the conceptual shift from the free energy to the free entropy.

First, we would like to emphasize that the change from the usual free energy to the free entropy is not a simple mathematical manipulation, but marks a fundamental conceptual difference. Indeed, in the standard approach to considering multiple conserved quantities, such as when considering the grand canonical ensemble, one introduces the chemical potential μ such that the free energy becomes

where N is the particle number operator. In this way, energy is singled out as the privileged quantity, with the chemical potential acting as the ‘exchange rate’ between particle number and energy (and in the same way temperature acts as the exchange rate between entropy and energy). We argue that there is no reason to single out the energy, or any other quantity for that matter. In fact, it is possible to conceive of situations in which everything is degenerate in energy, and thus where energy plays absolutely no role. We are thus lead to introduce the free entropy, which naturally and uniquely treats all quantities on an equal footing.

A second argument for considering free entropy over the free energy is that the latter might give one incorrect intuition. Indeed, in the standard treatment, the free energy puts bounds on how much of the conserved quantity (energy) can be extracted, and one may be tempted to think that even when we have multiple conserved quantities, thermodynamics is about the bounds that constrain the extraction of individual quantities. However, as we will show, this is not the case, and there are no such bounds. The only limitation is on the trade-off between the conserved quantities, and this is precisely governed by the free entropy. It is only in the standard case of a single conserved quantity that one can choose to consider the free energy, or the free entropy, with both constraining the amount of work that can be extracted.

We also note that the thermal state is the state that minimizes the free energy only when the temperature is positive; if the temperature is negative the thermal state (at negative temperature) is instead the state that maximizes the free energy. On the other hand, for all temperatures (positive or negative), the thermal state always minimizes the free entropy.

Finally, we note that it is the difference in free entropy between ρs and τs that captures the thermodynamic usefulness of the system. This difference is exactly equal to the relative entropy between these two states, , where . This is demonstrated explicitly in the Methods. This highlights the entropic nature of .

Following on from the introduction of the free entropy, one can go a step further. Since the quantities βiAi〉 all appear alongside the entropy in the definition of the free entropy, it suggests that they might be thought of as ‘entropic quantities’. Note that this is true even in the standard case, where energy is the only conserved quantity; there one might think of βH〉 as an entropic quantity.

Importantly, the sum of these entropic quantities of the batteries is the object onto which the second law of thermodynamics applies. It says that the increase in this sum is constrained by the decrease in the free entropy of the system relative to the bath equation (4).

### The set-up

The set-up is similar in spirit to that of previous lines of work25,42. We consider the interaction of generalized thermal baths with quantum systems and batteries (Fig. 1). There are a number of conserved quantities, A1 to Ak, which may or may not commute or functionally depend on each other. The generalized thermal bath consists of an unbounded collection of systems, each of which is in a generalized thermal state as defined by equation (5). Any given protocol will involve only a finite set of systems in the bath, whose combined thermal state can be written as τb(β1,…,βk). We also want to consider an additional quantum system ρs that is both initially uncorrelated from and out of equilibrium with respect to the generalized bath, that is, ρsb=ρsτb(β1,…,βk) and ρsτs(β1,…,βk). The main question we ask is how much of each of the conserved quantities can be extracted from the system (in conjunction with the bath, and stored in an associated battery).

In the interest of being clear, we proceed by concentrating on a scenario with only two conserved quantities, A and B, since this already captures the majority of the physics contained in the general case of k conserved quantities.

In order to talk about the extraction of the conserved quantities, there are two ways in which one can proceed: by either including battery systems implicitly, or explicitly, in the formalism. In the former case, one allows the global amount of each quantity stored in the system and bath to change, and defines the changes as the amount of ‘A-type work’ and ‘B-type work’ that have been extracted from (or done on) the global system. The idea is that because of global conservation laws, when the Ai of the system and bath changes, this change is compensated by a corresponding change to the external environment (the implicit battery).

In the latter case, one introduces explicit battery systems, which by definition only accept a single type of work (that is, an A-type battery and a B-type battery). Here by definition the amount of A stored in the A-type battery is the A-type work, and similarly for B. We enforce that the global amount of A and B stored in the system, bath and battery is constant, either strictly (the entire distribution is conserved) or on average.

In the main text we consider the case of implicit batteries. We do this since dealing with implicit batteries simplifies the considerations and allows us to focus on what is arguably the most important part of the protocols, namely the interaction between system and bath. Obviously, it is preferable to have the full protocol including batteries explicitly. In doing so, there are many subtleties, which also arise in the case of standard thermodynamics. In particular, we need to impose ‘no cheating’ conditions that make sure that we do not make illegitimate use of batteries as sources of free entropy25,42,43. The danger stems from the fact that the batteries are systems out of equilibrium with respect to the bath. In Supplementary Note 2 we show how to include explicit batteries for a number of cases, as specified in Table 1.

More concretely, when considering implicit battery systems the class of allowed transformations consists of all global unitary transformations U on the system and bath. After such a transformation, the global state is with the reduced state of the system and bath given by the reductions, and , respectively. We define the A-type and B-type work to be

where , and analogously for ΔBs and ΔBb. In addition, note that if our protocol involves multiple bath systems then , where acts non-trivially only on bath system i, that is, Ab is the sum of the local A for each system (and analogously for Bb). In equation (8) we are equating the average change of A and B, because of the unitary transformation, with the amount of A-type and B-type work that has been extracted from the system and bath. As such, our framework automatically incorporates the first law of thermodynamics for each of the conserved quantities.

Finally, an additional unrelated problem, but which often plays an important role, concerns the precise structure of the bath. In usual treatments, we may consider particles in the bath that have any energy-level spacing, such that their occupation probabilities can match any probabilities in the external system. This is used to construct efficient protocols. When considering other quantities than energy, we may be faced with quantities whose spectrum is fixed, such as angular momentum. In addition, extra constraints or relationships may exist between the different conserved quantities. This results in additional difficulties. To address these, and to remain as general as possible, we will consider baths with a minimal amount of accessible structure in terms of the eigenvalues of the conserved quantities.

### The second law

Of great interest to us is the particular form that the second law of thermodynamics takes in the present setting. In the classical thermodynamic setting, the second law states that if one only has access to a thermal bath, then no work can be extracted, and that the maximal amount of work that can be extracted from a non-equilibrium system interacting with a thermal bath is bounded by the change in its free energy.

In our framework of multiple conserved quantities, we will see that the second law constrains the different combinations of conserved quantities that can be extracted from the system. In particular, we will show below that in the present framework, the amount of A-type work and B-type work that can be extracted is constrained such that

where . In the case where there is no system, or when the system is left in the same state, , then , and we obtain as a corollary

Equations (9) and (10) constitute the second law when one has multiple conserved quantities (with and without a system).

To prove the second law, equation (9), we will need to use two further formulae, as well as the first laws, equation (8). First, since we restrict to unitary transformations, the total entropy of the global system remains unchanged, , and from the fact that the system and bath are initially uncorrelated, along with sub-additivity, we have

where , and analogously for ΔSb and ΔSsb. Second, since the bath starts in the thermal state τ(βA, βB), which is a minimum of the free entropy (by definition), its free entropy cannot decrease during the protocol; thus,

Now, eliminating all quantities on the bath, by substituting from the first laws, equation (8), and from equation (11), we finally arrive at

which, after re-arranging and identifying terms, is straightforwardly seen to be equation (9), as desired. Thus, the first law, in conjunction with the lack of initial correlations (and sub-additivity), and the extremality of the generalized thermal state imply in a direct manner that systems obey a second law of the form given. We note that the proof does not rely on any particular properties of A and B, which need not even commute.

At this point it is worth briefly returning to the issue of implicit versus explicit batteries. If explicit batteries are included, then the unitary operations have to be extended to act on the system, bath and explicit batteries. Crucially, equation (11), and as a consequence the second law, equation (9), can be shown to hold when we are careful to avoid cheating via batteries. Details are provided in Supplementary Note 2.

In the remaining we will study to what extent we can saturate equations (9) and (10), depending upon the properties of the conserved quantities (whether they commute or not), whether we consider implicit or explicit batteries and whether we consider strict or average conservation.

### Commuting observables

We will now specialize to the case of commuting observables, where we have access to joint eigenstates, and show how the second law can be saturated, both in terms of trading resources, and when extracting resources from a non-equilibrium system.

In order to remain as general as possible, we want to assume as little as possible about the structure of the generalized thermal bath. What we will require is that there exists a system in the bath (of which we can take arbitrarily many copies) with d≥3 states, |ai, bi〉, for i{0, 1, 2,…d−1}, which are the joint eigenstates of Ab and Bb such that Ab|ai, bi〉=ai|ai, bi〉 and Bb|ai, bi〉=bi|ai, bi〉. We then need only three requirements. First, that the three eigenvalues of each observable are distinct, a0a1a2 and b0b1b2 (note that one consequence of this is to rule out the case in which either A or B is proportional to the identity, and thus trivially cannot be changed). Second, that the observables should be sufficiently different. In particular, that

which amounts to saying that A and B should not be affinely related to each other, in which case they should not be thought of as different quantities. Third, that in the thermal state the joint eigenstates should not have the same populations. In particular, it must be that

If both x and y simultaneously vanish, then all three states have the same populations, in which case the system looks maximally mixed in this subspace. When trading quantities inside the bath, this will be the only problematic case. However, when we come to processing non-equilibrium systems, we will require simultaneously x≠0 and y≠0 in order for the bath to have enough structure to allow us to approach reversibility. We will also see that, depending on how close to reversible we want to be, we will have to exclude a small set (non-dense and of measure zero) of joint values for x and y, which are rationally related, as will be explained later. Below we outline the main ideas, and present all the details in the Methods.

We start by considering the task of trading resources within the generalized bath. That is, we consider the situation where we only have access to a generalized bath (and no external system). We will show that we can perform a unitary transformation such that, first, its free entropy changes by an arbitrarily small amount,

where we used that ΔSb=0 by definition for unitary transformations. Second, the change ΔAb or ΔBb can be made arbitrarily large, that is

with the other appropriately constrained by equations (16); (generally having large magnitude but opposite sign). If the above two conditions can be satisfied, we say that we can exchange A for B in an essentially reversible manner.

To show that this is possible, we proceed in two steps. We provide an explicit protocol that exchanges a suitably chosen two-dimensional subspace within the bath, and calculate the change in , ΔAb and ΔBb that this produces. We then show that by repeating this protocol a sufficient number of times we achieve equations (16) and (17).

The explicit protocol takes the bath as n copies of τ(βA, βB), and a two dimensional subspace that consists of states that differ in population by Δq, and differ in the number of systems in the state |a1, b1〉 by Δn1. Then, as we show in the Methods, by interchanging the population of two such states, we can achieve

where the sign of ΔAb or ΔBb can be chosen arbitrarily, with the other quantity generally having the opposite sign, in accordance with equation (16). Hence, can be made as small as desired by making Δq arbitrarily small, while independently the relative change can be made as large as desired by increasing Δn1.

Finally, by repeating the above protocol a sufficient number of times, one can trade arbitrary amounts of the conserved quantities from a generalized bath by sacrificing an arbitrarily small amount of free entropy. In particular, to achieve with , one can perform the protocol above () times, with .

We now move onto the task of extracting resources from a single quantum system. In the above we showed that arbitrarily good interconversions can be enacted, given access only to a generalized bath. We now move on to the scenario of having a quantum system out of equilibrium with respect to the bath. Our goal is to show that we can saturate the second law given by equation (9) arbitrarily well—that is, that we can extract conserved quantities from a non-equilibrium system such that βAΔWA+βBΔWB is as close as desired to the system’s decrease in free entropy.

Let us consider that we have a state ρs, which in terms of its eigenstates and eigenvalues is given by ρs=∑ipi|ψi〉〈ψi|, and by convention we take the eigenvalues to be ordered, pn+1pn. In general, the eigenbasis of the state will not coincide with the joint eigenbasis of the conserved quantities A and B. The first step is to pre-process the system, to bring it to a diagonal form in this basis. As we show in the Methods, it is always possible to do so, without even utilizing the bath, such that , that is, in a fully reversible way that saturates equation (9). Note that in the case of explicit battery systems this pre-processing step is more complicated, nevertheless, the ideal pre-processing can still be arbitrarily well approximated, as shown in full details in Supplementary Note 3.

Now, having bought the system to diagonal form, we want to consider a protocol that moves a small population δp between two eigenstates, which have populations p0 and p1, respectively. We can implement such changes by finding two levels in the bath whose ratio of populations are close to p0/p1, and then swapping the 2D subspaces of the system and bath. Therefore, to carry out any such transformation requires a finely spaced set of different population ratios in the bath.

In the Methods we show that, except for a non-dense and measure zero set of x and y (as defined in equation (15)), we can find two levels in the bath whose ratio of populations is sufficiently close to p0/p1, such that after applying the swap operation between the appropriate two-dimensional subspaces, we achieve

that is, up to a correction of order O(δp2), the combination of conserved quantities extracted, which themselves are order O(δp), matches the change in free entropy of the system. Thus, by composing O(1/δp) of such transformations, we can implement a protocol that transforms ρsτs(βA, βB), whereby in each stage the population changes between two states by order O(δp), and such that

Therefore, by taking δp sufficiently small we can approach the reversible regime, whereby the change in free entropy of the system matches the dimensionless combination of conserved quantities extracted. Combining this protocol with the protocol from the previous section, involving only the generalized bath and the batteries, we can obtain any combination of extracted conserved quantities.

Finally, note that the same protocol can also be used to perform efficient transformations between any two system states (where the final state is full rank), and not just to the thermal state. Our protocol also immediately gives an asymptotic protocol for the interconversion of states with no average work cost: the rate at which one can transform ρn into σnR is given by

Here one can simply run the protocol ‘forward’ individually on n copies of ρ in order to obtain in the batteries , and create τ(β1,…,βk)n. Then, on nR copies run the protocol ‘backwards’ to create σnR, having returned each battery so that finally it contains the same amount its associated quantity that it initially contained (on average).

In Supplementary Note 3 we show how these results extend to the case of explicit batteries with either strict or average conservation. We also show in Supplementary Note 4 how the protocol can be made robust to experimental imperfections—that is, without assuming precise knowledge of βA or βB.

### Non-commuting observables

In this section we will show that when considering implicit batteries the results obtained in the previous section can easily be modified to also work for non-commuting observables. This also extends to explicit batteries with average conservation laws when the batteries have continuous spectrum. However, the same protocols do not obviously generalize to the case of explicit batteries with strict conservation.

Whereas previously by virtue of the commutativity of the observables we could find a joint eigenbasis |ai,bi〉 that was used in our explicit protocols, that is no longer the case for non-commuting observables. Nevertheless, the generalized thermal state is diagonal in the eigenbasis of βAA+βBB,

Although to each eigenstate we can no longer associate an eigenvalue for A or B, we can still associate an average value,

The main point is that all of our previous results hold if instead of joint eigenstates |ai, bi〉, with eigenvalues ai and bi, we use the eigenstate |i〉 with average values 〈ai and 〈bi throughout.

The only subtlety that arises is the structure we need from the bath. We still only need to use three distinct eigenstates, |0〉, |1〉 and |2〉; however, now the necessary structure relates to the average value of the conserved quantities in the eigenstates, First, it must be that

otherwise, at the level of the average values, the observables appear affinely related and therefore cannot be sufficiently distinguished to allow for trade-offs. Furthermore, we still need to be able to find eigenstates in the bath that differ in population, just as before. We can define the analogous quantities 〈x〉 and 〈y〉, and if they do not simultaneously vanish then the bath will not be maximally mixed in the subspace. Finally, in order to extract resources from systems out of equilibrium with respect to the generalized bath, there must be sufficient structure such that any ratio of populations can be approximated well enough. Again, in complete analogy to the above, if (〈x〉/〈y〉) is irrational, then we have sufficient structure. If on the other hand (〈x〉/〈y〉) is rational, we will again have to exclude a small set of values of 〈x〉 and 〈y〉 (non-dense, of zero measure), for which our results will not hold.

## Discussion

In this work we have studied a generalization of thermodynamics where there are multiple conserved quantities, where energy may not even be part of the story. We have been interested in what form the second law takes, and showed that it is no longer about restrictions on individual extractable quantities, but rather about the allowed ways that the conserved quantities can be traded-off for one another. Indeed, we found that we can extract as much of any individual conserved quantity as desired, as long as the other conserved quantities are appropriately consumed in the process, with the second law dictating how much of the others are necessarily consumed. In particular, we were led to introduce a dimensionless generalization of the free energy, which we termed the free entropy, that is the central quantity appearing in the second law and dictating the allowed trade-offs. Moreover, given access to any quantum system out of equilibrium with respect to the generalized bath, we showed that its free entropy change bounds the combination of conserved quantities that can be extracted.

Our results hold both for commuting and non-commuting observables, and with the desire to remain as general as possible we made only very mild assumptions about the bath. Indeed, we assumed very little about the relationship between the conserved quantities or their individual structure. The one case that remains open for future research is the case of non-commuting observables, with explicit batteries and strict conservation of the conserved quantities. Although the protocols presented for saturating the second law do not appear to generalize to this case, we do not know whether entirely different constructions will be able to achieve this goal.

## Methods

### Relation between free entropy and relative entropy

Here we show that the free entropy difference between any state ρs and the generalized thermal state is equal to the relative entropy difference between these two states. First, note that the free entropy of the thermal state is

where we recall that is the generalized partition function. Then, it follows that

which demonstrates the claim. Note that this result is completely analogous to the case of standard thermodynamics44.

Consider the situation where we only have access to a generalized bath (and no external system). We will show that we can perform a unitary transformation such that: (i) the free entropy (since ΔSb=0 by definition) changes by an arbitrarily small amount. (ii) The changes |ΔAb| and |ΔBb| can be made arbitrarily large.

Consider that we have a n copies of . It will be convenient to label states by the number of systems found in a given eigenstate, which we shall refer to as the occupation. We denote by |n, α〉≡|n0, n1,…, nd−1, α〉=Pα|a0, ${b}_{0}{〉}^{\otimes {n}_{0}}\text{|}{a}_{\text{1}},\phantom{\rule{0.25em}{0ex}}{b}_{1}{〉}^{\otimes {n}_{1...}}\text{|}{a}_{d\text{-1}}$, ${b}_{d-1}{〉}^{\otimes {n}_{d-1}}$, where Pα is a permutation operator, permuting the bath systems, labelled by α, and n0+n1+…+nd−1=n. Now, we will consider only two states from the dn which are available, corresponding to

that is, such that only the occupations of the first three levels differ between these states. As such, we have the constraint that . The key step in our protocol is to apply a swap operation between these two states, while leaving all other states unchanged. We assume the bath is sufficiently large so that after this step any modified systems from the bath can be discarded, and any further operations act on fresh bath systems. A direct calculation shows that the change in the average value of each quantity of interest is

where Δnk=(nknk), ak0=(aka0), bk0=(bkb0), x and y are as defined in equation (15), and

is the difference in populations between the two states. Given y≠0, we can rewrite equation (31) as

Now, for arbitrary Δn1, we can find an integer m such that mn1<x/y≤(m+1)/Δn1. Setting Δn2=−m in equation (33), we obtain

Hence, can be made as small as desired by making Δq arbitrarily small (which can be achieved by increasing n0). Note that it is crucial that . This is because the thermal state is the unique state that minimizes . Thus, implies that the bath is left completely unchanged, which in turn implies that ΔAbBb=0; hence, the desired transformation cannot take place. On the other hand, we find that the relative change in the conserved quantities and are

In both cases, the final term satisfies (x/yn2n1)−1≥Δn1 and can, hence, be made as large as desired by increasing Δn1. This means that the magnitude of and will become arbitrarily large. The sign of ΔAb will depend on the other constants, but can be modified if desired by choosing m such that (m−1)/Δn1x/y<mn1 above. Note also that if y=0 but x≠0 we can construct an equivalent proof with the roles of x and y swapped.

Finally, by repeating the above protocol a sufficient number of times, one can trade arbitrary amounts of the conserved quantities from a generalized bath by sacrificing an arbitrarily small amount of free entropy. In particular, to achieve with , one can perform the protocol above () times, with .

There are a number of important aspects of the above protocol: first, it relies on a minimal amount of structure in the observables A and B and the bath: it requires that there exist many copies of a bath system with a three-dimensional subspace where the action of the operators are not trivially related (by a shift and rescaling), and that the state is not maximally mixed in this subspace. Moreover, each bath system is taken to be identical, with no additional parameters necessary (that is, we do not require a family of different Ab′s and Bb′s, similar to the families of Hamiltonians considered in ref. 25). Second, this protocol is a only a proof-of-principle demonstration that trade-offs can be enacted. No attention was paid to the number of generalized thermal states necessary. If one cared about minimizing the resources utilized, then the above protocol would not be used, and more efficient ones would be sought. Finally, the above analysis generalizes beyond two conserved quantities to the general case of k quantities. In this case, equation (14) must hold pairwise for all quantities.

### Extracting resources from a single quantum system

Here we consider the scenario involving a quantum system out of equilibrium with respect to the bath. We will show that the second law given by equation (9) can be saturated arbitrarily well—that is, we can extract conserved quantities from a non-equilibrium system such that βAΔWA+βBΔWB is as close as desired to the system’s decrease in free entropy.

Let us consider that we have a state ρs, which in terms of its eigenstates and eigenvalues, is given by , and by convention we take the eigenvalues to be ordered, pn+1pn. In general, the eigenbasis of the state will not coincide with the joint eigenbasis of the conserved quantities A and B. The first step is to pre-process the system to bring it to a diagonal form in this basis. To do so we will not interact with the bath, but simply apply the unitary

on the system such that . Owing to the first laws, equation (8), we have ΔWA=−ΔAs and ΔWB=−ΔBs. Moreover, since the entropy of the system did not change, , and we have immediately

that is, in this state, unsurprisingly, we have a change in the batteries that coincides with the free entropy change of the system, and saturates equation (9). Note that in the case of explicit battery systems, the transformation in equation (36) cannot be perfectly performed at the level of the system, since [Us, As]≠0 and [Us, Bs]≠0. Nevertheless, one can implement a joint unitary on the system and batteries such that at the level of the system the transformation Us can be approximated arbitrarily well as long as the battery systems are in appropriate states, similarly to the case of standard quantum thermodynamics42,43. Full details can be found in Supplementary Note 3.

Now, having brought the system to a diagonal form, we want to consider a transformation in which only two levels of the system change their populations by a small amount. Note that here we denote the eigenvalues of As and Bs by and to differentiate them from the eigenvalues of Ab and Bb, which we will similarly denote by and . Namely, we would like to perform . We can implement such changes by finding two levels in the bath whose ratio of populations is close to p0/p1 and then swapping the two-dimensional subspaces of the system and bath. To carry out any such transformation requires a finely spaced set of different population ratios in the bath. Let us now consider whether the simple bath systems we have considered so far can provide such possibilities. As before, we bring in a collection of n generalized thermal states, τ(βA,βB) and consider only the two states in equation (28), |n, α〉 and |n′, α′〉. We shall denote the populations of these states by qn and qn, respectively. The global unitary transformation we will apply is the swap operator between the two-dimensional subspaces of the system and bath, and the identity everywhere else. That is, the operation that performs

while leaving all other states unchanged. By performing this transformation, the population that is shifted between the states of the system, which coincides with the population that is shifted between the states of the bath, is δp=(p0qnp1qn). Now, the changes in the conserved quantities of the system and bath are found to be

The change in the entropy of the system and the bath are also found to be

where we use rather than since we can always take . We want to achieve ΔSsSb=O(δp2), which requires that . To see when this condition is satisfied, we first use the explicit form of the probabilities, which show that qn/qn=exp(−xΔn1yΔn2). Hence, we require . Since and are arbitrary, our requirement is that xΔn1+yΔn2 should be able to come within O(δp) of any number. As we can rescale Δn1 and Δn2 by an arbitrary integer, it is sufficient to obtain 0<xΔn1+yΔn2O(δp). If x and y are not rationally related, this is always possible. However, if x/y is rational, and given in reduced form by u/v (where u and v are co-prime integers), then we need

From number theory, one can always find Δn1 and Δn2 such that the term in brackets is 1 (or −1); hence, we need |y/v|≤O(δp). For a fixed desired accuracy (of order O(δp)), and fixed y, this rules out a finite number of x values for which x/y is a rational with a small denominator. Extending this to the x-y plane, we find that we can achieve the desired accuracy everywhere except for a non-dense set of measure zero.

Returning to the entropies, with the above in place, ΔSsSb=O(δp2), that is, the system and bath remain essentially uncorrelated after the transformation. Finally, we use once again the fact that the generalized thermal state is a minimum of the free entropy. This implies that the changes in population, of order O(δp), change the free entropy only to second order, . Putting everything together we have

Thus, since the left-hand side is O(δp2), it must be that

that is, up to a correction of order O(δp2), the combination of conserved quantities extracted, which themselves are order O(δp), matches the change in free entropy of the system. Thus, by composing O(1/δp) of such transformations, we can implement a protocol that transforms ρsτs(βA,βB), whereby in each stage the population changes between two states by order O(δp), and such that

Therefore, by taking δp sufficiently small we can approach the reversible regime, whereby the change in free entropy of the system matches the dimensionless combination of conserved quantities extracted. Combining this protocol with the protocol from the previous section, involving only the generalized bath and the batteries, we can obtain any combination of extracted conserved quantities.

It is important to stress that our assumptions only changed by a small amount relative to the previous section. In particular, we need a minimal amount of extra structure in the bath, such that it is useful to process arbitrary individual systems out of equilibrium. Furthermore, as in the previous case the protocol presented generalizes in a straightforward manner to the case of k mutually commuting conserved quantities A1,... Ak.

Finally, note that the same protocol can also be used to perform efficient transformations between any two system states (where the final state is full rank), and not just to the thermal state. Our protocol also immediately gives an asymptotic protocol for the interconversion of states with no average work cost: the rate at which one can transform ρn into σnR is given by

Here one can simply run the protocol ‘forward’ individually on n copies of ρ in order to obtain in the batteries and create τ(β1,…,βk)n. Then, on nR copies run the protocol ‘backwards’ to create σnR, having returned each battery so that finally it contains the same amount its associated quantity that it initially contained (on average).

In Supplementary Note 4 we show how these results extend to the case of explicit batteries with either strict or average conservation. In Supplementary Note 4 we also show how the protocol can be made robust to experimental imperfections—that is, without assuming precise knowledge of βA or βB.

### Data availability statement

Data sharing not applicable to this article as no datasets were generated or analysed during the current study.

How to cite this article: Guryanova, Y. et al. Thermodynamics of quantum systems with multiple conserved quantities. Nat. Commun. 7:12049 doi: 10.1038/ncomms12049 (2016).

## References

1. Gibbs., J. W. Elementary Principles in Statistical Mechanics Cambridge University Press (2010) Cambridge Books Online.

2. Jaynes., E. T. Information theory and statistical mechanics. Phys. Rev. 106, 620–630 (1957).

3. Jaynes., E. T. Information theory and statistical mechanics. II. Phys. Rev. 108, 171–190 (1957).

4. Rigol, M., Dunjko, V., Yurovsky, V. & Olshanii., M. Relaxation in a completely integrable many-body quantum system: an ab initio study of the dynamics of the highly excited states of 1d lattice hard-core bosons. Phys. Rev. Lett. 98, 050405 (2007).

5. Kollar, M., Wolf, F. A. & Eckstein., M. Generalized Gibbs ensemble prediction of prethermalization plateaus and their relation to nonthermal steady states in integrable systems. Phys. Rev. B 84, 054304 (2011).

6. Caux, J.-S. & Konik., R. M. Constructing the generalized Gibbs ensemble after a quantum quench. Phys. Rev. Lett. 109, 175301 (2012).

7. Dóra, B., Bácsi, Á. & Zaránd., G. Generalized Gibbs ensemble and work statistics of a quenched Luttinger liquid. Phys. Rev. B 86, 161109 (2012).

8. Pozsgay., B. The generalized Gibbs ensemble for Heisenberg spin chains. J. Stat. Mech. 2013, P07003 (2013).

9. Vaccaro, J. A. & Barnett., S. M. Information erasure without an energy cost. Proc. R Soc. A 467, 1770–1778 (2011).

10. Barnett, S. M. & Vaccaro., J. A. Beyond Landauer erasure. Entropy 15, 4956–4968 (2013).

11. Dahlsten, O. C. O., Renner, R., Rieper, E. & Vedral., V. Inadequacy of von Neumann entropy for characterizing extractable work. New J. Phys. 13, 53015 (2011).

12. del Rio, L., Åberg, J., Renner, R., Dahlsten, O. C. O. & Vedral., V. The thermodynamic meaning of negative entropy. Nature 474, 61–63 (2011).

13. Egloff, D., Dahlsten, O. C. O., Renner, R. & Vedral., V. A measure of majorization emerging from single-shot statistical mechanics. New J. Phys. 17, 073001 (2015).

14. Faist, P., Dupuis, F., Oppenheim, J. & Renner., R. The minimal work cost of information processing. Nat. Commun. 6, 7669 (2015).

15. Halpern, N. Y., Garner, A. J. P., Dahlsten, O. C. O. & Vedral., V. Introducing one-shot work into fluctuation relations. New J. Phys. 17, 095003 (2015).

16. Woods, M. P., Ng, N. & Wehner., S. The Maximum Efficiency of Nano Heat Engines Depends on More than Temperature. Preprint at http://arxiv.org/abs/1506.02322 (2015).

17. Weilenmann, M., Krämer, L., Faist, P. & Renner., R. Axiomatic Relation Between Thermodynamic and Information-Theoretic Entropies. Preprint at http://arxiv.org/abs/1501.06920 (2015).

18. Bennett, C. H., Bernstein, H., Popescu, S. & Schumacher., B. Concentrating partial entanglement by local operations. Phys. Rev. A 53, 2046–2052 (1996).

19. Horodecki, M., Horodecki, P. & Oppenheim., J. Reversible transformations from pure to mixed states and the unique measure of information. Phys. Rev. A 67, 62104 (2003).

20. Gour, G. & Spekkens., R. W. The resource theory of quantum reference frames: manipulations and monotones. New J. Phys. 10, 033023 (2008).

21. Brandão, F. G. S. L., Horodecki, M., Oppenheim, J., Renes, J. & Spekkens., R. W. Resource theory of quantum states out of thermal equilibrium. Phys. Rev. Lett. 111, 250404 (2013).

22. Janzing, D., Wocjan, P., Zeier, R., Geiss, R. & Beth., T. Thermodynamic cost of reliability and low temperatures: tightening Landauer’s principle and the second law. Int. J. Theor. Phys. 39, 2717–2753 (2000).

23. Horodecki, M. & Oppenheim., J. Fundamental limitations for quantum and nanoscale thermodynamics. Nat. Commun. 4, 2059 (2013).

24. Åberg., J. Truly work-like work extraction via a single-shot analysis. Nat. Commun. 4, 1925 (2013).

25. Skrzypczyk, P., Short, A. J. & Popescu., S. Work extraction and thermodynamics for individual quantum systems. Nat. Commun. 5, 4185 (2014).

26. Brandão, F. G. S. L., Horodecki, M., Ng, N., Oppenheim, J. & Wehner., S. The second laws of quantum thermodynamics. Proc. Natl Acad. Sci. USA 112, 3275–3279 (2015).

27. Ng, N. H. Y., Mančinska, L., Cirstoiu, C., Eisert, J. & Wehner, S. Limits to catalysis in quantum thermodynamics. New J. Phys. 17, 085004 (2015).

28. Renes., J. M. Work cost of thermal operations in quantum thermodynamics. EPJ Plus 129, 153 (2014).

29. Faist, P., Oppenheim, J. & Renner., R. Gibbs-preserving maps outperform thermal operations in the quantum regime. New J. Phys. 17, 043003 (2015).

30. Lostaglio, M., Jennings, D. & Rudolph., T. Description of quantum coherence in thermodynamic processes requires constraints beyond free energy. Nat. Commun. 6, 6383 (2015).

31. Lostaglio, M., Korzekwa, K., Jennings, D. & Rudolph., T. Quantum coherence, time-translation symmetry, and thermodynamics. Phys. Rev. X 5, 021001 (2015).

32. Ćwikliski, P., Studziski, M., Horodecki, M. & Oppenheim., J. Limitations on the evolution of quantum coherences: towards fully quantum second laws of thermodynamics. Phys. Rev. Lett. 115, 210403 (2015).

33. Lostaglio, M., Müller, M. P. & Pastena., M. Stochastic independence as a resource in small-scale thermodynamics. Phys. Rev. Lett. 115, 150402 (2015).

34. Korzekwa, K., Lostaglio, M., Oppenheim, J. & Jennings., D. The extraction of work from quantum coherence. New J. Phys. 18, 023045 (2016).

35. Alhambra, Á. M., Oppenheim, J. & Perry, C. What is the Probability of a Thermodynamical Transition? Preprint at http://arxiv.org/abs/1504.00020 (2015).

36. Perry, C., Ćwikliski, P., Anders, J., Horodecki, M. & Oppenheim, J. A Sufficient Set of Experimentally Implementable Thermal Operations. Preprint at http://arxiv.org/abs/1511.06553.

37. Halpern, N. Y. & Renes., J. M. Beyond heat baths: generalized resource theories for small-scale thermodynamics. Phys. Rev. E 93, 022126 (2016).

38. Yunger-Halpern., N. Beyond Heat Baths II: Framework for Generalized Thermodynamic Resource Theories. Preprint at http://arXiv:1409.7845 (2015).

39. Lostaglio, M., Jennings, D. & Rudolph, T. Thermodynamic resource theories, non-commutativity and maximum entropy principles. Preprint at http://arxiv.org/abs/1511.04420 (2015).

40. Halpern, N. Y., Faist, P., Oppenheim, J. & Winter, A. Microcanonical and resource-theoretic derivations of the thermal state of a quantum system with noncommuting charges. Nat. Commun. 7, 12051 (2016).

41. Liu., Y.-K. The Complexity of the Consistency and N-representability Problems for Quantum States PhD thesis Univ. California (2007).

42. Malabarba, A. S. L., Short, A. J. & Kammerlander., P. Clock-driven quantum thermal engines. New J. Phys. 17, 045027 (2015).

43. Åberg., J. Catalytic coherence. Phys. Rev. Lett. 113, 150402 (2014).

44. Donald., M. J. Free energy and the relative entropy. J. Stat. Phys. 49, 81–87 (1987).

## Acknowledgements

We thank J. Hannay for many discussions while carrying out this research. We also thank S. Massar for useful comments. Y.G., P.S. and S.P. acknowledge support from the European Research Council (ERC AdG NLST). S.P. acknowledges support from a Royal Society Wolfson Merit Award. A.J.S. acknowledges support from the Royal Society and FQXi via the SVCF. R.S. acknowledges support from the Swiss National Science Foundation (Starting grant DIAQ). Y.G., A.J.S., R.S. and P.S. acknowledge support from the COST Action MP1209 Thermodynamics in the quantum regime.

## Author information

Authors

### Contributions

All authors contributed to all aspects of this work.

### Corresponding author

Correspondence to Sandu Popescu.

## Ethics declarations

### Competing interests

The authors declare no competing financial interests.

## Supplementary information

### Supplementary Information

Supplementary Figures 1-3, Supplementary Notes 1-4 and Supplementary References. (PDF 344 kb)

## Rights and permissions

Reprints and Permissions

Guryanova, Y., Popescu, S., Short, A. et al. Thermodynamics of quantum systems with multiple conserved quantities. Nat Commun 7, 12049 (2016). https://doi.org/10.1038/ncomms12049

• Accepted:

• Published:

• DOI: https://doi.org/10.1038/ncomms12049

• ### How to build Hamiltonians that transport noncommuting charges in quantum thermodynamics

• Nicole Yunger Halpern
• Shayan Majidy

npj Quantum Information (2022)

• ### Restrictions on realizable unitary operations imposed by symmetry and locality

• Iman Marvian

Nature Physics (2022)

• ### The tight Second Law inequality for coherent quantum systems and finite-size heat baths

• Marcin Łobejko

Nature Communications (2021)

• ### Quantum majorization and a complete set of entropic conditions for quantum thermodynamics

• David Jennings
• Iman Marvian

Nature Communications (2018)

• ### Revealing missing charges with generalised quantum fluctuation relations

• J. Mur-Petit
• A. Relaño
• D. Jaksch

Nature Communications (2018)

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

## Search

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing