Introduction

Within thermodynamics, heat engines are devices that operate in a thermal context so as to extract ordered energy in the form of work. The canonical scenario involves an engine that operates cyclically between two temperatures T hot, T cold and performs a quantity of mechanical work. To do so, the engine absorbs heat from the hot reservoir, converts some of this energy to mechanical work and releases heat into the cold reservoir in accordance with the second law of thermodynamics. The largest possible efficiency, \(\eta = 1 - \frac{{T_{{\mathrm{cold}}}}}{{T_{{\mathrm{hot}}}}}\), occurs for the reversible Carnot engine1, 2 and provides a fundamental thermodynamic bound on the amount of ordered energy that can be obtained. Carnot engines, and more in general heat engines, have been extensively studied in the microscopic regime3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28 (as well as, of course, in the macroscopic regime).

However, the issue of ordered energy extraction can also be considered in scenarios in which no notion of temperature exists, and can provide a broader notion of equilibrium states. For example, more general equilibrium states can occur in physical realisations when a system has been perturbed and has not had enough time to fully thermalise. They can also arise in the context of non-equilibrium steady states29, and even when we consider closed systems in a pure state, but we only have access to a small portion of the system. Given a quantum system in a state ρ one can ask if it is possible to extract energy from it solely by performing a reversible unitary transformation on the system. The largest amount of ordered energy that was previously thought to be extractable (the ‘ergotropy’, see refs. 30,31,32) depends non-trivially on the quantum state. If no energy can be extracted in this way, then ρ is called passive33,34,35,36,37 and constitutes a primitive form of equilibrium.

In this work, we consider a scenario that is intermediate between heat engines and passive states, and is motivated by the fact that a work extraction machine should be considered as a system, which is involved in the process. Our core question is whether there exist passive states ρ S for which energy can be extracted if one performs a reversible unitary process over the system S together with a second quantum system M, which starts and finishes in the same quantum state ρ M. This second quantum system is the machine which, in analogy with the working body of a Carnot cycle, undergoes a cyclic evolution. This class of processes (which have been termed catalytic thermal operations38) is reminiscent of the ones taking place inside heat engines. However, there are some important differences between heat engines and our machine, not last the fact that our scheme does not involve actual thermal reservoirs, and there are not physical temperatures involved.

Rephrasing our core question (namely, whether it is possible to reversibly reduce the energy of a single passive state) in terms of optimal work extraction performed by a thermal machine appears to be rather convenient. In this setting, the main system S, described by the passive state, plays the role of both thermal reservoirs of an heat engine, while the additional system M can be seen as the machine, which exchanges energy between these two reservoirs in a cyclic manner. It is worth noting that, while the above identification of a passive state in terms of two thermal reservoirs is convenient for analysing our protocol, one ought to be cautious about assigning a physical meaning to it, due to the obvious differences between single systems in a passive state and thermal reservoirs.

Our study on passivity extends the set of allowed operations (which is originally composed solely of unitary operations) with the possibility of interacting with an additional system, which undergoes a cyclic dynamics. Extending the set of operations to this broader class seems reasonable, especially in light of the fact that microscopic machines can nowadays be realised in the laboratory4, 7, 11, 12, 39, 40.

In this paper, we show that energy can always be extracted from single copies of athermal passive states by means of the above set of allowed operations. We provide an explicit protocol for the energy extraction, involving an ancillary system whose local state is left invariant by the evolution. We show that, in general, correlations between the main system and the ancilla are created during the extraction protocol. However, when the dimension of the ancillary system goes to infinity, these correlations can be reduced to an infinitesimal amount, which results in a reversible (energy-extracting) dynamics on the main system. Crucially, this result has fundamental implications for the notion of passivity. In fact, if energy can be extracted from a passive state with these reversible processes, and no entropy is generated, then it seems that associating passivity of the state is a restricted idealisation, unstable under this simple extension. Thus, our work provide a way to single out the thermal state, and consequently to recover a notion of temperature, without having to take the thermodynamic limit, or to consider thermalisation scenarios. Within the passivity setting, the thermal state was previously identified as the only passive state from which no work could be extracted in the thermodynamic limit. Indeed, all other passive states become active in this limit, that is, work can be extracted from many copies of them with a global unitary operation31. However, since a theory of thermodynamics can also be formulated without taking the thermodynamic limit, one should be able to single out the thermal state even when considering single systems, and the results of our study show how this is possible.

Results

Passive states

Consider a finite-dimensional quantum system associated with the Hilbert space \({\cal H} \equiv {\Bbb C}^d\) (a qudit), with Hamiltonian \(H = \mathop {\sum}\nolimits_{i = 0}^{d - 1} E_i \left |i \right \rangle \left \langle i \right |\), and described by the state ρ. We say that the state ρ is passive iff its average energy cannot be lowered by acting on it with unitary operations, that is,

$${\mathrm{Tr}}\left[ {H\rho } \right] \le {\mathrm{Tr}}\left[ {HU\rho U^\dagger } \right]\,,\,\forall U \in {\cal B}\left( {\cal H} \right)\,,\,UU^\dagger = U^\dagger U = {{\Bbb I}}.$$
(1)

This implies that no work can be extracted from the state via a unitary process, since by conservation of energy, lowering the energy of a system would mean that this energy has been transferred to a work storage device.

We can also introduce a more restrictive notion of passivity. Let us consider \(n \in {\Bbb N}\) independent and identically distributed (i.i.d.) copies of our system, with a total Hamiltonian \(H^{\left( n \right)} = \mathop {\sum}\nolimits_{i = 1}^d H_i\), where each H i is a single system Hamiltonian acting on a different copy of the system. The state of this global system is described by \(\rho ^{ \otimes n}\). Then, we say that the state ρ is completely passive if and only if the state \(\rho ^{ \otimes n}\) is passive for all \(n \in {\Bbb N}\), while the state ρ is k-activable if \(\rho ^{ \otimes n}\) becomes active for \(n \ge k\). It can be shown33 that the completely passive states of a system with Hamiltonian H are the ones satisfying the KMS condition41,42,43. Specifically, these states are the ground state and the thermal states with temperature β ≥ 0, that is, \(\tau _\beta = e^{ - \beta H}/Z\) with \(Z = {\mathrm{Tr}}\left[ {e^{ - \beta H}} \right]\). Any state which is not of this form, is called athermal.

A characterisation of all passive states can be easily obtained. A system in a passive state is such that the ground state has the highest probability of being occupied, and the probability of occupation decreases as the energy associated with the eigenstate of H increases, Fig. 1. Specifically, a state ρ is passive iff ρ = f(H), where f is a monotone non-increasing function. Simply put, this means that the state can expressed as

$$\rho = \mathop {\sum}\limits_{i = 0}^{d - 1} p_i\left| i \right\rangle \left\langle i \right|\,,\,{\mathrm{such}} \, {\mathrm{that}}\,p_i \ge p_{i + 1}\,\forall i = 0, \ldots ,d - 2,$$
(2)

where \(\left\{ {\left| i \right\rangle } \right\}_{i = 0}^{d - 1}\) are the eigenvectors of H, ordered so that E i  ≤ E i+1 for all i (for the case of equal energies E i  = E i+1 we must make an additional stability assumption to ensure that p i  = p i+1).

Fig. 1
figure 1

Passive state spectrum and virtual temperatures. a The spectrum of a qutrit passive state \(\rho = \mathop {\sum}\nolimits_{i = 0}^2 p_i \left| i \right\rangle \left \langle i \right|\) over the eigenbasis of its Hamiltonian \(H = \mathop {\sum}\nolimits_{i = 0}^2 E_i \left| i \right\rangle \left \langle i \right |\). The occupation probabilities are ordered in a decreasing order, from the one associated with the ground state of H to the one associated with the maximally excited one, as per definition in Eq. (2). b A passive state can equally be described by virtual temperatures. Indeed, for each pair of eigenvalues of ρ, say p i and p j , we can define a virtual temperature β ij through the relation \(p_i/p_j = e^{ - \beta _{ij}\left( {E_i - E_j} \right)}\), where E i (E j ) is the energy level associated with the eigenstate \(\left| i \right\rangle \, \left( \left| j \right\rangle \right)\). In the figure, the pair of eigenstates \(\left| 0 \right\rangle\) and \(\left| 1 \right\rangle\) is associated with the hot temperature \(\beta _{{\mathrm{hot}}}^{ - 1}\), while the pair \(\left| 1 \right\rangle\) and \(\left| 2 \right\rangle\) is associated with the cold temperature \(\beta _{{\mathrm{cold}}}^{ - 1}\). The temperature associated with \(\left| 0 \right\rangle\) and \(\left| 2 \right\rangle\) is an average of the other two temperatures

We can describe the probability distribution of the passive state ρ by using virtual temperatures15, 44. In fact, for any given passive state, we can associate a (non-negative) virtual temperature with each pair of its eigenstates. For example, if we consider the pair (\(\left| i \right\rangle ,\left\langle j \right|\)), we define the virtual temperature associated with them as the \(\beta _{ij}^{ - 1} \ge 0\) such that

$$\frac{{p_i}}{{p_j}} = :e^{ - \beta _{ij}\left( {E_i - E_j} \right)},$$
(3)

where p i is the probability of occupation of the state \(\left| i \right\rangle\), and E i is the energy associated with the state (similarly for j). Thus, each pair of states can be regarded as an effective thermal state at a specific temperature. When all pairs of states has the same virtual temperature, we have that the passive state is completely passive, that is, it is the thermal state of H at that temperature.

The core protocol

We now introduce a device that extracts work by acting individually on a passive state. The device is composed by two elements, namely, a main system in a specific passive state, and a qudit “machine” system. As we will see, the following protocol is independent of the Hamiltonian of the machine, and we set it to be the trivial Hamiltonian \(H = {{\Bbb I}}\) for simplicity. Furthermore, we consider the main system to be a qutrit, since the protocol can be easily generalised to quantum d-level systems. The Hamiltonian of the main system is

$$H_{\rm P} = \mathop {\sum}\limits_{i = 0}^2 {E_i\left| i \right\rangle \left\langle i \right|_{{\rm P}}} ,$$
(4)

where E i  ≤ E i+1, and it is described by the state

$$\rho _{\rm P} = \mathop {\sum}\limits_{i = 0}^2 {p_i\left| i \right\rangle \left\langle i \right|_{\rm P}} ,$$
(5)

where p i  ≥ p i+1 (Fig. 1).

In the following we parametrise the passive state ρ P in terms of virtual temperatures. We utilise such parametrisation because it allows us to draw a conceptual link between the current scenario and the one of heat engines. This link turns out to be very convenient for the exposition of our protocol, but one should not assign to it any physical meaning; in fact, our scenario is completely different from the one in which heat engines operates. We are here considering single systems in a passive state, no physical temperatures are involved, and no actual thermal reservoirs are present.

The passive state is parametrised as follow; the virtual temperature \(T_{{\mathrm{hot}}} = \beta _{{\mathrm{hot}}}^{ - 1} > 0\) is associated with the pair of eigenstates (\(\left| 0 \right\rangle _{\mathrm{P}}\),\(\left| 1 \right\rangle _{\mathrm{P}}\)), and the virtual temperature \(T_{{\mathrm{cold}}} = \beta _{{\mathrm{cold}}}^{ - 1} > 0\) is associated with the pair (\(\left| 1 \right\rangle _{\mathrm{P}}\),\(\left| 2 \right\rangle _{\mathrm{P}}\)). We assume for simplicity that T hot > T cold, but a similar analysis applies for T hot < T cold. In Supplementary Note 1 the cycle is presented in full detail. The relation between the probability distribution of ρ P and the temperatures T hot and T cold is given by

$$\frac{{p_1}}{{p_0}} = :e^{ - \beta _{{\mathrm{hot}}}\Delta E_{10}},$$
(6)
$$\frac{{p_2}}{{p_1}} = :e^{ - \beta _{{\mathrm{cold}}}\Delta E_{21}},$$
(7)

where ΔE 10 = E 1 − E 0 ≥ 0, and ΔE 21 = E 2 − E 1 ≥ 0. Thus, by referring again to the conceptual link with heat engines, the pair of states (\(\left| 0 \right\rangle _{\mathrm{P}}\),\(\left| 1 \right\rangle _{\mathrm{P}}\)) can be visualised as if it was a hot reservoir, while the pair of states (\(\left| 1 \right\rangle _{\mathrm{P}}\),\(\left| 2 \right\rangle _{\mathrm{P}}\)) can be visualised as if it was a cold reservoir. It is worth noting that the other pair of states, (\(\left| 0 \right\rangle _{\mathrm{P}}\),\(\left| 2 \right\rangle _{\mathrm{P}}\)), is associated with a virtual temperature that is intermediate between T cold and T hot, as we can easily verify from Eqs. (6) and (7).

The protocol extracts work by means of the following cycle. A single system, described by the state ρ P, is put in contact with the machine, described by the state \(\rho _{\rm M} = \mathop {\sum}\nolimits_{j = 0}^{d - 1} q_j \left| j \right\rangle \left \langle j \right |_{\rm M}\). Then, we perform m swaps (we refer to them as hot swaps) between the hot “virtual” reservoir of the passive state and m different pairs of states of ρ M, followed by n swaps (cold swaps) between the cold “virtual” reservoir and other n different pairs of states of ρ M. In order to perform the swaps on different pairs of states, we need the machine to have at least m + n levels, and therefore we fix d = m + n. Specifically, we apply the following unitary operation to the global system

$$S_{m,n} = S_{(1,2)}^{(0,m)} \circ S_{(1,2)}^{(m,m + 1)} \circ S_{(1,2)}^{(m + 1,m + 2)} \circ \ldots \\ \circ S_{(1,2)}^{(m + n - 2,m + n - 1)} \circ S_{(0,1)}^{(m - 1,m + n - 1)} \\ \circ S_{(0,1)}^{(m - 2,m - 1)} \circ S_{(0,1)}^{(m - 3,m - 2)} \circ \ldots \circ S_{(0,1)}^{(0,1)},$$
(8)

where the operator \(S_{(a,b)}^{(c,d)}\) is a swap between system and machine, performed through the permutation \(\left| a \right\rangle _P \left| d \right\rangle_{\rm M} \leftrightarrow \left| b \right\rangle_P \left| c \right\rangle_{\rm M}\). A graphical representation of this global operation is shown in Fig. 2, where each swap is depicted by an arrow acting over the states of the machine. Although in the figure we represent the eigenstates of ρ M in a ladder, they are all associated with the same energy, and therefore the order in which we present them is only functional for visualising the cycle S m,n .

Fig. 2
figure 2

The action of the cycle over the machine. The cycle S m,n is represented in a pictorial way over the eigenstates of the d-dimensional machine (where d = m + n). Notice that the machine has a trivial Hamiltonian, and we order the eigenstates to only simplify the visualisation of the cycle. The upward arrow connecting two eigenstates of the machine represents a swap between these two states and the pair (\(\left| 0 \right\rangle _{\mathrm{P}}\),\(\left| 1 \right\rangle _{\mathrm{P}}\)) of the passive state. The downward arrow connecting two eigenstates of the machine represents a swap between this pair and the pair (\(\left| 1 \right\rangle _{\mathrm{P}}\),\(\left| 2 \right\rangle _{\mathrm{P}}\)) of the passive state. We initially perform m − 1 swaps between (\(\left| 0 \right\rangle _{\mathrm{P}}\),\(\left| 1 \right\rangle _{\mathrm{P}}\)) and \(\left\{ {\left( {\left| j \right\rangle_{\rm M}, \left| j + 1 \right\rangle_{\rm M}} \right)} \right\}_{j = 0}^{m - 2}\), and one swap between (\(\left| 0 \right\rangle _{\mathrm{P}}\),\(\left| 1 \right\rangle _{\mathrm{P}}\)) and \(\left( {\left| m - 1 \right\rangle_{\rm M}, \left| m + n - 1 \right\rangle_{\rm M}} \right)\). Then, we perform n − 1 swaps between (\(\left| 1 \right\rangle _{\mathrm{P}}\),\(\left| 2 \right\rangle _{\mathrm{P}}\)) and \(\left\{ {\left( {\left| j \right\rangle_{\rm M}, \left| j + 1 \right\rangle_{\rm M}} \right)} \right\}_{j = m}^{m + n - 2}\), and one swap between (\(\left| 1 \right\rangle _{\mathrm{P}}\),\(\left| 2 \right\rangle _{\mathrm{P}}\)) and \(\left( \left| 0 \right\rangle_{\rm M} , \left| m \right\rangle_{\rm M}\right)\). If we consider the arrow representation of swaps, we can see that the cycle is close, and this allows us to recover the local state of the machine M while extracting work

In order for the protocol to be cyclic, we need the local state of the machine to end up in its initial state. Therefore, we impose the following constraint on the state of the machine,

$$\rho _{\rm M}\mathop { = }\limits^! {\mathrm{Tr}}_{\rm P}\left[ {S_{m,n}\left( {\rho _{\rm P} \otimes \rho _{\rm M}} \right)S_{m,n}^\dagger } \right].$$
(9)

Through Eq. (9) we can express the probability distribution of the machine in terms of the passive state ρ P . In our model, we do not explicitly include an additional system (a battery) for storing the energy we extract from the passive state. Instead, we implicitly assume the existence of this work storage system, and we define the work extracted, ΔW, as the difference in average energy between the initial and final state of the main system (as the machine M has a trivial Hamiltonian, and no interaction terms are present between system and machine). Thus, we have that

$$\Delta W = {\mathrm{Tr}}\left[ {H_P\left( {\rho _{\mathrm{P}} - \tilde \rho _{\mathrm{P}}} \right)} \right],$$
(10)

where the final state of the system is

$$\tilde \rho _P = {\mathrm{Tr}}_{\rm M}\left[ {S_{m,n}\left( {\rho _{\rm P} \otimes \rho _{\rm M}} \right)S_{m,n}^\dagger } \right].$$
(11)

It is worth noting that the final state of system and machine will in general develop correlations. These correlations are classical, and without them work would not be extracted during the cycle. However, they do not compromise the re-usability of the machine if applied to another uncorrelated quantum system.

For a given system Hamiltonian H P and a given cycle S m,n , we can investigate the amount of work we extract from the state ρ P. In Supplementary Note 1 we provide all the necessary steps to evaluate ΔW in terms of the probability distribution of ρ P. We can express this quantity as

$$\Delta W = \alpha \left( {m\Delta E_{10} - n\Delta E_{21}} \right)\left( {e^{\beta _{{\mathrm{cold}}}n\Delta E_{21}} - e^{\beta _{{\mathrm{hot}}}m\Delta E_{10}}} \right),$$
(12)

where α is a positive coefficient depending non-trivially on the probability distribution of ρ P. For the class of passive states, we are considering (namely, the one in which β cold > β hot), we find that work can be extracted (ΔW > 0) iff

1. The Hamiltonian H P is such that mΔE 10 > nΔE 21.

2. The temperatures of the two virtual reservoirs are such that \(\beta _{{\mathrm{cold}}} > \frac{{m\Delta E_{10}}}{{n\Delta E_{21}}}\beta _{{\mathrm{hot}}}\).

Thus, for a fixed cycle (defined by the parameters m and n), and for a fixed Hamiltonian H P, we find that work can only be extracted if the virtual temperature T cold is lower than T hot by a multiplicative factor, which depends on the energy gaps of the Hamiltonian, see Fig. 3 for an example. In the next section we will show that, for a given Hamiltonian H P, work can be extracted from any passive (but not completely passive) state, and we characterise the cycle which allows for this extraction.

Fig. 3
figure 3

Energy extraction and efficiency with a qubit machine. Consider a qutrit system with Hamiltonian \(H_{\rm P} = \mathop {\sum}\nolimits_{i = 0}^2 E_i \left| i \right\rangle \left \langle i \right |_{\rm P}\), in the passive state \(\rho _{\rm P} = \mathop {\sum}\nolimits_{i = 0}^2 p_i \left| i \right\rangle \left \langle i \right |_{\rm P}\). The simplest energy-extracting protocol involves a qubit machine, and energy is extracted from the passive state by performing a single hot and cold swap between system and machine. This cycle is analogous to the one studied in ref. 13. a The energy extracted from a given passive state depends on the Hamiltonian of the system. This energy is positive iff the hot energy gap ΔE 10 = E 1 − E 0 lies inside the range \(\left( {\Delta E_{21};\frac{{\beta _{{\mathrm{cold}}}}}{{\beta _{{\mathrm{hot}}}}}\Delta E_{21}} \right)\), where ΔE 21 = E 2 − E 1 is the cold energy gap, and \(\beta _{{\mathrm{hot}}}^{ - 1}\) (\(\beta _{{\mathrm{cold}}}^{ - 1}\)) is the virtual temperature associated with the pair of eigenstates \(\left| 0 \right\rangle _{\mathrm{P}}\) and \(\left| 1 \right\rangle _{\mathrm{P}}\) (\(\left| 1 \right\rangle _{\mathrm{P}}\) and \(\left| 2 \right\rangle _{\mathrm{P}}\)). The above range is obtained from conditions 1 and 2. b The efficiency of the protocol η is defined as the ratio between the energy extracted at the end of the protocol and the energy extracted when performing hot swap (that is, the total positive energy extracted during the cycle). When the hot energy gap ΔE 10 lies in the correct range, the efficiency takes values between 0 and the Carnot efficiency

If we analyse in a more detailed way the cycle, we find that the same amount of energy is gained during each swap between the machine M and the hot virtual reservoir, that is

$$q_{{\mathrm{hot}}} = \alpha \Delta E_{10}\left( {e^{\beta _{{\mathrm{cold}}}n\Delta E_{21}} - e^{\beta _{{\mathrm{hot}}}m\Delta E_{10}}} \right),$$
(13)

where α is the same positive coefficient of Eq. (12). Moreover, the same amount of energy is spent during each swap between the machine M and the cold virtual reservoir,

$$q_{{\mathrm{cold}}} = \alpha \Delta E_{21}\left( {e^{\beta _{{\mathrm{cold}}}n\Delta E_{21}} - e^{\beta _{{\mathrm{hot}}}m\Delta E_{10}}} \right).$$
(14)

Knowing the amount of energy exchanged during each swap allows us to evaluate the heat exchanged with the virtual reservoirs. In fact, if we identify the pair of levels (\(\left| 0 \right\rangle _{\mathrm{P}}\),\(\left| 1 \right\rangle _{\mathrm{P}}\)) with the hot virtual reservoir, then the energy exchanged during a swap with these levels can be considered as heat coming from the hot virtual reservoir. In this way, the total heat absorbed by the machine is

$$Q_{{\mathrm{hot}}} = m\,q_{{\mathrm{hot}}},$$
(15)

while the total heat provided to the cold virtual reservoir is

$$Q_{{\mathrm{cold}}} = n\,q_{{\mathrm{cold}}}.$$
(16)

From Eqs. (15) and (16), we obtain that the work extracted can be expressed as \(\Delta W = Q_{{\mathrm{hot}}} - Q_{{\mathrm{cold}}}\), as in a standard heat engine exchanging energy between two reservoirs. Once Q hot and Q cold are defined, we can evaluate an efficiency of this cycle, that is

$$\eta = \frac{{\Delta W}}{{Q_{{\mathrm{hot}}}}} = 1 - \frac{{n\Delta E_{21}}}{{m\Delta E_{10}}}.$$
(17)

The efficiency of our protocol (when the machine is finite-dimensional) is sub-Carnot in the virtual temperatures, see Fig. 3. In fact, work can only be extracted when conditions 1 and 2 are satisfied, and these conditions implied \(0 < \eta < 1 - \frac{{T_{{\mathrm{cold}}}}}{{T_{{\mathrm{hot}}}}}\). When we consider the case of an infinite-dimensional machine, we find that by a judicious choice of parameters we may obtain Carnot efficiency.

Once the cycle S m,n is ended, the local state of the main system is moved to a less energetic state. By solving Eq. (9), we find that the final state of the main system \(\tilde \rho _{\rm P}\) has the following probability distribution

$$p{\prime}_0 = p_0 + m\Delta P,$$
(18)
$$p{\prime}_1 = p_1 - \left( {m + n} \right)\Delta P,$$
(19)
$$p{\prime}_2 = p_2 + n\Delta P,$$
(20)

where the unit of probability ΔP depends on the initial state ρ P, and it is given by

$$\Delta P = \alpha \left( {e^{\beta _{{\mathrm{cold}}}n\Delta E_{21}} - e^{\beta _{{\mathrm{hot}}}m\Delta E_{10}}} \right),$$
(21)

with α the same positive coefficient of Eq. (12). Due to condition 2, the unit ΔP > 0, so that the probability of occupation of \(\left| 1 \right\rangle _{\mathrm{P}}\) is reduced in favour of the probabilities p 0 and p 1. Thus, energy is extracted from the passive state when mΔP is moved from p 1 to p 0 (during the hot swaps), and part of this energy is used to move the probability nΔP from p 1 to p 2 (during the cold swaps), see Supplementary Fig. 1.

Work extraction from any passive state

We now show that, for a given Hamiltonian H P, work can be extracted from any passive but not completely passive state. In particular, we first show this for qutrit passive states, and we then generalise to the qudit case. Work extraction is achieved with the cycle presented in previous section, for specific values of the parameters m and n. In what follows, we represent the passive state with the probabilities of occupation {p 0, p 1, p 2}, as opposed to the previous case in which the virtual temperatures were used. In this way, we can consider all possible scenarios, and we are not limited to the case in which a specific pair of eigenstates has a colder (hotter) virtual temperature than the other pair.

The Hamiltonian of the system H P is defined in Eq. (4), where the energy gap between ground and first excited state is ΔE 10, and the gap between first and second excited states is ΔE 21. We assume that

$$\exists M,N \in {\Bbb N}\,{\mathrm{such}}\, {\mathrm{that}}\,M\,\Delta E_{10} - N\,\Delta E_{21} = 0,$$
(22)

that is, we ask the ratio between the two energy gaps to be rational. Notice that, even if the ratio is irrational, we can find a suitable \(N\) and \(M\) such that the condition is approximatively satisfied. Once the relation between energy gaps is defined, we can divide the set of passive states into three different subsets, namely

$$R_1 = \left\{ {\rho _{\rm P}\,{\mathrm{passive}}\,\left| {\left( {\frac{{p_1}}{{p_2}}} \right)^N >\left( {\frac{{p_0}}{{p_1}}} \right)^M} \right.} \right\},$$
(23)
$$R_2 = \left\{ {\rho _{\rm P}\,{\mathrm{passive}}\,\left| {\left( {\frac{{p_1}}{{p_2}}} \right)^N < \left( {\frac{{p_0}}{{p_1}}} \right)^M} \right.} \right\},$$
(24)
$$R_3 = \left\{ {\rho _{\rm P}\,{\mathrm{passive}}\,\left| {\left( {\frac{{p_1}}{{p_2}}} \right)^N = \left( {\frac{{p_0}}{{p_1}}} \right)^M} \right.} \right\}.$$
(25)

The union of these three subsets gives the set of all passive states. In particular, one can verify that the subset R 3 contains all the completely passive states, that is, the thermal states of H P at any temperature \(\beta ^{ - 1} \ge 0\). Moreover, R 1 corresponds to the set of passive states with β hot associated with the pair of eigenstates \(\left| 0 \right\rangle _{\mathrm{P}}\) and \(\left| 1 \right\rangle _{\mathrm{P}}\), and β cold associated with the pair \(\left| 1 \right\rangle _{\mathrm{P}}\) and \(\left| 2 \right\rangle _{\mathrm{P}}\). The set R 2, instead, contains the passive states with opposite hot and cold virtual temperatures. Since we are considering qutrit systems, we can represent the set of passive states in a two-dimensional diagram, using their probability distribution. Each point in this diagram represents a passive state. In Fig. 4, we show the three subsets of Eqs. (23), (24) and (25).

Fig. 4
figure 4

The region of qutrit passive states and the activable set. Consider a qutrit system with Hamiltonian \(H_{\rm P} = \mathop {\sum}\nolimits_{i = 0}^2 E_i \left| i \right\rangle \left \langle i \right |_{\rm P}\), whose state \(\rho _{\rm P} = \mathop {\sum}\nolimits_{i = 0}^2 p_i \left| i \right\rangle \left \langle i \right |_{\rm P}\) is passive. The Hamiltonian is fixed by choosing two \(N,M \in {\Bbb N}\) such that M ΔE 10 − N ΔE 21 = 0, where ΔE 10 = E 1 − E 0 and ΔE 21 = E 2 − E 1. In both panels we set M = 2 and N = 1. a The space of passive states can be represented in a two-dimensional plot, whose axes represent the probability of occupation of the ground state p 0, and first excited state p 1. The purple region represents the subset R 1, defined in Eq. (23), while the light blue region represents the subset R 2, defined in Eq. (24). The black line is R 3, that is, the set of completely passive states, see Eq. (25). b For a given cycle S m,n we can draw the set of passive states from which energy can be extracted, \(R_{m,n}^ +\). In this plot, we show the regions \(R_{3,1}^ +\) (light blue), \(R_{5,2}^ +\) (orange) and \(R_{11,5}^ +\) (yellow), which cover the region R 1 (purple) better and better as m and n (the number of hot and cold swaps, respectively) grow

In the previous section, we have seen that a cycle defined by the parameters m and n can activate a passive state ρ P with Hamiltonian H P if conditions 1 and 2 are satisfied. These conditions apply to the case in which the passive state is described by Eqs. (6) and (7), with β hot < β cold. In the present, more general scenario we find that work is extracted by the cycle if and only if the passive state belongs to the following subset

$$\begin{array}{*{20}{l}} {R_{{\it{m,n}}}^ + } \hfill & \hskip-8pt = \hfill &\hskip-7pt {\left\{ {\rho _{\mathrm{P}}\,{\mathrm{passive}} \, |\left( {\frac{{p_1}}{{p_2}}} \right)^{\it{n}} >\left( {\frac{{p_0}}{{p_1}}} \right)^{\it{m}}\,{\mathrm{when }}\,m{\kern 1pt} {\mathrm{\Delta }}E_{10} - n{\kern 1pt} {\mathrm{\Delta }}E_{21} > 0} \right.} \hfill \\ {} \hfill & {} \hfill & {\left. { \vee \left( {\frac{{p_1}}{{p_2}}} \right)^{\it{n}} < \left( {\frac{{p_0}}{{p_1}}} \right)^{\it{m}}\,{\mathrm{when}}\,m{\kern 1pt} {\mathrm{\Delta }}E_{10} - n{\kern 1pt} {\mathrm{\Delta }}E_{21} < 0} \right\},} \hfill \end{array}$$
(26)

where these conditions can be obtained by analysing the general expression of the extracted work. We now show that, by tailoring the value of the parameters m and n, we can make \(R_{m,n}^ +\) to (asymptotically) cover either the region R 1 or R 2. Here, we focus on R 1 solely, since R 2 follows from similar arguments. As a first step, we ask \(m\Delta E_{10} - n\Delta E_{21} > 0\), which implies \(m >\frac{M}{N}n\), due to Eq. (22). Then, in order to satisfy this condition, we set \(m = \frac{M}{N}n + 1\), where we ask n to be large enough for m to be an integer. The set of passive states activated by the cycle is such that

$$\left( {\frac{{p_1}}{{p_2}}} \right)^n >\left( {\frac{{p_0}}{{p_1}}} \right)^m \Rightarrow \left( {\frac{{p_1}}{{p_2}}} \right)^n >\left( {\frac{{p_0}}{{p_1}}} \right)^{\frac{M}{N}n + 1} \Rightarrow \left( {\frac{{p_1}}{{p_2}}} \right)^N >\left( {\frac{{p_0}}{{p_1}}} \right)^{M + \frac{N}{n}}.$$
(27)

We notice that, since ρ P is passive, p 0 ≥ p 1, which implies that

$$\left( {\frac{{p_0}}{{p_1}}} \right)^{M + \frac{N}{n}} \ge \left( {\frac{{p_0}}{{p_1}}} \right)^M.$$
(28)

Thus, Eq. (27) and (28) together assure that \(R_{\frac{M}{N}n + 1,n}^ + \subset R_1\). Moreover, if n→∞, we have that \(M + \frac{N}{n} \to M\), which implies that \(R_{\frac{M}{N}n + 1,n}^ + \to R_1\). Thus, we have that, for a given Hamiltonian H P, and a given passive state \(\rho _{\rm P} \in R_1\), there exist a cycle S m,n such that \(\rho _{\rm P} \in R_{m,n}^ +\). However, the closer (in trace norm) the state ρ P is to the set of completely passive states (R 3), the larger the parameters m and n have to be, that is, the larger the machine has to be (Fig. 4).

Work extraction from a generic qudit passive state can be achieved straightforwardly by applying the cycle of the previous section to just three of the d possible levels of the system. The only requirement for the three levels is that their virtual temperatures have to be different. In this case, as we show in more details in Supplementary Note 2, work is extracted from the qudit state by letting the machine interact with the three levels of the system.

General instability of passive states

We can now establish our central claim: that any athermal passive state is energetically unstable under a reversible process that does not generate entropy. We analyse the evolution of a passive state, which sequentially interacts with an infinite-dimensional machine M, and find that the system moves through a continuous trajectory of passive states towards the set of minimum energy states, that is, the set of the states45.

We consider a cycle composed of infinitely many hot swaps, m→∞, and infinite many cold swaps, n→∞, with the assumption that n = αm, where α is a parameter taking values in a specific range, we will describe shortly. Let us now consider the situation in which the main system is a qutrit with Hamiltonian H P given in Eq. (4), described by the passive state ρ P whose probability distribution satisfies the equalities of Eqs. (6) and (7). Then, ρ P belongs to the subset R 1 defined in Eq. (23), and the cycle S m,n has to satisfy conditions 1 and 2 in order to extract work from it. These conditions are reflected in the allowed range of the parameter α, that is

$$\frac{{\beta _{{\mathrm{hot}}}\Delta E_{10}}}{{\beta _{{\mathrm{cold}}}\Delta E_{21}}} < \,\alpha \, < \frac{{\Delta E_{10}}}{{\Delta E_{21}}}.$$
(29)

If we set α equal to a value inside the range specified by the previous equation, and we send m→∞, we find that (see Supplementary Note 4 for details) the state of the machine as obtained from Eq. (9) is given by a mixture of two ‘thermal’ states, one with effective temperature \(\beta _{{\mathrm{hot}}}^{ - 1}\), the other with effective temperature \(\beta _{{\mathrm{cold}}}^{ - 1}\) (note we still have H M = 0 for the machine). These distributions have support in two different subspaces, and their weight depends non-trivially on the energy gaps of H P and on the virtual temperatures of ρ P. In fact, we can loosely interpret the state of the machine in terms of a thermal mixture

$$\rho _{\rm M} = \lambda \tau _{\beta _{{\mathrm{hot}}}} + \left( {1 - \lambda } \right)\tau _{\beta _{{\mathrm{cold}}}},$$
(30)

where

$${{\tau _{\beta _{{\mathrm{hot}}}} = \frac{{e^{ - \beta _{{\mathrm{hot}}}H_{{\mathrm{hot}}}}}}{{Z_{{\mathrm{hot}}}}}\,,{\mathrm{with}} \, {H_{\mathrm{hot}}} = \mathop {\sum}\limits_{j = 0}^{m - 1} j \, \Delta E_{10} \left| j \right\rangle \left \langle j \right | _{\rm M} \,{\mathrm{ and}}\, {Z_{\mathrm{hot}}} = {\mathrm{Tr}}\left[ {e^{ - \beta _{{\mathrm{hot}}}H_{{\mathrm{hot}}}}} \right],}}$$
(31)

and

$$\tau _{\beta _{{\mathrm{cold}}}} = \frac{{e^{ - \beta _{{\mathrm{cold}}}H_{{\mathrm{cold}}}}}}{{Z_{{\mathrm{cold}}}}}\,,{\mathrm{with}} \,{H_{\mathrm{cold}}} \\ = \mathop {\sum}\limits_{j = 0}^{n - 3} j \, \Delta E_{21}\left| {j + m} \right\rangle \left\langle {j + m} \right|_{\rm M}\,{\mathrm{and}}\,Z_{{\mathrm{cold}}} = {\mathrm{Tr}}\left[ {e^{ - \beta _{{\mathrm{cold}}}H_{{\mathrm{cold}}}}} \right].$$
(32)

Notice that in order to define these “thermal states”, we have introduced two fictitious Hamiltonians, namely, H hot and H cold. These operators are necessary if we want to consider the distribution of the machine as the mixture of two thermal distributions, but they do not enter in any way in the derivation of the extractable work. Indeed, as we specified before, the machine M can have any Hamiltonian (it does not modify the amount of work we extract during the cycle), and we choose to use a trivial one H M = 0, so that the machine acts as a memory. The weight λ in the mixture is given by

$$\lambda = \frac{{1 - e^{ - \beta _{{\mathrm{cold}}}\Delta E_{21}}}}{{1 - e^{ - \beta _{{\mathrm{hot}}}\Delta E_{10} - \beta _{{\mathrm{cold}}}\Delta E_{21}}}}.$$
(33)

Thus, during the cycle, the passive state ρ P first interacts with the “hot reservoir”, by performing a sequence of swaps between the pair of states \(\left| 0 \right\rangle _{\mathrm{P}}\) and \(\left| 1 \right\rangle _{\mathrm{P}}\) and the levels of \(\tau _{\beta _{{\mathrm{hot}}}}\). Then, the state interacts with the “cold reservoir”, performing a sequence of swaps between the pair \(\left| 1 \right\rangle _{\mathrm{P}}\) and \(\left| 2 \right\rangle _{\mathrm{P}}\) and the levels of \(\tau _{\beta _{{\mathrm{cold}}}}\).

In this scenario, we find that the probability distribution of the passive state ρ P is infinitesimally modified, and consequently the work extracted is infinitesimally small. In particular, we find that the unit of probability, defined in Eq. (21), tends to 0 with an exponential scaling, \(\Delta P \propto e^{ - \beta _{{\mathrm{hot}}}m\Delta E_{10}}\) for m→∞. Let us consider the probability distribution of the final state of the system \(\tilde \rho _{\rm P}\). Since the distribution only changes infinitesimally during the cycle, we can recast Eqs. (18), (19) and (20) as a set of differential equations. Thus, we can imagine the situation in which infinite many machines are present, so that we can keep infinitesimally changing the state of the main system. In this case, the evolution of the state ρ P is governed by the following equation

$$\frac{{{\mathrm{d}}p_1}}{{{\mathrm{d}}t}} = - \left( {1 + \alpha \left( {p_0\left( t \right),p_1\left( t \right)} \right)} \right)\frac{{{\mathrm{d}}p_0}}{{{\mathrm{d}}t}},$$
(34)

where the parameter t provides a continuum label for the sequence of cycles we perform on the passive state. We can then solve this equation for extremal cases for the function α(p 0, p 1). When the parameter function α(p 0,(t), p 1(t)) is equal to one of its limiting values, Eq. (34) assumes a clear meaning. In fact,

when \(\alpha \left( {p_0\left( t \right),p_1\left( t \right)} \right) = \frac{{\Delta E_{10}}}{{\Delta E_{21}}}\), then the differential equation can be recast as a condition over the average energy of the system, that is,

$${\mathrm{Tr}}\left[ {H_{\rm P}{\kern 1pt} \rho _{\rm P}} \right] = {\mathrm{Tr}}\left[ {H_{\rm P}{\kern 1pt} \tilde \rho _{\rm P}} \right].$$
(35)

Then, for α taking this value, the passive state evolves along a trajectory that conserves the energy of the system.

when \(\alpha \left( {p_0\left( t \right),p_1\left( t \right)} \right) = \frac{{\beta _{{\mathrm{hot}}}\left( t \right)\Delta E_{10}}}{{\beta _{{\mathrm{cold}}}\left( t \right)\Delta E_{21}}}\), instead, the differential equation can be recast as a condition over the entropy of the system, that is,

$$S\left( {\rho _{\rm P}} \right) = S\left( {\tilde \rho _{\rm P}} \right),$$
(36)

where \(S\left( \rho \right) = - {\mathrm{Tr}}\left[ {\rho \, \log \, \rho } \right]\) is the Von Neumann entropy. Then, for this α, the passive state evolves along a trajectory that conserves the entropy of the system.

For α taking values inside the allowed range, we have that any trajectory between the two presented above is possible, and the set of achievable states is shown in Fig. 5. It is possible to show that the evolution of the system moves the passive state toward the set of thermal states, which are the stationary states of this dynamic. In Fig. 5, we also show the same set of achievable states, represented this time in the energy-entropy diagram32. It is clear that, through this evolution, we can obtain any passive state with a smaller average energy and a bigger entropy than ρ P. In Supplementary Note 5, we show that these states are also the only ones that we can reach with our protocol (and with a broader class of maps, called activation maps).

Fig. 5
figure 5

Instability of passive states and their dynamics. a The state space of a qutrit system, where the region of passive states is highlighted in light blue. The black line contained in the passive region is the set of thermal states. We fix an initial state ρ P, represented by the black point in the diagram. Then, we evolve this state by applying the cycle S m,n (where m, n→∞) an infinite number of times. The evolution is then modulated by the parameter \(\alpha = \frac{n}{m}\). For \(\alpha\) equal to \(\frac{{\Delta E_{10}}}{{\Delta E_{21}}}\), the system evolves along the yellow trajectory, and the final state is the thermal state at temperature β min (with same average energy of ρ P). For \(\alpha = \frac{{\beta _{{\mathrm{hot}}}\left( t \right)\Delta E_{10}}}{{\beta _{{\mathrm{cold}}}\left( t \right)\Delta E_{21}}}\), the system evolves along the purple line, and the final state is the thermal state at temperature β max (with same entropy of ρ P). The dark blue region represents the subset of achievable states when the initial state is ρ P. b A partial representation of the state space of a d-level quantum system in the energy–entropy diagram32. In this diagram, quantum states are grouped into equivalence classes defined by their average energy E and their entropy S. Each point between the x-axis (the set of pure states) and the dark blue curve (the set of thermal states) represents one of these equivalence classes. The diagram depends on the Hamiltonian H P of the system. Here, we only represent the states with average energy lower than \(\bar E = {\mathrm{Tr}}\left[ {H_{\rm P}\rho _{{\mathrm{mm}}}} \right]\), where \(\rho _{{\mathrm{mm}}} = \frac{{{{\Bbb I}}}}{{\mathrm{d}}}\) is the maximally-mixed state, since all passive states are contained in this set. For a given initial state ρ P, the light blue region contains all the passive states, which can be achieved with the process

It is interesting to consider the limiting values of work extraction that can be achieved following the scheme suggested in this section. When the system evolves along the energy-preserving trajectory, the final state we obtain is the thermal state of H P at temperature \(\beta _{{\mathrm{min}}}^{ - 1}\), that is, \(\tau _{\beta _{{\mathrm{min}}}}\), where the temperature is such that \({\mathrm{Tr}}\left[ {H_{\rm P}{\kern 1pt} \rho _{\rm P}} \right] = {\mathrm{Tr}}\left[ {H_{\rm P}{\kern 1pt} \tau _{\beta _{{\mathrm{min}}}}} \right]\). In this case, it is easy to see that the protocol does not extract work, and its only effect consists in raising the entropy of the system. If we consider the efficiency of this cycle, Eq. (17), we see that η = 0, as expected.

The opposite limit is more interesting. This is the case in which the system evolves along the entropy-preserving trajectory, and the transformation which acts on the system is therefore reversible. The final state we obtain is \(\tau _{\beta _{{\mathrm{max}}}}\), that is, the thermal state of H P at temperature \(\beta _{{\mathrm{max}}}^{ - 1}\), such that \(S\left( {\rho _{\rm P}} \right) = S\left( {\tau _{\beta _{{\mathrm{max}}}}} \right)\). The work extracted by the cycle is

$$\Delta W = {\mathrm{Tr}}\left[ {H_{\rm P}\left( {\rho _{\rm P} - \tau _{\beta _{{\mathrm{max}}}}} \right)} \right],$$
(37)

which, interestingly, is the maximum amount one can extract by means of reversible operations31, 32. We refer to the quantity shown in Eq. (37) as the catalytic ergotropy associated with the passive state ρ P, since it is the maximum energy extracted from the state when reversible operations are allowed in the presence of an additional system (the machine). It is worth noting that the catalytic ergotropy is the optimal work that can be reversibly extracted from a closed system when a catalyst is allowed. In the case of open quantum systems, work extraction aided by auxiliary systems has been considered in refs. 38, 46,47,48.

Significantly, if we compute the efficiency of the process, Eq. (17), we find that it is equal to the Carnot efficiency, \(\eta _{{\mathrm{Carnot}}} = 1 - \frac{{\beta _{{\mathrm{hot}}}}}{{\beta _{{\mathrm{cold}}}}}\). Thus, we see that our set up allows for maximal work extraction from passive states, and the protocol extracting this energy is reversible. In fact, no correlations are created between the machine and the system, so that the entropy of the system is preserved. The reversibility of the asymptotic protocol implies (via a Carnot argument49) that our result must be optimal, and model-independent. Therefore, even though we extract energy from passive states with a very specific protocol, our result is independent of such protocol, and any other reversible protocol would extract the same amount of energy.

Discussion

In the paper, we have presented a protocol that allows us to extract work from any single copy of an athermal passive state. The protocol utilises an ancillary system for the work extraction, and the local state of this system is recovered at the end of the cycle. In this way, the cycle can be run multiple times, and each time it acts on a new copy of the passive state. The dimension of the ancillary system grows as the distance between the state and the set of completely passive states is reduced. Moreover, with an infinite dimension machine we can evolve a passive state smoothly towards the set of thermal states. Optimal work extraction can be obtained in this case, and it is achieved by mapping the initial state into the thermal state with the same entropy.

The present work provides some evidence that a resource theory for thermodynamics with an imperfect thermal reservoir presents non-trivial challenges. Such a resource theory could be realised by providing passive states for free. However, an obvious restriction we should make in this resource theory consists in the fact that we could not provide more than k−1 copies of a k-activable passive state, otherwise work might be extracted with unitary operations from this free state. Moreover, our results show that, even in the case in which a single passive state is provided, an ancillary system exists such that work can be extracted from the individual passive state. Then, in order to build a sensible resource theory, passive states should be always provided at a work cost, equal to the optimal amount of energy extractable from them when a machine is present.

Data availability

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