Microcanonical and resource-theoretic derivations of the thermal state of a quantum system with noncommuting charges

The grand canonical ensemble lies at the core of quantum and classical statistical mechanics. A small system thermalizes to this ensemble while exchanging heat and particles with a bath. A quantum system may exchange quantities represented by operators that fail to commute. Whether such a system thermalizes and what form the thermal state has are questions about truly quantum thermodynamics. Here we investigate this thermal state from three perspectives. First, we introduce an approximate microcanonical ensemble. If this ensemble characterizes the system-and-bath composite, tracing out the bath yields the system's thermal state. This state is expected to be the equilibrium point, we argue, of typical dynamics. Finally, we define a resource-theory model for thermodynamic exchanges of noncommuting observables. Complete passivity---the inability to extract work from equilibrium states---implies the thermal state's form, too. Our work opens new avenues into equilibrium in the presence of quantum noncommutation.

TheỸ j 's are defined on H ⊗n , · ∞ denotes the operator norm, and O (n) denotes a function that approaches zero as n → ∞. Consider m blocks of n copies of S, i.e., N = nm copies of S. We can view one copy as the system of interest and N − 1 copies as a bath. Consider the average, over N copies, of a charge Q j : ThisQ j equals also the average, over m blocks, of the block averageQ j : Let us construct observablesȲ j that approximate theQ j 's and that commute: [Ȳ j ,Ȳ k ] = 0, and Q j −Ȳ j ∞ ≤ for all m. SinceỸ j approximates theQ j in Eq. (6), we may takē Approximate microcanonical subspace: Recall the textbook derivation of the form of the thermal state of a system that exchanges commuting charges with a bath. The composite system's state occupies a microcanonical subspace. In every state in the subspace, every whole-system charge, including the energy, has a well-defined value.
Charges that fail to commute might not have well-defined values simultaneously. But, if N is large, theQ j 's nearly commute; they can nearly have well-defined values simultaneously. This approximation motivates our definition of an approximate microcanonical subspace M. If the composite system occupies any state in M, one has a high probability of being able to predict the outcome of a measurement of anyQ j . Definition 1. For η, η , , δ, δ > 0, an ( , η, η , δ, δ )-approximate microcanonical (a.m.c.) subspace M of H ⊗N associated with observables Q j and with approximate expectation values v j consists of the states ω for which the probability distribution over the possible outcomes of a measurement of anyQ j peaks sharply about v j . More precisely, we denote by Π η j the projector onto the direct sum of the eigensubspaces ofQ j associated with the eigenvalues in the interval [v j − ηΣ(Q j ), v j + ηΣ(Q j )]. Here, Σ(Q) = λ max (Q) − λ min (Q) is the spectral diameter of an observable Q. M must satisfy the following conditions: 1. Let ω denote any state, defined on H ⊗N , whose support lies in M. A measurement of anyQ j is likely to yield a value near v j : 2. Conversely, consider any state ω, defined on H ⊗N , whose measurement statistics peak sharply. Most of the state's probability weight lies in M: wherein P denotes the projector onto M.
This definition merits two comments. First, M is the trivial (zero) subspace if the v j 's are inconsistent, i.e., if no state ρ satisfies Tr(ρ Q j ) = v j ∀j. Second, specifying (η, η , , δ, δ ) does not specify a unique subspace. The inequalities enable multiple approximate microcanonical subspaces to satisfy Definition 1. The definition ensures, however, that any two such subspaces overlap substantially.
The approximate microcanonical subspace leads to the NATS: Let us show that Definition 1 exhibits the property desired of a microcanonical state: The reduced state of each subsystem is close to the NATS.
We quantify the discrepancy between Ω and the NATS with the relative entropy: wherein S(Ω ) := − Tr Ω log(Ω ) is the von Neumann entropy. The relative entropy is lower-bounded by the trace norm, which quantifies quantum states' distinguishability [2]: Theorem 2. Let M denote an ( , η, η , δ, δ )-approximate microcanonical subspace of H ⊗N associated with the Q j 's and the v j 's, for N ≥ [2 Q j 2 ∞ /(η 2 )] log(2/δ ). The average, over the N subsystems, of the relative entropy between each subsystem's reduced state Ω and the NATS is small: This θ = (const.)/ √ N is proportional to a constant dependent on , on the v j 's, and on d.
Proof. We will bound each term in the definition (10) of the relative entropy D. The von Neumann-entropy term S(Ω ), we bound with Schumacher's theorem for typical subspaces. The cross term is bounded, by the definition of the approximate microcanonical subspace M, in terms of the small parameters that quantify the approximation.
First, we lower-bound the dimensionality of M in terms of , η, η , δ, and δ . Imagine measuring someQ j of the composite-system state γ ⊗N v . This is equivalent to measuring each subsystem's Q j , then averaging the outcomes. Each Q j measurement would yield a random outcome X j ∈ [λ min (Q j ), λ max (Q j )], for = 0, . . . , N − 1. The average of these Q j -measurement outcomes is tightly concentrated around v j , by Hoeffding's Inequality [3]: ≤ δ , for large enough N . From the second property in Definition 1, it follows that Tr γ ⊗N v P ≥ 1 − . Hence M is a high-probability subspace of γ ⊗N v . By Schumacher's Theorem, or by the stronger [4,Theorem I.19], wherein θ := (const.)/ √ N . The constant depends on , d, and the charge values v j . The entropy's subadditivity implies that S(Ω) ≤ N −1 =0 S(Ω ). Combining this inequality with Ineq. (17) yields The support of Ω lies within M: =0 Ω . We will bound the many-copy average = Tr(ΩQ j ).
Let us bound this trace from both sides. RepresentingQ j = q q Π q j in its eigendecomposition, we upper-bound the following average: We complement this upper bound with a lower bound: Inequalities (23) and (25) show that the whole-system average w j is close to the single-copy average v j : Let us bound the average relative entropy. By definition, Let us focus on the second term. First, we substitute in the form of γ v from Eq. (1) of the main text. Next, we substitute in for w j , using Eq. (19). Third, we substitute in ξ j , using Eq. (26). Fourth, we invoke the definition of S(γ v ), which we bound with Ineq. (18): Tr Ω log(γ v ) (29) Combining this inequality with Eq. (28) yields The final inequality follows from Ineq. (27). Since the v j 's determine the µ j -values, (c + 1) (max j |µ j |) is a constant determined by the v j 's. The final term in Ineq. (37), therefore, is upper-bounded by θ = (c + 1)(const.)(η + 2δ) · max j Q j ∞ .
Existence of an approximate microcanonical subspace: Definition 1 does not reveal under what conditions an approximate microcanonical subspace M exists. We will show that an M exists for , η, η , δ, δ that can approach zero simultaneously, for sufficiently large N . First, we prove the existence of a microcanonical subspace for commuting observables. Applying this lemma to theỸ j 's shows that M exists for noncommuting observables.
Lemma 3. Consider a Hilbert space K with commuting observables X j , j = 0, . . . , c. For all , η, δ > 0 and for sufficiently large m, there exists an , η, η =η, δ, δ = c+1 -approximate microcanonical subspace M of K ⊗m associated with the observables X j and with the approximate expectation values v j .
Proof. Recall thatX is the average of X j over the m subsystems. Denote by the projector onto the direct sum of theX j eigenspaces associated with the eigenvalues in [v j − η, v j + η]. Consider the subspace M η com projected onto by all the X j 's. The projector onto M η com is Denote by ω any state whose support lies in M η com . Let us show that ω satisfies the inequality in (8). By the definition of P com , supp(ω) ⊂ supp(Ξ η j ). Hence Tr ωΞ η j = 1 ≥ 1 − δ. Let us verify the second condition in Definition 1. Consider any eigenvalueȳ j ofȲ j , for each j. Consider the joint eigensubspace, shared by theȲ j 's, associated with any eigenvalueȳ 1 ofȲ 1 , with any eigenvalueȳ 2 ofȲ 2 , etc. Denote the projector onto this eigensubspace of H ⊗N by Pȳ 1 ,··· ,ȳc .
Lemma 3 proves the existence of an approximate microcanonical subspace M η com for theỸ j 's defined on K = H ⊗n and for sufficiently large n. In the subsequent discussion, we denote by Υ η j the projector onto the direct sum of theȲ j eigenspaces associated with the eigenvalues in [v j − ηΣ(Ỹ j ), v j + ηΣ(Ỹ j )]. Passing fromỸ j toQ j to Q j , we now prove that the same M η com is an approximate microcanonical subspace for the Q j 's.
Proof. Letη = (η + η )/2. For a constant C AP > 0 to be determined later, let n be such Choose m in Lemma 3 large enough such that an ( ,η,η =η,δ,δ )-approximate microcanonical subspace M := M com associated with the commutingỸ j exists, with approximate expectation values v j .
Let ω denote a state defined on H ⊗N . We will show that, if measuring theȲ j 's of ω yields sharply peaked statistics, measuring theQ j 's yields sharply peaked statistics. Later, we will prove the reverse (that sharply peakedQ j statistics imply sharply peakedȲ j statistics).
Recall from Definition 1 that Π η j denotes the projector onto the direct sum of theQ j eigenstates associated with the eigenvalues in [v j − ηΣ(Q j ), v j + ηΣ(Q j )]. These eigenprojectors are discontinuous functions of the observables. Hence we look for better-behaved functions. We will approximate the action of Π η j by using j , associated with a width-η 0 interval around v j , and a projector Π η1 j associated with a width-η 1 interval of eigenvalues. f η,η is the indicator function on the interval [−η, η]. Hence O and C AP denotes a universal constant. Inequality (51) holds because f is λ-Lipschitz and bounded, so the Hölder norm in [6, Theorem 4.1] is proportional to λ.
Let us show that, if measuring theȲ j 's of ω yields sharply peaked statistics, then measuring theQ j 's yields sharply peaked statistics, and vice versa. First, we choose η 0 = η, η By the "sandwiching," Tr ωΠ To bound the right-hand side, we invoke Ineq. (51): Upon invoking the trace's linearity, we rearrange terms: The final inequality follows from the "sandwiching" property of f η0,η1 . Combining Ineqs. (52) and (58) yields a bound on fluctuations inQ j measurement statistics in terms of fluctuations inȲ j statistics: Now, we bound fluctuations inȲ j statistics with fluctuations inQ j statistics.
Using Ineqs. (59) and (60), we can now show that M := Mη com is an approximate microcanonical subspace for the observables Q j and the approximate charge values v j . In other words, M is an approximate microcanonical subspace for the observablesQ j .
To show that M satisfies Condition 2, By Condition 2 in the definition of M η com , therefore, at least fraction 1 − of the probability weight of ω lies in This derivation confirms physically the information-theoretic maximum-entropy derivation. By "physically," we mean, "involving the microcanonical form of a composite system's state and from the tracing out of an environment." The noncommutation of the charges Q j required us to define an approximate microcanonical subspace M. The proof of the subspace's existence, under appropriate conditions, crowns the derivation.
The physical principle underlying this derivation is, roughly, the Correspondence Principle. The Q j 's of one copy of the system S fail to commute with each other. This noncommutation constitutes quantum mechanical behavior. In the many-copy limit, however, averagesQ j of the Q j 's are approximated by commutingȲ j 's, whose existence was proved by Ogata [1]. In the many-copy limit, the noncommuting (quantum) problem reduces approximately to the commuting (classical) problem.
We stress that the approximate microcanonical subspace M corresponds to a set of observables Q j and a set of values v j . Consider the subspace M associated with a subset of the Q j 's and their v j 's. This M differs from M. Indeed, M typically has a greater dimensionality than M, because fewer equations constrain it. Furthermore, consider a linear combination Q = c j=0 µ j Q j . The averageQ of N copies of Q equals c j=0 µ jQj . The approximate microcanonical subspace M of the whole set of Q j 's has the property that all states that lie mostly on it have sharply defined values near v = c j=0 µ j v j . Generally, however, our M is not an approximate microcanonical subspace for Q , or a selection of Q , Q , etc., unless these primed operators span the same set of observables as the Q j 's. SUPPLEMENTARY NOTE 2: DYNAMICAL CONSIDERATIONS Inequality (7) of the main text is derived as follows: Let us focus on ρ − γ v 1 . Adding and subtracting Ω to the argument, then invoking the Triangle Inequality, yields We average over copies and average (via . ) over pure whole-system states |ψ . The first term on the right-hand side is bounded in Ineq. (6) of the main text: To bound the final term, we invoke Pinsker's Inequality [Ineq. (11)], Ω − γ v 1 ≤ 2D(Ω ||γ v ). Averaging over and over states |ψ yields wherein D denotes the relative entropy. The second inequality follows from the square-root's concavity. Let us double each side of Ineq. (12), then take the square-root: Combining the foregoing two inequalities, and substituting into Ineq. (64), yields Ineq. (7) of the main text.

SUPPLEMENTARY NOTE 3: DERIVATION FROM COMPLETE PASSIVITY AND RESOURCE THEORY
An alternative derivation of the thermal state's form relies on complete passivity. One cannot extract work from any number of copies of the thermal state via any energy-preserving unitary [7,8]. We adapt this argument to noncommuting conserved charges. The Non-Abelian Thermal State is shown to be the completely passive "free" state in a thermodynamic resource theory.
Resource theories are models, developed in quantum information theory, for scarcity. Using a resource theory, one can calculate the value attributable to a quantum state by an agent limited to performing only certain operations, called "free operations." The first resource theory described pure bipartite entanglement [9]. Entanglement theory concerns how one can manipulate entanglement, if able to perform only local operations and classical communications. The entanglement theory's success led to resource theories for asymmetry [10], for stabilizer codes in quantum computation [11], for coherence [12], for quantum Shannon theory [13], and for thermodynamics, amongst other settings.
Resource-theoretic models for heat exchanges were constructed recently [14,15]. The free operations, called "thermal operations," conserve energy. How to extend the theory to other conserved quantities was noted in [15]. The commuting-observables version of the theory was defined and analyzed in [16,17], which posed questions about modeling noncommuting observables. We extend the resource theory to model thermodynamic exchanges of noncommuting observables. The free operations that define this theory, we term "Non-Abelian Thermal Operations" (NATO). This resource theory is related to that in [18]. We supplement earlier approaches with a work payoff function, as well as with a reference frame associated with a non-Abelian group.
This section is organized as follows. First, we introduce three subsystems and define work. Next, we define NATO. The NATO resource theory leads to the NATS via two routes: 1. The NATS is completely passive: The agent cannot extract work from any number of copies of γ v .
2. The NATS is the state preserved by NATO, the operations that require no work. The latter condition leads to "second laws" for thermodynamics that involves noncommuting conserved charges. The second laws imply the maximum amount of work extractable from a transformation between states.
Subsystems: To specify a physical system in this resource theory, one specifies a Hilbert space, a density operator, a Hamiltonian, and operators that represent the system's charges. To specify the subsystem S of interest, for example, one specifies a Hilbert space H; a density operator ρ S ; a Hamiltonian H S ; and charges Q 1S , . . . , Q cS .
Consider the group G formed from elements of the form e iµ·Q . Each Q j can be viewed as a generator. G is non-Abelian if the Q j 's fail to commute with each other. Following [19], we assume that G is a compact Lie group. The compactness assumption is satisfied if the system's Hilbert space is finite-dimensional. (We model the reference frame's Hilbert space as infinite-dimensional for convenience. Finite-size references can implement the desired protocols with arbitrary fidelity [19]. ) We consider three systems, apart from S: First, R denotes a reservoir of free states. The resource theory is nontrivial, we prove, if and only if the free states have the NATS's form. Second, a battery W stores work. W doubles as a non-Abelian reference frame. Third, any other ancilla is denoted by A.
The Hamiltonian H tot := H S + H R + H W + H A governs the whole system. The j th whole-system charge has the form Q jtot := Q jS + Q jR + Q jW + Q jA . Let us introduce each subsystem individually.
Battery: We define work by modeling the system that stores the work. In general, the mathematical expression for thermodynamic work depends on which physical degrees of freedom a system has. A textbook example concerns a gas, subject to a pressure p, whose volume increases by an amount dV . The gas performs an amount dW = p dV of work. If a force F stretches a polymer through a displacement dx, dW = −F dx. If a material's magnetization decreases by an amount dM in the presence of a strength-B magnetic field, dW = B dM .
We model the ability to convert, into a standard form of work, a variation in some physical quantity. The model consists of an observable called a "payoff function." The payoff function is defined as We generally regard the payoff function as an observable of the battery's. We can also consider the W of the system of interest. If the system whose W we refer to is not obvious from context, we will use a subscript. For example, W W denotes the battery's work function. One might assume that the battery exchanges only finite amounts of charges. Under this assumption, a realistically sized battery can implement the desired protocols with perfect fidelity [19]. Work: We define as average extracted work W the difference in expectation value of the payoff function W: The battery's initial and final states are denoted by ρ W and ρ W . If the expectation value increases, then W > 0, and work has been extracted from the system of interest. Otherwise, work has been expended. We focus on the average work extracted in the asymptotic limit: We consider processing many copies of the system, then averaging over copies. Alternatively, one could focus on one instance of the transformation. The deterministic or maximal guaranteed work would quantify the protocol's efficiency better than the average work would [15,[20][21][22]. Reference frame: Reference frames have appeared in the thermodynamic resource theory for heat exchanges [23][24][25]. We introduce a non-Abelian reference frame into the thermodynamic resource theory for noncommuting conserved charges. Our agent's reference frame carries a representation of the G associated with the charges [10,19].
The reference frame expands the set of allowed operations from a possibly trivial set. A superselection rule restricts the free operations, as detailed below. Every free unitary U conserves (commutes with) each charge. The system charges Q jS might not commute with each other. In the worst case, the Q jS 's share no multidimensional eigensubspace. The only unitary that conserves all such Q jS 's is trivial: U ∝ I.
A reference frame "frees up" dynamics, enabling the system to evolve nontrivially. A free unitary can fail to commute with a Q jS while preserving Q jtot . This dynamics transfers charges between the system and the reference frame.
Our agent's reference frame doubles as the battery. The reference frame and battery are combined for simplicity, to reduce the number of subsystems under consideration. Ancillas: The agent could manipulate extra subsystems, called "ancillas." A list (ρ A , H A , Q 1A , . . . , Q cA ) specifies each ancilla A. Any ancillas evolve cyclically under free operations. That is, NATO preserve the ancillas' states, ρ A . If NATO evolved ancillas acyclically, the agent could "cheat," extracting work by degrading an ancilla [26].
Example ancillas include catalysts. A catalyst facilitates a transformation that could not occur for free in the catalyst's absence [26]. Suppose that a state S = (ρ S , H S , Q 1S , . . . , Q cS ) cannot transform into a stateS = (ρ S ,H S ,Q 1S , . . . ,Q cS ) by free operations: S →S. Some state X = (ρ X , H X , Q 1X , . . . , Q cX ) might enable S ⊗ X →S ⊗ X to occur for free. Such a facilitated transformation is called a "catalytic operation." Non-Abelian Thermal Operations: NATO are the resource theory's free operations. NATO model exchanges of heat and of charges that might not commute with each other.
Definition 5. Every Non-Abelian Thermal Operation (NATO) consists of the following three steps. Every sequence of three such steps forms a NATO: 1. Any number of free states (ρ R , H R , Q 1R , . . . , Q cR ) can be added.
2. Any unitary U that satisfies the following conditions can be implemented on the whole system:  (c) Any ancillas return to their original states: Tr \A (U ρ tot U † ) = ρ A .

Any subsystem can be discarded (traced out).
Conditions 2a and 2b ensure that the energy and the charges are conserved. The allowed operations are G-invariant, or symmetric with respect to the non-Abelian group G. Conditions 2a and 2b do not significantly restrict the allowed operations, if the agent uses a reference frame. Suppose that the agent wishes to implement, on S, some unitary U that fails to commute with some Q jS . U can be mapped to a whole-system unitaryŨ that conserves Q jtot . The noncommutation represents the transfer of charges to the battery, associated with work.
The construction ofŨ from U is described in [19]. (We focus on the subset of free operations analyzed in [19].) Let g, φ ∈ G denote any elements of the symmetry group. Let T denote any subsystem (e.g., T = S, W ). Let V T (g) denote a representation, defined on the Hilbert space of system T , of g. Let |φ T denote a state of S that transforms as the left regular representation of G: V T (g)|φ T = |gφ T . U can be implemented on the system S of interest by the global unitaryŨ The construction (70) does not increase the reference frame's entropy if the reference is initialized to |φ = 1 W . This nonincrease keeps the extracted work "clean" [22,26,27]. No entropy is "hidden" in the reference frame W . W allows us to implement the unitary U , providing or storing the charges consumed or outputted by the system of interest.

A. A zeroth law of thermodynamics: Complete passivity of the Non-Abelian Thermal State
Which states ρ R should the resource-theory agent access for free? The free states are the only states from which work cannot be extracted via free operations. We will ignore S in this section, treating the reservoir R as the system of interest. Free states in the resource theory for heat exchanges: Our argument about noncommuting charges will mirror the argument about extracting work when only the energy is conserved. Consider the thermodynamic resource theory for energy conservation. Let H R denote the Hamiltonian of R. The free state ρ R has the form ρ R = e −βHR /Z [16,26]. This form follows from the canonical ensemble's completely passivity and from the nonexistence of any other completely passive state. Complete passivity was introduced in [7,8].
Definition 6 (Passivity and complete passivity). Let ρ denote a state governed by a Hamiltonian H. ρ is passive with respect to H if no free unitary U can lower the energy expectation value of ρ: That is, work cannot be extracted from ρ by any free unitary. If work cannot be extracted from any number n of copies of ρ, ρ is completely passive with respect to H: ∀n = 1, 2, . . . , ∃ U : Tr U ρ ⊗n U † H < Tr ρ ⊗n H .
A free U could lower the energy expectation value only if the energy expectation value of a work-storage system increased. This transfer of energy would amount to work extraction. Conditions under which ρ is passive have been derived [7,8]: 2. E i > E j implies that p i ≤ p j for all i, j.
One can check that e −βHR /Z is completely passive with respect to H R .
No other states are completely passive (apart from the ground state). Suppose that the agent could access copies of some ρ 0 = e −βHR /Z. The agent could extract work via thermal operations [26]. Free (worthless) states could be transformed into a (valuable) resource for free. Such a transformation would be unphysical, rendering the resource theory trivial, in a sense. (As noted in [28], if a reference frame is not allowed, the theory might be nontrivial in that creating superpositions of energy eigenstates would not be possible). Free states in the resource theory of Non-Abelian Thermal Operations: We have reviewed the free states in the resource theory for heat exchanges. Similar considerations characterize the resource theory for noncommuting charges Q j . The free states, we show, have the NATS's form. If any other state were free, the agent could extract work for free. Theorem 7. There exists an m > 0 such that a NATO can extract a nonzero amount of chemical work from (ρ R ) ⊗m if and only if ρ R = e −β (HR+ j µj Qj R ) /Z for some β ∈ R.
Proof. We borrow from [7,8] the proof that canonical-type states, and only canonical-type states, are completely passive. We generalize complete passivity with respect to a Hamiltonian H to complete passivity with respect to the work function W.
Every free unitary preserves every global charge. Hence the lowering of the expectation value of the work function W of a system amounts to transferring work from the system to the battery: Just as e −βH /Z is completely passive with respect to H [7,8], the NATS is completely passive with respect to W R for some β.
Conversely, if ρ R is not of the NATS form, it is not completely passive with respect to W R . Some unitary U R ⊗m lowers the energy expectation value of ρ ⊗m , for some great-enough m. A joint unitary defined on R ⊗m and W approximates U R ⊗m well and uses the system W as a reference frame [Eq. (70)]. This joint unitary conserves every global charge. Because the expectation value of W R ⊗m decreases, chemical work is transferred to the battery.
The NATS is completely passive with respect to W R but not necessarily with respect to each charge Q j . The latter lack of passivity was viewed as problematic in [18]. The lowering of the NATS's Q j 's creates no problems in our framework, because free operations cannot lower the NATS's W . The possibility of extracting charge of a desired type Q j , rather than energy, is investigated also in [29].
For example, let the Q j 's be the components J j of the spin operator J. Let the z-axis point in the direction of µ, and let µ z > 0: The NATS has the form ρ R = e −β(HR−µzJz R ) /Z. This ρ R shares an eigenbasis with J zR . Hence the expectation value of the battery's J x charge vanishes: Tr(ρ R J xR ) = 0. A free unitary, defined on R and W , can rotate the spin operator that appears in the exponential of ρ R . Under this unitary, the eigenstates of ρ R become eigenstates of J xR . Tr(J x ρ R ) becomes negative; work appears appears to be extracted "along the J x -direction" from ρ R . Hence the NATS appears to lack completely passivity. The unitary, however, extracts no chemical work: The decrease in Tr(ρ R J xR ) is compensated for by an increase in Tr(ρ R J zR ). Another example concerns the charges J i and ρ R = e −β(HR−µzJz R ) /Z. No amount of the charge J z can be extracted from ρ R . But the eigenstates of −J z are inversely populated: The eigenstate |z associated with the low eigenvalue − 2 of −J z has the small population e −β /2 . The eigenstate | − z associated with the large eigenvalue 2 of −J z has the large population e β /2 . Hence the charge −J z can be extracted from ρ R . This extractability does not prevent ρ R from being completely passive, according our definition. Only the extraction of W corresponds to chemical work. The extraction of just one charge does not.
The interconvertibility of types of free energy associated with commuting charges was noted in [17]. Let Q 1 and Q 2 denote commuting charges, and let ρ R = e −β(HR−µ1Q1 R −µ2Q2 R ) . One can extract Q 1 work at the expense of Q 2 work, by swapping Q 1 and Q 2 (if an allowed unitary implements the swap).
B. Non-Abelian Thermal Operations preserve the Non-Abelian Thermal State.
The NATS, we have shown, is the only completely passive state. It is also the only state preserved by NATO.
Theorem 8. Consider the resource theory, defined by NATO, associated with a fixed β. Let each free state be specified by (ρ R , H R , Q 1R , . . . , Q cR ), wherein ρ R := e −β (HR− c j=1 µj Qj R ) /Z. Suppose that the agent has access to the battery, associated with the payoff function (68). The agent cannot, at a cost of W ≤ 0, transform any number of copies of free states into any other state. In particular, the agent cannot change the state's β or µ j 's.
Proof. Drawing on Theorem 7, we prove Theorem 8 by contradiction. Imagine that some free operation could transform some number m of copies of γ v := e −β (HR− j µj Qj R ) /Z into some other state γ v : γ ⊗m v → γ v . (γ v could have a different form from the NATS's. Alternatively, γ v could have the same form but have different µ j 's or a different β.) γ v is not completely passive. Work could be extracted from some number n of copies of γ v , by Theorem 7. By converting copies of γ v into copies of γ v , and extracting work from copies of γ v , the agent could extract work from γ v for free. But work cannot be extracted from γ v , by Theorem 7. Hence γ ⊗m v must not be convertible into any γ v = γ v , for all m = 1, 2, . . ..
Second laws: Consider any resource theory defined by operations that preserve some state, e.g., states of the form e −β (HR− c j=1 µj Qj R ) /Z. Consider any distance measure on states that is contractive under the free operations. Every state's distance from the preserved state ρ R decreases monotonically under the operations. NATO can be characterized with any distance measure from ρ R that is contractive under completely positive trace-preserving maps. We focus on the Rényi divergences, extending the second laws developed in [26] for the resource theory for heat exchanges.
To avoid excessive subscripting, we alter our notation for the NATS. For any subsystem T , we denote by γ T the NATS relative to the fixed β, to the fixed µ j 's, and to the Hamiltonian H T and the charges Q 1 T , . . . , Q c T associated with T . For example, γ SW := e −β[(HS+HW)+ c j=1 µj (Qj S +Qj W )] /Z denotes the NATS associated with the system-and-battery composite.
We define the generalized free energies The classical Rényi divergences D α (ρ S γ S ) are defined as wherein p k and q k denote the probabilities of the possible outcomes of measurements of the work function W associated with ρ S and with γ S . The state ρ S of S is compared with the NATS associated with H S and with the Q jS 's. The F α 's generalize the thermodynamic free energy. To see how, we consider transforming n copies (ρ S ) ⊗n of a state ρ S . Consider the asymptotic limit, similar to the thermodynamic limit, in which n → ∞. Suppose that the agent has some arbitrarily small, nonzero probability ε of failing to achieve the transformation. ε can be incorporated into any F α via "smoothing" [26]. The smoothed F ε α per copy of ρ S approaches F 1 in the asymptotic limit [26]: This expression resembles the definition F := E − T S + c j=1 µ j Q j of a thermodynamic free energy F . In terms of these generalized free energies, we formulate second laws.

Proposition 9.
In the presence of a heat bath of inverse temperature β and chemical potentials µ j , the free energies F α (ρ S , γ S ) decrease monotonically: wherein ρ S and ρ S denote the system's initial and final states. If [W S , ρ S ] = 0 and F α (ρ S , γ S ) ≥ F α (ρ S , γ S ) ∀α ≥ 0, some catalytic NATO maps ρ S to ρ S .
The F α (ρ S , γ S )'s are called "monotones." Under NATO, the functions cannot increase. The transformed state approaches the NATS or retains its distance.
Two remarks about extraneous systems are in order. First, the second laws clearly govern operations during which no work is performed on the system S. But the second laws also govern work performance: Let SW denote the system-and-battery composite. The second laws govern the transformations of SW . During such transformations, work can be transferred from W to S.
Second, the second laws govern transformations that change the system's Hamiltonian. An ancilla facilitates such transformations [15]. Let us model the change, via external control, of an initial Hamiltonian H S into H S . Let γ S and γ S denote the NATSs relative to H S and to H S . The second laws become F α (ρ S , γ S ) ≥ F α (ρ S , γ S ) ∀α ≥ 0. (81) Extractable work: In terms of the free energies, we can bound the work extractable from a resource state via NATO. Unlike in the previous section, we consider the battery W separately from the system S of interest. We assume that W and S initially occupy a product state. (This assumption is reasonable for the idealised, infinite-dimensional battery we have been considering. As we will show, the assumption can be dropped when we focus on average work.) Let ρ W and ρ W denote the battery's initial and final states. For all α, Since F α (ρ S ⊗ ρ W , γ SW ) = F α (ρ S , γ S ) + F α (ρ W , γ W ), If the battery states ρ W and ρ W are energy eigenstates, the left-hand side of Ineq. (83) represents the work extractable during one implementation of the protocol. Hence the right-hand side bounds the work extractable during the transition ρ S → ρ S . This bound is a necessary condition under which work can be extracted.
When α = 1, we need not assume that W and S occupy a product state. The reason is that subadditivity implies F 1 (ρ SW , γ SW ) ≤ F 1 (ρ S , γ S ) + F 1 (ρ W , γ W ). F 1 is the relevant free energy if only the average work is important. Quantum second laws: As in [26], additional laws can be derived in terms of quantum Rényi divergences [30][31][32][33]. These laws provide extra constraints if ρ S (and/or ρ S ) has coherences relative to the W S eigenbasis. Such coherences would prevent ρ S from commuting with the work function. Such noncommutation is a signature of truly quantum behavior. Two quantum analogues of F α (ρ S , γ S ) are defined as The additional second laws have the following form.