The maximum efficiency of nano heat engines depends on more than temperature
Abstract
Sadi Carnot’s theorem regarding the maximum efficiency of heat engines is considered to be of fundamental importance in thermodynamics. This theorem famously states that the maximum efficiency depends only on the temperature of the heat baths used by the engine  but not the specific details on how these baths are actually realized. Here, we show that at the nano and quantum scale, this law needs to be revised in the sense that more information about the bath other than its temperature is required to decide whether maximum efficiency can be achieved. In particular, we derive new fundamental limitations of the efficiency of heat engines that show that the Carnot efficiency can only be achieved under special circumstances, and we derive a new maximum efficiency for others. This new understanding of thermodynamics has implications for nanoscale engineering aiming to construct very small thermal machines.
Nicolas Léonard Sadi Carnot is often described as the “father of thermodynamics”. In his only publication in 1824 Carnot (1824) , Carnot gave the first successful theory of the maximum efficiency of heat engines. It was later used by Rudolf Clausius and Lord Kelvin to formalize the second law of thermodynamics and define the concept of entropy Clausius (1865); Thompson (Lord Kelvin) (1851) . In 1824 he concluded that the maximum efficiency attainable did not depend upon the exact nature of the working fluids Carnot (1824) :
The motive power of heat is independent of the agents employed to realize it; its quantity is fixed solely by the temperatures of the bodies between which is effected, finally, the transfer of caloric.
For his “motive power of heat”, we would today say “the efficiency of a reversible heat engine”, and rather than “transfer of caloric” we would say “the reversible transfer of heat.” Carnot knew intuitively that his engine would have the maximum efficiency, but was unable to state what that efficiency should be. Working fluids refers to the substance (normally gas or liquid) which is at the hot or cold bath temperatures.
Carnot also defined a hypothetical heat engine (now known as the Carnot engine) which would achieve the maximum efficiency. Later, this efficiency  now known as the Carnot efficiency (C.E.)  was shown to be
(1) 
where , are the inverse temperatures of the cold and hot baths respectively.
Unlike the large scale heat engines that inspired thermodynamics, we are now able to build nanoscale quantum machines consisting of a mere handful of particles, prompting many efforts to understand quantum thermodynamics (see e.g. Horodecki and Oppenheim (2013); Brandão et al. (2015); Åberg (2013); Dahlsten et al. (2011); Gallego et al. (2015); Gemmer and Anders (2015); Lostaglio et al. (2015a); Scully et al. (2003); Lostaglio et al. (2015b); Binder et al. (2015); Salek and Wiesner (2015); Tajima and Hayashi (2014); Gemmer et al. (2009); Roßnagel et al. (2014); Gardas and Deffner (2015); PerarnauLlobet et al. (2015)). Such devices are too small to admit statistical methods, and many results have shown that the workings of thermodynamics become more intricate in such regimes Horodecki and Oppenheim (2013); Brandão et al. (2015); Åberg (2013); Dahlsten et al. (2011); Tajima and Hayashi (2014) .
We show in this report that unlike at the macroscopic scale  at which Carnot’s fundamental results hold  there are new fundamental limitations to the maximal efficiency at the nanoscale. Most significantly, this new efficiency depends on the working substance. We find that the C.E. can be achieved, but only when the working substance is of a particular form. Otherwise, a reduced efficiency is obtained, highlighting the significant difference in the performance of heat engines as our devices decrease in size.
Work in the nanoregime
The basic components of a heat engine (H.E.) are detailed in Fig. 1. The definition of work when dealing with nanoscopic quantum systems has seen much attention lately Horodecki and Oppenheim (2013); Brandão et al. (2015); Åberg (2013); Dahlsten et al. (2011); Gallego et al. (2015); Gemmer and Anders (2015) . Performing work is always understood as changing the energy of a system, which we call battery. In the macroregime, one often pictures raising a weight on a string. In the nanoregime, this corresponds to changing the energy of a quantum system by lifting it to an excited state (see Fig. 2).
One aspect of extracting work is to bring the battery’s initial state to some final state such that . However, a change in energy alone, does not yet correspond to performing work. It is implicit in our macroscopic understanding of work that the energy transfer takes place in an ordered form. When lifting a weight, we know its final position and can exploit this precise knowledge to transfer all the work onto a third system without  in principle  losing any energy in the process. In the quantum regime, such knowledge corresponds to being a pure state. When is diagonal in the energy eigenbasis of , then is an energy eigenstate. We can thus understand work as an energy transfer about which we have perfect information, while heat, in contrast, is an energy transfer about which we hold essentially no information. Clearly, there is also an intermediary regime in which we transfer energy, while having some  but not perfect  information.
To illustrate this idea, consider a twolevel system battery, where we extract work by transiting from an initial energy eigenstate to another energy eigenstate , where . Changing the energy, while having some amount of information corresponds to changing the state of the battery to a mixture for some parameter . The case of corresponds to doing perfect work. The smaller is, the closer we are to the situation of perfect work. One can characterize this intermediary regime by the von Neumann entropy . For perfect work, , while for heat transfer, under a fixed average energy, the twolevel battery becomes thermal, since the thermal state maximizes entropy for a fixed energy Jaynes (1957) . Intuitively, we may also think about as the failure probability of extracting work.
When , what is relevant is not as an absolute, but relative to the energy that is extracted. We are thus interested in where is the change in entropy of the battery. For our investigations the limit will be of particular interest, and corresponds to performing near perfect work. Our analysis applies to arbitrarily small heat engines, even if this machine was run for only one cycle. We emphasize that this is not a restriction of the analysis, but rather a strong and appealing feature because it is indeed the relevant case when we consider few qubit devices, and a small number of experimental trials.
No perfect work
Before establishing our main result, we first show that in the nanoscopic regime, no heat engine can perform perfect work (). That is, the efficiency of any such heat engine is zero. More formally, it means that there exists no global energy preserving unitary (see Fig. 1) for which .
Efficiency
Clearly, however, heat engines can be built, prompting the question how this might be possible. We show that for any , there exists a process such that . Therefore, a heat engine is possible if we ask only for near perfect work. Interestingly, even in the macroscopic regime, we can envision a heat engine that only extracts work with probability , but over many cycles of the engine we do not notice this feature when looking at the average work gained in each run.
To study the efficiency in the nanoscale regime, we make crucial use of the second laws of quantum thermodynamics Brandão et al. (2015) . It is apparent from these laws that we might only discover further limitations to the efficiency than we see at the macroscopic scale. Indeed they do arise, as we find that the efficiency no longer depends on just the temperatures of the heat baths. Instead, the explicit structure of the cold bath Hamiltonian becomes important (a similar argument can be made for the hot bath). Consider a cold bath comprised of twolevel systems each with its own energy gap, where can be arbitrarily large, but finite. Let us denote the spectral gap of the cold bath—the energy gap between its ground state and first excited state—by . We can then define the quantity
(2) 
and study the efficiency in the quasistatic limit. This means that the final state of the cold bath is thermal, and its final temperature is higher than by only a positive infinitesimal amount.
Whenever , we show that the maximum and attainable efficiency is indeed the familiar C.E., which can be expressed as
(3) 
However, when , we find a new nanoscale limitation. In this situation, the efficiency is only
(4) 
for a quasistatic heat engine. One might hope to obtain a higher efficiency compared to (4) by going away from the quasistatic setting, however we also show that such an efficiency is always strictly less than the C.E.
The restriction of near perfect work per cycle can now be further justified by examining how well the heat engine performs when the machine runs over many cycles: we find that if , the heat engine can be run quasistatically with an efficiency arbitrarily close to the C.E. while extracting any finite amount of work with an arbitrarily small entropy increase in the battery.
Comparison with standard entropy results
For any system in thermal contact with a bath at temperature , consider the Helmholtz free energy , where is the von Neumann entropy of . In the macroregime, the usual second law states that the Helmholtz free energy never increases,
(5) 
when the system goes from a state to a state . This, however, is but one of many conditions necessary for a state transformation Brandão et al. (2015) . The limitations we observe are a consequence of the fact that in the nanoregime, possible transitions are governed by a family of generalized second laws. The fact that more laws appear in this regime can intuitively be understood as being analogous to the fact that when performing a probabilistic experiment only a handful of times, not just the average, but other moments of a distribution become relevant. Indeed, all second laws converge to the standard second law in the limit of infinitely many particles Brandão et al. (2015), illustrating why we are traditionally accustomed to only this second law. The standard second law also emerges in some regimes of inexact catalysis Brandão et al. (2015); Lostaglio et al. (2015c), however, this corresponds to a degradation of the machine in each cycle.
It is illustrative to analyze our problem when we apply just the standard second law in (5) to derive bounds on the efficiency, which is indeed a matter of textbook thermodynamics Reif (1965) . However, we here apply the law precisely to the heat engine model as given in Fig. 1, in which all energy flows are accounted for and (near) perfect work is performed. One might wonder whether the limitations we observe are just due to an inaccurate model or our demand for near perfect instead of average work, and might thus also arise in the macroregime. That is, are these newfound limitations really a consequence of the need to obey a wider family of second laws, or would the standard free energy predict the same things when the energy is quantized?
We show independently of whether we consider perfect () or near perfect () work  that according to the standard free energy in (5), the maximum achievable efficiency is the C.E. Furthermore, we recover Carnot’s famous statement that the C.E. can be achieved for any cold bath (i.e. for a cold bath with any finite dimensional pure point spectrum). We also see that C.E. is only achieved for quasistatic H.E.s. We prove this without invoking any additional assumptions than those laid out here, such as reversibility or that the system is in thermodynamic equilibrium at all times. Therefore, with our setup we recover exactly what Carnot predicted, namely that the maximum efficiency of the H.E. is independent of the working substance. This rules out that our inability to achieve what Carnot predicted according to the macroscopic laws of thermodynamics is not only a consequence of an overly stringent model.
Extensions to the setup
One could ask whether at the nano regime, if a less stringent model would allow one to recover Carnot’s predictions. Specifically, what if we consider any final state of the battery which is away in trace distance from the desired final battery state ? In this case, we show that as long as one still considers the extraction of near perfect work , our findings remain unchanged: when , C.E. cannot be obtained.
In a similar vein, one could imagine that the final components of the heat engine become correlated between themselves, and that this would allow one to always achieve the C.E.. According to macroscopic laws of thermodynamics, correlations between the final components always inhibit one from achieving the C.E.. We show that at the nanoscale such correlations can also be ruled out as a means to achieve the C.E. when .
These results thus show the inevitability that the maximum efficiency of a nanoscale heat engine depends on more information about the thermal baths rather than just the temperature.
Conclusion
Our work establishes a fundamental result for the operation of nanoscale heat engines. We find all cold baths can be used in heat engines. However, for all temperatures and of the cold and hot baths, there exists an energy gap of the twolevel systems forming the cold bath above which the optimal efficiency is reduced below the C.E.. Viewed from another direction, for a fixed energy gap , whether the C.E. can be achieved depends on the relation between and as illustrated in Fig. 4. Loosely speaking, the C.E. can be achieved whenever the two temperatures are unequal but not too far apart. One might wonder why this restriction has not been observed before in the classical scenario. There, the energy spectrum is continuous or forms a quasicontinuum, and hence we can only access the C.E. regime.
Our result is a consequence of the fact that the second law takes on a more complicated form in the nanoregime. Next to the standard second law, many other laws become relevant and lead to additional restrictions. From a statistical perspective, small numbers require more refined descriptions than provided by averages, and as a result thermodynamics becomes more complicated when considering systems comprised of few particles. Similar effects can also be observed in information theory, where averaged quantities as given by the Shannon entropy need to be supplemented with refined quantities when we consider finitely many channel uses.
In the macroscopic regime, for completeness, we ruled out the possibility that the observed limitations on efficiency is a consequence of our demand for near perfect work, or the fact that we are using systems with discrete (sufficiently large spaced) spectra. This verification was achieved by showing that the C.E. can indeed always be attained (regardless to the size of an energy gap if present) when extracting near perfect work, when we are in such large systems that only the standard second law is relevant. One might wonder whether heat engines that do not operate quasistatically, or employing quantum coherences would allow us to achieve the C.E. independent of the structure of the cold bath. As we show in the Supplementary Material, both do not help.
There are several works Skrzypczyk et al. (2011, 2014); Brunner et al. (2012, 2014); Tajima and Hayashi (2014) that have analyzed the efficiencies of heat engines and obtained C.E. as the maximal efficiency. Common to all these approaches is that they consider an average notion of work, without directly accounting for a contribution from disordered energy (heat). Instead, one keeps the entropy of the battery low Skrzypczyk et al. (2014) , or bound the higher moments of the energy distribution Brunner et al. (2012) . These only limit contributions from heat, but do not fully prevent them. Our notion of (near) perfect work now makes this aspect of macroscopic work explicit in the nanoregime. Needless to say, imperfect work with some contribution of heat can also be useful. Yet, it does not quite constitute work if we cannot explicitly single out a contribution from heat. One could construct a machine which extracts some amount of energy, with some nonnegligible amount of information. We can prove in this case that Carnot’s efficiency can even be exceeded Ng et al. (2015) . This should not come as a surprise, because we are no longer asking for work  energy transfer about which we have (near) perfect information.
Our work raises many open questions. We see that the quasistatic efficiency has a discontinuous derivative with respect to , or at , as illustrated in Fig. 4, which is often associated with a phase transition. It is unclear whether this phenomenon can also be understood as a phase transition  absent at the macroscopic scale  and whether there is an abrupt change in the nature of the machine when crossing the boundary.
It would furthermore be satisfying to derive the explicit form of a hot bath, and machine attaining Carnot  or new Carnot  efficiency. One might wonder whether a nontrivial machine is needed at all in this case. To illustrate the dependence on the bath, it was sufficient to consider a bath comprising solely of qubits. The tools proposed in the Supplementary Material can also be used to study other forms of bath structures, yet it is a nontrivial question to derive efficiencies for such cold baths.
Most interestingly, there is the extremely challenging question of deriving a statement that is analogous to the C.E., but which makes explicit the tradeoff between information and energy for all possible starting situations. In a heat engine, we obtain energy from two thermal baths about which we have minimal information. It is clear that the C.E. is thus a special case of a more general statement in which we start with two systems of a certain energy about which we may have some information, and we want to extract work by combining them. Indeed, the form that such a general statement should take is by itself a beautiful conceptual challenge, since what we understand as efficiency may not only be a matter of work obtained vs. energy wasted. Instead, we may want to take a loss of information about the initial states into account when formulating such a fully general efficiency.
References
 Carnot (1824) S. Carnot, Reflections on the Motive Power of Fire (1824).
 Clausius (1865) R. Clausius, Annalen der Physik 201, 353 (1865).
 Thompson (Lord Kelvin) (1851) W. Thompson (Lord Kelvin), (1851).
 Horodecki and Oppenheim (2013) M. Horodecki and J. Oppenheim, Nature Communications 4 (2013).
 Brandão et al. (2015) F. Brandão, M. Horodecki, N. Ng, J. Oppenheim, and S. Wehner, Proceedings of the National Academy of Sciences 112, 3275 (2015).
 Åberg (2013) J. Åberg, Nature Communications 4 (2013).
 Dahlsten et al. (2011) O. Dahlsten, R. Renner, E. Rieper, and V. Vedral, New Journal of Physics 13, 053015 (2011).
 Gallego et al. (2015) R. Gallego, J. Eisert, and H. Wilming, (2015), arXiv:1504.05056.
 Gemmer and Anders (2015) J. Gemmer and J. Anders, arXiv:1504.05061 (2015).
 Lostaglio et al. (2015a) M. Lostaglio, D. Jennings, and T. Rudolph, Nature communications 6 (2015a).
 Scully et al. (2003) M. Scully, M. Zubairy, G. Agarwal, and H. Walther, Science 299, 862 (2003).
 Lostaglio et al. (2015b) M. Lostaglio, K. Korzekwa, D. Jennings, and T. Rudolph, Phys. Rev. X 5, 021001 (2015b).
 Binder et al. (2015) F. Binder, S. Vinjanampathy, K. Modi, and J. Goold, Phys. Rev. E 91, 032119 (2015).
 Salek and Wiesner (2015) S. Salek and K. Wiesner, (2015), arXiv:1504.05111.
 Tajima and Hayashi (2014) H. Tajima and M. Hayashi, arXiv:1405.6457 (2014).
 Gemmer et al. (2009) J. Gemmer, M. Michel, and G. Mahler, Quantum thermodynamics (Springer, 2009).
 Roßnagel et al. (2014) J. Roßnagel, O. Abah, F. SchmidtKaler, K. Singer, and E. Lutz, Phys. Rev. Lett. 112, 030602 (2014).
 Gardas and Deffner (2015) B. Gardas and S. Deffner, Phys. Rev. E 92, 042126 (2015).
 PerarnauLlobet et al. (2015) M. PerarnauLlobet, K. V. Hovhannisyan, M. Huber, P. Skrzypczyk, N. Brunner, and A. Acín, Phys. Rev. X 5, 041011 (2015).
 Jaynes (1957) E. Jaynes, Physical Review 106, 620 (1957).
 Skrzypczyk et al. (2014) P. Skrzypczyk, A. Short, and S. Popescu, Nature Communications 5 (2014).
 Lostaglio et al. (2015c) M. Lostaglio, M. P. Müller, and M. Pastena, Phys. Rev. Lett. 115, 150402 (2015c).
 Reif (1965) F. Reif, Fundamentals of statistical and thermal physics, McGrawHill series in fundamentals of physics (McGrawHill, 1965).
 Skrzypczyk et al. (2011) P. Skrzypczyk, N. Brunner, N. Linden, and S. Popescu, Journal of Physics A: Mathematical and Theoretical 44, 492002 (2011).
 Brunner et al. (2012) N. Brunner, N. Linden, S. Popescu, and P. Skrzypczyk, Phys. Rev. E 85, 051117 (2012).
 Brunner et al. (2014) N. Brunner, M. Huber, N. Linden, S. Popescu, R. Silva, and P. Skrzypczyk, Phys. Rev. E 89, 032115 (2014).
 Ng et al. (2015) N. Ng, M. Woods, and S. Wehner, (2015), in preparation.
 Shoup (2009) V. Shoup, A computational introduction to number theory and algebra (Cambridge university press, 2009) p. 50.
 Cover and Thomas (2012) T. M. Cover and J. A. Thomas, Elements of information theory (John Wiley & Sons, 2012).
 Shannon (1948) C. Shannon, Bell System Technical Journal 27, 379 (1948).
Acknowledgments
We thank J. Oppenheim, M. Horodecki, R. Renner and A. Winter for useful comments and discussions. This research was funded by Singapore’s MOE Tier 3A Grant MOE2012T31009, and STW, Netherlands.
Methods
Setup of heat engine The workings of a heat engine have been described in Fig. 1, which we expand in mathematical detail here. Consider the initial global system
(6) 
The hot bath Hamiltonian can be chosen arbitrarily, as long as is the corresponding thermal state of temperature . Similarly, the machine and its Hamiltonian can be chosen arbitrarily. Given any cold bath such that is a thermal state at temperature , one can extract work and store it in system W. This process then corresponds to inducing the transition
(7) 
where . We have , that is, the machine is not degraded in the process. This also means that we preserve the tensor product structure between ColdW and M: if the machine is initially correlated with some other system, we do not want to destroy such correlations since this would also mean that we degrade the machine.
To quantify the amount of extractable work, we apply the generalized second laws derived in Brandão et al. (2015) . The initial cold bath is thermal, and therefore diagonal in the energy eigenbasis, while the initial battery state is also a pure energy eigenstate (see Fig. 2). Since here energy conserving never increase coherences between energy eigenstates Brandão et al. (2015) , we can therefore conclude that is also diagonal in the energy eigenbasis. We can thus invoke the necessary and sufficient conditions for a transformation to be possible Brandão et al. (2015) . Specifically, iff ,
(8) 
where is the thermal state of the joint system (cold bath and battery) at temperature . The generalized free energy is defined as
(9) 
where are known as Rényi divergences. For states which are diagonal in the same eigenbasis, the Rényi divergences can be simplified to
(10) 
where are the eigenvalues of and respectively. The case is defined by continuity in . Taking the limit for (9), one recovers the Helmholtz free energy, . Using the second laws Brandão et al. (2015) is a powerful tool, since when searching for the optimum efficiency, we do not have to optimize explicitly over the possible machines , the form of the hot bath , or the energy conserving unitary . Whenever (8) is satisfied, then we are guaranteed a suitable choice exists and hence we can focus solely on the possible final states .
Since we know that is a diagonal in the energy eigenbasis, the correlations between cold bath and battery can only be classical (w.r.t. energy eigenbasis). However, even such correlations cannot improve the efficiency: we show in the Supplementary Material that we may take the output state to have the form in order to achieve the maximum efficiency. According to Fig. 2, consider and . From the second laws (8), we see that the maximum amount of extractable work is given by the largest value of such that the state transition is possible. The form of (derived in the Supplementary Material) is
(11)  
(12)  
(13) 
where , are probabilities of the thermal state of the cold bath at temperatures respectively, and are the probability amplitudes of state when written in the energy eigenbasis of . The quantity is dependent on the initial and final cold bath , the hot bath temperature , and the allowed failure probability . The main difficulty of evaluating comes from the infimum over ,  indeed we know examples in which it can be obtained at any depending on and other parameters.
The efficiency , however, is not determined the maximum extractable work, but rather by a tradeoff between and the energy drawn from the hot bath. More precisely,
(14) 
where
(15) 
is the mean energy drawn from the hot bath. Since is void of interaction terms, and since total energy is preserved, we can also write the change of energy in the hot bath, in terms of the energy change in the remaining systems. That is,
(16) 
where
(17) 
and
(18) 
is the change in average energy of the cold bath and battery. We thus see that the efficiency can be described wholely in terms of the battery and the cold bath.
Macroscopic second law We first analyze the efficiency in the macroscopic regime, where only the usual free energy () dictates if a certain state transition is possible. The main question is then: given an initial cold bath Hamiltonian , what is the maximum attainable efficiency considering all possible final states ? In both cases of perfect and near perfect work, we find that the efficiency is only maximized whenever is (A) a thermal state, and (B) has a temperature arbitrarily close to . We refer to this situation as a quasistatic heat engine. Moreover, we find that the maximum is the C.E. and that it can be achieved by any given . These results rigorously prove Carnot’s findings when only the usual free energy is relevant.
Nanoscale second laws Here, when considering perfect work, we are immediately faced with an obstacle: the constraint at implies that is not possible, whenever is of full rank. This is due to the discontinuity of in the state probability amplitudes, and is similar to effects observed in information theory in lossy vs. lossless compression: no compression is possible if no error however small is allowed. However, when considering near perfect work, the constraint is satisfied automatically. We thus consider the limit .
The results for the macroscopic second law implies an upper bound on both the maximum extractable work and efficiency for nanoscopic second laws, since the constraint of generalized free energy at is simply one of the many constraints described by all . It thus follows from the macroscopic second law results, that if we can achieve the C.E., we can only do so when both (A) and (B) are satisfied. Consequently, we analyze the quasistatic regime. Furthermore, we specialize to the case where the cold bath consists of multiple identical twolevel systems, each of which are described by a Hamiltonian with energy gap .
Firstly, we identify characteristics that should have, such that near perfect work is extracted in the limit (i.e. when (A) and (B) are satisfied). We then show two technical results:

The choice of (as a function of ) simplifies the minimization problem in (11), by reducing the range the variable appearing in the optimization of . Under the consideration of near perfect work, can be chosen such that the optimization of is over for some , instead of . The larger is for a chosen , the slower converges to zero.

We analyze the following cases separately:

For , can always be chosen such that the infimum in (11) is obtained in the limit . Evaluating the efficiency in the limit corresponds to the C.E..

The maximum efficiency of nano heat engines depends on more than temperature: Appendix
Contents
 A The general setting for a heat engine
 B The conditions for thermodynamical state transitions
 C Efficiency, maximum efficiency and how to evaluate it
 D Efficiency of a heat engine according to macroscopic thermodynamics
 E Efficiency of a nanoscopic quantum heat engine
 F Extensions to the setup
In this Supplementary Material, we detail our findings. Sections AC are aimed at giving the reader an overview of the important concepts regarding heat engines, and to introduce the quantities of interest. Firstly, in Section A we describe the setup of our heat engine, the systems involved, and how work is extracted and stored. By using this general setup, we then proceed in Section B to introduce conditions for thermodynamical state transitions in a cycle of a heat engine. In Section C, we introduce the formal definition of efficiency, and specify how can this quantity be maximized over a set of free parameters (involving the bath Hamiltonian structure).
After providing these guidelines, we start in Section D to apply the macroscopic law of thermodynamics. We have performed the analysis with the generalization of allowing for an arbitrarily small probability of failure. The results in this section might be familiar and known to the reader, however from a technical perspective, their establishment is helpful for proving our main results (in Section E) about nanoscale systems. In Section E, we apply the recently discovered generalizations of the second law for small quantum systems. The results in Section D and Section E are summarized at the beginning of each section, for the reader to have a concise overview of the distinction between thermodynamics of macroscopic and nanoscopic systems. Finally, in Section F, we show that even when considering a more general setup, these results obtained in Section E remain unchanged.
Appendix A The general setting for a heat engine
A heat engine is a procedure for extracting work from a temperature difference. It comprises of four basic elements: two thermal baths at distinct temperatures and respectively, a machine, and a battery. The machine interacts with these baths in such a way that utilizes the temperature difference between the two baths to perform work extraction. The extracted work can then be transferred and stored in the battery, while the machine returns to its original state.
In this section, we describe a fully general setup, where all involved systems and changes in energy are accounted for explicitly. Let us begin with the total Hamiltonian
(19) 
where the indices Hot, Cold, M, W represent a hot thermal bath (Hot), a cold thermal bath (Cold), a machine (M), and a battery (W) respectively. Let us also consider an initial state
(20) 
The state () is the initial thermal state at temperature (), corresponding to the hot (cold) bath Hamiltonians . More generally, given any Hamiltonian and temperature , the thermal state is defined as . For notational convenience, we shall often use inverse temperatures, defined as and where is the Boltzmann constant. Without loss of generality we set . The initial machine can be chosen arbitrarily, as long as its final state is preserved (and therefore the machine acts like a catalyst).
We adopt a resource theory approach, which allows all energypreserving unitaries on the global system, i.e. such unitaries obey . If and can be arbitrarily chosen, these correspond to the set of catalytic thermal operations Brandão et al. (2015) one can perform on the joint state ColdW. This implies that the cold bath is used as a resource state. By catalytic thermal operations that act on the cold bath, using the hot bath as a thermal reservoir, and the machine as a catalyst, one can possibly extract work and store it in the battery.
The aim is to achieve a final reduced state , such that
(21) 
where , i.e. the machine is preserved, and are the final states of the cold bath and battery. In Section F, we will consider the case in which there are correlations between the final state of the cold bath, hot bath, battery and or machine. We will find that the correlations do not change our results. For any bipartite state , we use the notation of reduced states , .
Finally, we describe the battery such that the state transformation from to stores work in the battery. This is done as follows: consider the battery which has a Hamiltonian (written in its diagonal form)
(22) 
For some parameter , we consider the initial and final states of the battery to be
(23)  
(24) 
respectively. The parameter is defined as the energy difference
(25) 
where we define such that . In the case where is a value such that the transition is possible via catalytic thermal operations, it corresponds to extracting work. We refer to the parameter as the probability of failure of work extraction. Note that in Eq. (24) is also the trace distance
(26) 
between and . In Section F, we will generalize this definition to include all final states of the battery , which are a trace distance from the ideal final battery state . We show that our findings regarding the achievability of C.E. remains unchanged.
Throughout our analysis, we deal with two distinct scenarios of work extraction as defined below.
Definition 1.
(Perfect work) An amount of work extracted is referred to as perfect work when .
The next definition of work involves a condition regarding the von Neumann entropy of the final battery state. Let be the von Neumann entropy of the final battery state. When the initial state is pure, we have
(27) 
When the final battery state is given by Eq. (24), its probability distribution has its support on a twodimensional subspace of the battery system, this definition also coincides with the binary entropy of ,
(28) 
Definition 2.
(Near perfect work) An amount of work extracted is referred to as near perfect work when

for some fixed and

for any , i.e. is arbitrarily small.
In the main text, we have provided a detailed discussion regarding the physical meaning of perfect work and near perfect work, and the necessity for considering these quantities. As we will see later in the proof to Lemma 5, 1) and 2) in Def. 2 are both satisfied if and only if
(29) 
Since the initial state is diagonal in the energy eigenbasis, and since catalytic thermal operations do not create coherences between energy eigenstates, therefore has to be diagonal in the energy eigenbasis. Furthermore, (as already stated above) in Section F, we extend the setup to include correlation in the final state between the battery, cold bath and machine and more general final battery states.
Note that in our model we allow the battery to have arbitrarily many (but finite) eigenvalues. One can compare this to the twodimensional battery used in Brandão et al. (2015), referred to as the wit. Having a minimal dimension, the wit is a conceptually very useful tool to visualize work extraction. However, it has the disadvantage that the energy spacing, i.e. the amount of work to be extracted, has to be known a priori to the work being extracted in order to tune the energy gap of the wit. The more general battery, which we describe in Eq. (22), requires a higher system dimension, but has the advantage that it can form a quasicontinuum and thus effectively any amount of work (i.e. any ) can be stored in it without prior knowledge of the work extraction process. We will see that our results are independent of .
To summarize, so far we have made the following minimal assumptions:

Product state: There are no initial nor final correlations between the cold bath, machine and battery. Initial correlations we assume do not exist, since each of the initial systems are brought independently into the process. This is an advantage of our setup, since if one assumed initial coherence, one would then have to use unknown resources to generate them in the first place. We later also show that correlations between the final cold bath and battery do not provide improvements in maximum extractable work or efficiency.

Perfect cyclicity: The machine undergoes a cyclic process, i.e.

Isolated quantum system: The heat engine as a whole, is isolated from and does not interact with the world. This assumption ensures that all possible resources in a work extraction process has been accounted for.

Finite dimension: The Hilbert space associated with is finite dimensional but can be arbitrarily large. Moreover, the Hamiltonians and all have bounded pure point spectra, meaning that these Hamiltonians have eigenvalues which are bounded.
After defining the set of allowed operations, and describing the desired state transformation process, one can then ask: what conditions should be fulfilled such that there exists a hot bath , and a machine such that is possible? Throughout this document we use “” to denote a state transition via catalytic thermal operations.
In Section D, by assuming the macroscopic law of thermodynamics governs the heat engine, we derive the efficiency of a heat engine, and verify the long known Carnot efficiency as the optimal efficiency. We do this for both cases where and when is arbitrarily small. In Section E, we analyze the same problem under recently derived second laws, which hold for small quantum systems. We show that these new second laws lead to fundamental differences to the efficiency of a heat engine.
Throughout our analysis, a particular notion that describes thermodynamical transitions will be important towards achieving maximum efficiency. We therefore define this technical term, which will be used throughout the manuscript.
Definition 3.
(Quasistatic) A heat engine is quasistatic if the final state of the cold bath is a thermal state and its inverse temperature only differs infinitesimally from the initial cold bath temperature, i.e. , where .
Since throughout this analysis we frequently deal with arbitrarily small paramaters , we also introduce beforehand the notation of order function , , which denotes the growth of a function.
Definition 4.
(Big , small notation
Shoup (2009))
Consider two realvalued functions . We say that
1.
in the limit iff there exists and such that for all , .
2. in the limit iff there exists such that .
Remark 1.
We also list a few properties of these functions here for , which will help us throughout the proof:
a) For any , .
b) For any functions and , .
c) For any functions and , .
d) For any functions and , .
Definition 3 has two direct implications for a quasistatic heat engine:

The temperature of the final state of the cold bath , only increases w.r.t. its initial temperature by an infinitesimal amount, i.e. .
Appendix B The conditions for thermodynamical state transitions
In this section, we briefly state the laws which govern the transitions from initial, to final, states for one cycle of our heat engine. By applying these laws, the amount of extractable work can be quantified and expressed as a function of the cold bath.
b.1 Second law for macroscopic systems
The cold bath, machine and battery form a closed but not isolated thermodynamic system. This means only heat exchange (and not mass exchange) occurs between these systems and the hot bath. Therefore, a transition from to will be possible if and only if the Helmholtz free energy, does not increase
(30) 
where
(31) 
and and being the entropy and the mean energy of state respectively. Throughout the manuscript, whenever the state is a thermal state at temperature , we use the shorthand notation and .
The Helmholtz free energy bears a close relation to the relative entropy,
(32) 
Whenever and are diagonal in the same basis, the relative entropy can be written as
(33) 
where are the eigenvalues of and respectively. Now, for any Hamiltonian , consider , which is the thermal state at some inverse temperature , with partition function , and denote its eigenvalues as . Then for any diagonal state with eigenvalues , and denoting as the eigenvalues of ,
(34) 
This implies that
(35) 
In Section D we will solve Eq. (30) in order to evaluate the maximum efficiency.
b.2 Second laws for nanoscopic systems
In the microscopic quantum regime, where only a few quantum particles are involved, it has been shown that macroscopic thermodynamics is not a complete description of thermodynamical transitions. More precisely, not only the Helmholtz free energy, but a whole other family of generalized free energies have to decrease during a state transition Brandão et al. (2015). This places further constraints on whether a particular transition is allowed. In particular, these laws also give necessary and sufficient conditions, when a system with initial state can be transformed to final state (both diagonal in the energy eigenbasis), with the help of any catalyst/machine which is returned to its initial state after the process.
We can apply these second laws to our scenario by associating the catalyst with , and considering the state transition as described in Section A. Note that the initial state is blockdiagonal in the energy eigenbasis (for the battery by our choice, and for the cold bath because it is a thermal state). By catalytic thermal operations, the final state is also blockdiagonal in the energy eigenbasis. Furthermore, according to the second laws in Brandão et al. (2015), the transition from is then possible iff
(36) 
where is the thermal state of the system at temperature of the surrounding bath. The quantity for corresponds to a family of free energies defined in Brandão et al. (2015), which can be written in the form
(37) 
where