{'fraction_non_alphanumeric': 0.026824391869376876, 'fraction_numerical': 0.005664778407197601, 'mean_word_length': 4.553782095766828, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Carnot's theorem for nonthermal stationary reservoirs

Carnot's theorem poses a fundamental limit on the maximum efficiency achievable from an engine that works between two reservoirs at thermal equilibrium. We extend this result to the case of arbitrary nonthermal stationary reservoirs, even with quantum coherence. In order to do this we prove that a single nonthermal reservoir is formally equivalent to multiple equilibrium ones. Finally, we discuss the possibility of realizing an engine that works at unit efficiency by exploiting quantum coherence present in the reservoir.


I. INTRODUCTION
For almost two centuries, Carnot's theorem has constituted one of the cornerstones of thermodynamics, setting a fundamental bound on the efficiency of any heat-towork conversion process. It states that: All reversible engines working between two reservoirs at temperatures T C and T H have the same efficiency η C = 1 − TC TH . No engine working between two reservoirs at thermal equilibrium can have an efficiency greater than that. Here the efficiency is defined as the ratio between W , the work performed by the engine, and Q H , the heat extracted from the hotter reservoir.
In this paper we generalize Carnot's theorem to a more general setting in which the reservoirs are not in thermal equilibrium (and thus T C and T H cannot be defined). In the field of quantum thermodynamics, examples of such nonthermal reservoirs can be found, for example, in the study of engines with strongly coupled [1] or quantum coherent [2] reservoirs. While in the following we will concentrate on such kind of microscopic examples, it is worthwhile to notice that, in general, most of the engines present in our everyday world actually extract energy from nonequilibrium environments (e.g., all living being extracting energy from ATP molecules). This paper is structured as follows: in Section II we will start by introducing our approach to heat engines that we will then use in Section III to rederive the standard Carnot's theorem. In Section IV we will prove a general equivalence theorem, stating that a nonthermal reservoir is formally equivalent to a collection of equilibrium ones at different temperatures. This result will be used in Section V to prove a generalized version of the Carnot's theorem, valid for general nonthermal reservoirs. In Section VI such theorem will be tested against some previously known result. Finally, using the developed theory, in Section VII, we discuss the possibility of realizing an engine exploiting quantum coherence to work at unit efficiency. Conclusion and perspectives are drawn in Section VIII.

II. GENERAL THEORY
In order to develop our program we are immediately confronted with the problem of defining what we mean with reservoir. In order to keep our theory as general as possible, we will consider the largest possible definition of reservoir, that is, we will consider a reservoir to be a completely general physical system, with the only constraint that its size and the strength of the interaction with the external world (the engine in our case) are such that its state is not affected sensibly by the time evolution.
The generality of the above definition implies that we disregard any a priori difference between a heat reservoir and a work reservoir. The difference will only be a posteriori. If our theory implies that it is possible to extract work by coupling the engine with only one reservoir, we will classify it as a work reservoir. A typical example would be an inverted system, such that a higher energy level has a population bigger than a lower lying one. It is well known that energy can be extracted from such systems without any need of using a second reservoir (e.g., a laser extracting energy from an inverted medium).
While the formalism we will develop could be used to describe such systems, it is not meaningful to define an efficiency in the usual sense for them (by energy conser-vation W = Q H and thus η = 1). We will thus disregard such systems because Carnot's theorem does not apply to them. When, in the following, we will talk about heat engines, we will imply engines working with reservoirs defined in such a sense.
To formulate our theory in a model-independent manner, we adopt a slightly unusual approach in the study of heat engines. Heat engines are normally studied taking into consideration some of their degrees of freedom, evolving under the influence of two (or eventually more) external reservoirs. Given that an engine is, by definition, cyclical, after a cycle the engine is back to its initial state while the reservoirs have slightly evolved. We can thus model the action of the engine as an operator coupling the reservoirs and allowing energy flows between them (see Fig. 1 for a schematic representation of the two approaches). This point of view will allow us to consider arbitrary reservoirs, be they at thermal equilibrium or not, and to optimize the efficiency of the engine over the space of all the possible interaction operators (i.e., all the possible engines).
In our theory, the reservoirs are thus dynamical objects and we describe them in terms of their density operators ρ H and ρ C and Hamiltonians H H and H C , whose eigenvalues we call E H and E C . Given that the reservoirs can a priori be nonthermal, the subscripts H (hot) and C (cold) have no direct implication of their temperatures, but rather are used to differentiate the energy source (hot reservoir) and drain (cold reservoir). In order to be able to derive our main results, we will restrict our attention to the case in which the initial states of the decoupled reservoirs are time independent, that is The engine's effective role is to couple the two reservoirs. It can thus be described completely by a Hermitian time-dependent coupling operator λV (t), where λ ∈ R and V (t) is an operator over the tensor product of the Hilbert spaces of the two reservoirs (without the time dependence the engine would conserve the total energy of the reservoirs and thus extract no work).
In the definition of reservoir we chose, it is explicitly required that its state does not change in any significant way during the interaction with the engine. For this reason, to recover usual thermodynamic results from our approach, we have to consider the limit of vanishing interaction λ → 0, thus developing the theory to the first nonvanishing order in λ. This limit is well defined because the efficiency, which is given by the ratio between work and heat fluxes, will not depend on λ.
In the interaction picture, the Liouville equation for the system, up to the second order, takes the forṁ (2) whereṼ (t) = e it(HH +HC ) V (t)e −it(HH +HC ) is the perturbation in the interaction picture and ρ(0) = ρ H ⊗ ρ C is the initial density matrix. In order to calculate the heat flow from reservoir j = {C, H}, we can use the quantum version of the first law of thermodynamics [3]. The total internal energy of reservoir j is given by and thus its time variation iṡ The two terms in the right-hand side of Eq. 4 can be identified respectively with the exchanged work and heat, making Eq. 4 a quantum version of the first law of thermodynamics. The interested reader is invited to read Ref. [3] and references therein for a discussion of the relevance of such identification. In our case the Hamiltonian of the reservoirs is time independent and thus they exchange no mechanical work. The exchanged heat, which in the present case is equal to the total energy variation, can thus be calculated aṡ where we have chosen the convention that Q j is positive if heat is extracted from the reservoir. Inserting Eq. 2 into Eq. 5 we havė where the first term in the right-hand side vanishes due to Eq. 1. Formally integrating Eq. 6 up to final time t f , chosen to be a multiple of the engine period, we obtain the total amount of heat exchanged with each reservoir where and we have exploited the fact that, using the Jacobi identity and the fact that the initial states of the decoupled reservoirs are time-independent (Eq. 1), we have, for ∀t 1 , t 2 , The net balance of energy between the two reservoirs gives the total work extracted by the engine Introducing indexes (p, q) over the energy eigenstates of the cold reservoir and (m, n) over the eigenstates of the hot one, and noticing that, because of Eq. 1, ρ C and ρ H can be made diagonal in such a basis, we can rewrite Eq. 7 elementwise as Exploiting the hermiticity of M (|M nq mp |= |M mp nq |), we can rewrite Eq. 11 summing only over states such that E m H > E n H , thus obtaining Equation 12 gives a self-contained, model independent description of energy exchanges in a general heat engine. The explicit dependance over the Hamiltonian spectrum makes this formalism particularly adapted to the study of the engine efficiency at the ultimate quantum limit [4][5][6].

III. STANDARD CARNOT'S THEOREM
It is interesting to notice that the standard Carnot's theorem can be easily derived from Eq. 12, by choosing properly normalized thermal distributions for the reservoirs with T H ≥ T C . In order to have the engine extract heat from the hot reservoir (Q H ≥ 0), from Eq. 12 we need to have the condition verified at least for some values of (m, n, p, q) (please refer to Appendix A for a detailed justification of this important point). Using the reservoirs in Eq. 13, Eq. 14 becomes Writing down the engine efficiency using Eqs. 10 and 12, we have .
It is easy to verify that any value of (m, n, p, q) that does not satisfy Eq. 14 lowers the overall efficiency η. We can thus rewrite Eq. 16 as where the prime over the sum symbol means we sum only over indexes such that Eq. 14 is satisfied. By construction, each term in the sum in the numerator of Eq. 17 obeys the inequality in Eq. 15. We can thus fix a lower bound on each of the terms and obtain Carnot's result If all the transitions take place between almost equilibrium states, the left-hand side of Eq. 14 tends toward zero and Eqs. 15 and 18 become equalities. This is independent from the chosen engine interaction M nq mp , because each term |M nq mp | 2 (ρ m H ρ p C − ρ n H ρ q C ) in Eq. 12, being present both in Q C and Q H , simplifies in Eq. 18. That is, consistently with the usual formulation of Carnot's theorem, we find that any engine working between states almost at equilibrium, attains Carnot efficiency (a similar approach to the Carnot efficiency has recently been proposed in [5]). The fact that we can prove Carnot's theorem from our formalism is not surprising, because systems at thermal equilibrium (like the reservoirs in Eq. 13) are known to obey it. This is a good consistency check for our approach.

IV. RESERVOIR EQUIVALENCE THEOREM
If the reservoirs' distributions differ from thermal equilibrium ones, we cannot in general define a temperature for them and thus Eq. 18 does not apply. In this section we will prove a reservoir equivalence theorem that we will use in Section V to establish a generalized form of Carnot's theorem, valid for arbitrary nonthermal reservoirs.
We start by rewriting the sum in Eq. 12 as a sum over all the possible transitions between pairs of states in each reservoir From Eq. 20, we see that the heat flow between the two reservoirs is composed of the sum over all the possible pairwise interactions, coupling a transition in the cold reservoir (from p to q) and a transition in the hot one (from m to n). This means that, modulo a renormalization of the density operator (that only amounts to a redefinition of the engine interaction M nq mp ), the heat flow between two reservoirs with multiple levels (and thus multiple transitions) is formally equivalent to the flow between multiple reservoirs, each one with only two levels (and thus only one transition). A single engine working between the cold and hot reservoirs is thus equivalent to a set of different engines, each one working between two reservoirs composed respectively of the two-level systems made of the levels (p, q) and (m, n).
This point is important for us because a two-level system with arbitrary level populations ρ 0 and ρ 1 and level energies E 0 and E 1 , can always be considered in thermal equilibrium for a certain effective temperature T eff . This is due to the elementary calculus result that, given two arbitrary points in the Cartesian plane, there is always an exponential function connecting them (see Fig. 2 for a schematic illustration). The effective temperature T eff , that can be positive or negative, will thus be given by the equation From the two remarks above we obtain one of our main result: An arbitrary time-independent reservoir is formally equivalent to a collection of equilibrium subreservoirs composed of two-level systems, each one characterized by its effective equilibrium temperature given by Eq. 21.
Given that a reservoir is usually made up of many identical subsystems (e.g., the molecules of a gas), each transition will be highly degenerate. Through Eq. 21 this will give rise to many identical two-level systems, leading to sub-reservoirs roughly of the same size (in terms of the number of subsystems and thus of the number of available transitions) of the original ones. It is important to note that the equivalence is purely formal; these sub-reservoirs are only mathematical objects, useful abstractions. We are not suggesting that the reservoir is phisically divided into multiple pieces. It is also important to remember that the hypothesis that the initial states are stationary states of the decoupled reservoirs (Eq. 1) is required for the theorem to hold.

V. GENERALZED CARNOT'S THEOREM
From the theorem proven in the previous section, the generalization of Carnot's theorem we are looking for follows quite naturally. Being a nonthermal reservoir equivalent to a collection of equilibrium sub-reservoirs, an engine working between two of them is in fact formally equivalent to one operating between two sets of equilibrium sub-reservoirs, each one with its own effective temperature. The engine couples pairs of sub-reservoirs, one from the cold side and the other from the hot one, extracting work from them (see Fig. 3 for a schematic illustration in the case of two reservoirs composed of three-level systems). We have now a system that can be described using only thermal reservoirs and we can thus easily find an upper bound to its efficiency using the standard Carnot theorem and the tools we developed in Section III. Using Eq. 21 we can define the effective, transition-dependent temperatures for each pair of levels as and, following the standard Carnot theorem, or better its trivial expansion to the case of multiple reservoirs, we obtain the following upper bound on the efficiency of energy extraction from the nonthermal reservoirs where the minimum and the maximum are taken respectively over all the pairs of levels in the cold (p, q) and hot (m, n) reservoirs. In particular the engine described by an operator M nq mp , whose only nonzero elements have indexes (m,ñ) and (p,q) that satisfy couples only pairs of transitions corresponding to the lowest and highest temperature, that is, it works only between the coldest and the hottest reservoir. It will thus obey Eq. 23 and it can saturate the inequality if all the transitions take place between almost equilibrium states, as explained in Section III. In order to write Eq. 23 we made two supplementary hypotesis: all the effective temperatures are positive and all the effective temperatures of the hot reservoir are hotter than those of the cold one. If the first hypotesis is violated, it could be possible to construct an engine extracting work from a single reservoir; if the second is violated, we could extract work from bidirectional heat flows. In both cases, while our formalism is completely apt to study them, the usual definition of efficiency is not well suited (see the discussion about work reservoirs in Section II) and thus it is meaningless to apply the Carnot's theorem, and we will thus ignore these possibilities. We have thus proved that the determination of the upper bound of the efficiency can be reduced to the calculation of the extrema of the effective temperatures in the two reservoirs.
While we will consider in the following only examples concerning systems with discrete spectra, the same procedure can be generalized to the generic continuum case. The effective temperatures in each reservoir will then form two dimensional surfaces and their extrema can be located by usual analytic or numerical methods.

VI. APPLICATION TO A KNOWN CASE
In the final part of this paper, we will apply the theory just developed to study the efficiency that can be obtained from reservoirs presenting some amount of quantum coherence. This case was treated in a paper by Scully and coworkers [2]. In this paper they showed how, given a reservoir consisting of a thermal gas of threelevel atoms with a certain amount of quantum coherence between the quasi-degenerate two lower levels, it is possible to build an engine with an efficiency greater than the one given by Carnot's theorem. In order to do that, they devised a Photo-Carnot engine whose working fluid is composed of photons, that uses the thermal threelevel quantum coherent atom gas as a hot reservoir and a generic reservoir at the same temperature, but without coherence, as a cold one. We will show how our theory allows us to find the same results in a complete modelindependent way (that is without any need of devising an actual engine).
Following Ref. [2] we will define a thermal, quantum coherent system as a system whose density matrix has diagonal elements given by thermal populations and some nonzero off-diagonal terms. The coherent gas is thus described by the density matrix where the diagonal elements are the thermal populations of the three states. In the following we will consider the degenerate case P b = P c , in order to satisfy Eq. 1 and be able to apply our equivalence theorem, and we will call Ω the energy gap between the higher level and the lower two. In the limit of high temperature and small coherence, Scully and coworkers find an efficiency for the Photo-Carnot engine depending on the phase between the two coherent levels, given by where, given the two reservoirs at the same temperature, we would expect a zero efficiency in the absence of coherence. To apply our theory we diagonalize the density matrix in Eq. 25, obtaining the eigenvalues [P a , P b − ρ bc , P b + ρ bc ]. The thermal, coherent gas, is thus equivalent to a fully incoherent, but nonthermal gas. Applying Eq. 22 we find the following three effective temperatures for the hot reservoir T ac H = Ω/ log T bc H = 0, while for the incoherent, cold reservoir, we have a single, equilibrium temperature Substituting Eqs. 27 and 28 into Eq. 23, we obtain the maximal efficiency given by which, in the high temperature (P b ≃ P a ) and small coherence (ρ bc ≪ 1) regime, reduces to that is the maximum of Eq. 26 (actually following the calculations in Ref. [2], but without making any simplifying approximation, we would find the optimal efficiency exactly as in Eq. 29). We have thus proved that our theory can correctly predict, in a model-independent way, the maximal efficiency of the Photo-Carnot engine.
Moreover we have shown that the efficiency found in Ref. [2] is indeed optimal for the chosen cold and hot reservoirs.

VII. UNIT EFFICIENCY ENGINE
While proving the results of the previous section, we stumbled upon a rather unexpected result. One of the temperature in Eq. 27, corresponding to the transition between the two coherent degenerate levels, has an effective temperature equal to 0. This seems to imply that, switching the two reservoir, that is using the coherent reservoir as the cold one, it should be possible to conceive an engine working at unit efficiency (the T C in Eq. 23 is equal to 0 and thus η = 1).
Initially puzzling, this turns out to be a generic feature of reservoirs with degenerate, coherent levels. Two coherent degenerate levels are generally described by a density matrix of the form that, after diagonalization, yields an effective zero temperature, as can be seen from Eq. 22, because the energies are equal while the populations are different. The physical origin of such seemingly unphysical behavior is easy to understand. The entropy of ρ c is always lower than that of the fully incoherent density matrix Since all the states in such a degenerate subspace have the same energy, the reservoir can act as a perfect entropy drain, absorbing entropy but not energy from the engine as it evolves from ρ c to ρ i . We thus predict the possibility to realize an engine with unit efficiency, extracting work from a single reservoir and dissipating entropy by destroying coherence in a second, coherent reservoir. The maximal efficiency of such engine would be independent of the strength of the coherence σ, but the work extractable from it would depend on the total amount of coherence that is burned by the engine. A simple application of the second law of thermodynamics gives the following upper bound where M is the total number of pairs of levels whose coherence is utilized to extract work W and ∆S is the entropy difference between ρ i and ρ c . While such predictions of high efficiencies might seem to violate the usual Carnot bound, this is not the case. In fact, as we stated above, we are considering the efficiency of work extraction from reservoirs already in a nonthermal state. In order to compare such results with the ones obtained for thermal reservoirs we should also consider the processes needed to bring the reservoirs out of thermal equilibrium in the first place. Illuminating discussions in the case of the Photo-Carnot engine can be found in [7,8].
The above construction is rather formal, but there are simple and well-known systems that implement the mechanism described. Without entering into detailed calculations, that are beyond the scope of this paper, we can notice that a laser without inversion [9] driven by a thermal field can indeed behave as a unit efficiency engine. If the active medium is composed of coherent, degenerate Λ atoms, whose upper level is at an energy high enough to be able to neglect its thermal occupation, such a system effectively extracts energy (in the form of laser radiation) from the thermal reservoir (the thermal field) with unit efficiency, while destroying the coherence of the Λ atoms.
It is also interesting to notice that destroying coherence between degenerate levels is not the only way to eliminate entropy without loosing energy. A number of investigations have indeed shown, exploiting the links between thermodynamics and information theory [10][11][12][13][14][15][16], that if information is somehow extracted from the system, it is possible to obtain an engine working at unit efficiency.

VIII. CONCLUSIONS AND PERSPECTIVES
In the present paper we have introduced a new approach to study the efficiency of thermal engines that allows us to treat general nonthermal and quantum coherent reservoirs. We have proved that our approach gives the same result as the canonical one when applied to thermal situations (Section III) and yields the right result when applied to the only case of a nonthermal reservoir thoroughly studied in literature (Section V). While the formalism we developed differs in many respects from what usually done in standard thermodynamics, the fact that it is able to give the right results in all known situations vindicates the correctness of our approach.
As applications we reproduced the results originally derived in Ref. [2] and then showed the possibility of realizing an engine with unit efficiency that exploits quantum coherence The aforementioned results were derived using rather formal methods. It will be an interesting challenge to identify and study physical systems in which such results can be tested and applied.