1 Introduction

Thermodynamics is one of the most successful physical theories and a pillar of modern science and technology. It was initially developed empirically to describe heat engines, such as the steam engine and internal combustion engines that powered the industrial revolution of the eighteenth and nineteenth century. Later on, it has been founded on statistical mechanics with the assumption that the systems are composed of a large number of classical particles. The thermal baths, which the system interacts with, are even larger in size so that the temperature of the bath effectively does not alter after the interaction. The laws of thermodynamics find their applications in almost all branches of the exact sciences. The emergence of quantum mechanics in the last century, and the subsequent achievements in controlling and tuning of an individual or a finite number of quantum systems, led to the exploration of thermodynamics in the quantum regime. There, the system is made up of a single or moderate number of quantum particles interacting with a thermal bath. This regime is often termed the finite-size regime. The system may possess nontrivial quantum correlations, such as entanglement among the particles, and the bath can be finite or comparable in size with the system. In the quantum domain, another layer of difficulties arises when one considers more than one conserved quantities (charges) that do not commute with each other, as the simultaneous conservation of all the charges cannot be guaranteed.

Recent studies of quantum thermodynamics [1, 2] focus on systems of finite size and the cases where measurements are allowed only once. In addition to thermodynamic averages, there one is interested in values and bounds on fluctuations of thermodynamic quantities. One way to handle these problems is by the use of various fluctuations theorems [3,4,5]. Another way to deal with these regimes is exactly via the resource theory of thermodynamics that allows for rigorous treatment of second laws, optimal work extraction problem, etc. (cf. [6,7,8], see also [9,10,11,12]). The resource theory of quantum thermodynamics was recently extended to deal with quantum and nanoscale engines made up of a finite or a small number of quantum particles, and two baths at different temperatures [13].

Resource theory is a rigorous mathematical framework initially developed to characterize the role of entanglement in quantum information processing tasks. Later the framework was extended to characterize coherence, non-locality, asymmetry and many more, including quantum Shannon theory itself, see [14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]. The resource theory approach applies also to classical theories. In general, the resource theories have the following common features: (1) a well-defined set of resource-free states, and any states that do not belong to this set has a non-vanishing amount of resource; (2) a well-defined set of resource-free operations (allowed operations), that cannot create or increases resource in a state. These allow one to quantify the resources present in the states or operations and characterize their roles in the transformations between the states or the operations. In particular, it enables the definition and rigorous calculation or bounding of resource measures; to determine which states can be transformed to others using allowed operation; how the resource content of states may be changed; and how these changes are bounded under the allowed operations, etc.

In the present paper, we formulate a resource theory of quantum thermodynamics with multiple conserved quantities, where the system and bath a priori are arbitrary in size. We adhere to the asymptotic regime where a system of many non-interacting particles with multiple conserved quantities or charges interacts with a bath. It is discussed in [32] that in the resource theory of thermodynamics with multiple non-commuting conserved quantities, complete passivity and maximum entropy principle lead to incompatible sets of resource free states. Here we choose the maximum entropy principle, that is the resource-free states are the generalized Gibbs states (GGS), and allowed operations are the (average) entropy and (average) charge preserving operations. The thermodynamic resource is quantified by the Helmholtz free entropy. Clearly, the entropy and charge preserving operations cannot create thermodynamic resource in the resource-free GGSs. For any quantum state, we associate a vector with entries of the average charge values and entropy of that state. We call the set of all these vectors the phase diagram of a system. The concept of phase diagram in the present sense was originally pioneered in [33] for a system with energy as the only conserved quantity of the system where it has been shown that the phase diagram is a convex set. This terminology is motivated by traditional thermodynamics, where the phase diagram is a multi-dimensional map of the equilibrium states of a system according to the temperature and other relevant intensive or extensive quantities (such as pressure, volume, particle concentrations, etc.). The difference here is that we also allow non-equilibrium states, effectively decoupling the entropy from the dynamical parameters. The seminal results of [33] were generalized to multiple pairwise commuting conserved quantities by the present authors [12], and the further generalization to the case of multiple, in general non-commuting charges is the subject of the present paper. For an individual system with multiple charges the phase diagram is not necessarily convex. Interestingly, however, for a composition of two or more systems, the phase diagram becomes convex. Moreover, for a composition of large enough systems, for any point in the phase diagram, there is a state with tensor product structure that realizes it. This implies that from the macroscopic point of view it is enough to consider states of a composite system with tensor product structure. This is an important feature when we study a traditional thermodynamics set-up considering only tensor product states, and it does not affect the generality of the laws of thermodynamics which only depend on the macroscopic properties of a state rather than the state itself. We find that given the entropy and charge preserving operations as the allowed operations, the (generalized) phase diagram fully characterizes the thermodynamic transformations of the states and the role of thermodynamic resources in such processes. We further extend our study to situations where the system and bath become correlated after initially being independent. In such a case we use the conditional entropy instead of the entropy, to express the phase diagram and derive the laws of quantum thermodynamics when the final state exhibits possible system-bath correlations.

The rest of the paper is organized as follows. In Sect. 2, we specify our resource theory, considering a quantum system Q with a finite-dimensional Hilbert space, together with a Hamiltonian \(H=A_1\) and other quantities (“charges”) \(A_2, \ldots , A_c\). We introduce here the concept of phase diagram and prove the fundamental Asymptotic Equivalence Theorem 4 (AET), which shows that the points in the phase diagram label asymptotic equivalence classes of sequences of states. This allows us to study asymptotic thermodynamics of systems with multiple conserved quantities in Sect. 3. We start by describing the system model, comprising a work system, baths and batteries, which permits us to formulate and prove the first law in Sect. 3.1; the second law is discussed in Sect. 3.2; in Sect. 3.3 we characterize precisely which work transformations are possible on a system with a given bath, in terms of the extended phase diagram, which features negative entropies corresponding to the purely quantum effect of entanglement between system and bath; in Sect. 3.4 we introduce the thermal bath rate, and discuss the tradeoff between the bath rate and work extraction. We conclude in Sect. 4 with a discussion of our theory and an outlook. The paper also includes three appendices: “Appendix A” introduces technical notation and some auxiliary results; “Appendix B” gives an explicit construction of so-called approximate microcanonical subspaces (a.m.c.) for non-commuting observables [34]; “Appendix C” provides the full proof of the AET Theorem 4.

2 Resource Theory of Charges and Entropy

A system in our resource theory is a quantum system Q with a finite-dimensional Hilbert space (denoted Q, too, without danger of confusion), together with a Hamiltonian \(H=A_1\) and other quantities (“charges”) \(A_2, \ldots , A_c\), all of which are Hermitian operators that do not necessarily commute with each other. We consider composition of n non-interacting systems, where the Hilbert space of the composite system \(Q^n\) is the tensor product \(Q^{\otimes n} = Q_1 \otimes \cdots \otimes Q_n\) of the Hilbert spaces of the individual systems, and the j-th charge of the composite system is the sum of charges of individual systems as follows,

$$\begin{aligned} A^{(n)}_j = \sum _{i=1}^{n} \mathbbm {1}^{\otimes (i-1)} \otimes A_j \otimes \mathbbm {1}^{\otimes (n-i)}, \quad j=1,2,\ldots ,c. \end{aligned}$$
(1)

For ease of notation, we will write throughout \(A_j^{(Q_i)} = \mathbbm {1}^{\otimes (i-1)} \otimes A_j \otimes \mathbbm {1}^{\otimes (n-i)}\). We note that throughout the paper we label various subsystems or individual systems with subscripts whereas here subscript j denotes different charges of each subsystem. To avoid this confusion, note that various charges are always labeled by j.

We wish to build a resource theory where the objects are states on a quantum system, which are transformed under thermodynamically meaningful operations. To any quantum state \(\rho \) is assigned the point \((\underline{a},s) = (a_1,\ldots ,a_c,s) = \bigl ( {{\text {Tr}}\,}\rho A_1, \ldots , {{\text {Tr}}\,}\rho A_c, S(\rho ) \bigr ) \in {\mathbb {R}}^{c+1}\), which is an element in the phase diagram that has been originally introduced, for \(c=1\), as energy-entropy diagram in [33]; there it is shown, for a system where energy is the only conserved quantity, that the diagram is a convex set. In the case of commuting multiple conserved quantities, the charge-entropy diagram has been generalized and further investigated in [12]. Note that the set of all these vectors, denoted \({\mathcal {P}}^{(1)}\), is not in general convex (unless the quantities commute pairwise). An example is a qubit system with charges \(\sigma _x\), \(\sigma _y\) and \(\sigma _z\) where charge values uniquely determine the state as a linear function of the \({\text {Tr}}\rho \sigma _i\), hence the entropy, while the von Neumann entropy itself is well-known to be strictly concave.

Moreover, the set of these points for a composite system with charges \(A_1^{(n)}, \ldots , A_c^{(n)}\), which we denote \({\mathcal {P}}^{(n)}\) contains, but is not necessarily equal to \(n{\mathcal {P}}^{(1)}\) (which however is true for commuting charges). Namely, consider the point \(g=\left( \frac{1}{2}{{\text {Tr}}\,}(\rho _1+\rho _2) A_1, \ldots , \frac{1}{2}{{\text {Tr}}\,}(\rho _1+\rho _2) A_c, \frac{1}{2}S(\rho _1)+\frac{1}{2}S(\rho _2)\right) \), which does not necessarily belong to \({\mathcal {P}}^{(1)}\) but belongs to its convex hull; however, \(2g \in {\mathcal {P}}^{(2)}\) due to the state \(\rho _1 \otimes \rho _2\). Therefore, we consider the convex hull of the set \({\mathcal {P}}^{(1)}\) and call it the phase diagram of the system, denoted

$$\begin{aligned} \overline{{\mathcal {P}}} \equiv \overline{{\mathcal {P}}}^{(1)}:= & {} \left\{ \left( \sum _i p_i {{\text {Tr}}\,}\rho _i A_1, \ldots , \sum _i p_i{{\text {Tr}}\,}\rho _i A_c, \sum _i p_i S(\rho _i)\right) :\right. \nonumber \\{} & {} \left. 0 \le p_i \le 1,\sum _i p_i = 1 \right\} . \end{aligned}$$
(2)

The interpretation is that the objects of our resource theory are ensembles of states \(\{p_i,\rho _i\}\), rather than single states.

We define the zero-entropy diagram and max-entropy diagram, respectively, as the sets

$$\begin{aligned} \overline{{\mathcal {P}}}_0^{(1)}&= \{(\underline{a},0): {{\text {Tr}}\,}\rho A_j = a_j \text { for a state } \rho \}, \\ \overline{{\mathcal {P}}}_{\max }^{(1)}&= \left\{ \bigl (\underline{a},S(\tau (\underline{a}))\bigr ): {{\text {Tr}}\,}\rho A_j = a_j \text { for a state } \rho \right\} , \end{aligned}$$

where \(\tau (\underline{a})\) is the unique state maximizing the entropy among all states with charge values \({{\text {Tr}}\,}\rho A_j = a_j\) for all j, which is called generalized thermal state, or generalized Gibbs state, or also generalized grand canonical state [35]. Note that, as a linear image of the compact convex set of states, the zero-entropy diagram is compact and convex. We similarly define the set \({\mathcal {P}}^{(n)}\), the phase diagram \(\overline{{\mathcal {P}}}^{(n)}\), zero-entropy diagram \(\overline{{\mathcal {P}}}_0^{(n)}\) and max-entropy diagram \(\overline{{\mathcal {P}}}_{\max }^{(n)}\) for the composition of n systems with charges \(A_1^{(n)}, \ldots , A_c^{(n)}\). Figure 1 illustrates these concepts.

Fig. 1
figure 1

Schematic of the phase diagrams \({\mathcal {P}}^{(1)}\), \({\mathcal {P}}^{(2)}\) and \(\overline{{\mathcal {P}}}\). As seen, \({\mathcal {P}}^{(1)}\) is not convex, having a hollow on the underside

Lemma 1

For an individual system Q and composite system \(Q^{\otimes n}\) with charges \(A_j\) and \(A^{(n)}_j\), respectively, the following holds:

  1. 1.

    \(\overline{{\mathcal {P}}}^{(n)}\), for \(n \ge 1\), is a compact and convex subset of \({\mathbb {R}}^{c+1}\).

  2. 2.

    \(\overline{{\mathcal {P}}}^{(n)}\), for \(n \ge 1\), is the convex hull of the union \(\overline{{\mathcal {P}}}_{0}^{(n)} \cup \overline{{\mathcal {P}}}_{\max }^{(n)}\), of the zero-entropy diagram and the max-entropy diagram.

  3. 3.

    \(\overline{{\mathcal {P}}}^{(n)} = n \overline{{\mathcal {P}}}^{(1)}\) for all \(n \ge 1\).

  4. 4.

    \({\mathcal {P}}^{(n)}\) is convex for all \(n \ge 2\), and indeed \({\mathcal {P}}^{(n)} = \overline{{\mathcal {P}}}^{(n)} = n \overline{{\mathcal {P}}}^{(1)}\).

  5. 5.

    Every point of \({\mathcal {P}}^{(n)}\) is realized by a suitable tensor product state \(\rho _1 \otimes \cdots \otimes \rho _n\), for all \(n \ge |Q|\) where |Q| is the dimension of system Q.

  6. 6.

    All points \(\bigl (\underline{a},S(\tau (\underline{a}))\bigr ) \in \overline{{\mathcal {P}}}_{\max }\) are extreme points of \(\overline{{\mathcal {P}}}\).

Proof

1. The phase diagram is convex by definition. Further, \({{\text {Tr}}\,}\rho A_j^{(n)}\) and \(S(\rho )\) are continuous functions defined on the set of quantum states which is a compact set; hence, the set \({\mathcal {P}}^{(n)}\) is also a compact set. The convex hull of a finite-dimensional compact set is compact, so the phase diagram is a compact set.

2. Any point in the phase diagram according to the definition is a convex combination of the form

$$\begin{aligned} (a_1,\ldots ,a_c,s) = \left( \sum _i p_i {{\text {Tr}}\,}(\rho _i A_1), \ldots , \sum _i p_i{{\text {Tr}}\,}(\rho _i A_c),\sum _i p_i S(\rho _i)\right) . \end{aligned}$$

The point \((a_1,\ldots ,a_c,0)\) belongs to \(\overline{{\mathcal {P}}}_{0}^{(1)}\) because the state \(\rho =\sum _i p_i \rho _i\) has charge values \(a_1, \ldots , a_c\). Moreover, the state with charge values \(a_1, \ldots , a_c\) of maximum entropy is the generalized thermal state \(\tau (\underline{a})\), so we have

$$\begin{aligned} S(\tau (\underline{a})) \ge S(\rho ) \ge \sum _i p_i S(\rho _i), \end{aligned}$$

where the second inequality is due to concavity of the entropy. Therefore, any point \((\underline{a},s)\) can be written as the convex combination of the points \((\underline{a},0)\) and \(\bigl (\underline{a},S(\tau (\underline{a}))\bigr )\).

3. Due to item 2, it is enough to show that \(\overline{{\mathcal {P}}}_{0}^{(n)} = n\overline{{\mathcal {P}}}_{0}^{(1)}\), and \(\overline{{\mathcal {P}}}_{\max }^{(n)}= n\overline{{\mathcal {P}}}_{\max }^{(1)}\). The former follows from the definition. The latter is due to the fact that the thermal state for a composite system is the tensor power of the thermal state of the individual system.

4. Let \(\tau (\underline{a}) = \sum _i p_i {|{i}\rangle }{\langle {i}|}\) be the diagonalization of the generalized thermal state. For \(n \ge 2\), define \({|{v}\rangle } = \sum _i \sqrt{p_i} {|{i}\rangle }^{\otimes n}\). Obviously, the charge values of the states \(\tau (\underline{a})^{\otimes n}\) and \({|{v}\rangle }{\langle {v}|}\) are the same, since they have the same reduced states on the individual systems; thus, there is a pure state for any point in the zero-entropy diagram of the composite system. Now, consider the state \(\lambda {|{v}\rangle }{\langle {v}|}+(1-\lambda )\tau (\underline{a})^{\otimes n}\), which has the same charge values as \(\tau (\underline{a})^{\otimes n}\) and \({|{v}\rangle }{\langle {v}|}\). The entropy \(S\bigl (\lambda {|{v}\rangle }{\langle {v}|}+(1-\lambda )\tau (\underline{a})^{\otimes n}\bigr )\) is a continuous function of \(\lambda \); hence, for any value s between 0 and \(S(\tau (\underline{a})^{\otimes n})\), there is a state with the given values and entropy s.

5. For \(n\ge |Q|\), it is easy to see that any state \(\rho \) can be decomposed into a uniform convex combination of n pure states, i.e. \(\rho =\frac{1}{n} \sum _{i=1}^n {|{\psi _i}\rangle }{\langle {\psi _i}|}\). For instance, consider the diagonalization of \(\rho = \sum _{t=1}^{|Q|} q_t |t\rangle \!\langle t|\), and define \({|{\psi _\ell }\rangle } := \sum _t \sqrt{q_t} e^{2\pi i t\ell /n}{|{t}\rangle }\). Due to the cyclotomic properties of the primitive n-root of unit, this satisfies the claim. Now observe that the state \(\psi ^{n} = {|{\psi _1}\rangle }{\langle {\psi _1}|} \otimes \cdots \otimes {|{\psi _n}\rangle }{\langle {\psi _n}|}\) has the same charge values as the state \(\rho ^{\otimes n}\), but as it is pure it has entropy 0. Further, consider the thermal state \(\tau \) with the same charge values as \(\rho \), but the maximum entropy consistent with them. Now let \(\rho _i := \lambda {|{\psi _i}\rangle }{\langle {\psi _i}|}+(1-\lambda )\tau \), and observe that \(\rho _\lambda ^{n} = \rho _1 \otimes \cdots \rho _n\) has the same charge values as \(\psi ^{n}\), \(\rho ^{n}\) and \(\tau ^{\otimes n}\). Since the entropy \(S(\rho _\lambda ^{n})\) is a continuous function of \(\lambda \), thus interpolating smoothly between 0 and \(n S(\tau )\), there is a tensor product state with the same given charge values and prescribed entropy s in the said interval.

6. This follows from the strict concavity of the von Neumann entropy \(S(\rho )\) as a function of the state, which imparts the strict concavity on \(\underline{a} \mapsto S(\tau (\underline{a}))\)\(\square \)

The penultimate point of Lemma 1 motivates us to define a resource theory where the objects are sequences of states on composite systems of \(n\rightarrow \infty \) parts. Inspired by [33], the allowed operations in this resource theory are those that respect basic principles of physics, namely entropy and charge conservation. We point out right here, that “physics” in the present context does not necessarily refer to the fundamental physical laws of nature, but to any rule that the system under consideration obeys. It is well-known that quantum operations that preserve entropy for all states are unitaries. The class of unitaries that conserve charges of a system are precisely those that commute with all charges of that system. However, it turns out that these constraints are too strong if imposed literally, when many charges are to be conserved, as it could easily happen that only trivial unitaries are allowed. Our way out is to consider the thermodynamic limit and at the same time relax the allowed operations to approximately entropy and charge conserving ones. As for the former, we couple the composite system to an ancillary system with corresponding Hilbert space \({\mathcal {K}}\) of dimension \(2^{o(n)}\), where restricting the dimension of the ancilla ensures that the entropy rate per system, that is the entropy of the composite system divided by n, does not change in the limit of large n. Here and in the following, we use standard little-oh notation, by which o(n) denotes a function such that \(\lim _{n\rightarrow \infty } \frac{o(n)}{n} = 0\). Moreover, as for charge conservation, we consider unitaries that are almost commuting with the total charges of the composite system and the ancilla. The precise definition is as follows.

Definition 2

A unitary operation U acting on a composite system coupled to an ancillary system with Hilbert spaces \({\mathcal {H}}^{\otimes n}\) and \({\mathcal {K}}\) of dimension \(2^{o(n)}\), respectively, is called an almost-commuting unitary with the total charges of a composite system and an ancillary system if the operator norm of the normalized commutator for all total charges vanishes asymptotically for large n:

$$\begin{aligned} \lim _{n \rightarrow \infty } \frac{1}{n} \left\Vert [U,A_j^{(n)}+A_j']\right\Vert _{\infty }&=\lim _{n \rightarrow \infty } \frac{1}{n}\left\Vert U (A_j^{(n)}+A_j')-(A_j^{(n)}+A_j') U \right\Vert _{\infty } \\&= 0\quad j=1,\ldots ,c. \end{aligned}$$

where \(A_j^{(n)}\) and \(A_j'\) are respectively the charges of the composite system and the ancilla, such that \(\left\Vert A_j'\right\Vert _{\infty } \le o(n)\).

We stress that the definition of almost-commuting unitaries automatically implies that the ancillary system has a relatively small dimension and charges with small operator norm compared to a composite system. The first step in the development of our resource theory is a precise characterization of which transformations between sequences of product state are possible using almost commuting unitaries. To do so, we define asymptotically equivalent states as follows:

Definition 3

Two sequences of product states \(\rho ^n = \rho _{Q^n} = (\rho _1)_{Q_1} \otimes \cdots \otimes (\rho _n)_{Q_n}\) and \(\sigma ^n = \sigma _{Q^n} = (\sigma _1)_{Q_1} \otimes \cdots \otimes (\sigma _n)_{Q_n}\) of a composite system with charges \(A_j^{(n)}\) for \(j=1,\ldots ,c\), are called asymptotically equivalent if

$$\begin{aligned}&\lim _{n \rightarrow \infty } \frac{1}{n} \left|S(\rho ^n) - S(\sigma ^n)\right| = 0, \\&\lim _{n \rightarrow \infty } \frac{1}{n} \left|{{\text {Tr}}\,}\rho ^n A_j^{(n)} - {{\text {Tr}}\,}\sigma ^n A_j^{(n)}\right| = 0\quad \text {for all}\quad j=1,\ldots ,c. \end{aligned}$$

In other words, two sequences of product states are considered equivalent if their associated points in the normalized phase diagrams \(\frac{1}{n} {\mathcal {P}}^{(n)}\) differ by a sequence converging to 0.

We note that in the above definition, \(\rho ^n\) and \(\sigma ^n\) are tensor products of possibly different states; a tensor power state is denoted \(\rho ^{\otimes n}\).

The asymptotic equivalence theorem of [33] characterizes feasible state transformations via exactly commuting unitaries where energy is the only conserved quantity of a system, showing that it is precisely given by asymptotic equivalence. We prove an extension of this theorem for systems with multiple, possibly non-commuting conserved quantities, by allowing almost-commuting unitaries.

Theorem 4

(Asymptotic (approximate) Equivalence Theorem—AET). Let \(\rho ^n=\rho _1 \otimes \cdots \otimes \rho _n\) and \(\sigma ^n=\sigma _1 \otimes \cdots \otimes \sigma _n\) be two sequences of product states of a composite system with charges \(A_j^{(n)}\) for \(j=1,\ldots ,c\). These two states are asymptotically equivalent if and only if there exist ancillary quantum systems with corresponding Hilbert space \({\mathcal {K}}\) of dimension \(2^{o(n)}\) and an almost-commuting unitary U acting on \({\mathcal {H}}^{\otimes n} \otimes {\mathcal {K}}\) such that

$$\begin{aligned} \lim _{n \rightarrow \infty } \left\Vert U (\rho ^n \otimes \omega ') U^{\dagger } - \sigma ^n \otimes \omega \right\Vert _1&= 0, \\ \end{aligned}$$

where \(\omega \) and \(\omega '\) are states of the ancillary system, and charges of the ancillary system are trivial, \(A_j' = 0\).

The proof of this theorem is given in “Appendix C”, as it relies on a number of technical lemmas, among them the concept of an approximate microcanonical subspace (a.m.c.) [34], of which we give a novel construction in “Appendix B”.

3 Asymptotic Thermodynamics of Multiple Conserved Quantities

As a thermodynamic theory, or even as a resource theory in general, transformations by almost-commuting unitaries do not appear to be the most fruitful: they are reversible and induce an equivalence relation among the sequences of product states. In particular, every point \((\underline{a},s)\) of the phase diagram \(\overline{{\mathcal {P}}}^{(1)}\) defines an equivalence class, namely of all state sequences with charges and entropy converging to \(\underline{a}\) and s, respectively.

To make the theory more interesting, and more resembling of ordinary thermodynamics, as expressed in its first and second laws (including irreversibility), we now specialize to a setting considered in many previous papers in the resource theory of thermodynamics, both with single or multiple conserved quantities. Specifically, we consider an asymptotic analogue of the setting proposed in [36] concerning the interaction of thermal baths with a quantum system and batteries, where it was shown that the second law constrains the combination of extractable charge quantities. In [36], explicit protocols for state transformations to saturate the second law are presented, that store each of several commuting charges in its corresponding explicit battery. However, for the case of non-commuting charges, one battery, or a so-called reference frame, stores all different types of charges [34, 37]. Only recently it was shown that reference frames for non-commuting charges can be constructed, at least under certain conditions, which store the different charge types in physically separated subsystems [38]. Moreover, the size of the bath required to perform the transformations is not addressed in these works, as only the limit of asymptotically large bath was considered. We will address these questions in a similar setting but in the asymptotic regime, where Theorem 4 provides the necessary and sufficient condition for physically possible state transformations. In this new setting, the asymptotic second law constrains the combination of extractable charges; we provide explicit protocols for realizing transformations satisfying the second law, where each explicit battery can store its corresponding type of work in the general case of non-commuting charges. Furthermore, we determine the minimum number of thermal baths of a given type that is required to perform a transformation.

3.1 System Model, Batteries and the First Law

We consider a system being in contact with a bath and suitable batteries, with a total Hilbert space \(Q=S\otimes B\otimes W_1\otimes \cdots \otimes W_c\), consisting of many non-interacting subsystems; namely, the work system, the thermal bath and c battery systems with Hilbert spaces S, B and \({W}_j\) for \(j=1,\ldots ,c\), respectively. We call the j-th battery system the j-type battery as it is designed to absorb j-type work. The work system and the thermal bath have respectively the charges \(A_{S_j}\) and \(A_{B_j}\) for all j, but j-type battery has only one nontrivial charge \(A_{W_j}\), and all its other charges are zero because it is meant to store only the j-th charge. We note that S, B and \(W_j\)s are different Hilbert spaces, so the charges of their corresponding systems can be different as well. The total charge is the sum of the charges of the sub-systems \(A_j=A_{S_j}+A_{B_j}+A_{W_j}\) for all j. Furthermore, for a charge A, let \(\Sigma (A)=\lambda _{\max }(A)-\lambda _{\min }(A)\) denote the spectral diameter, where \(\lambda _{\max }(A)\) and \(\lambda _{\min }(A)\) are the largest and smallest eigenvalues of the charge A, respectively. We assume that the total spectral diameter of the work system and the thermal bath is bounded by the spectral diameter of the battery, that is \(\Sigma (A_{S_j})+\Sigma (A_{B_j}) \le \Sigma (A_{W_j})\) for all j; this assumption ensures that the batteries can absorb or release charges for transformations.

As we discussed in the previous section, the generalized thermal state \(\tau (\underline{a})\) is the state that maximizes the entropy subject to the constraint that the charges \(A_j\) have the values \(a_j\). This state is equal to \(\frac{1}{Z}e^{-\sum _{j=1}^c \beta _j A_{j}}\) for real numbers \(\beta _j\) called inverse temperatures and chemical potentials; each of them is a smooth function of charge values \(a_1,\ldots ,a_c\), and \(Z={{\text {Tr}}\,}e^{-\sum _{j=1}^c \beta _j A_{j}}\) is the generalized partition function. Therefore, the generalized thermal state can be equivalently denoted \(\tau (\underline{\beta })\) as a function of the inverse temperatures, associated uniquely with the charge values \(\underline{a}\). We assume that the thermal bath is initially in a generalized thermal state \(\tau _b(\underline{\beta })\), for globally fixed \(\underline{\beta }\). This is because in [34] it was argued that these are precisely the completely passive states, from which no energy can be extracted into a battery storing energy, while not changing any of the other conserved quantities, by means of almost-commuting unitaries and even when unlimited copies of the state are available. We assume that the work system with state \(\rho _s\) and the thermal bath are initially uncorrelated, and furthermore that the battery systems can acquire only pure states.

Therefore, the initial state of an individual global system Q is assumed to be of the following form,

$$\begin{aligned} \rho _{SBW_1\ldots W_c} = \rho _S \otimes \tau (\underline{\beta })_B \otimes |w_1\rangle \!\langle w_1|_{W_1} \otimes \cdots \otimes |w_c\rangle \!\langle w_c|_{W_c}, \end{aligned}$$
(3)

and the final states we consider are of the form

$$\begin{aligned} \sigma _{SBW_1\ldots W_c} = \sigma _{SB} \otimes |w_1'\rangle \!\langle w_1'|_{W_1} \otimes \cdots \otimes |w_c'\rangle \!\langle w_c'|_{W_c}, \end{aligned}$$
(4)

where \(\rho _S\) and \(\sigma _{SB}\) are states of the system and system-plus-bath, respectively, and \(w_j\) and \(w_j'\) label pure states of the j-type battery before and after the transformation. The notation is meant to convey the expectation value of the j-type work, i.e. \(w_j^{(\prime )}\) is a real number and \({{\text {Tr}}\,}|w_j^{(\prime )}\rangle \!\langle w_j^{(\prime )}|A_{W_j} = w_j^{(\prime )}\).

The established resource theory of thermodynamics treats the batteries and the bath as ‘enablers’ of transformations of the system S, and we will show first and second laws that express the essential constraints that any such transformation has to obey. We start with the batteries. With the notations \(\underline{W} = W_1\ldots W_c\), \({|{\underline{w}}\rangle } = {|{w_1}\rangle }\cdots {|{w_c}\rangle }\), and \({|{\underline{w}'}\rangle } = {|{w_1'}\rangle }\cdots {|{w_c'}\rangle }\), let us look at a sequence \(\rho ^n = \rho _{S^n} = \rho _{S_1} \otimes \cdots \otimes \rho _{S_n}\) of initial system states, and a sequence \(|\underline{w}\rangle \!\langle \underline{w}|^n = |\underline{w}_1\rangle \!\langle \underline{w}_1|_{\underline{W}_1} \otimes \cdots \otimes |\underline{w}_n\rangle \!\langle \underline{w}_n|_{\underline{W}_n}\) of initial battery states, recalling that the baths are initially all in the same thermal state, \(\tau _{B^n} = \tau (\underline{\beta })^{\otimes n}\); furthermore a sequence of target states \(\sigma ^n = \sigma _{S^nB^n} = \sigma _{S_1B_1} \otimes \cdots \otimes \sigma _{S_nB_n}\) of the system and bath, and a sequence \(|\underline{w}'\rangle \!\langle \underline{w}'|^n = |\underline{w}_1'\rangle \!\langle \underline{w}_1'|_{\underline{W}_1} \otimes \cdots \otimes |\underline{w}_n'\rangle \!\langle \underline{w}_n'|_{\underline{W}_n}\) of target states of the batteries.

Definition 5

A sequence of states \(\rho ^n\) on any system \(Q^n\) is called regular if its charge and entropy rates converge, i.e. if

$$\begin{aligned} a_j&= \lim _{n\rightarrow \infty } \frac{1}{n} {{\text {Tr}}\,}\rho ^n A_j^{(n)},\quad j=1,\ldots ,c,\quad \text {and} \\ s&= \lim _{n\rightarrow \infty } \frac{1}{n} S(\rho ^n) \end{aligned}$$

exist. To indicate the dependence on the state sequence, we write \(a_j(\{\rho ^n\})\) and \(s(\{\rho ^n\})\).

In the rest of the chapter we will essentially focus on regular sequences, so that we can simply identify them, up to asymptotic equivalence, with a point in the phase diagram. However, it should be noted that at the expense of clumsier expressions, most of our expositions can be extended to arbitrary sequences of product states or block-product states.

According to the AET and the other results of the previous section, every point \((\underline{a},s)\) in the phase diagram \(\overline{{\mathcal {P}}}^{(1)}\) labels an equivalence class of regular sequences of product states under transformations by almost-commuting unitaries.

We emphasize that in AET by grouping the Q-systems into blocks of k, we do not of course change the physics of our system, except that now in the asymptotic limit we only consider \(n = k\nu \) copies of Q, but the state \(\rho ^n\) is asymptotically equivalent to \(\rho ^{n+O(1)}\) via almost-commuting unitaries according to Definition 2 and Theorem 4. But now we consider \(Q^k\) with its charge observables \(A_j^{(k)}\) as elementary systems, which have many more states than the k-fold product states we began with. Yet, Lemma 1 shows that the phase diagram for the k-copy system is simply the rescaled single-copy phase diagram, \(\overline{{\mathcal {P}}}^{(k)} = k \overline{{\mathcal {P}}}^{(1)}\), and indeed for \(k\ge d\), \({\mathcal {P}}^{(k)} = k \overline{{\mathcal {P}}}^{(1)}\). This means that we can extend the relation of asymptotic equivalence and the concomitant Asymptotic Equivalence Theorem (AET) 4 to any sequences of states that factor into product states of blocks \(Q^k\), for any integer k, which freedom we exploit in this thermodynamics setup.

Now, for regular sequences \(\rho _{S^n}\) of initial states of the system and final states of the system plus bath, \(\sigma _{S^nB^n}\), as well as regular sequences of initial and final battery states, \(|\underline{w}\rangle \!\langle \underline{w}|^n\) and \(|\underline{w}'\rangle \!\langle \underline{w}'|^n\), respectively, define the asymptotic rate of j-th charge change of the j-type battery as

$$\begin{aligned} \Delta A_{W_j}:= & {} a_j\left( \left\{ |w_j'\rangle \!\langle w_j'|^n\right\} \right) -a_j\left( \left\{ |w_j\rangle \!\langle w_j|^n\right\} \right) \nonumber \\= & {} \lim _{n\rightarrow \infty } \frac{1}{n} {{\text {Tr}}\,}\left( |w_j'\rangle \!\langle w_j'|^n-|w_j\rangle \!\langle w_j|^n\right) A_{W_j}^{(n)}. \end{aligned}$$
(5)

Where there is no danger of confusion, we denote this number also as \(W_j\), the j-type work extracted (if \(W_j < 0\), this means that the work \(-W_j\) is done on system S and bath B).

Similarly, we define the asymptotic rate of j-th charge change of the work system and the bath as

$$\begin{aligned} \Delta A_{S_j}&:= a_j(\{\sigma _{S^n}\})-a_j(\{\rho _{S^n}\}) = \lim _{n\rightarrow \infty } \frac{1}{n} {{\text {Tr}}\,}(\sigma _{S^n}-\rho _{S^n})A_{S_j}^{(n)}, \\ \Delta A_{B_j}&:= a_j(\{\sigma _{B^n}\})-a_j(\{\tau (\underline{\beta })_{B^n}\}) = \lim _{n\rightarrow \infty } \frac{1}{n} {{\text {Tr}}\,}\left( \sigma _{B^n}-\tau (\underline{\beta })_B^{\otimes n}\right) A_{B_j}^{(n)}, \end{aligned}$$

where we denote \(\sigma _{S^n} = {\text {Tr}}_{B^n} \sigma _{S^nB^n}\) and likewise \(\sigma _{B^n} = {\text {Tr}}_{S^n} \sigma _{S^nB^n}\).

Theorem 6

(First Law). Under the above notations, if the regular sequences of the initial state \(\rho _{S^nB^n\underline{W}^n} = \rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \otimes |\underline{w}\rangle \!\langle \underline{w}|^n\) and the final state \(\sigma _{S^nB^n\underline{W}^n} = \sigma _{S^nB^n} \otimes |\underline{w}'\rangle \!\langle \underline{w}'|^n\) are equivalent under almost-commuting unitaries, then

$$\begin{aligned} s(\{\sigma _{S^nB^n}\})&= s(\{\rho _{S^n}\}) + S(\tau (\underline{\beta }))\quad \text {and} \\ W_j&= -\Delta A_{S_j}-\Delta A_{B_j}\quad \text {for all}\quad j=1,\ldots ,c. \end{aligned}$$

Conversely, given regular sequences \(\rho _{S^n}\) and \(\sigma _{S^nB^n}\) of product states such that

$$\begin{aligned} s(\{\sigma _{S^nB^n}\}) = s(\{\rho _{S^n}\}) + S(\tau (\underline{\beta })), \end{aligned}$$

and assuming that the spectral radius of the battery observables \(W_{A_j}\) is large enough (see the discussion at the start of this section), then there exist regular sequences of product states of the j-type battery, \(|w_j\rangle \!\langle w_j|^n\) and \(|w_j'\rangle \!\langle w_j'|^n\), for all \(j=1,\ldots ,c\), such that

$$\begin{aligned} \rho _{S^nB^n\underline{W}^n}&= \rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \otimes |\underline{w}\rangle \!\langle \underline{w}|^n\quad \text {and} \end{aligned}$$
(6)
$$\begin{aligned} \sigma _{S^nB^n\underline{W}^n}&= \sigma _{S^nB^n} \otimes |\underline{w}'\rangle \!\langle \underline{w}'|^n \end{aligned}$$
(7)

can be transformed into each other by almost-commuting unitaries.

Proof

The first part is by definition, since the almost-commuting unitaries asymptotically preserve the entropy rate and the work rate of all charges.

In the other direction, all we have to do is find states \(|w_j\rangle \!\langle w_j|\) and \(|w_j'\rangle \!\langle w_j'|\) of the j-type battery \(W_j\), such that \(W_j = \Delta A_{W_j} = -\Delta A_{S_j}-\Delta A_{B_j}\), for all \(j=1,\ldots ,c\). This is clearly possible if the spectral radius of \(W_{A_j}\) is large enough. With this, the states in Eqs. (6) and (7) have the same asymptotic entropy and charge rates. Hence, the claim follows from the AET, Theorem 4\(\square \)

Remark 7

The second part of Theorem 6 says that for regular product state sequences, as long as the initial and final states of the work system and the thermal bath have asymptotically the same entropy, they can be transformed one into the another because there are always batteries that can absorb or release the necessary charge difference. Furthermore, we can even fix the initial (or final) state of the batteries and design the matching final (initial) battery state, assuming that the charge expectation value of the initial (final) state is far enough from the edge of the spectrum of \(A_{W_j}\).

For any such states, we say that there is a work transformation taking one to the other, denoted \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\). This transformation is always feasible, implicitly assuming the presence of suitable batteries for all j-type works to balance to books explicitly.

Remark 8

As a consequence of the previous remark, we now change our point of view of what a transformation is. Of our complicated S-B-\(\underline{W}\) compound, we only focus on SB and its state, and treat the batteries as implicit. Since we insist that batteries need to remain in a pure state, which thus factors off and does not contribute to the entropy, and due to the above first law Theorem 6, we can indeed understand everything that is going on by looking at how \(\rho _{S^nB^n}\) transforms into \(\sigma _{S^nB^n}\).

Note that in this context, it is in a certain sense enough that the initial states \(\rho _{S^n}\) form a regular sequence of product states and that the target states \(\sigma _{S^nB^n}\) form a regular sequence. This is because the first part of the first law, Theorem 6, only requires regularity, and since the target state defines a unique point \((\underline{a}',s')\) in the phase diagram, we can find a sequence of product states \({\widetilde{\sigma }}_{S^nB^n}\) in its equivalence class, and use the second part of Theorem 6 to realize the work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow {\widetilde{\sigma }}_{S^nB^n}\).

3.2 The Second Law

If the first law in our framework arises from focusing on the system-plus-bath compound SB, while making the batteries implicit, the second law comes about from trying to understand the action on the work system S alone, through the concomitant back-action on the bath B. Following [34, 36], the second law constrains the different combinations of commuting conserved quantities that can be extracted from the work system. We show here that in the asymptotic regime, the second law similarly bounds the extractable work rate via the rate of free entropy of the system.

The free entropy for a system with state \(\rho \), charges \(A_j\) and inverse temperatures \(\beta _j\) is defined in [36] as

$$\begin{aligned} {\widetilde{F}}(\rho ) = \sum _{j=1}^c \beta _j {{\text {Tr}}\,}\rho A_j - S(\rho ). \end{aligned}$$
(8)

It is shown in [36] that the generalized thermal state \(\tau (\underline{\beta })\) is the state that minimizes the free entropy for fixed \(\beta _j\).

For any work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\) between regular sequences of states, we define the asymptotic rate of free entropy change for the work system and the thermal bath respectively as follows:

$$\begin{aligned} \begin{aligned} \Delta {\widetilde{F}}_S&:= \lim _{n \rightarrow \infty } \frac{1}{n}\left( {\widetilde{F}}(\sigma _{S^n}) -{\widetilde{F}}(\rho _{S^n}) \right) , \\ \Delta {\widetilde{F}}_B&:= \lim _{n \rightarrow \infty } \frac{1}{n}\left( {\widetilde{F}}(\sigma _{B^n}) -n {\widetilde{F}}(\tau _B)\right) , \end{aligned} \end{aligned}$$
(9)

where the free entropy is with respect to the charges of the work system and the thermal bath with fixed inverse temperatures \(\beta _j\).

Fig. 2
figure 2

State change of the bath for a given work transformation under extraction of j-type work \(W_j\), viewed in the phase diagram of the bath \(\overline{{{{\mathcal {P}}}}}_B\). The blue line represents the tangent hyperplane at the corresponding point of the generalized thermal state \(\tau (\underline{\beta })_B\), R is the number of copies of the elementary baths in the proof of Theorem 9, and F is the point corresponding to the final state of the bath

Theorem 9

(Second Law). For any work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\) between regular sequences of states, the j-type works \(W_j\) that are extracted (and they are necessarily \(W_j = -\Delta A_{S_j}-\Delta A_{B_j}\) according to the first law) are constrained by the rate of free entropy change of the system:

$$\begin{aligned} \sum _{j=1}^c \beta _j W_j \le -\Delta {\widetilde{F}}_S. \end{aligned}$$

Conversely, for arbitrary regular sequences of product states, \(\rho _{S^n}\) and \(\sigma _{S^n}\), and any real numbers \(W_j\) with \(\sum _{j=1}^c \beta _j W_j < -\Delta {\widetilde{F}}_S\), there exists a bath system B and a regular sequence of product states \(\sigma _{S^nB^n}\) with \({{\text {Tr}}\,}_{B^n}\sigma _{S^nB^n} = \sigma _{S^n}\), such that there is a work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\) with accompanying extraction of j-type work at rate \(W_j\). This is illustrated in Fig. 2.

Proof

We start with the first statement of the theorem. Consider the global system transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\) by almost-commuting unitaries. We use the definition of work (5) and free entropy (8), as well as the first law, Theorem 6, to get

$$\begin{aligned} \sum _j \beta _j W_j= & {} -\sum _j \beta _j(\Delta A_{S_j}+\Delta A_{B_j})\nonumber \\= & {} -\Delta {\widetilde{F}}_S-\Delta {\widetilde{F}}_B-\Delta s_S -\Delta s_B . \end{aligned}$$
(10)

The second line is due to the definition in Eq. (9). Now observe that

$$\begin{aligned} \Delta s_S +\Delta s_B&= \lim _{n \rightarrow \infty } \frac{1}{n} \left( S(\sigma _{S^n})-S(\rho _{S^n})\right) + \frac{1}{n} \left( S(\sigma _{B^n})-nS(\tau (\underline{\beta })_B)\right) \nonumber \\&\ge \lim _{n \rightarrow \infty } \frac{1}{n} \left( S(\sigma _{{SB}^n})-S(\rho _{S^n})-S\left( \tau (\underline{\beta })_B^{\otimes n}\right) \right) = 0, \end{aligned}$$
(11)

where the inequality is due to sub-additivity of von Neumann entropy, and the final equality is due to asymptotic entropy conservation. Further, the generalized thermal state \(\tau (\underline{\beta })_B\) has the minimum free entropy [36], hence

$$\begin{aligned} \Delta {\widetilde{F}}_B \ge 0. \end{aligned}$$
(12)

For the second statement of the theorem, the achievability part of the second law, we aim to show that there is a work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^n} \otimes \xi _{B^n}\), with a suitable regular sequences of product states, and works \(W_1,\ldots ,W_c\) are extracted. This will be guaranteed, by the first law (Theorem 6) and the AET, Theorem 4, if

$$\begin{aligned} \begin{aligned} s(\{\xi _{B^n}\})&= S(\tau (\underline{\beta })_B) - \Delta s_S, \\ a_j(\{\xi _{B^n}\})&= {{\text {Tr}}\,}\tau (\underline{\beta })_B A_{B_j} - \Delta A_{S_j} - W_j \quad \text {for all}\quad j=1,\ldots ,c. \end{aligned}\end{aligned}$$
(13)

The left-hand side here defines a point \((\underline{a},s)\) in the charges-entropy space of the bath, and our task is to show that it lies in the phase diagram, for which purpose we have to define the bath characteristics suitably. On the right-hand side, \(\bigl ({{\text {Tr}}\,}\tau (\underline{\beta })_B A_{B_1}, \ldots , {{\text {Tr}}\,}\tau (\underline{\beta })_B A_{B_c}, S(\tau (\underline{\beta })_B)\bigr )\) is the point corresponding to the initial state of the bath, which due to its thermal nature is situated on the upper boundary of the region. At that point, the region has a unique tangent hyperplane, which has the equation \(\sum _j \beta _j a_j-s = {\widetilde{F}}(\tau (\underline{\beta })_B)\), and the phase diagram is contained in the half space \(\sum _j \beta _j a_j-s \ge {\widetilde{F}}(\tau (\underline{\beta })_B)\), corresponding to the fact that their free entropy is larger than that of the thermal state. In fact, due to the strict concavity of the entropy, and hence of the upper boundary of the phase diagram, the phase diagram, with the exception of the thermal point \(\bigl ({{\text {Tr}}\,}\tau (\underline{\beta })_B \underline{A_{B}}, S(\tau (\underline{\beta })_B)\bigr )\) is contained in the open half space \(\sum _j \beta _j a_j-s > {\widetilde{F}}(\tau (\underline{\beta })_B)\).

One of many ways to construct a suitable bath B is as several (\(R\gg 1\)) non-interacting copies of an “elementary bath” b: \(B=b^R\) and charges \(A_{B_j}=A^{(R)}_{b_j}\), so that the GGS of B is \(\tau (\underline{\beta })_B = \tau (\underline{\beta })_b^{\otimes R}\). We claim that for large enough R, the left-hand side of Eq. (13) defines a point in the phase diagram of B. Indeed, we can express the conditions in terms of b, assuming that we aim for a regular sequence of product states \(\xi _{b^{nR}}\):

$$\begin{aligned} \begin{aligned} s(\{\xi _{b^{nR}}\})&= S(\tau (\underline{\beta })_b) - \frac{1}{R} \Delta s_S, \\ a_j(\{\xi _{b^{nR}}\})&= {{\text {Tr}}\,}\tau (\underline{\beta })_b A_{b_j} - \frac{1}{R} (\Delta A_{S_j} + W_j) \quad \text {for all}\quad j=1,\ldots ,c. \end{aligned}\end{aligned}$$
(14)

For all sufficiently large R, these points \((\underline{a},s)\) are arbitrarily close to where the bath starts off, at \((\underline{a}_{\underline{\beta }},s_{\underline{\beta }}) = \bigl ({{\text {Tr}}\,}\tau (\underline{\beta })_b A_{b_1}, \ldots , {{\text {Tr}}\,}\tau (\underline{\beta })_b A_{b_c}, S(\tau (\underline{\beta })_b)\bigr )\), while they always remains in the open half plane \(\sum _j \beta _j a_j-s > {\widetilde{F}}(\tau (\underline{\beta })_b)\). Indeed, they all lie on a straight line pointing from \((\underline{a}_{\underline{\beta }},s_{\underline{\beta }})\) into the interior of that half plane. Hence, for sufficiently large R, \((\underline{a},s) \in \overline{{{{\mathcal {P}}}}}\), the phase diagram of b, and by point 5 of Lemma 1 there does indeed exist a regular sequence of product states corresponding to it. \(\square \)

In the next two subsections we study the achievability of the second law in a setting where the thermal bath is given. Namely, given a bath system with fixed charges and the thermal states \(\tau (\underline{\beta })_B^{\otimes n}\), we aim to understand whether a specific work transformation is feasible and if so what is the minimum size of the thermal bath to implement such a work transformation? We rigorously state these questions as Q1 and Q2 in Sects. 3.3 and 3.4, respectively, and answer them in their corresponding subsections.

3.3 Finiteness of the Bath: Tighter Constraints and Negative Entropy

In the previous two subsections we have elucidated the traditional statements of the first and second law of thermodynamics, as emerging in our resource theory. In particular, the second law is tight, if sufficiently large baths are allowed to be used.

Here, we specifically look at the second statement (achievability) of the second law in the presence of an explicitly given, finite bath B. It will turn out that usually, equality in the second law cannot be attained, only up to a certain loss due to the finiteness of the bath. We also discover a purely quantum effect whereby the system and the bath remain entangled after effecting a certain state transformation, allowing quantum engines to perform tasks impossible classically (i.e. with separable correlations). The question we want to address is the following refinement of the one answered in the previous subsection:

Q1: For a given bath B, regular sequences \(\{\rho _{S^n}\}\) and \(\{\sigma _{S^n}\}\) of the initial and final states of the product form, respectively, as well as real numbers \(W_1,\ldots ,W_c\) satisfying the second law, are there extensions \(\sigma _{S^nB^n}\) of \(\sigma _{S^n}\) forming a regular sequence of product states, such that the work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\) is feasible with the extracted works at rates \(W_1,\ldots ,W_c\)?

To answer it, we need the following extended phase diagram. For a give state \(\sigma _S\) of the system S, and a bath B, it is defined as the following set:

$$\begin{aligned} {{{\mathcal {P}}}}^{(1)}_{|\sigma _S}:= & {} \left\{ \left( {{\text {Tr}}\,}\xi _B A_1^{(B)},\ldots ,{{\text {Tr}}\,}\xi _B A_c^{(B)},S(B|S)_\xi \right) : \xi _{SB}\right. \nonumber \\{} & {} \left. \text {state with}\,{{\text {Tr}}\,}_B\xi _{SB}=\sigma _S \right\} . \end{aligned}$$
(15)

Furthermore its n-copy version, for a given product state \(\sigma _{S^n}=(\sigma _{1})_{S_1}\otimes \cdots \otimes (\sigma _n)_{S_n}\),

$$\begin{aligned} {{{\mathcal {P}}}}^{(n)}_{|\sigma _{S^n}}&:= \Big \{ \left( {{\text {Tr}}\,}\xi _{B^n} A_1^{(B^n)},\ldots ,{{\text {Tr}}\,}\xi _{B^n} A_c^{(B^n)},S(B^n|S^n)_\xi \right) : \xi _{S^nB^n}\nonumber \\&\quad \text {state with}\,{{\text {Tr}}\,}_{B^n}\xi _{S^nB^n}=\sigma _{S^n} \Big \}. \end{aligned}$$
(16)

These sets capture which combinations of charge value of the bath and conditional von Neumann entropy S(B|S) of the bath conditional on the system are consistent with quantum mechanics. Note that extended phase diagram contains the previously discussed phase diagram of the bath, since we can choose \(\xi _{SB}=\sigma _S\otimes \xi _B\) as a product state, and then \(S(B|S)_\xi = S(\xi _B)\), but correlations between the system and the bath can reduce the conditional entropy below this quantity, in some cases not only to zero but to negative values. Finally, define the conditional entropy phase diagram as

$$\begin{aligned} \overline{{{{\mathcal {P}}}}}_{|s_0}&:= \overline{{{{\mathcal {P}}}}}^{(1)}_{|s_0} := \Big \{ \bigl (\underline{a},s\bigr ) : a_j = {{\text {Tr}}\,}\xi _B A_j^{(B)},\, -\min \{s_0,S(\tau (\underline{a}))\} \le s \nonumber \\&\le S(\tau (\underline{a})) \text { for a state } \xi _B \Big \}, \end{aligned}$$
(17)

and likewise its n-copy version \(\overline{{{{\mathcal {P}}}}}^{(n)}_{|ns_0}\), for a number \(s_0\) (intended to be an entropy or entropy rate). These concepts are illustrated in Fig. 3. The relation between the sets, and the name of the latter, are explained in the following lemma.

Fig. 3
figure 3

Schematic of the extended phase diagram \(\overline{{{{\mathcal {P}}}}}_{|s_0}\). Depending on the value of \(s_0\), whether it is smaller or larger than \(\log |B|\), the diagram acquires either the left-hand or the right-hand one of the above shapes

Lemma 10

With the previous notation, we have:

  1. 1.

    For all k, \({{{\mathcal {P}}}}^{(k)}_{|\sigma _{S^k}} \subset \overline{{{{\mathcal {P}}}}}^{(k)}_{|S(\sigma _{S^k})}\), and the latter is a closed convex set.

  2. 2.

    For all k, \(\overline{{{{\mathcal {P}}}}}^{(k)}_{|ks_0} = k \overline{{{{\mathcal {P}}}}}^{(1)}_{|s_0}\).

  3. 3.

    For a regular sequence \(\{\sigma _{S^k}\}\) of product states with entropy rate \(s_0=s(\{\sigma _{S^k}\})\), every point in \(\overline{{{{\mathcal {P}}}}}_{|s}\) is arbitrarily well approximated by points in \(\frac{1}{k} {{{\mathcal {P}}}}^{(k)}_{|\sigma _{S^k}}\) for all sufficiently large k, i.e., \({\overline{{{{\mathcal {P}}}}}_{|s_0} = \lim _{k\rightarrow \infty } \frac{1}{k} {{{\mathcal {P}}}}^{(k)}_{|S(\sigma _{S^k})}}\).

Proof

1. We only have to convince ourselves that for a state \(\xi _{S^kB^k}\) with \({{\text {Tr}}\,}_{B^k}\xi _{S^kB^k}=\sigma _{S^k}\),

$$\begin{aligned} - \min \{S(\sigma _{S^k}),kS(\tau (\underline{a}))\} \le S(B^k|S^k)_\xi \le k S(\tau (\underline{a})), \end{aligned}$$

where \(\underline{a}=(a_1,\ldots ,a_c)\) with \(a_i = \frac{1}{k} {{\text {Tr}}\,}\xi _{B^k} A_i^{(B^k)}\). The upper bound follows from subadditivity, since \(S(B^k|S^k)_\xi \le S(B^k)_\xi \le k S(\tau (\underline{a}))\). The lower bound consists of two inequalities: first, by purifying \(\xi \) to a state \({|{\phi }\rangle } \in S^kB^kR\) and strong subadditivity, \(S(B^k|S^k)_\xi \ge S(B^k|S^kR)_\phi = - S(B^k)_\xi \ge - k S(\tau (\underline{a}))\). Secondly, \(S(B^k|S^k)_\xi \ge -S(S^k)_\xi = -S(\sigma _{S^k})\).

2. Follows easily from the definition.

3. It is enough to show that the points of the minimum entropy diagram

$$\begin{aligned} \overline{{{{\mathcal {P}}}}}_{\min |s} := \left\{ \bigl (\underline{a},-\min \{s_0,S(\tau (\underline{a}))\}\bigr ) : {{\text {Tr}}\,}\xi _B A_j^{(B)} = a_j \text { for a state } \xi _B \right\} \end{aligned}$$

can be approximated as claimed by an admissible k-copy state \(\xi _{S^kB^k}\). This is because the maximum entropy diagram \(\overline{{{{\mathcal {P}}}}}_{\max }^{(k)}\) is realized by states \(\vartheta _{S^kB^k} := \sigma _{S^k}\otimes \tau (\underline{a})_B^{\otimes k}\), and by interpolating the states, i.e. \(\lambda \xi + (1-\lambda )\vartheta \) for \(0\le \lambda \le 1\), we can realize the same charge values \(\underline{a}\) with entropies in the whole interval \([S(B^k|S^k)_\xi ;k S(\tau (\underline{a}))]\).

The approximation of \(\overline{{{{\mathcal {P}}}}}_{\min |s}\) can be proved invoking results from quantum Shannon theory, specifically quantum state merging, the form of which that we need here is stated below as Lemma 11. For this, consider a tuple \(\underline{a} \in \overline{{{{\mathcal {P}}}}}_0\) and a purification \({|{\Psi }\rangle } \in S^kB^kR^k\) of the state \(\vartheta _{S^kB^k} = \sigma _{S^k}\otimes \tau (\underline{a})_B^{\otimes k}\), which can be chosen in such a way as to be a product state itself: \({|{\Psi }\rangle } = {|{\Psi _1}\rangle }_{S_1B_1R_1}\otimes \cdots \otimes {|{\Psi _k}\rangle }_{S_kB_kR_k}\). Our strategy is to find \(\xi _{S^kB^k}\) as correlated as possible, in the sense that we would like to minimize its entropy, subject to the constraint that its marginal on \(S^k\) is \(\sigma _{S^k}\) and that on \(B^k\) shares the charge values with \(\tau (\underline{a})_B^{\otimes k}\). As we do not know an explicit construction that achieves this, we resort to a random one that succeeds with high probability, which is what quantum state merging facilitates.

We distinguish two cases, depending on which of the entropies \(S(\sigma _{S^k})\) and \(kS\bigl (\tau (\underline{a})_B\bigr )\) is the smaller.

  1. (i)

    \(\mathbf {S(\sigma _{S^k}) \ge S\bigl (\tau (\underline{a})_B\bigr )}\): We shall construct \(\xi _{S^kB^k}\) in such a way that \(\xi _{S^k} = \sigma _{S^k}\) and \(\xi _{B^k} \approx \tau \bigl (\underline{a}\bigr )_B^{\otimes k}\). To this end, choose a pure state \(\phi _{CR'}\) with entanglement entropy \(S(\phi _C) = \frac{1}{k} S(\sigma _{S^k})-S\bigl (\tau (\underline{a})_B\bigr ) + \frac{1}{2} \epsilon \), and consider the state \({\widetilde{\Psi }}^{S^kB^kC^kR^k{R'}^k} = \Psi _{S^kB^kR^k}\otimes \phi _{CR'}^{\otimes k}\). Now we apply state merging (Lemma 11) twice to this state (which is a tensor product of k systems), with a random rank-one projector P on the combined system \(R^k{R'}^k\): first, by splitting the remaining parties \(S^k : B^kC^k\), and second by splitting them \(B^k : S^kC^k\). By construction, in both bipartitions it is the solitary system (\(S^k\) and \(B^k\), resp.) that has the smaller entropy by at least \(\frac{1}{2}\epsilon k\), showing that the post-measurement state \({\widetilde{\xi }}(P)_{S^kB^kC^k}\) with high probability approximates the marginals of \(\vartheta _{S^kB^k}\) on \(S^k\) and on \(B^k\) simultaneously. Choose a typical subspace projector \(\Pi \) of \(\phi _C^{\otimes k}\) with \(\log {{\,\textrm{rank}\,}}\Pi \le S(\sigma _{S^k})-k S\bigl (\tau (\underline{a})_B\bigr ) + \epsilon k\), and let

    $$\begin{aligned} {|{\xi (P)}\rangle }_{S^kB^kC^k} := \frac{1}{c} (\mathbbm {1}_{S^kB^k}\Pi _{C^k}){|{{\widetilde{\xi }}(P)}\rangle }, \end{aligned}$$

    with a normalization constant c. Merging and properties of the typical subspace imply that for sufficiently large k,

    $$\begin{aligned} \frac{1}{2} \left\| \xi (P)_{S^k} - \sigma _{S^k} \right\| _1&\le \epsilon , \end{aligned}$$
    (18)
    $$\begin{aligned} \frac{1}{2} \left\| \xi (P)_{B^k} - \tau (\underline{a})_B^{\otimes k} \right\| _1&\le \epsilon . \end{aligned}$$
    (19)

    Now, we invoke Uhlmann’s theorem applied to purifications of \(\sigma _{S^k}\) and of \(\xi (P)_{S^kB^k}\), together with the well-known relations between fidelity and trace norm applied to Eq. (18), to obtain a state \(\xi _{S^kB^k}\) with \(\xi _{S^k} = \sigma _{S^k}\) and \(\frac{1}{2} \left\| \xi (P)_{S^kB^k} - \xi _{S^kB^k} \right\| _1 \le \sqrt{\epsilon (2-\epsilon )}\), thus by Eq. (19)

    $$\begin{aligned} \frac{1}{2} \left\| \xi _{B^k} - \tau (\underline{a})_B^{\otimes k} \right\| _1 \le \epsilon + \sqrt{\epsilon (2-\epsilon )}. \end{aligned}$$

    From the latter bound it follows that

    $$\begin{aligned} \left| \frac{1}{k} {\text {Tr}}\xi _{B^k}A_j^{(B^k)} - a_j \right| \le \Vert A_{B_j}\Vert \left( \epsilon + \sqrt{\epsilon (2-\epsilon )}\right) . \end{aligned}$$

    It remains to bound the conditional entropy:

    $$\begin{aligned}\begin{aligned} \frac{1}{k} S(B^k|S^k)_\xi&= \frac{1}{k} S\bigl (\xi _{S^kB^k}\bigr ) - \frac{1}{k} S(\xi _{S^k}) \\&\le \frac{1}{k} S\bigl (\xi (P)_{S^kB^k}\bigr ) - \frac{1}{k} S(\sigma _{S^k}) + \left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \log (|S||B|)\\&\quad + h\left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \\&\le \frac{1}{k} \log {{\,\textrm{rank}\,}}\Pi - \frac{1}{k} S(\sigma _{S^k}) + \left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \log (|S||B|)\\&\quad + h\left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \\&\le \frac{1}{k} \left( S(\sigma _{S^k}) - kS\bigl (\tau (\underline{a})\bigr ) \right) - \frac{1}{k} S(\sigma _{S^k}) \\&\quad + \left( 2\epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \log (|S||B|) + h\left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \\&= -S\bigl (\tau (\underline{a})\bigr ) + \left( 2\epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \log (|S||B|) \\&\quad + h\left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) , \end{aligned}\end{aligned}$$

    where in the second line we have used the Fannes inequality on the continuity of the entropy [39, 40], with the binary entropy \(h(x)=-x\log x-(1-x)\log (1-x)\); in the third line that \(\xi (P)_{S^kB^k}\) has rank at most \({{\,\textrm{rank}\,}}\Pi \); and in the fourth line the upper bound on the latter rank by construction.

  2. (ii)

    \(\mathbf {S(\sigma _{S^k}) < S\bigl (\tau (\underline{a})_B\bigr )}\): We shall construct \(\xi _{S^kB^k}\) such that \(\xi _{S^k} = \sigma _{S^k}\) and \({\text {Tr}}\xi _{B^k}A_j^{(B^k)} \approx {\text {Tr}}\tau \bigl (\underline{a}\bigr )_B A_{B_j}\) for all \(j=1,\ldots ,c\). Here, choose a pure state \(\phi _{CR'}\) with entanglement entropy \(S(\phi _C) = \epsilon \), and define \({\widetilde{\Psi }}^{S^kB^kC^kR^k{R'}^k} = \Psi _{S^kB^kR^k}\otimes \phi _{CR'}^{\otimes k}\). Now we apply state merging (Lemma 11) to this state (which is a tensor product of k systems), with a random rank-one projector P on the combined system \(R^k{R'}^k\), by splitting the remaining parties \(S^k : B^kC^k\), which ensures that \(S^k\) has the smaller entropy by at least \(\epsilon k\), showing that the post-measurement state \({\widetilde{\xi }}(P)_{S^kB^kC^k}\) with high probability approximates the marginal of \(\vartheta _{S^kB^k}\) on \(S^k\). Proceed as before with a typical subspace projector \(\Pi \) of \(\phi _C^{\otimes k}\) such that \(\log {{\,\textrm{rank}\,}}\Pi \le S(\sigma _{S^k})-k S\bigl (\tau (\underline{a})_B\bigr ) + \epsilon k\), and let \( {|{\xi (P)}\rangle }_{S^kB^kC^k} := \frac{1}{c} (\mathbbm {1}_{S^kB^k}\Pi _{C^k}){|{{\widetilde{\xi }}(P)}\rangle }, \) with a normalization constant c. Merging and properties of the typical subspace thus imply that for sufficiently large k,

    $$\begin{aligned} \frac{1}{2} \left\| \xi (P)_{S^k} - \sigma _{S^k} \right\| _1 \le \epsilon . \end{aligned}$$
    (20)

    Next we need to look at the charge values of \(\xi (P)_{B^k}\). Note that the expectation \({{{\mathbb {E}}}}_P \xi (P)_{B^k}\) is approximately equal to \({{{\mathbb {E}}}}_P {\widetilde{\xi }}(P)_{B^k} = \tau (\underline{a})_B^{\otimes k}\). It follows from [41, Lemma III.5], that if k is sufficiently large, then with high probability

    $$\begin{aligned} \left| {\text {Tr}}\bigl (\xi (P)_{B^k} - \tau (\underline{a})_B^{\otimes k}\bigr ) A_j^{(B^k)} \right| \le \Vert A_{B_j}\Vert \epsilon \quad \text {for all}\quad j=1,\ldots ,c. \end{aligned}$$
    (21)

    So we just focus on a good instance of P, where both Eqs. (20) and (21) hold. Now we proceed as in the first case to find a state \(\xi _{S^kB^k}\) with \(\xi _{S^k} = \sigma _{S^k}\) and \(\frac{1}{2} \left\| \xi (P)_{S^kB^k} - \xi _{S^kB^k} \right\| _1 \le \sqrt{\epsilon (2-\epsilon )}\), using Uhlmann’s theorem. Thus, as before we find

    $$\begin{aligned} \left| \frac{1}{k} {\text {Tr}}\xi _{B^k}A_j^{(B^k)} - a_j \right| \le \Vert A_{B_j}\Vert \left( \epsilon + \sqrt{\epsilon (2-\epsilon )}\right) . \end{aligned}$$

    Regarding the conditional entropy, we have quite similarly as before,

    $$\begin{aligned}\begin{aligned} \frac{1}{k} S(B^k|S^k)_\xi&= \frac{1}{k} S\bigl (\xi _{S^kB^k}\bigr ) - \frac{1}{k} S(\xi _{S^k}) \\&\le \frac{1}{k} S\bigl (\xi (P)_{S^kB^k}\bigr ) - \frac{1}{k} S(\sigma _{S^k}) + \left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \log (|S||B|)\\&\quad + h\left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \\&\le \frac{1}{k} \log 2^{\epsilon k} - \frac{1}{k} S(\sigma _{S^k}) + \left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \log (|S||B|)\\&\quad + h\left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \\&\le -\frac{1}{k} S(\sigma _{S^k}) + \left( 2\epsilon + \sqrt{\epsilon (2-\epsilon )} \right) \log (|S||B|) + h\left( \epsilon + \sqrt{\epsilon (2-\epsilon )} \right) . \end{aligned}\end{aligned}$$

Since in both cases we knew the conditional entropy to be always \(\ge - \frac{1}{k} \min \left\{ S(\sigma _{S^k}),k S\bigl (\tau (\underline{a})\bigr ) \right\} \), this concludes the proof. \(\blacksquare \)

Lemma 11

(Quantum state merging [42, 43]). Given a pure product state\(\Psi _{A^nB^nC^n}=(\Psi _1)_{A_1B_1C_1}\otimes \cdots \otimes (\Psi _n)_{A_nB_nC_n}\), such that \(S(\Psi _{A^n})-S(\Psi _{B^n}) \ge \epsilon n\), consider a Haar random rank-one projector P on \(C^n\). Then, it holds that the post-measurement state

$$\begin{aligned} \psi (P)_{A^nB^n} = \frac{1}{{\text {Tr}}\Psi _{C^n}P}{\text {Tr}}_{C^n}\Psi (\mathbbm {1}_{A^nB^n}\otimes P) \end{aligned}$$

satisfies \(\frac{1}{2}\Vert \psi (P)-\Psi _{A^nB^n}\Vert _1 \le \epsilon \), except with arbitrarily small probability for sufficiently large n. \(\blacksquare \)

Remark 12

While we have seen that the upper boundary of the extended phase diagram \(\overline{{{{\mathcal {P}}}}}^{(k)}_{|S(\sigma _{S^k})}\) is exactly realized by points in \({{{\mathcal {P}}}}^{(k)}_{|\sigma _{S^k}}\), namely those corresponding to the tensor product states \(\sigma _{S^k} \otimes \tau (\underline{a})_B^{\otimes k}\), it seems unlikely that we can achieve the analogous thing for the lower boundary: this would entail finding, for every (sufficiently large) k a tensor product state, or a block tensor product state, \(\xi _{S^kB^k}\) with prescribed charge vector \(\underline{a}\) on \(B^k\), and \(S(B^k|S^k)_\xi = -\min \{kS\bigl (\tau (\underline{a})\bigr ),S(\sigma _{S^k})\}\).

Now, for concreteness, consider the case that \(kS\bigl (\tau (\underline{a})\bigr ) \le S(\sigma _{S^k})\), so that the conditional entropy aimed for is \(S(B^k|S^k)_\xi = -k S\bigl (\tau (\underline{a})_B\bigr )\), which is the value of a purification of \(\tau (\underline{a})_B^{\otimes k}\). In particular, it would mean that \(S(\xi _{B^k}) = k S\bigl (\tau (\underline{a})_B\bigr )\), and so—recalling the charge values and the maximum entropy principle—it would follow that \(\xi _{B^k} = \tau (\underline{a})_B^{\otimes k}\). However, from the equality conditions in strong subadditivity [44], this in turn would imply that \(\xi _{S^kB^k}\) is a probabilistic mixture of purifications of \(\tau (\underline{a})_B^{\otimes k}\) whose restrictions to \(S^k\) are pairwise orthogonal. This would clearly put constraints on the spectrum of \(\sigma _{S^k}\) that are not generally met.

In the other case that \(kS\bigl (\tau (\underline{a})\bigr ) > S(\sigma _{S^k})\), the conditional entropy should be \(S(B^k|S^k)_\xi = - S(\sigma _{S^k})\), and since \(\xi _{S^k} = \sigma _{S^k}\), this would necessitate a pure state \(\xi _{S^kB^k}\). Looking at the proof of Lemma 10, however, we see that it leaves quite a bit of maneuvering space, so it may or may not be possible to satisfy all charge constraints \({\text {Tr}}\xi _{B^k}A_j^{(B^k)} = a_j\) (\(j=1,\ldots ,c\)).

Coming back to our question, if a work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\) is feasible for regular sequences on the left-hand side, by the first law this implies that

$$\begin{aligned} s(\{\sigma _{S^nB^n}\})&= s(\{\rho _{S^n}\}) + S(\tau (\underline{\beta })) \text { and} \\ W_j&= -\Delta A_{S_j}-\Delta A_{B_j} \\&= a_j(\{\rho _{S^n}\}) - a_j(\{\sigma _{S^n}\}) + a_j(\{\tau (\underline{\beta })_{B^n}\}) - a_j(\{\sigma _{B^n}\}). \end{aligned}$$

When \(\sigma _{S^n}\) and the \(W_j\) are given, this constrains the possible states \(\sigma _{S^nB^n}\) as follows: for each n,

$$\begin{aligned} \frac{1}{n} S(B^n|S^n)_\sigma&\approx S(\tau (\underline{\beta })) - \Delta s_S, \\ \frac{1}{n} {{\text {Tr}}\,}\sigma _{B^n} A_{B_j}^{(n)}&\approx {{\text {Tr}}\,}\tau (\underline{\beta })_B A_{B_j} - \Delta A_{S_j} - W_j,\quad \text {for all } j=1,\ldots ,c. \end{aligned}$$

Since by Lemma 10 the left-hand sides converge to the components of a point in \(\overline{{{{\mathcal {P}}}}}_{|s(\{\sigma _{S^n}\})}\), meaning that a necessary condition for the feasibility of the work transformation in question is that

$$\begin{aligned} \begin{aligned} (\underline{a},t) \in \overline{{{{\mathcal {P}}}}}_{|s(\{\sigma _{S^n}\})},\quad \text {with}\quad a_j&:= {{\text {Tr}}\,}\tau (\underline{\beta })_B A_{B_j} - \Delta A_{S_j} - W_j, \\ t&:= S(\tau (\underline{\beta })) - \Delta s_S. \end{aligned}\end{aligned}$$
(22)

Again by Lemma 10, this is equivalent to all \(a_j\) to be contained in the set of joint quantum expectations of the observables \(A_{B_j}\), and

$$\begin{aligned} -\min \left\{ s(\{\sigma _{S^n}\}),S\bigl (\tau (\underline{a})\bigr ) \right\} \le t \le S\bigl (\tau (\underline{a})\bigr ). \end{aligned}$$

The following theorem shows that this is also sufficient, when we allow blockings of the asymptotically many systems.

Theorem 13

(Second Law with fixed bath). For arbitrary regular sequences \(\rho _{S^n}\) and \(\sigma _{S^n}\) of product states, a given bath B, and any real numbers \(W_j\), if there exists a regular sequence of block product states \(\sigma _{S^nB^n}\) with \({{\text {Tr}}\,}_{B^n}\sigma _{S^nB^n} = \sigma _{S^n}\), such that there is a work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\) with accompanying extraction of j-type work at rate \(W_j\), then Eq. (22) defines a point \((\underline{a},t) \in \overline{{{{\mathcal {P}}}}}_{|s(\{\sigma _{S^n}\})}\).

Conversely, assuming additionally that \(\sigma _{S^n} = \sigma _S^{\otimes n}\) is an i.i.d. state, if Eq. (22) defines a point \((\underline{a},t) \in \overline{{{{\mathcal {P}}}}}_{|S(\sigma _S)}^0\) in the interior of the extended phase diagram, then for every \(\epsilon >0\) there is a work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n} \rightarrow \sigma _{S^nB^n}\) with block product states \(\sigma _{S^nB^n}\) such that \({{\text {Tr}}\,}_{B^n}\sigma _{S^nB^n} = \sigma _{S^n}\), and with accompanying extraction of j-type work at rate \(W_j\pm \epsilon \). This is illustrated in Fig. 4.

Proof

We have already argued the necessity of the condition. It remains to show its sufficiency. Using Lemma 10, this is not hard: Namely, by its point 3, for sufficiently large k, \((\underline{a},t) \in \overline{{{{\mathcal {P}}}}}_{|s}\) is \(\epsilon \)-approximated by \(\frac{1}{k} {{{\mathcal {P}}}}^{(k)}_{|\sigma _S^{\otimes k}}\), i.e. there exists a \(\sigma _{S^kB^k}\) with \({\text {Tr}}_{B^k} \sigma _{S^kB^k} = \sigma _S^{\otimes k}\) with \(\frac{1}{k} S(B^k|S^k)_\sigma \le t-\epsilon \) and \(\frac{1}{k} {\text {Tr}}\sigma _{B^k} A_j^{(B^k)} \approx a_j\) for all \(j=1,\ldots ,c\). By mixing \(\sigma \) with a small fraction of \(\bigl (\tau (\underline{a})_B\otimes \sigma _S\bigr )^{\otimes k}\), we can in fact assume that \(\frac{1}{k} S(B^k|S^k)_\sigma = t\) while preserving \(\frac{1}{k} {\text {Tr}}\sigma _{B^k} A_j^{(B^k)} \approx a_j\). Now our target block product states will be \(\sigma _{S^nB^n} := \bigl (\sigma _{S^kB^k}\bigr )^{\otimes \frac{n}{k}}\) for n a multiple of k. By construction, this sequence has the same entropy rate as the initial regular sequence of product states \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes n}\), so by the first law, Theorem 6, and the AET, Theorem 4, there is indeed a corresponding work transformation with j-type work extracted equal to \(W_j\pm \epsilon \). \(\blacksquare \)

Remark 14

One might object that tensor power target states are not general enough in Theorem 13, as we had observed in Sect. 2 that such states do not generate the full phase diagram \(\overline{{\mathcal {P}}}\) of the system S. However, by considering blocks of \(\ell \) systems \(S^\ell \), we can apply the theorem to block tensor power target states \(\sigma _{S^n} = \bigl (\sigma _1\otimes \cdots \otimes \sigma _\ell \bigr )^{\otimes \frac{n}{\ell }}\), and these latter are in fact a rich enough class to exhaust the entire phase diagram \({\overline{P}}\), when \(\ell \ge {{\text {dim}}}S\) (point 5 of Lemma 1).

More generally, we can allow as target uniformly regular sequences of product states \(\sigma _{S^n}\), by which we mean the following strengthening of the condition in Definition 5. Denoting \(B_{N+1}^{N+n} := B_{N+1}\ldots B_{N+n}\), we require that for all \(\epsilon > 0\) and uniformly for all N, it holds that for sufficiently large n,

$$\begin{aligned}{} & {} \left| a_j - \frac{1}{n} {{\text {Tr}}\,}\sigma _{B_{N+1}^{N+n}} A_j^{(n)} \right| \le \epsilon \quad \text {for all}\quad j=1,\ldots ,c, \\{} & {} \quad \text {and}\quad \left| s - \frac{1}{n} S(\sigma _{B_{N+1}^{N+n}}) \right| \le \epsilon . \end{aligned}$$
Fig. 4
figure 4

State change of the bath for a given work transformation under the extraction of j-type work \(W_j\), viewed in the extended phase diagram of the bath, which initially is in the thermal state \(\tau (\underline{\beta })_B\), the blue line at the corresponding point in the diagram representing the tangent hyperplane of the diagram. The final states \(\{\sigma _{S^nB^n}\}\) give rise to the point F in the extended diagram, whose charge values are those of \(\{\sigma _{B^n}\}\), while the entropy is \(\frac{1}{n} S(B^n|S^n)_\sigma \)

Remark 15

We conclude this subsection with a reflexion on the peculiar role of entanglement played in the quantum advantage implied by Theorem 13. Indeed, whereas in many quantum tasks entanglement is the fuel requisite at the beginning to perform super-classically, here it is the possibility of leaving the system and bath in an entangled state which allows to reach points in the extended phase diagram outside the usual phase diagram, i.e. with negative conditional entropy S(B|S). Note that no separable state can achieve this, as by the result of [45, 46] then \(S(B|S)\ge 0\).

Evidently, demonstrating such an effect would require phenomenal control of the quantum degrees of freedom of both S and B, so in a macroscopic system that would presumably be impossible. But we believe it not completely beyond the bounds of the recent demonstrations of thermal machines in mesoscopic and nanoscopic systems. While we cannot indicate any concrete references, a well-designed experiment would be feasible with any of the contemporary platform for quantum simulations (QS), such as

  • Superconducting qubits, used by Google [47] or D-Wave [48], are often employed as digital QSs (cf. [49]) and/or in circuit QED systems [50];

  • Ultracold atoms, which offer analog quantum simulation, can be realized in the continuum or in optical lattices [51]. They are very flexible and they allow to simulate complex Hubbard models, as well as spin systems;

  • Trapped ions can also be used as perfect analog or digital QSs [52, 53]. They typically simulate spin-\(\frac{1}{2}\) systems, but very recently a qudit quantum computer/simulator was realized with ions [54];

  • Rydberg atoms are atoms where the electron has been excited to a high principal quantum number, and which are trapped in optical tweezers. They mimic spin systems with long-range interactions [55,56,57];

  • Light and cavity materials: Quantum simulators based on cavity QED take advantage of the coupling between quantum system and the coherent light field of the cavity in which such system has been placed. Experiments are mainly conducted in the scope of Jaynes-Cummings and Dicke models [58]. Recent studies concern also engineering materials entirely from light with resulting photon-photon interactions [59,60,61,62];

  • Twistronics systems: Twistronics deals with twisted bilayer graphene or other two-dimensional materials [63, 64]. For small “magic” angle, such systems lead to periodic Moiré patterns at a length scale much larger than the typical scale of condensed matter systems: in this sense, they can themselves be considered as condensed matter quantum simulators of condensed matter [65]. Twisted bilayer materials can, however, also be mimicked by ultracold atoms in a two-dimensional lattice with synthetic dimensions [66];

  • Polaritons are especially useful for non-equilibrium systems and quantum hydrodynamics simulation, as well as relativistic effects thanks to dual (half light half particle) nature of the polaritonic quasi-particles [67,68,69].

3.4 Tradeoff Between Thermal Bath Rate and Work Extraction

Here we consider a different take on the question of the work deficit due to finiteness of the bath. Namely, we still consider a given fixed finite bath system B, but now as which state transformations and associated generalized works are possible when for each copy of the subsystem S, \(R\ge 0\) copies of B are present. It is clear what that means when R is an integer, but below we shall give a meaning to this rate as a real number. We start off with the observation that “large enough bath” in Theorem 9 can be taken to mean \(B^R\), for the given elementary bath B and sufficiently large integer R.

Theorem 16

For arbitrary regular sequences of product states, \(\rho _{S^n}\) and \(\sigma _{S^n}\), and any real numbers \(W_j\) with \(\sum _{j=1}^c \beta _j W_j < -\Delta {\widetilde{F}}_S\), there exists an integer \(R\ge 0\) and a regular sequence of product states \(\sigma _{S^nB^{nR}}\) with \({{\text {Tr}}\,}_{B^{nR}}\sigma _{S^nB^{nR}} = \sigma _{S^n}\), such that there is a work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes nR} \rightarrow \sigma _{S^nB^{nR}}\) with accompanying extraction of j-type work at rate \(W_j\).

Proof

This was already shown in the achievability part of Theorem 9. \(\square \)

To give meaning to a rational rate \(R = \frac{\ell }{k}\), group the systems of \(S^n\), for \(n=\nu k\), into blocks of k, which we denote \({\widetilde{S}}=S^k\), and consider \(\rho _{S^n} \equiv \rho _{{\widetilde{S}}^\nu }\) as a \(\nu \)-party state, and likewise \(\sigma _{S^n} \equiv \sigma _{{\widetilde{S}}^\nu }\). For each \({\widetilde{S}}=S^k\) we assume \(\ell \) copies of the thermal bath, \(\tau (\underline{\beta })_B^{\otimes \ell } = \tau (\underline{\beta })_{{\widetilde{B}}}\), with \({\widetilde{B}} = B^\ell \). If \(\{\rho _{S^n}\}\) and \(\{\sigma _{S^n}\}\) are regular sequences of product states, then evidently so are \(\{\rho _{{\widetilde{S}}^\nu }\}\) and \(\{\sigma _{{\widetilde{S}}^\nu }\}\). With this definition of the rate, the question that we address in this subsections is:

Q2: For a given bath B, regular sequences \(\{\rho _{S^n}\}\) and \(\{\sigma _{S^n}\}\) of the initial and final states of the product form, respectively, as well as real numbers \(W_1,\ldots ,W_c\) satisfying \(\sum _j\beta _j W_j = -\Delta {\widetilde{F}}_S-\delta \), \(\delta \ge 0\), what is the infimum over all rates \(R = \frac{\ell }{k}\) such that there is a work transformation

$$\begin{aligned} \rho _{S^n} \otimes \tau (\underline{\beta })_{B^{nR}} \equiv \rho _{{\widetilde{S}}^\nu } \otimes \tau (\underline{\beta })_{{\widetilde{B}}}^{\otimes \nu \ell } \rightarrow \sigma _{{\widetilde{S}}^\nu {\widetilde{B}}^{\nu \ell }} \equiv \sigma _{S^nB^{nR}}, \end{aligned}$$

with the extracted works at rates \(W_1,\ldots ,W_c\) and the final state satisfying \({{\text {Tr}}\,}_{{\widetilde{B}}^{\nu \ell }} \sigma _{{\widetilde{S}}^\nu {\widetilde{B}}^{\nu \ell }} = \sigma _{{\widetilde{S}}^\nu }\).

We first observe that if \(S(\rho _{S^n})=S(\sigma _{S^n})\), then \(\sum _j\beta _j W_j = -\Delta {\widetilde{F}}_S\) can hold without using any thermal bath, which follows from Eq. (10). That is, the thermal bath is not necessary for the work transformation and extracting work if the entropy of the work system does not change. Conversely, the role of the thermal bath is precisely to facilitate changes of entropy in the work system.

To answer the above question about the minimum bath rate \(R^*\), we first show the following lemma.

Lemma 17

Consider regular sequences of product states, \(\rho _{S^n}\) and \(\sigma _{S^n}\), and real numbers \(W_j\), and assume that for large enough rate R there is a work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes nR} \rightarrow \sigma _{S^nB^{nR}}\), with \(\sigma _{S^n}\) as the reduced final state on the work system, and works \(W_1,\ldots ,W_c\) are extracted. Then there is another work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes nR} \rightarrow \sigma _{S^n}\otimes \xi _{B^{nR}}\), in which the final state of the work system and the thermal bath are uncorrelated, \(\xi _{B^{nR}}\) is a regular sequence of product states, and the same works \(W_1,\ldots ,W_c\) are extracted.

Proof

Assuming that \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes nR} \rightarrow \sigma _{S^nB^{nR}}\) is a work transformation, the second law implies that \(\sum _j\beta _j W_j = -\Delta {\widetilde{F}}_s-\delta \) for some \(\delta \ge 0\), and we obtain the following coordinates for the bath system for \(0 \le \delta ' \le \delta \):

$$\begin{aligned} s(\{\sigma _{B^{nR}}\})&= S(\tau (\underline{\beta })_B) - \frac{1}{R} \Delta s_S+\frac{\delta '}{R}, \nonumber \\ a_j(\{\sigma _{B^{nR}}\})&= {{\text {Tr}}\,}\tau (\underline{\beta })_B A_{B_j} - \frac{1}{R} (\Delta A_{S_j} + W_j) \quad \text {for all}\quad j=1,\ldots ,c.\qquad \end{aligned}$$
(23)

To obtain the first equality, which is the expansion of \(\Delta s_S +\Delta s_B=\delta '\), we use the fact that \(\sum _j \beta _j W_j = -\Delta {\widetilde{F}}_S\underbrace{-\Delta {\widetilde{F}}_B-\Delta s_S -\Delta s_B }_{-\delta }\), i.e. \(\Delta {\widetilde{F}}_B+\Delta s_S +\Delta s_B =\delta \) which follows from Eq. (10). Due to positivity of the entropy rate change, i.e. \(\Delta s_S +\Delta s_B \ge 0\) from Eq. (11) and \(\Delta {\widetilde{F}}_B \ge 0\) from Eq. (12), we infer that \(0 \le \underbrace{\Delta s_S +\Delta s_B}_{\delta '} \le \delta \). The second equality, which is the expansion of \(\Delta A_{B_j}+\Delta A_{S_j}=-W_j\), follows from the first law, Theorem 6, and the AET, Theorem 4. If R is large enough, due to the convexity of the phase diagram of the thermal bath \(\overline{{\mathcal {P}}}_B^{(1)}\), the following coordinates belong to the phase diagram as well

$$\begin{aligned} s(\{\xi _{B^{nR}}\})&= S(\tau (\underline{\beta })_B) - \frac{1}{R} \Delta s_S, \nonumber \\ a_j(\{\xi _{B^{nR}}\})&= {{\text {Tr}}\,}\tau (\underline{\beta })_B A_{B_j} - \frac{1}{R} (\Delta A_{S_j} + W_j) \quad \text {for all}\quad j=1,\ldots ,c.\qquad \end{aligned}$$
(24)

We can observe this in Fig. 5; the new coordinates have the same charge values, but the entropy is \(\frac{\delta '}{R}\) smaller than the entropy of the coordinates in Eq. (23). Therefore, as long as \(S(\tau (\underline{\beta })_B) - \frac{1}{R} \Delta s_S \ge 0\), the new coordinates are inside the phase diagram as well. Hence, due to points 3 and 5 of Lemma 1, there is a tensor product state \(\xi _{B^{nR}}\) with coordinate of Eq. (24) on \(\overline{{{{\mathcal {P}}}}}_B^{(1)}\). Hence the first law, Theorem 6, implies that the desired transformation exists, and works \(W_1,\ldots ,W_c\) are extracted. \(\square \)

Theorem 18

For regular sequences of product states, \(\rho _{S^n}\) and \(\sigma _{S^n}\), and real numbers \(W_j\) satisfying \(\sum _j\beta _j W_j = -\Delta {\widetilde{F}}_s-\delta \), let \(R^*\) be the infimum of rates such that there is a work transformation \(\rho _{S^n} \otimes \tau (\underline{\beta })_B^{\otimes nR} \rightarrow \sigma _{S^n}\otimes \xi _{B^{nR}}\) under which works \(W_1,\ldots ,W_c\) are extracted, and \(\xi _{B^{nR}}\) is a regular sequence of product states.

Then, this minimum \(R^*\) is achieved for a state \(\xi _{B^{nR}}\) on the boundary of the phase diagram \(\overline{{\mathcal {P}}}_B\) of the thermal bath. Indeed, it is the point where the line given by Eq. (14) intersects the boundary of the phase diagram; see Fig. 5. Equivalently, it is the smallest R such that the point in Eq. (14) is contained in \(\overline{{\mathcal {P}}}_B\).

For \(\delta \ll 1\), the minimum rate can be written as

$$\begin{aligned} R \approx -\frac{1}{2\delta } \sum _{ij} \frac{\partial \beta _j}{\partial a_i}(\Delta A_{S_i}+W_i)(\Delta A_{S_j}+W_j), \end{aligned}$$
(25)

where \(\Delta A_{S_j} = a(\{\sigma _{S^n}\}) - a(\{\rho _{S^n}\})\).

Fig. 5
figure 5

Graphical illustration of \(R^*\), the minimum bath rate for a work transformation \(\{\rho _{S^n}\} \rightarrow \{\sigma _{S^n}\}\) satisfying the second law, according to Theorem 18. The initial state is the generalized thermal state \(\tau (\underline{\beta })\), its corresponding point marked on the upper boundary of the phase diagram. The final bath states correspond to points on the line denoted f, and they are feasible if and only they fall into the phase diagram. Consequently, \(F^*\) is the point corresponding to the minimum rate

Proof

We notice that the initial and final states of the work system as well as the initial state of the bath and the extracted work rates are known. Also, the final state of the thermal bath \(\xi _{{B}^{ nR}}\) is a tensor product state, therefore, the first law (Theorem 6), and the AET( Theorem 4) imply that the entropy and the charges rates of the global system are preserved; hence, we obtain the following entropy and charge rates for the final state of the bath:

$$\begin{aligned} s(\{\xi _{B^{nR}}\})&= S(\tau (\underline{\beta })_B) - \frac{1}{R} \Delta s_S, \nonumber \\ a_j(\{\xi _{B^{nR}}\})&= {{\text {Tr}}\,}\tau (\underline{\beta })_B A_{B_j} - \frac{1}{R} (\Delta A_{S_j} + W_j) \quad \text {for all}\quad j=1,\ldots ,c,\qquad \end{aligned}$$
(26)

where \(\Delta s_{S} = s(\{\sigma _{S^n}\}) - s(\{\rho _{S^n}\})\). The above quantities on the left member are rates of the entropy and charge changes, therefore, they must belong to the diagram \(\frac{\overline{{\mathcal {P}}}_B^{(nR)}}{nR}\). Hence, due to point 3 of Lemma 1, the above coordinates belong to \(\overline{{\mathcal {P}}}_B^{(1)}=\frac{\overline{{\mathcal {P}}}_B^{(nR)}}{nR}\). Now, for \(R=R^*\) assume that the above coordinates belong to the point \((\underline{a},s)\) on the boundary of the phase diagram \(\overline{{\mathcal {P}}}^{(1)}_B\). Then, for \(R>R^*\) the point of Eq. (26) is a convex combination of the points \((\underline{a},s)\) and the corresponding point of the state \(\tau (\underline{\beta })_B\), so it belongs to the phase diagram due to its convexity. Therefore, all points with \(R>R^*\) are inside the diagram.

To approximate the minimum R for small \(\delta \), define the function \(S(\underline{a}):=S(\tau (\underline{a})_B)\) for \(\underline{a}=(a_1,\ldots ,a_c)\). Its Taylor expansion around the point corresponding to the initial thermal state \(\tau (\underline{\beta })_B \equiv S\left( \tau (\underline{a}^0)_B\right) \) of the bath gives the approximation

$$\begin{aligned} S(\underline{a}) \approx S(\underline{a}^0) + \sum _j \beta _j \left( a_j-a_j^0\right) + \frac{1}{2} \sum _{ij} \frac{\partial \beta _j}{\partial a_i}\left( a_j-a_j^0\right) \left( a_i-a_i^0\right) , \end{aligned}$$
(27)

where we have used the well-known relation \(\frac{\partial S}{\partial a_i}=\beta _i\). From Eq. (26), we obtain

$$\begin{aligned} S(\underline{a})-S(\underline{a}^0)&= -\frac{\Delta s_S}{R},\\ a_j-a_j^0&= \frac{1}{R} (-\Delta A_{S_j}-W_j), \end{aligned}$$

and by substituting these values in the Taylor approximation (27), using the definition of the free entropy and of the deficit \(\delta \), we arrive at the claimed Eq. (25). \(\square \)

Remark 19

For a single charge, \(c=1\), which we traditionally interpret as the internal energy E of a system, Eq. (25) takes on the very simple form

$$\begin{aligned} R \approx -\frac{1}{2\delta } \frac{\partial \beta }{\partial E}(\Delta E_S+W)^2. \end{aligned}$$

Here we can use the usual thermodynamic definitions to rewrite \(\frac{\partial \beta }{\partial E} = \frac{\partial \frac{1}{T}}{\partial E} = -\frac{1}{T^2}\frac{1}{C}\), with the heat capacity \(C = \frac{\partial E}{\partial T}\), all derivatives taken with respect to corresponding Gibbs equilibrium states. Thus,

$$\begin{aligned} R \approx \frac{1}{T^2}\frac{1}{C}\cdot \frac{1}{2\delta }(\Delta E_S+W)^2, \end{aligned}$$
(28)

resulting in a clear operational interpretation of the heat capacity in terms of the rate of the bath to approach the second law tightly.

For larger numbers of charges, the matrix \(\bigl [ \frac{\partial \beta _j}{\partial a_i} \bigr ]_{ij} = \bigl [ \frac{\partial ^2 S}{\partial a_i\partial a_j} \bigr ]_{ij}\) is actually the Hessian of the entropy \(S\bigl (\tau (\underline{a})_B\bigr )\) with respect to the charges, and the r.h.s. side of Eq. (25) is \(\frac{1}{2\delta }\) times the corresponding quadratic form evaluated on the vector \((\Delta A_{S_1}+W_1,\ldots ,\Delta A_{S_c}+W_c)\). Note that by the strict concavity of the generalized Gibbs entropy, this is a negative definite symmetric matrix, thus explaining the minus sign in Eq. (25). In the same vein as the single-parameter discussion before, the Hessian matrix can be read as being composed of generalized heat capacities, which likewise receive their operational interpretation in terms of the required rate of the bath.

The heat capacity has made appearances in previous results in the resource approach to thermodynamics: Chubb et al. [70] have found it to show up in the optimal interconversion rate between states in a resource theory of Gibbs-preserving transformations and with unlimited baths at temperature T. Their setting is the finite-copy regime, and in contrast to our result of finite bath where the heat capacity affects the first order term (scaling linear with n), the heat capacity determines the so-called second order term, scaling with \(\sqrt{n}\). While it is thus amusing to contemplate the separate appearance of the heat capacity in the two results, the settings seem too different to allow for a meaningful comparison.

4 Discussion

We have presented a resource theory in which the objects are sequences of tensor product states, and thermodynamically meaningful allowed transformations, namely operations which preserve the entropy and charges of a system asymptotically. The allowed operations classify the objects into equivalence classes of state sequences that are interconvertible under allowed operations. The basic result on which our theory is built is that the objects are interconvertible via allowed operations if and only if they have the same average entropy and average charge values in the asymptotic limit.

The existence of the allowed operations between the objects of the same class is based on two pillars: First, for objects with the same average entropy there are states with sublinear dimension which can be coupled to the objects to make their spectrum asymptotically identical. Second, objects with the same average charge values project onto a common subspace of the charges of the system which has the property that any unitary acting on this subspace is an almost-commuting unitary with the corresponding charges. Therefore, the spectrum of the objects of the same class can be modified using small ancillary systems and then they are interconvertible via unitaries that asymptotically preserve the charges of the system. The notion of a common subspace for different charges, which are Hermitian operators, is introduced in [34] as approximate microcanonical (a.m.c.) subspace. In this paper, for given charges and parameters, we construct a permutation-symmetric a.m.c., something not guaranteed by the construction in [34].

We then applied this resource theory to understand quantum thermodynamics with multiple conserved quantities. We specifically consider an asymptotic generalization of the setting proposed in [36] where there are many copies of a global system consisting of a main system, called a work system, a thermal bath with fixed temperatures and various batteries to store the different charges of the system. Our approach allows us, in our setting, to resolve affirmatively a question from [34, 36], which asks about the possibility of constructing physically separate batteries for all the involved charge numbers, be they commuting or not (cf. [38]). Therefore, the objects and allowed operations of the resource theory apply quantum states of a thermodynamics system and thermodynamical transformations, respectively. It is evident that the allowed operations can transform a state with a tensor product structure to a state of a general form; however, we show that restricting the final states to the specific form of tensor product structure does not reduce the generality and tightness of the bounds that we obtain, which follows from the fact that for any point of the phase diagram there is a state with tensor product structure realizing it.

As discussed in [36], for a system with multiple charges, the free entropy is a conceptually more meaningful quantity than the free energy, which is originally defined when energy is the only conserved quantity of the system. Namely, the free energy bounds the amount of energy that can be extracted (while conserving the other charges); however, for a system with multiple charges there are not various quantities that bound the extraction of individual charges. Rather, there is only a bound on the trade-off between the charges that can be extracted which is precisely the free entropy defined with respect to the temperatures of the thermal bath. We show that indeed this is the case in our scenario as well and formulate the second law: the amount of charge combination that is extracted is bounded by the free entropy change of the work system per number of copies of the work system, i.e. the free entropy rate change. Conversely, we show that all transformations with given extracted charge values, with a combination strictly bounded by the free entropy rate change of the work system, are feasible. In particular, any amount of a given charge, or the so-called work type, is extractable providing that sufficient amounts of other charges are injected to the system.

This raises the following fundamental question: for given extractable charge values, with a combination saturating the second law up to a deficit \(\delta \), what is the minimum number of the thermal baths per number of the copies of the work system. We define this ratio as the thermal bath rate. We find that for large thermal bath rates the optimal value is inversely proportional to the deficit \(\delta \), and there is always a corresponding transformation where the final state of the work system and the thermal bath are uncorrelated. However, in general this is not true: the minimum rate might be obtained where the final state correlates the work system and the thermal bath. This is a purely quantum mechanical effect, making certain work transformations possible with a smaller size of the thermal bath than would be possible classically; it relies on work system and bath becoming entangled. In order to describe precisely the possible work transformations with a fixed bath, we define and analyze the extended phase diagram of the bath, which depends on a given conditional state of the work system and records the conditional, rather than plain, entropy.

Our results paint a broad picture of thermodynamics as a resource theory, which ultimately relies only on conservation laws, namely the conservation of information (i.e. entropy)—cf. [12]—, and the conservation of extensive physical quantities. At the microscopic level, the former means that the allowed transformations are (approximate) unitaries, the latter that they (approximately) commute with the conserved quantities. Amazingly, after these simple premises give rise to the phase diagram, the supposed deep distinction between entropy and the conserved charges disappears: they both are simply extensive conserved quantities. Following our development of thermodynamics, with its batteries for the distinct charges, we could augment this with an entropy battery, which carries no charges and is only there to absorb or release entropy. This is a very general picture that in some respect includes as a special case our treatment of the second law: namely, the role of the bath is largely as such an entropy battery, although the fact that it also carries charges complicates things compared to this abstract vantage point.

We leave several open questions to be addressed. Not to dwell on the overly technical ones, which will be evident to readers of the detailed claims and proofs, a fundamental problem is whether it is possible to prove the AET Theorem 4 with unitaries that exactly commute with the conserved quantities, rather than approximately? This would require the construction of a subexponential reference frame to take care of the conservation laws; this is known to be possible for a single conserved quantity (energy) [33], and more generally for pairwise commuting charges [12]. If it were possible in the non-commuting setting, it would give our theory a much stronger appeal, since at a fundamental level, conservation laws in nature are considered to hold strictly, rather than only approximately.

There is a whole plethora of open questions concerning practical and experimental implications of our results (similar experimental settings for thermodynamics with non-commuting charges have been characterized recently in [71, 72]). The most straightforward, and perhaps most interesting is this one: can one design a system and a bath of small to moderate size, such that a concrete work transformation will necessarily leave the system and the bath in a final entangled state? The impossibility of such a transformation in a classical system could be interpreted as a thermal machine entanglement witness.