1 , 2

  *

# Fluctuations in heat engines

Viktor Holubec1 and Artem Ryabov2 Charles University, Faculty of Mathematics
and Physics, Department of Macromolecular Physics, V Holešovičkách 2, CZ-180
00 Praha, Czech Republic<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

Investigation of fundamental limitations of heat to work conversion at the
macroscale gave birth to the second law of classical thermodynamics. Recent
years have witnessed an enormous effort to develop and describe microscopic
heat engines based on systems as small as individual colloidal particles or
quantum dots. At such scales, fluctuations are an inherent part of dynamics
and thermodynamics. The fundamentally stochastic character of the second law
then yields interesting implications on statistics of output power and
efficiency of the small heat engines. The general properties, symmetries, and
limitations of these statistics have become revealed, understood, and tested
only during the last few years. Will their complete understanding ignite a
similar revolution as the discovery of the second law? Here, we review the
known general results concerning fluctuations in the performance of small heat
engines. To make the discussion more transparent, we illustrate the main
abstract findings on exactly solvable models and provide a thorough
theoretical introduction for newcomers to the field.

††: J. Phys. A: Math. Gen.

##  1 Introduction

Noises and fluctuations are often regarded as negative effects, which
devaluate signals and make our lives more unpredictable. However, they are at
the very hearth of thermodynamics [1, 2, 3, 4, 5, 6]. Indeed, the fundamental
notions of heat and entropy are closely related to thermal fluctuations. Only
due to these fluctuations, we are able to use heat engines to transform the
easily accessible thermal energy into the useful mechanical work, and thus to
propel our industrial society.

During the last decades, we have witnessed an enormous effort to explore
energy transformations in living organisms, to miniaturize building blocks
necessary for development of computers, and to advance experimental
micromanipulation techniques. With the current experimental resolution, one
can observe how thermal fluctuations transfer working medium of a heat engine
between its microstates. A periodic driving of energies of the microstates and
temperature of the environment then allows us to systematically convert energy
of the thermal fluctuations into mechanical work. We call such operating
machines as microscopic cyclic heat engines. Another option is to couple the
working medium to several thermal environments at different temperatures and
to convert part of the resulting heat flux into work. These micrscopic
machines operate autonomously under stationary conditions and we refer to them
as to steady-state heat engines.

As far as one can neglect fluctuations, e.g. at macroscopic scales,
theoretical limitations on performance of both these types of heat engines are
identical and dictated by the second law of thermodynamics [6]. However, at
microscales, fluctuations reveal that output work in cyclic and steady-state
heat engines are fundamentally different stochastic processes obeying
different limitations [7]. Mathematical description of these processes and
intuitive understanding of their physical behavior are the main aims of this
review. We will addressed them using exact solutions to specific models and
generalizations of the second law that take into account fluctuations.

The consistent theoretical framework describing thermodynamics of small
systems is known as the stochastic thermodynamics. Its development up to 2012
is comprehensibly reviewed in [8]. Concerning microscopic machines, this
period was mainly devoted to generalizations of classical problems: With a few
exceptions [9], performance of stochastic heat engines was almost universally
studied on the level of mean values with a special focus on the efficiency at
maximum power [10, 11, 12]. Only recently, a systematic attention has been
devoted to fluctuations in performance of small heat engines. Our main goal
here is to present a coherent and intuitive overview of main achievements in
this rapidly growing field.

Concretely, Sec. 2 of this review presents mathematical tools necessary for
analysis of dynamics of small systems under the broadly used Markovian
approximation. Section 3 describes definitions of basic thermodynamic
quantities for cyclic and steady-state heat engines and provides further
mathematical tools for studying their fluctuations. These two sections
introduce basic concepts of stochastic thermodynamics, which are employed in
the rest of this review.

An experienced reader can immediately jump to Sec. 4, where we review the
known general results on fluctuating thermodynamic performance of classical
heat engines (with a few quantum side-remarks). Namely, in Sec. 4.1 we
describe general properties of probability density functions (PDFs) for
stochastic work and heat. Section 4.2 discusses generalizations of the Crooks
and the Jarzynski fluctuation theorems for heat engines. In Sec. 4.3, we
discuss universal properties of PDF for fluctuating efficiency. Section 4.4 is
devoted to implications of thermodynamic uncertainty relations for the
performance of heat engines. In particular, we focus on the imposed bounds on
power and its fluctuations close to the reversible efficiency.

All these concepts and results are illustrated on specific models which are to
a great extent exactly solvable. These models, together with the corresponding
solutions, are in detail reviewed in Sec. 5. We believe that such a collection
of exactly solvable models will help the readers to gain an intuitive
understanding of how to apply the general results to various specific
situations.

This review is conceptually self contained. However, for readers willing to
learn about other achievements of stochastic thermodynamics or to get a deeper
understanding of its theoretical tools, we can recommend a number of excellent
reviews focusing on various aspects of the theory. First, the book [13]
contains a pedagogical introduction into stochastic energetics defining heat
and work for individual stochastic trajectories. It also covers several models
of microscopic machines not discussed here like the Feynman and the Büttiker-
Landauer ratchets, and information engines. Then, there are several
comprehensible reviews of fluctuation theorems (FTs) explaining their
properties from different perspectives [14, 15, 16, 17, 18] and review
articles focusing on thermodynamic uncertainty relations [19, 20, 21],
stochastic thermodynamics of information [22, 23], and experimental
applications of the theory [24, 25, 26, 27]. Furthermore, properties of
steady-state heat engines (with the main focus on quantum systems) are
discussed in Ref. [28]. We are aware of the fact that this list is highly
subjective and incomplete. We have selected its entries based on their
relation to the fluctuations in heat engines.

In the whole review, we will measure the energy in units of temperature and
thus we set $k_{B}=1$. Furthermore, to avoid introducing too many symbols, we
will often distinguish between different functions by their variables. For
example $L$ will denote matrix of transition rates and $L(s_{in})$ will be the
corresponding tilted rate matrix. We will also omit writing independent
variables of functions if they will not be necessary.

##  2 Dynamics

In this section, we review basic dynamical equations used to describe
stochastic time evolution of small systems. If not specified otherwise, we
assume the classical Markovian dynamics [29, 30] which can be in general
described by the Generalized master equation (GME) 111Equations of the form
(1) can also describe some non-Markovian systems, in which case
$\mathcal{L}p(x,t)$ depends on the history of the function $p(x,t)$, rendering
the dynamical equation non-local in time. For quantum systems, the function
$p(m,t)$ in general describes not only PDF for $m$ but also coherences in the
system [31], which are, in our description, neglected.

$\frac{\partial}{\partial t}p(m,t)=\mathcal{L}(t)p(m,t)$ (1)

for the probability density $p(m,t)$ to find the system at microstate $m$ at
time $t$. The time-dependence in the operator $\mathcal{L}(t)$ comes from time
dependence of temperature and driving protocol necessary to describe
cyclically operating heat engines.

###  2.1 Discrete state space

For systems with a discrete state space, such as various models of molecular
machines or even incoherent quantum models, the microstate label $m$ assumes a
(typically finite) number of discrete values, say $m=1,\dots,N$. The dynamical
equation can then be written in the matrix form

$\frac{d{\mathbf{p}}(t)}{dt}=L(t){\mathbf{p}}$ (2)

for the vector ${\mathbf{p}}=[p_{1}(t),\dots,p_{N}(t)]$ of occupation
probabilities $p_{m}(t)$ of the individual microstates. The non-diagonal
elements $L_{mn}(t)$ of the transition rate matrix $L(t)$ describe
probabilities (per unit time) for transitions from state $n$ to state $m$. The
diagonal element $L_{nn}(t)$ is then given by the sum over all transitions
from the state $n$: $L_{nn}(t)=-\sum_{m\neq n}L_{mn}(t)$.

To ensure thermodynamic consistency of the model, the transition rates must
obey the so-called (local) detailed balance condition

$\frac{L_{mn}(t)}{L_{nm}(t)}=\mathrm{e}^{-\beta(t)[U(m,t)-U(n,t)]},$ (3)

where $\beta(t)=1/T(t)$ and $U(m,t)$ denotes energy of microstate $m$ at time
$t$. The condition ensures that the probabilities $p_{m}(t)$ are described by
the Boltzmann equilibrium distribution

$p(m,t)\approx\exp[-\beta(t)U(m,t)]/Z(t),$ (4)

if the driving is much slower than all system relaxation times and if the
system is connected to a single heat bath at a time. The normalization $Z(t)$
is given by $Z(t)=\sum_{m}\exp[-\beta(t)U(m,t)]$.

In case of time-independent transition rates, the solution to the Master
equation (2) is given by the matrix exponential

${\mathbf{p}}(t)=\exp[L(t-t^{\prime})]{\mathbf{p}}(t^{\prime}).$ (5)

For problems with time dependent rates, the solution instead involves the so-
called time ordered matrix exponential
$\exp_{\rightarrow}[\int_{t^{\prime}}^{t}dt^{\prime\prime}\,L(t^{\prime\prime})]$.
While its exact evaluation is difficult, it can be easily evaluated
approximately with arbitrary precision as described on a specific example in
Sec. 5.1.1.

The matrix exponential yields complete information about dynamics of the
system. Moreover, when using the method of moment generating functions
described in Sec. 3.2, it can also yield information about functionals of the
stochastic process such as heat and work. Alternatively, complete information
about the dynamics and energetics of Markov processes with discrete state
space can be obtained using various simulation algorithms [29, 32].

###  2.2 Continuous state space

For systems where $m$ labels a continuum of microstates, the GME (1) is a
partial differential equation. For example, for an underdamped Brownian
particle, the microstate $m$ specifies position $\bf x$ and momentum $\bf p$
of the particle and the operator $\mathcal{L}$ assumes the form

$\mathcal{L}(t)=\nabla_{\bf p}\cdot\left[\gamma^{2}D(t)\nabla_{\bf
p}+\gamma{\bf p}+\nabla_{\bf x}U({\bf x},t)\right]-\nabla_{\bf x}{\bf
p}/m_{g},$ (6)

where $m_{g}$ is the particle mass and $U({\bf x},t)$ is potential. The nabla
operators $\nabla_{\bf x}$ and $\nabla_{\bf p}$ denote gradients with respect
to position and momentum, respectively. The thermodynamic consistency (4) in
this case requires that the friction coefficient, $\gamma$, diffusion
coefficient, $D$, and temperature $T$ are interconnected by the fluctuation-
dissipation theorem

$D(t)=T(t)/\gamma.$ (7)

The underdamped dynamics describes particles in diluted gasses so that the
relaxation time of their momentum is comparable or larger than that of the
position [30, 33].

For particles immersed in environments with larger friction, such as water,
the underdamped description can be significantly simplified by assuming that
momentum degrees of freedom are at all times in equilibrium. Then the
microstate $m$ is specified by the system position $\bf x$ and the operator
$\mathcal{L}$ reads

$\mathcal{L}(t)=\nabla\cdot\left[D(t)\nabla+\frac{1}{\gamma}\nabla U({\bf
x},t)\right],$ (8)

where $\nabla\equiv\nabla_{\bf x}$. This case corresponds to the most
frequently used description of the so-called Brownian heat engines with the
working medium composed of Brownian particles immersed in water, as witnessed
by the available experimental [34, 35, 36] and theoretical [10, 37, 38, 39,
40] results. Note that these systems can also be driven by non-conservative
forces. In such case, the potential force $-\nabla_{\bf x}U({\bf x},t)$ in
Eqs. (6) and (8) has to be replaced by the total force ${\bf F}({\bf x},t)$
containing also the non-potential component.

If the operator $\mathcal{L}$ assumes either of the two forms (6) and (8), the
GME (1) is called as the Fokker-Planck equation. Even for time-independent
driving, this equation can be solved exactly in few special cases only [33].
The most notable case is the Brownian motion in harmonic potential [10, 37,
41, 40], which yields forces linear in the position variable. In the
overdamped regime (8), we discuss these solution in detail in Sec. 5.2.

Besides various approximate techniques [33], the universally applicable
approach to problems where exact solutions are out of reach is provided by so
called Brownian dynamics simulations [29, 33]. They are based on the
stochastic differential equations

$\displaystyle\dot{\mathbf{x}}(t)$ $\displaystyle=$
$\displaystyle\frac{{\mathbf{p}}(t)}{m_{g}},$ (9)
$\displaystyle\dot{\mathbf{p}}(t)$ $\displaystyle=$
$\displaystyle-\gamma\frac{{\mathbf{p}}(t)}{m_{g}}-\nabla_{\bf x}U({\bf
x},t)+\sqrt{2D(t)\gamma^{2}}\,{\bm{\eta}}(t),$ (10)

and

$\dot{\mathbf{x}}(t)=-\frac{1}{\gamma}\nabla_{\bf x}U({\bf
x},t)+\sqrt{2D(t)}\,{\bm{\eta}}(t),$ (11)

corresponding to the underdamped and overdamped cases, respectively. Above,
the vector ${\bm{\eta}}(t)$ is the Gaussian white noise fulfilling
$\left<{\bm{\eta}}(t)\right>={\bm{0}}$ and
$\left<\eta_{i}(t)\eta_{j}(t^{\prime})\right>=\delta_{ij}\delta(t-t^{\prime})$.
Numerical integration of these equations yields trajectories of the stochastic
process that bare complete information about its dynamics and energetics.

Furthermore, for overdamped systems, the continuous state-space can be
discretized in a thermodynamically consistent way [42]. Then the Fokker-Planck
equation transforms into a matrix Master equation, which can be solved
numerically by evaluation of the (time ordered) matrix exponential.

###  2.3 Steady-state and cyclic heat engines

Traditionally, heat engines are cyclically operating machines transforming the
energy dissolved in thermal environment (heat) into mechanical work. Examples
of such _cyclic heat engines_ can be found in cars and other devices with
combustion engines. Another way to transform heat to work is to connect the
working medium simultaneously to two reservoirs at different temperatures and
transform part of the resulting heat flux into work. This way operate turbines
in thermal plants, solar cells, but in principle also the wind turbines as the
wind is propelled by a temperature gradient. In the rest of this work, we will
call these machines as _steady-state heat engines_. Due to a higher level of
required control, cyclic heat engines are usually harder to realize and
maintain in practice than the steady-state ones. However, the higher level of
control has also its advantages since cyclic heat engines can fundamentally
outperform their steady-state counterparts. Readers experienced in stochastic
thermodynamics can see directly Sec. 4.4 for more details. Beginners are
recommended to first go through the current section explaining details of
regimes of operation of the two classes of heat engines.

###  2.4 Steady-state heat engines

hot source $\left|h\right>$ at $T_{h}$quantum dot $\left|d\right>$cold drain
$\left|c\right>$ at
$T_{c}$$L_{hd}$$L_{dc}$$L_{dh}$$L_{hd}$$U(m,t)$$\mu_{c}$0$-\mu_{h}$$-\dot{q}_{out}$$\dot{q}_{in}$$\dot{w}_{out}$

Figure 1: The simplest model of a steady-state heat engine: a single level
quantum dot connected to two leads at different temperatures and chemical
potentials. In the steady-state, the engine utilizes the average heat flux
$\dot{q}_{in}$ due to the temperature gradient $T_{h}-T_{c}$ to drive
electrons against the gradient $\mu_{c}-\mu_{h}$ of chemical potential and
generate power $\dot{w}_{out}$. This model can be thought of as a simple
microscopic model of a thermoelectric device.

Steady-state heat engines require simultaneous connection to two (or more)
heat reservoirs. For the discrete models, different transitions can be
controlled by different reservoirs, whose temperatures will appear in the
detailed balance condition (3). As an example, consider the simple model of a
thermoelectric device depicted in Fig. 1. For the continuous models, this can
be achieved by considering interacting particles in contact with baths at
different temperatures. Other possibilities like spatially-dependent
temperature or connecting different degrees of freedom to different reservoirs
would result in spatially-dependent or matrix-valued diffusion coefficient
$D$, and we refer the interested reader to Refs. [43, 44]. Regardless the
implementation, connecting the system to more heat reservoirs results in
invalidation of the fluctuation-dissipation theorem (7).

Due to the constant conditions, steady-state heat engines cannot operate truly
cyclically. Instead, their internal state is during their operation on average
constant in time and thus given by the time independent solution of the GME
(1). For simplicity, we assume that $\mathcal{L}$ is ergodic and thus this
solution is unique. Then the steady-state solution $p(m)$ is given by the
eigenvector of the operator $\mathcal{L}$ corresponding to the eigenvalue
zero:

$\mathcal{L}p(m)=0.$ (12)

In situations where this eigenvalue problem is too complicated to be solved,
the steady-state can be obtained as the long-time limit of the solution (5) to
Eq. (1) for arbitrary initial condition:

$p(m)=\lim_{t\to\infty}p(t,m).$ (13)

###  2.5 Cyclic heat engines

$T(t)$$T(t)$$\left|d\right>$$\left|u\right>$$L_{ud}(t)$$L_{du}(t)$$U(m,t)$$E_{u}(t)$0$q$$w_{out}$$w_{out}$$q$$U(x,t)$

Figure 2: Paradigmatic examples of cyclic heat engines are the two-level
cyclic heat engine (left) and Brownian heat engine (right). These engines use
heat from hot reservoir to excite the system to higher energy levels and
perform work by decreasing energy of these excited microstates.

Two paradigmatic examples of cyclic heat engines are depicted in Fig. 2.
Namely, the simplest discrete state space model with two energy levels with
time dependent energies and the continuous model describing Brownian particle
trapped in a harmonic potential. Both these models are to a large extend
exactly solvable. For more details, see Secs. 5.1 and 5.2.

With respect to the mathematical description in Sec. 2, the cyclic heat
engines require a time-periodic protocol $\pi(t)=\left[U(m,t),T(t)\right]$
with a period $t_{p}$. Periodic operation of the engine itself then implies
that its state $p(m,t)$ is a time-periodic solution of the GME (1) fulfilling
the condition $p(m,t)=p(m,t+t_{p})$. For operators $\mathcal{L}(t)$ which do
not break ergodicity, the solution to Eq. (1) converges under the protocol
$\pi(t)$ to this _time-periodic steady-state_ also often called as the _limit
cycle_.

The limit cycle can thus be determined using two complementary approaches.
Most easily they can be formalised using the Green’s function for Eq. (1),
i.e. its solution $G(m,t|m^{\prime},t^{\prime})$ that fulfills the initial
condition $G(m,t^{\prime}|m^{\prime},t^{\prime})=\delta(m-m^{\prime})$, where
$\delta(m-m^{\prime})$ should be understood as a $\delta$-function for the
continuous systems and Kronecker $\delta$ for the discrete ones. The Green’s
function thus describes the time evolution of a system that departed with
certainty from the microstate $m^{\prime}$ at time $t^{\prime}$. Heaving the
Green’s function, the limit cycle solution can be obtained as the solution
$p(m,t)$ of the equation

$p(m,t+t_{p})=\int dm\,^{\prime}G(m,t+t_{p}|m^{\prime},t)p(m^{\prime},t),$
(14)

where the integration changes to summation over $m^{\prime}$ in the discrete
case. Understanding the right-hand side of this equation as an application of
an operator $G$ to a vector $p$, the limit cycle solution can be understood as
an eigenvector corresponding to the eigenvalue 1 of this operator. This
interpretation is especially useful for discrete systems where Eq. (14) can be
written in the matrix form as

${\mathbf{p}}(t+t_{p})=G(t+t_{p},t){\mathbf{p}}(t),$ (15)

where the element $mn$ of the matrix $G(t,t^{\prime})$ is
$G(m,t|n,t^{\prime})\equiv G_{mn}(t,t^{\prime})$. Alternatively, $p(t,m)$ can
be obtained as

$p(m,t)=\lim_{t^{\prime}\to-\infty}G(m,t|m^{\prime},t^{\prime}),$ (16)

which is nothing but the long-time limit of a solution for an arbitrary
initial condition.

##  3 Thermodynamics

The dynamics of small systems is inherently stochastic and so is thermodynamic
performance of machines based on these systems. To define work and heat for an
individual stochastic trajectory, $m(t)$, it is useful to consider the first
law of thermodynamics in the form [13, 8]

$du(t)\equiv dU(m(t),t)=\delta w(t)+\delta q(t)=\left.\frac{\partial
U(m,t)}{\partial m}\right|_{m=m(t)}dm(t)+\frac{\partial}{\partial
t}U(m(t),t)dt.$ (17)

Here, $du$ denotes the increase in the system internal energy during the
infinitesimal time-interval $dt$, and $\delta w$ and $\delta q$ are the
corresponding amounts of work and heat transferred _into_ the system. Equation
(17) is valid for overdamped systems. To obtain the corresponding relation for
underdamped system, the potential $U(m,t)$ has to be replaced by the full
Hamiltonian $H(m,t)=U(m,t)+K(m,t)$ including the kinetic energy $K(m,t)$.

As described in the following two sections, the identification of stochastic
work and heat in cyclic and steady-state heat engines significantly differs.
Let us now switch the ordering and start with the cyclic engines.

###  3.1 Thermodynamics of cyclic heat engines

####  3.1.1 Definitions

The two examples in Fig. 2 show that cyclic heat engines are driven by
altering the potential $U(m,t)$, playing role of a piston in a combustion
engine. Variation of the potential is thus the experimental tool for
extracting work from the system, which implies that the output work per cycle
of operation of a cyclic heat engine is defined by the integral

$w_{out}=-\int_{0}^{t_{p}}dt\left.\frac{\partial U(m,t)}{\partial
m}\right|_{m=m(t)}dm(t).$ (18)

This expression is most easily understood for discrete systems such as the
two-level system in Fig. 2. If the system resides in microstate $m$ at time
$t$, the work flux (power)

$\dot{w}(t)=\frac{\delta{w}}{dt}=\frac{\partial}{\partial t}U(m(t),t)$ (19)

flows _into_ /_from_ the system if the energy of microstate $m$ at time $t$,
$U(m,t)$, increases/decreases. A good intuition can be gained by comparing the
energy levels to an occupied/empty massless elevator – if it is occupied by a
heavy passenger and goes down in a gravity field, it can lift a weight and
thus produce work, no work is done if it is empty, and to lift it when
occupied requires work.

Heat flux into the system is given by the second contribution in Eq. (17)

$\frac{\delta{q}(t)}{dt}=\left.\frac{\partial U(m,t)}{\partial
m}\right|_{m=m(t)}\dot{m}(t).$ (20)

The heat flows into the system whenever it changes its microstate and thus it
is closely related to probability current. Using again the elevator analogy,
the heat can be understood as energy associated with jumping between elevators
(microstates) with different energies – jumping to a level with larger energy
require heat from the bath and the energy gained by jumping to lower energies
is transferred into the bath.

For assessing thermodynamic efficiency of cyclic heat engines, it is necessary
to identify which parts of the heat are the input, $q_{in}$, and output,
$q_{out}$, heats. While it always depends on skills of the experimentalists
which part of the heat they can use as a resource [45, 46], one of the
reasonable definitions are

$\displaystyle q_{in}$ $\displaystyle=$
$\displaystyle\int_{0}^{t_{p}}dt\frac{\delta{q}(t)}{dt}\theta[\dot{Q}(t)],$
(21) $\displaystyle q_{out}$ $\displaystyle=$
$\displaystyle-\int_{0}^{t_{p}}dt\frac{\delta{q(t)}}{dt}\theta[-\dot{Q}(t)].$
(22)

Here,

$\dot{Q}(t)\equiv\left<\delta{q}(t)/dt\right>=\int dm\,U(m,t)\dot{p}(m,t)$
(23)

is the average heat flux into the system at time $t$. Similarly as other
average thermodynamic quantities for cyclic heat engines, it can be calculated
by averaging over the limit cycle PDF (16), as detailed above. The symbol
$\theta(x)$ denotes the unit step function. This means that if the heat on
average flows into the system, we count it into the total input heat and vice
versa. If some part of the output heat can be on average recycled, the
input/output heats can be increased/decreased by that amount.

Having defined stochastic work per cycle and input heat, it is natural to
define the stochastic power as $w_{out}/t_{p}$. It might also seem natural to
define the stochastic efficiency as

$\tilde{\eta}=w_{out}/q_{in}.$ (24)

However, it turns out that this is not a well defined stochastic variable.
Namely, all its moments under quite general conditions diverge. In particular,
the average stochastic efficiency $\left<\tilde{\eta}\right>$ is thus rarely
equal to the traditional efficiency

$\eta=W_{out}/Q_{in}$ (25)

defined as the ratio of average performed work $W_{out}=\left<w_{out}\right>$
to the average input heat. One of the exceptions are models which yield
$w_{out}\propto q_{in}$, see Secs. 5.1.2 and 5.2.1. For more details on the
stochastic efficiency, see Sec. 4.3.

####  3.1.2 Fluctuations of stochastic work and heat

To investigate fluctuations of work and heat in cyclic heat engines on
analytical grounds, it is enough to consider the dynamical equation for the
joint process $\\{m(t),w(t)\\}$, which reads

$\frac{\partial}{\partial t}p(m,w,t)=\left[\mathcal{L}(t)-\frac{\partial
U(m,t)}{\partial t}\frac{\partial}{\partial w}\right]p(m,w,t).$ (26)

This equation reflects the fact that while the system resides in state $m$ the
work $\partial U(m,t)/\partial t$ per unit time is done on that. For its
formal derivation, see Refs. [47, 48]. For diffusive systems, Eq. (26) is just
the Fokker-Planck equation [33] corresponding to the stochastic process
$\\{m(t),w(t)\\}$ described by the Langevin Eqs. (9)–(11) and (19).

Both the PDF for stochastic power, $w_{out}/t_{p}$ and the PDF for the
stochastic efficiency (24) can be obtained from the solution
$G(w_{1},m_{1},t_{1}|w_{0},m_{0},t_{0})$ to Eq. (26) for the initial condition
when the system at time $t_{0}$ resides with unit probability in state $m_{0}$
and the work done on it is $w_{0}$, i.e.
$G(w_{1},m_{1},t_{0}|w_{0},m_{0},t_{0})=\delta(w_{1}-w_{0})\delta(m_{1}-m_{0})$.
Unfortunately, this Green’s function can be obtained explicitly only in very
few situations most of which are reviewed in Ref. [49], also see Sec. 5 for
examples with direct applications to heat engines. Alternatively, the PDFs can
be obtained using the numerical techniques mentioned at the ends of Secs. 2.1
and 2.2.

Having the Green’s function, the PDF for the output work reads

$\rho_{w_{out}}=\rho_{w_{out}}(t_{p})=\int dm_{1}\int
dm_{0}\,G(-w_{out},m_{1},t_{p}|0,m_{0},0)\,p(0,m_{0}),$ (27)

where $p(0,m_{0})$ is the state of the system within the limit cycle (14). To
calculate the PDF for the fluctuation efficiency, we need to first obtain the
joint PDF $\rho(w_{out},q_{in})$ for $w_{out}$ and $q_{in}$. Assuming that the
heat on average flows into the system from $t=0$ to $t=t_{h}$ during the
cycle, the Markovian property of the dynamics can be used to obtain the PDF
$\rho(w_{out},q_{in})$ from the Green’s function as

$\rho(w_{out},q_{in})=\int dw\int dm_{2}\int dm_{1}\int
dm_{0}\,\delta\left\\{q_{in}-\left[U(m_{1},t_{h})-U(m_{0},0)-w\right]\right\\}\\\
\times
G(-w_{out},m_{2},t_{p}|w,m_{1},t_{h})\,G(w,m_{1},t_{1}|0,m_{0},0)\,p(0,m_{0}).$
(28)

In words, this equation integrates over all trajectories which yield the heat
$q_{in}$ during the initial part of the of the cycle of duration $t_{h}$ and
provide the total output work $w_{out}$. The PDF $\rho(w_{out},q_{in})$ then
gives the PDFs $\rho_{q_{in}}$ and $\rho_{\tilde{\eta}}$ for input heat and
fluctuating efficiency by the marginalizations

$\displaystyle\rho_{q_{in}}$ $\displaystyle=$
$\displaystyle\rho_{q_{in}}(t_{p})=\int dw_{out}\,\rho(w_{out},q_{in}),$ (29)
$\displaystyle\rho_{\tilde{\eta}}$ $\displaystyle=$ $\displaystyle\int\int
dw_{out}\,dq_{in}\,\delta\left(\tilde{\eta}-\frac{w_{out}}{q_{in}}\right)\rho(w_{out},q_{in}).$
(30)

These PDFs yield all moments of stochastic thermodynamic variables describing
the heat engine in question. The price for this complete information is the
difficulty to determine them analytically. We leave a more detailed discussion
of properties of the PDFs $\rho_{w_{out}}$, $p_{q_{in}}$ and
$\rho_{\tilde{\eta}}$ to Secs. 4.1–4.3 and, to close this section, discuss an
alternative method for evaluation of second moment of output work based just
on solution of the dynamical equation (1).

In fact, the Green’s function $G(m,t\,|\,m^{\prime},t^{\prime})$ of Eq. (1)
and the limit-cycle probability density $p(m,t)$ render all time-correlation
functions of the underlying Markov process $m(t)$ and hence also all moments
of the thermodynamic variables involved [38, 49]. For example the two-time
correlation function

$\left<h[m(t)]\,f[m(t^{\prime})]\right>_{c}=\left\\{\begin{array}[]{l
l}\,\int\int
dm\,dm^{\prime}\,h(m)\,f(m^{\prime})G(m,t|m^{\prime},t^{\prime})p(m^{\prime},t^{\prime})\,\,,&\quad
t\geq t^{\prime}\\\ \,\int\int
dm\,dm^{\prime}\,f(m)\,h(m^{\prime})G(m,t^{\prime}|m^{\prime},t)p(m^{\prime},t)\,\,,&\quad
t\leq t^{\prime}\end{array}\right.$ (31)

yields the second raw moment of the random work (19) done per cycle via the
formula

$\left<w_{\rm out}^{2}\right>=\int_{0}^{t_{p}}{{\rm
d}t^{\prime}}\,\int_{0}^{t_{p}}{\rm
d}t^{\prime\prime}\,\left<\frac{{\partial}{U}[m(t^{\prime}),t^{\prime}]}{{\partial}t^{\prime}}\frac{{\partial}{U}[m(t^{\prime\prime}),t^{\prime\prime}]}{{\partial}t^{\prime\prime}}\right>_{c}\,\,.$
(32)

Higher moments can be obtained using a similar procedure. The resulting
equations, however, contain $2n$ integrations, where $n$ denotes the degree of
the moment, and thus quickly become practically useless. Let us now turn our
attention to fluctuations of work of work and heat in steady-state heat
engines.

###  3.2 Heat and work in steady-state heat engines

Steady-state heat engines operate under time-independent conditions in contact
with several heat bath at different temperatures and thus the work definition
(19) used for cyclic heat engines is not applicable as it gives 0. This means
that all energetic quantities defined for steady-state heat engines, including
work, are of the form (20) related to the motion of particles/excitations in
fixed energy landscapes $U(m)$.

Basic definitions can be most easily understood using the specific example in
Fig. 1, showing an engine based on a single level quantum dot connected to two
leads at different chemical potentials $\mu_{i}$ and temperatures $T_{i}$. The
red transitions are assumed to be caused by the hot reservoir and thus the
corresponding energy intake $q_{in}=\mu_{h}>0$ (in case the system jumps from
the hot lead to the quantum dot) is identified as input heat. Similarly, the
energy needed for jumps from the quantum dot to the cold lead, $\mu_{c}$, is
identified as heat obtained from the cold bath. The corresponding output heat
(positive if energy is transferred into the cold bath) is thus given by
$q_{out}=-\mu_{c}$. The work $w_{out}=\mu_{c}+\mu_{h}=q_{in}-q_{out}$ is then
done by the engine if an electron is transferred from the hot to the cold lead
against the gradient of chemical potential.

Analytical calculation of PDFs for work and heat in this case can be based on
so-called tilted generators. While this technique can be also used for cyclic
heat engines, the time-dependent generators used therein require some extra
care as sketched briefly in Sec. 5.1.1. Here, we explain the technique for the
specific example of the quantum dot in Fig. 1. A general expose is given in
Ref. [42].

Specifically, we show how to construct the joint PDF $p(w_{out},q_{in},t)$ for
output work and input heat

$w_{out}(t)=\int_{0}^{t}dt^{\prime}\dot{w}_{out},\quad
q_{in}(t)=\int_{0}^{t}dt^{\prime}\dot{q}_{in}$ (33)

integrated over the time interval $(0,t)$ during the operation of the heat
engine in the steady-state. Probability that the system residing in microstate
$m$ will during an infinitesimal time interval jump into microstate $n$ is
given by the transition rate $L_{nm}$. Describing the state of the quantum dot
in the steady-state by the vector ${\bf p}=[p_{0},p_{d}]^{\intercal}$ of
probabilities that no/one electron occupies the quantum dot, the rate matrix
in the GME (1) reads

$L=\begin{pmatrix}-L_{dh}-L_{dc}&\phantom{-}L_{hd}+L_{cd}\\\
\phantom{-}L_{dh}+L_{dc}&-L_{dh}-L_{dc}\\\ \end{pmatrix}.$ (34)

As discussed above, the amount of heat $\mu_{h}$ is transferred into the
system if the electron jumps from $\left|h\right>$ to $\left|d\right>$ and
vice versa. Further, $w_{out}=\mu_{c}$ when the electron jumps from
$\left|d\right>$ to $\left|c\right>$ and $w_{out}=-\mu_{h}$ for jumps from
$\left|d\right>$ to $\left|h\right>$. Probability that these jumps occur
during an infinitesimal time interval are described by elements of the matrix
$\exp(dtL)\approx 1+dtL$, where $1$ denotes the unity matrix. Multiplying the
transition rates by PDFs for the corresponding increments to $w_{out}$ and
$q_{in}$, we find that the matrix $1+dtL(w_{out},q_{in})$, with

$L(w_{out},q_{in})=\begin{pmatrix}-L_{dh}-L_{dc}&\delta(w_{out}+\mu_{h})\delta(q_{in}+\mu_{h})L_{hd}+\delta(w_{out}-\mu_{c})L_{cd}\\\
\delta(q_{in}-\mu_{h})L_{dh}+L_{dc}&-L_{dh}-L_{dc}\\\ \end{pmatrix}$ (35)

describes the Green’s function for work and heat transferred during the
infinitesimal time interval $dt$. Namely, the matrix element
$[1+dtL(w_{out},q_{in})]_{mn}$ gives PDF that system starting in microstate
$n$ at time 0 and found in microstate $m$ at time $dt$ performed work
$w_{out}$ and accepted heat $q_{in}$.

The unconditioned PDF that the system in steady-state ${\bf p}$ performs
during the time $dt$ work $w_{out}(dt)$ and accepts heat $q_{in}(dt)$ follows
by the summation
$p(w_{out},q_{in},dt)=\left<+\right|[1+dtL(w_{out},q_{in})]{\bf p}$. For
discrete statespaces, the operator $\left<+\right|$ is just a row vector of
ones, for continuous statespaces, it imposes integration over final
microstates. Markovianity of the stochastic process implies that PDFs for
longer integration times can be obtained by convolutions of the form
$p(w_{out},q_{in},dt)=\left<+\right|[1+dtL(w,q)]\star[1+dtL(w,q)](w_{out},q_{in}){\bf
p}$ over the work and heat variables. For long times, it is thus advantageous
to employ the Laplace transform and instead of the PDF $p[w_{out},q_{in},t]$
calculate its moment generating function. Denoting the transformed variables
for $q_{in}$ and $w_{out}$ as $s_{in}$ and $s_{w}$, respectively, we find that
$p(s_{w},s_{in},t+dt)=\left<+\right|[1+dtL(s_{w},s_{in})]p(s_{w},s_{in},t)$
and thus

$\dot{{\bf p}}(s_{w},s_{in},t)=L(s_{w},s_{in}){\bf p}(s_{w},s_{in},t),$ (36)

where the so-called tilted rate matrix $L(s_{w},s_{in})$ is Laplace
transformed matrix (35):

$L(s_{w},s_{in})=\begin{pmatrix}-L_{dh}-L_{dc}&\exp[(s_{w}+s_{in})\mu_{h}]L_{hd}+\exp(-s_{w}\mu_{c})L_{cd}\\\
\exp(-s_{in}\mu_{h})L_{dh}+L_{dc}&-L_{dh}-L_{dc}\\\ \end{pmatrix}.$ (37)

The equation (36) can be again solved by the matrix exponential. Taking into
account that at time 0 no work and heat were transferred and that the system
operates in the time independent steady-state, we get

${\mathbf{p}}(s_{w},s_{in},t)=\exp\left[L(s_{w},s_{in})t\right]{\mathbf{p}}.$
(38)

The generating function for the input and output heat accepted up to time $t$
then follows by summing over final microstates:

$\chi(s_{w},s_{in},t)=\left<+\right|\exp\left[L(s_{w},s_{in})t\right]{\mathbf{p}}.$
(39)

After the inverse Laplace transform, $\chi(s_{w},s_{in})$ yields the joint PDF
for $w_{out}(t)$ and $q_{in}(t)$. Alternatively, the generating function can
be directly applied for evaluation of raw and central moments of these
variables. Namely the raw moments of input heat read

$\left<[q_{in}(t)]^{n}\right>=(-1)^{n}\left.\frac{\partial^{n}}{\partial
s_{in}^{n}}\chi(s_{w},s_{in},t)\right|_{s_{in}=w_{out}=0}$ (40)

and similarly for $w_{out}(t)$.

At long times the PDF $\rho(w_{out},q_{in})$ can be approximated using the so-
called large deviation theory [50, 42]. Specifically, this theory postulates
that up to sub-exponential contributions the PDF is given by

$\rho(w_{out},q_{in},t)\sim\exp\left[tI\left(\frac{w_{out}}{t},\frac{q_{in}}{t}\right)\right],$
(41)

where $I(x,y)$ is the so-called large deviation or rate function. Let us now
show how it follows from the moment generating function (39). Using Eq. (41)
in the definition of $\chi(s_{w},s_{in},t)$, we find

$\log\chi(s_{w},s_{in},t)=\log\iint
dw_{out}\,dq_{in}\,\exp(-s_{w}w_{out}-s_{out}q_{out})\rho(w_{out},q_{in},t)\sim\\\
=\log\iint
dw_{out}\,dq_{in}\,\exp\left\\{t\left[I\left(\frac{w_{out}}{t},\frac{q_{in}}{t}\right)-s_{w}\frac{w_{out}}{t}-s_{in}\frac{q_{in}}{t}\right]\right\\}\approx\\\
t\max_{w_{out},q_{in}}\left[I\left(w_{out},q_{in}\right)-s_{w}w_{out}-s_{in}q_{in}\right].$
(42)

The last expression follows for large $t$ by the Laplace approximation of the
integral. On the other hand, writing the matrix exponential in the moment
generating function (39) using eigenvalues $\lambda_{i}(s_{w},s_{in})$ and the
corresponding eigenvectors of the tilted rate matrix, we find

$\frac{1}{t}\log\chi(s_{w},s_{in},t)=\frac{1}{t}\log\left\\{\left<+\right|\exp\left[L(s_{w},s_{in})t\right]{\mathbf{p}}\right\\}=\\\
\frac{1}{t}\log\left\\{\sum_{i}c_{i}(s_{w},s_{in})\exp\left[t\lambda_{i}(s_{w},s_{in})\right]\right\\}\approx\lambda_{max}(s_{w},s_{in}).$
(43)

The coefficients $c_{i}$ follow from products of the eigenvectors and vectors
${\mathbf{p}}$ and $\left<+\right|$. In the last step, we assumed large time
$t$ and approximated the sum by the term corresponding to the largest
eigenvalue of the tilted matrix, $\lambda_{max}(s_{w},s_{in})$.

Combining these two results and assuming differentiability of the generating
function, we find using the Legender-Fenchel transform of Eq. (43) that

$I(w_{out},q_{in})=\min_{s_{w},s_{in}}\left[\lambda_{max}(s_{w},s_{in})+s_{w}w_{out}+s_{in}q_{in}\right].$
(44)

The fluctuations of the integrated work and heat are thus for large times
controlled by the largest eigenvalue of the tilted rate matrix.

This section concludes our presentation of general mathematical background
needed for theoretical analysis of cyclic and steady-state heat engines. In
the next section, we review known general results about the behavior of the
above defined PDFs. In Sec. 5, we then present several exactly solvable models
which demonstrate these findings.

##  4 General results

In this section, we sum up known general results concerning heat and work
fluctuations in cyclic and steady-state heat engines. Next section describes
general properties of PDFs for work and heat in cyclic heat engines. Sec. 4.2
shows how the known detailed and integral fluctuation theorems apply to heat
engines. Properties of fluctuating efficiency $\tilde{\eta}$ are reviewed in
Sec. 4.3. And the last Sec. 4.4 of this chapter is devoted to application of
thermodynamic uncertainty relations to heat engines, especially to their
implications on trade-offs between power, power fluctuations, and efficiency
close to reversible efficiency.

###  4.1 Properties of work and heat PDFs in cyclic heat engines

Figure 3: Dynamics and thermodynamics of the two-level system depicted in Fig.
2 slowly driven by the piece-wise linear protocol analyzed in Sec. 5.1.2. a)
The piece-wise linear protocol for difference of energies of the two levels
$E_{u}(t)-E_{d}(t)$. b) The difference $p_{u}(t)-p_{d}(t)$ of occupation
probabilities during the limit cycle (solid line) is for the assumed slow
driving close to the equilibrium Boltzmann PDF (4) corresponding to the
immediate energies and temperatures (blue dashed line for cold isotherm and
red for the hot one). A notable difference occurs only after the sudden
changes in temperate. e) Mean output work, $\left<w_{out}(t)\right>$, heat,
$\left<q(t)\right>$, and internal energy of the system,
$\left<u(t)\right>=\left<U(m,t)\right>$, during the cycle. (c-d) PDFs for
output work and heat into the system integrated over the cold isotherm. (f-g)
PDFs for output work and heat integrated over the whole cycle. The stars show
mean values of the individual PDFs. The triangles (vertical arrows) depict
singular parts of the individual PDFs which are for the slow driving
negligible. The PDFs are plotted over their whole supports. Beyond the
supports, they vanish. Parameters taken $h_{1}=1.0/2$, $h_{2}=2.0$,
$t_{c}=1.0$, $t_{h}=2.0$, $T_{c}=1$, $T_{h}=10$, and $\nu=30$.  Figure 4:
Dynamics and thermodynamics of the two-level system depicted in Fig. 2 driven
by the piece-wise linear protocol analyzed in Sec. 5.1.2. We took $\nu=1$
corresponding to a fast driving. Other parameters and meanings of the
individual curves and symbols are the same as in Fig. 3. Note that the system
is far from equilibrium during the whole cycle (b) and that shapes of all the
PDFs are far from Gaussian (c-d and f-g). In particular, the weights of the
singular parts of the PDFs depicted by the arrows are quite large.

The PDFs for work and heat in cyclic heat engines bear several general
properties [47, 49, 9]. First, for quasi-static cycles, the work PDF is given
by $\delta$-function located at the value of the average work [51, 49].
Noteworthy, the PDF for input heat can be non-trivial even in the quasi-static
limit. To understand this, consider the two level system in Fig. 2. Quasi-
static limit means that the energy levels move so slowly that the system is at
all times in thermodynamic equilibrium (4). From the point of view of motion
of energy levels, the equilibrium is established immediately after the
beginning of the process as the average time for jumps between the energy
levels is vanishingly small compared to the time needed to change the
microstate energies. Hence, the work process is self-averaging and the
resulting PDF does not depend on the initial and final state of the system and
on the parametrization of the protocol. Heat, on the other hand, corresponds
to jumps between the microstates and thus it strongly depends on the initial
and final microstate. For example, for a time-independent protocol, zero
amount of heat is transferred if the system ends up in the initial state,
while ending up in a state with different energy than the initial one
corresponds to a nonzero transferred heat. As described in Sec. 3, work in
steady-state heat engines has properties of heat rather than work. And it is
the described fundamental difference between the strongly self-averaging work
in cyclic heat engines and the boundary states dependent heat-like work in
steady-state heat engines that implies different fluctuations of the two
quantities reviewed in Sec. 4.4. Second, the work PDF for slowly driven but
not quasi-static cycles is near its maximum, located at the average work,
Gaussian [51] 222Interestingly, it turns out that in slowly driven quantum
systems this property is lost if the driving induces coherence in the system
[52, 53].. This can be viewed as a manifestation of the central limit theorem.
Noteworthy, also this result does not hold for heat PDFs. Finally, for
infinitely fast cycles, the work and heat PDFs are given just by $\delta$
functions located at 0 as the system has no time to leave its microstate
during the cycle and the energy of all microstates at the end and at the
beginning of the cycle equal.

For systems with finite maximum changes in microstate energies over the cycle,
the work and heat PDFs in addition acquire finite supports. For work PDF, its
boundaries are determined by maximum and minimum (negative maximum) changes in
energies of the microstates over the cycle. For heat pdf, the support is
bounded by maximum and minimum energy differences between the microstates.
Further, if the microstates are discrete and thus there is a nonzero chance
that the system will spend the whole cycle in the same microstate (i.e. no
jumps during the cycle), the PDFs for work and heat have a singular component
represented by $\delta$-function located at 0 with weight given by the
probability that no jump occurs during the cycle. Work and heat PDFs for non-
cyclic processes have similar properties. Just the $\delta$-functions in work
PDFs do not need to be located at zero and there can be more of them – one for
each microstate with non-zero probability of staying during the whole time
evolution. Concerning heat PDF, the $\delta$-function is always located at
zero as no jumps always yield no heat transfer. For more details on shapes of
work and heat PDFs, see Refs. [47, 49, 9].

Most of the described features of work and heat PDFs are demonstrated in Figs.
3 and 4 using the two level model described in Sec. 5.1.2. Specifically, we
consider the system driven by the protocol (77)-(78) and calculate PDFs for
work $w_{out}(t)=\int_{0}^{t}dt^{\prime}\,\dot{w}(t^{\prime})$ and heat
$q(t)=\int_{0}^{t}dt^{\prime}\,\dot{q}(t^{\prime})$ at the end of the cold
isotherm ($t=t_{c}$) and end of the whole cycle ($t=t_{p}$).

In Fig. 3, we choose a large value of the parameter $\nu$ which controls the
number of jumps between the two levels per cycle and thus small system
relaxation time. The resulting system dynamics is indeed close to equilirbium
as witnessed both by the occupation probabilities converging to the Boltzmann
PDF (b) but also by Gaussian shapes of the work PDF both at $t_{c}$ (c) and at
$t_{p}$ (f). However, note that due to the finite supports of the work PDFs,
they are Gaussian only near their maximums. Heat PDFs, on the other hand,
develop even for this quasistatic process several Gaussian-like peaks, each
corresponding to different combination of initial and final states of the
system. Due to the frequent jumps, the singular parts of the heat and work
PDFs depicted by the arrows (triangles) are in this case negligible. Figure 4
corresponds to the same protocol as Fig. 3 but with small parameter $\nu$. The
resulting dynamics is thus far from equilirbium (b) and the PDFs (c-d and f-g)
are strongly non-Gaussian with significant singular parts. Note that, the work
PDF exhibits a single and heat PDF several discontinuities.

###  4.2 Fluctuation theorem for heat engines

One of the cornerstones of stochastic dynamics is the local detailed balance
condition

$\frac{p_{F}(\Gamma|m_{i})}{p_{R}(\Gamma_{R}|m_{f})}=\exp\left[\Delta
s_{R}(\Gamma)\right],$ (45)

which is the stochastic counterpart of time reversal invariance of microscopic
dynamics [54]. It relates the conditional probability $p_{F}(\Gamma|m_{i})$ to
observe a stochastic forward trajectory $\Gamma$ from microstate $m_{i}$ to
microstate $m_{f}$, the entropy $\Delta s_{R}(\Gamma)$ transferred into the
thermal environment during this process, and the conditional probability
$p_{R}(\Gamma_{R}|m_{f})$ to observe the time-reversed trajectory $\Gamma_{R}$
under time-reversed dynamics. The probabilities are conditioned on the initial
microstates $m_{i}$ and $m_{f}$ of the two trajectories. The detailed balance
condition implies the famous Jarzynski equality [55] and Crooks’ fluctuation
theorem [56].

Let us now derive counterparts of these results for cyclic heat engines
operating with two reservoirs at constant temperatures $T_{h}$ and $T_{c}$,
such as the one investigated in Figs. 3 and 4. Due to the cyclic (or steady-
state) operation regime of the engine, the probabilities of the initial and
final states $m_{i}$ and $m_{f}$ of the process $\Gamma$ in Eq. (45) are drawn
from the same probability distribution $p(m)$. The ratio of unconditioned
probabilities for the forward and reversed path thus reads

$\frac{p_{F}(\Gamma)}{p_{R}(\Gamma_{R})}\frac{p(m_{i})}{p(m_{f})}=\frac{p(\Gamma|m_{i})}{p_{R}(\Gamma_{R}|m_{f})}=\exp\left[\Delta
s_{R}(\Gamma)-\Delta s(\Gamma)\right]=\exp[\Delta s_{tot}(\Gamma)],$ (46)

where $\Delta s(\Gamma)=-\log[p(m_{f})/p(m_{i})]$ is the entropy change in the
system during the forward process and $\Delta s_{tot}(\Gamma)$ is the
corresponding total entropy produced. For a heat engines with two reservoirs,
$\Delta s_{R}(\Gamma)=-{q_{in}(\Gamma)}/{T_{h}}+{q_{out}(\Gamma)}/{Tc}$. Using
the standard procedure [56, 57], e.g. multiplying Eq. (46) by $\delta[\Delta
s-\Delta
s(\Gamma)]\delta[q_{in}-q_{in}(\Gamma)]\delta[q_{out}-q_{out}(\Gamma)]$,
integrating over the trajectories $\Gamma$, employing the one to one
correspondence between $\Gamma$ and $\Gamma_{R}$, and antisymmetry of all the
involved thermodynamic variables with respect to time reversal, we obtain the
fluctuation theorem for heat engines in the form [58, 59]

$\frac{\rho(\Delta s,q_{out},q_{in})}{\rho_{R}(-\Delta
s,-q_{out},-q_{in})}=\exp\left(\Delta s_{tot}\right).$ (47)

If the working medium is at the beginning of the cycle at thermal equilibrium
with the cold bath, $p(m)\propto\exp[-U(m,0)/(k_{B}T_{c})]$ and $\Delta
s(\Gamma)=-\Delta u(\Gamma)/T_{c}$. Then the same procedure yields the
detailed fluctuation theorem for joint PDF for work, input heat, and increase
of internal energy per cycle, $\Delta u$ [57, 60]:

$\frac{\rho(\Delta u,w_{out},q_{in})}{\rho_{R}(-\Delta
u,-w_{out},-q_{in})}=\frac{\rho(w_{out},q_{in})}{\rho_{R}(-w_{out},-q_{in})}=\exp\left(\Delta
s_{tot}\right)=\exp\left[\frac{1}{T_{c}}\left(\eta_{C}q_{in}-w_{out}\right)\right],$
(48)

where $\eta_{C}=1-T_{c}/T_{h}$ denotes the Carnot efficiency. The second
equality in Eq. (48) follows by integrating over $\Delta u$. For a model where
this results can be derived from an explicit joint PDF, see Sec. 5.2.1.

Multiplying by $p_{R}$, dividing by the right-hand side, and integrating over
all the variables, this detailed fluctuation theorem implies the integral
fluctuation theorem

$\left<\exp\left(-\Delta s_{tot}\right)\right>=\left<\exp\left[-\Delta
s-\frac{q_{in}}{T_{c}}(\eta_{C}-\tilde{\eta})\right]\right>=1.$ (49)

These results measure probability that engine cyclic operation decreases
entropy of the universe and thus it highlights the probabilistic character of
the second law. Namely, probability of $\Delta s_{tot}<0$ decays exponentially
with $|\Delta s_{tot}|$. Note, however, that stochastic efficiencies
$\tilde{\eta}>\eta_{C}$ are not necessary unlikely for cycles where change in
the system entropy is negative. This effect diminishes if heat and work are
measured over multiple cycles – while heat and work are extensive in the
number of cycles, the entropy change is not.

The fluctuation theorems thus generalize the Carnot result

$\eta\leq\eta_{C},$ (50)

which follows from Eq. (49) after applying the Jensen’s inequality
$\exp(\left<x\right>)\leq\left<\exp(x)\right>$ and noticing that for cyclic
processes $\left<\Delta s\right>=0$. Furthermore, the detailed fluctuation
theorem (47) betrays under quite general conditions interesting symmetry of
probability distribution for fluctuating efficiency discussed in the following
section, and can be used as one of the starting points for derivation of
thermodynamic uncertainty relations, see Sec. 4.4.

###  4.3 Fluctuating efficiency

The previous section reviews that the Carnot’s theorem, embodied in Eq. (50),
can be generalized by applying the detailed balance condition, or fluctuation
theorem for entropy production, (46). However, in classical thermodynamics the
second law and thus the definition of entropy are implications of the Carnot’s
theorem. One should thus ask if there is a generalization of Eq. (50) based on
the properties of the fluctuating efficiency defined as the ratio of
stochastic work and heat.

As in the previous section, consider a heat engine (either cyclic or steady-
state) operating with two heat reservoirs at constant temperatures $T_{h}$ and
$T_{c}$. The classical and stochastic efficiencies $\eta$ and $\tilde{\eta}$
per cycle of operation of the cyclic heat engine are given by Eqs. (24) and
(25). Counterparts of these definitions for steady-state heat engines should
be calculated using heat and work fluxes in the steady-state:
$\eta=\left<\dot{w}_{out}\right>/\left<\dot{q}_{in}\right>$ and
$\tilde{\eta}=\dot{w}_{out}(t)/\dot{q}_{in}(t)$. Regardless details of
definitions of work and heat in the definition of $\tilde{\eta}$, the joint
PDF $\rho(w_{out},q_{in})$ yields the efficiency PDF according to [61, 62]

$\rho(\tilde{\eta},t)=\int\int
dw_{out}dq_{in}\,\delta\left(\tilde{\eta}-\frac{w_{out}}{q_{in}}\right)\rho(w_{out},q_{in})=\\\
\frac{1}{\tilde{\eta}^{2}}\int
dw_{out}|w_{out}|\rho\left(w_{out},\frac{w_{out}}{\tilde{\eta}}\right).$ (51)

This results suggests that if the integral on the right-hand side does not
vanish for $\tilde{\eta}\to\pm\infty$, $\rho(\tilde{\eta},t)$ exhibits heavy
tails and its moments $\left<\tilde{\eta}^{k}\right>$, $k\geq 1$, diverge. An
example where the integral can be evaluated explicitly are models with
Gaussian fluctuations of all thermodynamic currents [63, 64, 65, 66, 67, 68,
69, 70]. Then, it indeed holds

$\rho(\tilde{\eta})\sim\frac{1}{\tilde{\eta}^{2}},\qquad|\tilde{\eta}|\to\infty,$
(52)

yielding diverging moments of the efficiency, including the mean value, i.e.
$\left<\tilde{\eta}\right>\neq\eta$. Experimentally, this means that
fluctuations of the empirical average $\left<\tilde{\eta}\right>$ diverge with
the number of experimental trajectories. The power-law tails (52) arise
because the stochastic input heat in the denominator of $\tilde{\eta}$ can be
very close to zero even for relatively large values of $|w_{out}|$.

Figure 5: Large deviation functions for fluctuating efficiency for the two-
level system depicted in Fig. 2 driven by the piece-wise constant protocol
analyzed in Sec. (5.1.1). The symmetric protocol (a-b) implies the large
deviation function with minimum at the reversible efficiency $\eta_{C}$ (solid
line in c) and maximum at the standard efficiency (25) (dotted line). Large
deviation functions for the time-asymmetric (solid blue line) and the
corresponding time-reversed (dot dashed red line) protocols (d-e) intersect at
the reversible efficiency (solid line in f). Maximums of these large deviation
functions (dotted and dashed lines in c) mark the corresponding standard
efficiencies $\eta$. We use the same parameters as Ref. [61]: $\Delta
E=2.375$, $T_{c}=2$, $T_{h}=14$, $B=0.05$, and $t_{p}=10$.

Beyond the nonexistence of moments, the PDF for the fluctuating efficiency,
defined using variables per cycle for cyclic heat engines or energy fluxes for
steady-state heat engines, bares no special properties and thus this variable
is not of much use. This, however, changes if one instead considers
fluctuating efficiencies evaluated from work and heat measured over many
cycles of the cyclic heat engines or long times in steady-state heat engines:

$\tilde{\eta}(t)=\frac{w_{out}(t)}{q_{in}(t)}.$ (53)

Here, $w_{out}(t)$ and $q_{in}(t)$ are defined as integrals (33) over
$\dot{w}_{out}(t)$ and $\dot{q}_{in}(t)$ from 0 to $t$. For cyclic heat
engines, the integration time is a whole number multiple of the cycle period,
$t=nt_{p}$. Note that
$\eta=\eta(t)=\left<w_{out}(t)\right>/\left<q_{in}(t)\right>$. While the PDF
for this definition of $\tilde{\eta}$ still obeys the properties described by
Eqs. (51) and (52), it acquires several interesting new features.

They can be derived from the specialized version of the fluctuation theorem
for heat engines (48). Let us now assume that (i) the joint PDF for the
integrated work and heat can be for large times written using the large
deviation form $\rho(w_{out},q_{in},t)\sim\exp[tI(w_{out}/t,q_{in}/t)]$, (ii)
$\rho(w_{out},q_{in},t)$ obeys Eq. (48), and (iii) the long-time limit of the
corresponding scaled cumulant generating function (42),

$\lim_{t\to\infty}\frac{1}{t}\log\xi(s_{w},s_{in},t)=\lim_{t\to\infty}\frac{1}{t}\left<\exp(-s_{w}w_{out}-s_{in}q_{in})\right>,$
(54)

is a smooth function of its arguments and has a unique maximum. Then the PDF
for the stochastic efficiency fulfills the large deviation principle,
$\rho_{\tilde{\eta}}\sim\exp(tI_{\tilde{\eta}})$, and its rate function

$I_{\tilde{\eta}}=\max_{q_{in}}I\left(\tilde{\eta}\frac{q_{in}}{t},\frac{q_{in}}{t}\right)$
(55)

shows interesting properties. Namely, for cyclic heat engines driven by time-
symmetric protocols and steady-state heat engines the position of its maximum
is located at the standard efficiency $\eta$, and the position of its minimum
at the reversible efficiency $\eta_{C}$ [71, 72, 59]. For time-symmetric
protocols, $\eta_{C}$ ($\eta$) thus represent the least (most) likely value of
efficiency $\tilde{\eta}(t)$ for large $t$. For non-symmetric protocols, the
position of the maximum of $I_{\tilde{\eta}}$ is still located at $\eta$, but
the minimum has no special meaning anymore. Instead, the reversible efficiency
$\eta_{C}$ mark the intersection point of rate functions for the forward and
for the time reversed protocols for the engine [61].

As an illustration, we plot in Fig. 5 rate functions for the fluctuating
efficiency (53) for the two-level system driven by a time symmetric (a-c) and
a time-asymmetric (d-e) protocols. Details of the calculations are described
in Sec. 5.1.1. The rate function corresponding to the symmetric driving (c)
exhibits a global maximum at the corresponding standard efficiency $\eta$,
similarly as the rate functions for the forward and time-reversed protocols in
d. The global minimum of the rate function for the symmetric driving and the
intersection of the rate functions for the forward and backward protocols are
then indeed located at $\tilde{\eta}=\eta_{C}$. This example is also
interesting from the point of view of breaking the assumptions of the
presented theory. Namely, all the time-asymmetric protocols composed of only 4
constant segments yield in this case stochastic output work proportional to
the input heat. The resulting fluctuating efficiency thus for all trajectories
equal to the standard efficiency and the corresponding PDF
$\rho_{\tilde{\eta}}=\delta(\tilde{\eta}-\eta)$ does not obey the large
deviation principle. A similar situation occurs in the Brownian heat engine
driven by a piece-wise constant protocol discusses in Sec. 5.2.1.

The position of the maximum of $I_{\tilde{\eta}}$ at $\tilde{\eta}=\eta$
follows from the assumption that quantities $w_{out}(t)$, $q_{in}(t)$, and
$\tilde{\eta}(t)$ obey the large deviation principle. Since $w_{out}(t)/t$ and
$q_{in}(t)/t$ converge with increasing $t$ towards their stationary mean
values, the PDF $\rho(\tilde{\eta},t)$ concentrates around the point
$\eta=\langle w_{out}\rangle/\langle q_{in}\rangle$ as $t\to\infty$. As
obvious from its dependence on symmetry of the protocol, the value of
$I(\eta_{C})$ corresponding to the reversible efficiency requires in addition
to the validity of the large deviation principle also the symmetry imposed by
the specialized fluctuation theorem (48) [59, 61, 71, 72].

As an example, consider the situation with a time-symmetric protocol [71, 72,
59], when the forward and backward PDFs in Eq. (47) equal. The fluctuating
efficiency is given by the reversible efficiency, $\tilde{\eta}=\eta_{C}$, for
reversible trajectories with $\Delta s_{tot}(t)=0$. In this case, Eq. (47)
implies the symmetry $\rho(w_{out},q_{in},t)=\rho(-w_{out},-q_{in},t)$ of the
PDF for work and heat and thus also of the corresponding rate function. The
rate function $I(\eta_{C}q_{in}/t,q_{in}/t)$ is thus an even function in
$q_{in}$ with an extreme at $q_{in}=0$. Equation (55) further implies that
$I_{\tilde{\eta}}(\tilde{\eta})\geq I(0,0)$ and thus the rate function for the
fluctuating efficiency has a global minimum at $\tilde{\eta}=\eta_{C}$. This
proves that $\eta_{C}$ is the least likely efficiency in the long-time limit
[59, 71, 72]. For a similar argument for time-asymmetric protocols, see Ref.
[61].

At first glance, Eq. (48) universally follows from the exact fluctuation
theorem (47) for large integration times $t$ when the time-nonextensive
entropy change in the system $\Delta s$ and internal energy change $\Delta u$
become negligible compared to the time-extensive integrated work and heat.
However, Ref. [73] explains that the reality is more subtle and the boundary
terms $\Delta u$ and $\Delta s$ can limit the region of convergence of the
scaled cumulant generating function (54). This can induce discontinuities in
the derivatives of the rate function $I(w_{out}/t,q_{in}/t)$ and break its
symmetry properties strongly enough that the value $I(\eta_{C})$ looses its
above described special meaning. For details, see Ref. [73].

Besides the presented general conclusions, the efficiency statistics has been
evaluated for several model situations [74, 75, 76], addressing e.g. the role
of coupling between system’s internal degrees of freedom [77], many-particle
gas models of a cylinder enclosed by a piston and coupled to a thermostat
[78], and a system of interacting unicyclic machines undergoing a phase
transition [79]. For feedback cooling techniques, the concept of fluctuating
efficiency was reformulated in terms of fluctuating information flows [80, 81,
82]. The fluctuating efficiency was also introduced for quantum machines, see
e.g. Refs. [83, 84, 85, 86, 87] for models of quantum dots and/or
thermoelectric junctions, and Ref. [88] for an example of quantum periodic
cycle.

As for experiments, to the best of our knowledge, there exist only a few works
reporting measurements of efficiency fluctuations [81, 82, 89].

###  4.4 Thermodynamic uncertainty relations for heat engines

Thermodynamic uncertainty relations (TURs) are inequalities that relate
relative fluctuations of a certain observable and the corresponding total
entropy production. They are thus frequently interpreted as thermodynamic
upper bounds on precision of measurements of the observable. Since their
discovery [90], TURs have been proved for several Markovian models [91, 92,
93] and from fluctuation theorems [94, 95, 96]. For recent reviews on TURs,
see Refs. [19, 20, 21].

In their original form [90, 97]

$\frac{J^{2}}{D}\leq\sigma,$ (56)

the TURs relate the average current $J=\lim_{t\to\infty}o(t)/t$ of a time-
extensive observable $o(t)$, its dispersion
$D=\lim_{t\to\infty}\langle[o(t)/t-J]^{2}t/2$, and the total average entropy
production rate $\sigma$. Examples of the observable $o(t)$ are the integrated
output work $w_{out}(t)$ and input heat $q_{in}(t)=w_{out}(t)+q_{out}(t)$
(33), which invites application of the TUR (56) to steady-state heat engines.

This application [97] uncovered a trade-off between power, power fluctuations,
and efficiency of these machines. Namely, introducing output power of a
steady-state heat engine by $P=\lim_{t\to\infty}w_{out}(t)/t$, defining the so
called constancy

$\Delta_{P}=\lim_{t\to\infty}\left<[w_{out}(t)/t-P]^{2}\right>t,$ (57)

and noticing that the entropy production rate for a steady-sate heat engine in
contact with two reservoirs at temperatures $T_{c}$ and $T_{h}$ obeys
$\sigma=\lim_{t\to\infty}[q_{out}(t)/(tT_{c})-q_{in}(t)/(tT_{h})]=P(\eta_{C}-\eta)/(T_{c}\eta)$,
the TUR (56) can be written in the form [98, 97]

$\eta\leq\frac{\eta_{C}}{1+2PT_{c}/\Delta_{P}}.$ (58)

It implies that the efficiency of a steady-state heat engine producing a well
defined output power (non-negligible $P/\Delta_{P}$) is always smaller than
$\eta_{C}$. The engine can work close to $\eta_{C}$ only if either $P$
vanishes, power fluctuations $\Delta_{P}$ diverge, or the engine operates at
extremely low $T_{c}$.

As already noted in Ref. [97] based on the analysis of Brownian clocks [99],
this result does not imply the same behavior for cyclic heat engines. The
reason is that the TUR (56) applies only to observables related to energy/mass
transport and it does not hold for output work in cyclic heat engines (18). As
discussed in Secs. 3.2 and 4.1, work in steady-state heat engines has
properties of heat rather than work in cyclic heat engines and has much
different statistics. Indeed, the cyclic heat engines can operate arbitrarily
close to the Carnot efficiency and deliver a well defined positive output
power if they are operated quasi-statically [7] by tuning the relaxation time
of the system.

To illustrate this striking difference between the performance of steady-state
and cyclic heat engines, we plot in Fig. 6 power, efficiency and power
fluctuations as functions of a scaling parameter $\Omega$ yielding reversible
efficiency $\eta_{C}$ in the limit $\Omega\to\infty$ for paradigmatic examples
of the two types of machines. Namely, Figs. a-c show performance of the simple
three-level model of steady-state solar cell considered in Ref. [97] and
reviewed in Sec. 5.3. For an illustration using a steady-state thermoelectric
heat engine, see Ref. [100]. Figures d-f correspond to the Brownian heat
engine based on the breathing parabola model discussed in Ref. [7] and
reviewed in Sec. 5.2.2.

Panels (a)-(c) verify that, while reaching the reversible efficiency
$\eta_{C}$ (b), the output power of the solar cell saturates (a) and its
fluctuations diverge (c). Furthermore, for large values of $\Omega$ this model
saturates the inequality $\eqref{eq:eta_bound_TUR}$, which can be also written
as

$\frac{\Delta_{P}}{P}\geq\frac{2T_{c}\eta}{\eta_{C}-\eta}=\frac{2P}{\sigma},$
(59)

see the overlapping solid, dotted, and dashed lines. On the other hand, as the
efficiency of the Brownian heat engine converges to $\eta_{C}$ (e), its power
increases (d) and the power fluctuations saturate (f). The saturation values
can be evaluated analytically using calculations similar to those performed in
Sec. 5.2.1. The result is

$\frac{\Delta_{P}}{P}=\frac{\Delta
S}{k_{B}^{2}T_{h}\eta_{C}},\quad\frac{\sigma_{P}}{P}=\frac{\Delta S}{k_{B}},$
(60)

where $\sigma_{P}^{2}=\left<w_{out}^{2}-W_{out}^{2}\right>/t_{p}^{2}$ denotes
the variance of the output power, and $\Delta S$ the entropy change in the
system during hot the isotherm. For details, see Sec. 5.2.2 and Ref. [7].

Figure 6: Power and power fluctuations close to the reversible efficiency
$\eta_{C}$ for steady-state and cyclic heat engines. (a-c) Performance of a
simple model solar cell operating as a steady-state heat engine, depicted in
Fig. 8 and described in Sec. 5.3 and Ref. [97]. As the efficiency reaches
$\eta_{C}$ (b), the power saturates (a) and its fluctuations diverge as
dictated by Eqs. (59). Parameters taken: $x_{c}=10$, $x_{h}=0.2$, $x_{ru}=1$,
and $x_{ru}=1.2+7/\Omega$. (d-f) Performance of the cyclic Brownian heat
engine depicted in Fig. 2 and detailed in Sec. 5.2.2 and Ref. [7], including
the used parameters. With $\eta\to\eta_{C}$ (e), its power increases (d) and
power fluctuations saturate to the values given by Eq. (60) (f).

Counterparts of the bound (58) valid for periodic processes were derived by
introducing a set of variational parameters formally reminiscent of occupation
probabilities for the individual microstates [101] and for slowly driven
systems [102, 103]. Another family of inequalities for entropy production
providing bounds on efficiency of cyclic heat engines was derived in Ref.
[104]. A recent comparative study of TURs for periodic systems performed for a
specific model of driven electron pump can be found in Ref. [105]. All these
results are in agreement with the conclusions of Ref. [7], which rely on two
broadly fulfilled assumption: (i) Dynamics of the system is described by the
GME (1). (ii) For a constant protocol, the GME has a unique (equilibrium)
stationary solution. The same assumptions are required for validity of the
Jarzynski identity [106], which can thus be used as a check whether given
system can be used as a basis of a cyclic heat engine operating close to
reversible efficiency with well defined nonzero output power.

To the best of our knowledge, TURs have not yet been tested experimentally in
realizations of microscopic machines. However, several utilizations of TURs to
infer entropy production have been proposed recently [20, 107, 108, 109].

##  5 Exactly solvable models of cyclic heat engines

In addition to being interesting by themselves, exactly solvable models play a
fundamental role in development of stochastic thermodynamics. The general
results such as fluctuation theorems for entropy production and thermodynamic
uncertainty relations were first established on a particular model. Simple
model systems also help us to establish an intuitive understanding of complex
physics out of equilibrium. Moreover, actual applications of theory to
experiments are frequently tested by means of experimental realizations of
such simple and in theory solvable models.

Similarly as in classical statistical physics, the paradigmatic examples of
discrete and continuous systems where analytical solutions in stochastic
thermodynamics can be obtained are two-level systems and harmonic oscillators.
Known results for the former are discussed in the next section. To the latter
is devoted Sec. 5.2. Finally, in Sec. 5.3 we review a simple steady-state
model of solar cell used to demonstrate validity of TURs in the previous
section.

###  5.1 Two-level system

The two-state Markov process has a prominent position both in theory and
experiment [110, 111] as a minimal non-trivial model with discrete energy
spectrum that describes well more complicated setups for low enough
temperatures. In practice, such processes can represent dynamics of a defect
in crystal [110, 111] and a single-level quantum dot or a tunnel junction
[112, 113]. They also serve as a general coarse-grained description of
transition dynamics in systems with time-dependent free-energy landscapes with
two sharp minima, such as in studies of stochastic resonance [114] or
macromolecules with two conformational states [25, 115].

The dynamics (1) of the two-level model is exactly solvable for an arbitrary
protocol [9] and thus one can evaluate analytically first two moments of work
and heat using the approach suggested in Eqs. (31) and (32). However, exact
solutions for work and heat PDFs are known only for two special classes of
protocols: piece-wise constant and piece-wise linear. Although the solutions
for piece-wise linear protocols for microstate energies are the more involved
from the two, they were obtained earlier in a series of papers by Chvosta et
al. [47, 116, 9, 117]. These solutions are remarkable especially because all
other known solution were obtained for a piece-wise constant driving.

Exact solutions for specific piece-wise constant protocols were obtained in
Refs. [118, 59] and applied in study of fluctuating efficiency [72, 61],
current fluctuations [119], time-reversal symmetric Crooks and
Gallavotti–Cohen fluctuation relations [120], and thermodynamic uncertainty
relation [105]. Moment-generating function for work was also discussed
recently in [121].

In the next section, we review the general approach to piece-wise constant
protocols in discrete systems. Review of results for piece-wise linear
protocols is given in Sec. 5.1.2.

####  5.1.1 Piece-wise constant protocol

Consider the two-level system depicted in Fig. 2 with energy levels and
temperature varying according to a periodic piece-wise constant protocol.
Several examples of such protocols are given in Fig. 5a-b and d-e. However, it
is important to note that an arbitrary protocol can be approximated by a
piece-wise constant driving [42, 122] and thus the following approach can be
applied for extracting information on work and heat fluctuations in
arbitrarily driven two-level system described by the GME (1). Moreover, the
nature of key steps of the presented technique don’t change with increasing
number of microstates and thus it applies for arbitrary discrete systems
[120]. Finally, Ref. [42] shows that overdamped continuous systems (8) can be
well approximated by discrete systems and thus the presented method yields
work and heat fluctuations also for overdamped Brownian heat engines.

During each constant segment of the protocol, the transition rate matrix is
constant. We employ the transition rates presented in Ref. [61], where the
rate matrix for the $i$th segment reads

$L_{i}=\begin{pmatrix}-\exp(B/T_{i})&\exp-[(B-E_{i})/T_{i}]\\\
\exp(B/T_{i})&-\exp-[(B-E_{i})/T_{i}]\\\ \end{pmatrix}.$ (61)

Here $T_{i}=T(t)$, $B-E_{i}=U(u,t)=E_{u}(t)$, $t\in]t_{i},t_{i+1}[$. The jumps
in the protocol occur at times $t_{i}$, $i=1,\dots,n+1$, and the energy
$U(d,t)=E_{d}(t)$ of the down microstate $\left|d\right>$ is set to zero
during the whole cycle. We assume that durations of all the $n$ constant
segments of the protocol equal, i.e. $t_{i+1}-t_{i}=t_{p}/n$, $i=1,\dots,n$.
Finally, the protocol is time-periodic and thus $T_{0}=T_{n}$ and similarly
for $E_{i}$.

We will now show how to calculate the generating function for output work (18)
and input heat (21) and also the corresponding rate function. We will employ a
strategy analogous to that with tilted rate matrices described for steady-
state heat engines in Sec. 3.2.

If the system dwells at the time $t_{i}$ of the $i$th jump in the upper level,
it performs work $-(E_{i}-E_{i-1})$. Since $E_{d}(t)=0$, these are the only
occasions when work is done. The propagators during the jumps are unity
matrices because the system has no time to change its state. The Laplace
transform of PDF for work done during the jumps conditioned on initial and
final states is thus described by the matrix

$G_{i}(s_{w})=\begin{pmatrix}1&0\\\ 0&-\exp[(E_{i}-E_{i-1})s_{w}]\\\
\end{pmatrix},$ (62)

where $s_{w}$ denotes the Laplace variable corresponding to $w_{out}$.
Specifically, the matrix element $[L_{i}(s_{w})]_{kl}$ gives the generating
function for the case when the system was before the jump at microstate $l$
and after the jump at microstate $k$.

Heat is absorbed from reservoirs whenever the system jumps between the
microstates $d$ and $u$. Namely $E_{i}$ if it jumps from $d$ to $u$ at time
$t$ and $-E_{i}$ for the opposite jump. The heat transferred during the
constant segments of the protocol equals the difference in the internal energy
$u$ of the system. Therefore, we do not need to tilt the rate matrix (61),
but, similarly as above for work, we can tilt directly the propagator
$G_{i}=\exp(L_{i}t_{p}/n)$ for the whole $i$th segment. The corresponding
conditioned generating function for the input heat reads

$G_{i}(s_{in})=\begin{pmatrix}[G_{i}]_{dd}&\exp(-E_{i}s_{in})[G_{i}]_{du}\\\
\exp(E_{i}s_{in})[G_{i}]_{ud}&[G_{i}]_{uu}\\\ \end{pmatrix}.$ (63)

The Chapman-Kolmogorov equation implies that the propagator $G$ for the whole
cycle follows from the propagators for the individual segments $G_{i}$ as the
matrix product

$G=G_{n}G_{n}\dots G_{1},$ (64)

which is thus equal to the ordered matrix exponential
$G=\exp_{\rightarrow}[\int_{0}^{t_{p}}dt^{\prime}L(t^{\prime})]$. In a similar
manner, the tilted propagators (62) and (63) yield the conditioned moment
generating function $G(s_{w},s_{in})$ for output work $w_{out}$ and input heat
$q_{in}$ per cycle:

$G(s_{w},s_{in})=G_{n+1}(s_{w})\tilde{G}_{n}(s_{in})G_{n}(s_{w})\dots\tilde{G}_{1}(s_{in})G_{1}(s_{w}).$
(65)

To take into account just the heat flowing into the system from the hot bath,
$\tilde{G}(s_{k})$ is given by $G(s_{k})$ if $T_{k}=T_{h}$ and $G_{k}$
otherwise.

The matrix $G(s_{w},s_{in})$ can be used for calculation of generating
function for heat and work measured over $k\geq 1$ cycles as

$\chi_{k}(s_{w},s_{in})=\left<+\right|[G(s_{w},s_{in})]^{k}{\mathbf{p}},$ (66)

where the state of the system at the beginning of the cycle, $\mathbf{p}$, is
determined by the periodicity condition ${\mathbf{p}}=G{\mathbf{p}}$. This
generating function can be either used to calculate moments of work and heat
as in Eq. (40), or for calculation of the PDF for work and heat using the
inverse Laplace transform. Instead, we will use it for derivation of the rate
function for work and heat, which we then apply to calculation of the rate
function for stochastic efficiency.

The rate function $I(w_{out},q_{in})$ can be obtained using a similar
procedure as Eq. (44). The only difference in the derivation is that now the
tilted propagator has the form $[U(s_{w},s_{in})]^{k}$ instead of
$\exp[tL(s_{w},s_{in})]$. However, writing
$[U(s_{w},s_{in})]^{k}=\exp\left[k\log U(s_{w},s_{in})\right]$ immediately
implies

$I(w_{out},q_{in})=\min_{s_{w},s_{in}}\left[\log\lambda_{max}(w_{in},s_{out})+s_{in}q_{in}+s_{w}w_{out}\right].$
(67)

If the stochastic output work and input heat are not proportional to each
other, the generating function $I(w_{out},q_{in})$ can be used for calculation
of generating function for the fluctuation efficiency (24) through the
transformation

$I_{\tilde{\eta}}=\max_{q_{in}}I(\tilde{\eta}q_{in},q_{in}),$ (68)

which follows from applying the Laplace approximation in the marginalization
(30) of the two-dimensional PDF.

To demonstrate the general features of the rate function for efficiency
described in Sec. 4.3, we calculated rate functions for the symmetric protocol
composed of 5 segments and forward and time-reversed 4 segments protocols
depicted in Fig. 5. Interestingly, for arbitrary symmetric 4 branches
protocol, $w_{out}$ and $q_{in}$ are proportional to each other,
$\tilde{\eta}$ is $\delta$-distributed, and the rate function
$I_{\tilde{\eta}}$ does not exist.

####  5.1.2 Piece-wise linear protocol

The PDF for work done on a two-level system by linearly varying its energy
levels in time was derived for two types of transition rates in Refs. [47,
116]. Subsequently, the method has been generalized to piece-wise constant
protocols and applied to derivation of heat and work PDFs for two-stroke
cyclic heat engine [9, 117]. Below, we review the main results for the heat
engine. For a more detailed review, see Ref. [49].

The engine was studied for the Glauber transition rates

$\displaystyle L_{du}(t)$ $\displaystyle=$
$\displaystyle\frac{\nu}{1+\exp\left\\{-\beta\left[E_{u}(t)-E_{d}(t)\right]\right\\}},$
(69) $\displaystyle L_{ud}(t)$ $\displaystyle=$
$\displaystyle\frac{\nu}{1+\exp\left\\{\beta\left[E_{u}(t)-E_{d}(t)\right]\right\\}},$
(70)

where the parameter $\nu$ controls relaxation time of the two-level system and
$E_{m}(t)=U(m,t)$, $m=u,d$ are energies of the two levels. Let us now consider
the purely linear protocol for energy levels and constant protocol for bath
temperature:

$E_{u}(t)=h+b(t-t^{\prime}),\quad E_{d}(t)=-E_{u}(t),\quad T(t)=T,$ (71)

where $h$ and $b$ are constants, and $t\geq t^{\prime}$. For $b>0$, the matrix
elements $G_{mn}(w,t|w^{\prime},t^{\prime})=G(w,m,t|w^{\prime},n,t^{\prime})$
of the Green’s function for the partial differential equation (26) are given
by [9]

$\displaystyle\frac{G_{uu}}{2\beta}$ $\displaystyle=$
$\displaystyle\left[\frac{1+u}{u+\mathrm{e}^{\widetilde{\tau}}}\right]^{a}\,\delta(\widetilde{\tau}-\widetilde{\eta})-\frac{\widetilde{\theta}\,aux^{a}(1-x)y}{2}$
$\displaystyle\times$
$\displaystyle\left[\frac{~{}{{}_{2\,}\\!\mathrm{F}\\!_{\,1}}\left(1+a,-a;1;\phi\right)}{(1+ux)^{1+a}(1+uy)^{1-a}}-(1+a)(1+u)(1+uxy)\frac{~{}{{}_{2\,}\\!\mathrm{F}\\!_{\,1}}\left(2+a,1-a;2;\phi\right)}{(1+ux)^{2+a}(1+uy)^{2-a}}\right],$
$\displaystyle\frac{G_{ud}}{2\beta}=\frac{\widetilde{\theta}\,aux^{a}y}{2}\frac{~{}{{}_{2\,}\\!\mathrm{F}\\!_{\,1}}\left(a,1-a;1;\phi\right)}{(1+ux)^{a}(1+uy)^{1-a}},$
(73)
$\displaystyle\frac{G_{du}}{2\beta}=\frac{\widetilde{\theta}\,ax^{a}}{2}\frac{~{}{{}_{2\,}\\!\mathrm{F}\\!_{\,1}}\left(1+a,-a;1;\phi\right)}{(1+ux)^{1+a}(1+uy)^{-a}},$
(74) $\displaystyle\frac{G_{dd}}{2\beta}$ $\displaystyle=$
$\displaystyle\left[\frac{1+u\exp(-\widetilde{\tau})}{1+u}\right]^{a}\,\delta(\widetilde{\tau}+\widetilde{\eta})+\frac{\widetilde{\theta}\,aux^{a}(1-y)}{2}$
$\displaystyle\times$
$\displaystyle\bigg{[}\frac{~{}{{}_{2\,}\\!\mathrm{F}\\!_{\,1}}\left(a,1-a;1;\phi\right)}{(1+ux)^{1+a}(1+uy)^{1-a}}-(1-a)(1+u)(1+uxy)\frac{~{}{{}_{2\,}\\!\mathrm{F}\\!_{\,1}}\left(1+a,2-a;2;\phi\right)}{(1+ux)^{2+a}(1+uy)^{2-a}}\bigg{]}.$

To shorten the notation, we have above defined the reduced work and time
variables $\eta=2\beta w$ and $\tau=\Omega t$, with $\Omega=2\beta|b|$. The
dimensionless combination $a=\nu/\Omega$ measures the degree of
irreversibility of the process. We have also introduced the abbreviations
$\widetilde{\tau}=\tau-\tau^{\prime}$, $\widetilde{\eta}=\eta-\eta^{\prime}$,
$\widetilde{\theta}=\theta(\widetilde{\tau}+\widetilde{\eta})\theta(\widetilde{\tau}-\widetilde{\eta})$,
where $\theta(z)$ is the unit step function, $u=\exp(-2\beta h|b|/b-\Omega
t^{\prime})$, $x=\exp\left[-(\widetilde{\tau}+\widetilde{\eta})/2\right]$,
$y=\exp\left[-(\widetilde{\tau}-\widetilde{\eta})/2\right]$, and

$\phi=-u\,\frac{1-x}{1+ux}\,\frac{1-y}{1+uy}\,\,.$ (76)

Finally, $\delta(z)$ denotes the Dirac function and
$\mathrm{{}_{2}F_{1}}(\alpha,\beta;\gamma;z)$ is the Gauss hypergeometric
function [123]. The Green’s function for $b<0$ follows after interchanging
indexes $u$ and $d$ in the Eqs. (5.1.2)–(5.1.2).

For the engine, we assume the piecewise linear periodic protocol:

$\displaystyle E_{u}(t)=h_{1}+\frac{\displaystyle h_{2}-h_{1}}{\displaystyle
t_{c}}t,\quad T(t)=T_{c},\quad t\in[0,t_{c}],$ (77) $\displaystyle
E_{u}(t)=h_{2}-\frac{\displaystyle h_{2}-h_{1}}{\displaystyle
t_{h}}\,(t-t_{c}),\quad T(t)=T_{h},\quad t\in[t_{c},t_{p}),$ (78)

and $E_{d}(t)=-E_{u}(t)$, where $t_{p}=t_{c}+t_{h}$. Invoking the Chapman-
Kolmogorov equation, the Green’s function for work during the whole cycle
reads

$G(w,t|w^{\prime},t^{\prime})=\begin{cases}G^{c}(w,t|w^{\prime},t^{\prime}),&t^{\prime}<t<t_{c},\\\
\displaystyle\int
dw^{\prime},G^{h}(w,t|w^{\prime},t_{c})G^{c}(w^{\prime},t_{c}|0,0),&t^{\prime}<t_{c}<t<t_{p},\\\
G^{h}(w,t|w^{\prime},t^{\prime}),&t_{c}<t^{\prime}<t<t_{p},\end{cases}$ (79)

where $G^{h}$ and $G^{c}$ are the Green’s functions for the first (cold) and
second (hot) branch of the cycle, respectively. Having the Green’s function
for work, the PDFs for heat and work per cycle follow from Eqs. (27) and (28)
in Sec. 3.1.2. Similar approach can be applied for linear protocols composed
of more branches.

The Green’s function (5.1.2)–(5.1.2) at first glance possesses a limited
support, imposed by the unit step functions, and a singular part, proportional
to the $\delta$-functions. In Sec. (4.1), we discuss these and other general
properties of work PDFs for systems with discrete microstates. The formulas
(5.1.2)–(79) are then applied in Figures 3 and 4 to illustrate these general
properties. Namely, we show PDFs for work and heat after the individual
branches. While the PDFs at the end of the cycle follow directly from Eqs.
(27) and (28), those after the first branch are obtained using the formulas

$\displaystyle\rho_{w_{out}}(t_{c})$ $\displaystyle=$
$\displaystyle\left<+\right|G(-w_{out},t_{c}|0,0)\,{\mathbf{p}}(0),$ (80)
$\displaystyle\rho(w_{out},q_{in})$ $\displaystyle=$ $\displaystyle\int
dw\sum_{mn}\delta\left\\{q_{in}-\left[E_{m}(t_{c})-E_{n}(0)-w\right]\right\\}$
(81) $\displaystyle\times$ $\displaystyle G_{mn}(w,t_{c}|0,0)\,p_{n}(0),$
$\displaystyle\rho_{q_{in}(t_{c})}$ $\displaystyle=$ $\displaystyle\int
dw_{out}\,\rho(w_{out},q_{in}),$ (82)

where ${\mathbf{p}}(t)$ denotes the state of the system during the limit
cycle. Interestingly, also ${\mathbf{p}}(t)$ can be calculated from the
propagator (79). For example as
${\mathbf{p}}(t)=\lim_{t^{\prime}\to-\infty}\int\int
dw\,dw^{\prime}\,G(w,t|w^{\prime},t^{\prime}){\mathbf{p}}_{0}$, where
${\mathbf{p}}_{0}$ is an arbitrary normalized initial condition.

###  5.2 Overdamped harmonic oscillator

The role of two-level systems for discrete models plays for continuous state
spaces the harmonic potential depicted in Fig. 2. Indeed, a broad class of
situations with weak enough noise involve stochastic dynamics near a single
minimum of the (free) energy landscape, that can be approximated by a harmonic
potential. For example in experiments, forces applied on single molecules,
e.g., by optical tweezers, are often approximately linear in particle’s
displacement from the center of laser beam [124, 125, 126, 127, 128, 129].

There are two qualitatively distinct scenarios, how the parabolic potential
$U(x,t)$ can vary in time. In the so-called “sliding parabola” model the
position of the potential minimum $\lambda(t)$ changes with time, i.e.,
$U(x,t)=k[x-\lambda(t)]^{2}/2$. The so-called “breathing parabola” model then
involves time-dependent stiffness $k$ of the potential,

$U(x,t)=\frac{k(t)}{2}x^{2}.$ (83)

For both these situations, the Langevin equations (9)–(11) for velocity and
position are linear. These processes are thus linear functionals of the
Gaussian white noise and their PDFs are also Gaussian [33]. The first two
moments of work and heat can then be evaluated analytically using the approach
suggested in Eqs. (31) and (32).

In the sliding parabola model, also the Langevin equation (19) for work is
linear and thus the work PDF is Gaussian [130, 131, 132, 133, 134, 135].
Unfortunately, the sliding parabola model can not be used as a basis of a heat
engine that would provide a positive output power because the mean position
$\left<x(t)\right>$ coupled to $\lambda(t)$ in the expressions for work (19)
and heat (20) is independent of temperature [39].

On the other hand, the breathing parabola model can be used as a basis of a
heat engine but does not allow for a general solution for heat and work PDFs
for an arbitrary stiffness $k(t)$. The task to find the Green’s function (26)
for the partial differential equation for work can be reduced to the solution
of the Riccati equation [40], or to an equivalent problem of coupled ordinary
differential equations [37, 136, 41]. Exact solution of these problems are
known only for a few specific functions $k(t)$. Namely, for a piece-wise
constant protocol, where $k(t)$ and $T(t)$ involve a single jump [136] or two
jumps [137, 7]; in the slow-driving limit ($\dot{k}(t)$ small compared to the
relaxation time of the system) where the work PDF is Gaussian for any $k(t)$
[37, 138]; and if $k(t)$ is a rational function of time [40, 41]. In addition
to exact approaches, theories were developed to predict asymptotics of work
PDFs for small and large values of work [139, 133, 140, 40, 141, 142]. Also an
Onsager-Machlup-type theory has been applied to obtain approximate solutions
of the problem in Ref. [143]. Finally, the method of approximating arbitrary
protocol by a piece-wise constant driving, described in Sec. 5.1.1, has been
for the breathing parabola model solved analytically for arbitrary finite
number of steps [122]. It thus allows to analytically approximate work PDF for
an arbitrary protocol with arbitrary precision.

Most of the known solutions correspond to the overdamped limit (8) with the
notable exception of Ref. [41]. This is because the overdamped approximation
offers simpler equations but also due to its high experimental relevance for
Brownian heat engines [34, 35, 36]. Let us now review the most frequently used
results for the overdamped case. Namely, the next section is devoted to the
derivation of PDFs for work and heat for an engine driven by a piece-wise
constant protocol with two jumps. In Sec. 5.2.2 we review derivation of the
Green’s function for position, which allows evaluation of second moments of
work and heat for arbitrary driving.

####  5.2.1 Piece-wise constant protocol

Figure 7: a)-b) Piece wise constant protocol for stiffens $k$ and temperature
$T$ for the Brownian heat engine based on a harmonic potential depicted in
Fig. 2 and discussed in Sec. 5.2.1. c) PDF for work done by the engine during
the adiabatic expansion (first branch). d) PDF for work done per cycle.

In this section, we provide analytical derivations of work, heat, and
efficiency PDFs in the arguably most simple stochastic heat engine with
continuous state-space. We consider an overdamped Brownian particle in a
harmonic potential with the protocol composed of two quasi-static isothermal-
isochoric branches interconnected by two infinitely fast adiabats [44]. During
the whole cycle, the state of the system is thus described by the Boltzmann-
like PDF

$p(z,k/T)=\sqrt{\frac{k}{2\pi T}}\exp\left(-\frac{k}{2\pi T}z^{2}\right),$
(84)

even though the fast adiabatic branches bring it far from equilibrium. An
example of the protocol is depicted in Figs. 7a and b. In the discussion
below, we will keep the depicted ordering of the individual branches:
adiabatic expansion, hot isotherm, adiabatic compression, cold isotherm.

The engine performs work only during the adiabatic branches. During the
adiabatic expansion, the system is in thermal equilibrium with reservoir at
temperature $T_{h}$ and the stiffness abruptly decreases from $k_{1}$ to
$k_{2}$. The branch is so fast that the system dwells in a fixed microstate,
say $x$, and the corresponding stochastic work done equals to the decrease in
potential energy $(k_{1}-k_{2})x^{2}/2$. The PDF for position during the
adiabat is given by Eq. (84) with $z=x$ and $k/T=k_{1}/T_{h}$ and thus the
work PDF after the first branch reads

$\rho_{w_{out}}(0_{+})=\int
dx\,\delta\left[w_{out}-(k_{1}-k_{2})x^{2}/2\right]p(x,k_{1}/T_{h})=\\\
\sqrt{\frac{\eta}{\pi
T_{h}}\frac{1}{|w_{out}|}}\exp\left(-\frac{\eta}{T_{h}}w_{out}\right)\theta(w_{out}).$
(85)

The unit step function $\theta$ in the expression originates in the fact that
decreasing the stiffness leads to an energy decrease regardless $x$.
Similarly, during the adiabatic compression the stiffness increases from
$k_{2}$ to $k_{1}$ and the work done reads $(k_{2}-k_{1})y^{2}/2$, where $y$
is the miscrostate occupied during the second adiabat. The total stochastic
work per cycle

$w_{out}(x,y)=\frac{1}{2}(k_{1}-k_{2})(x^{2}-y^{2})$ (86)

thus depends just on the microstates $x$ and $y$ occupied during the adiabatic
branches. Due to the quasi-static isotherms mediating the two adiabats, the
random variables $x$ and $y$ are independent and distributed according to the
PDF (84) with $k/T=k_{1}/T_{h}$ for $z=x$ and $k_{2}/T_{c}$ for $z=y$. The PDF
for the output work per cycle thus reads

$\rho_{w_{out}}(t_{p})=\int dx\int
dy\,\delta(w_{out}-w_{out}(x,y))p(x,k_{1}/T_{h})p(y,k_{2}/T_{c})=\\\
\sqrt{\frac{k_{1}k_{2}}{T_{c}T_{h}}}\frac{1}{\pi(k_{1}-k_{2})}\exp\left(-\frac{k_{1}T_{c}-k_{2}T_{h}}{k_{1}-k_{2}}\frac{w}{2T_{c}T_{h}}\right)K_{0}{\left(\frac{k_{1}T_{c}+k_{2}T_{h}}{k_{1}-k_{2}}\frac{|w|}{2T_{c}T_{h}}\right)}.$
(87)

The PDFs for work after the first adiabat (85) and the whole cycle (87) are
plotted in Figs. 7c and d. The shown shapes of the PDFs are characteristic for
piece-wise constant protocols with a single and two jumps, respectively.

The heat flows into the system during the hot isotherm. This branch is
isochoric, no work is done, and thus the input heat is given just by the
increase in the internal energy,

$q_{in}(x,y)=\frac{1}{2}k_{1}(x^{2}-y^{2}).$ (88)

The stochastic input heat is thus proportional to the stochastic output work
and also their PDFs are proportional. Namely,
$\rho_{q}(q_{in})=\eta\rho_{w}(\eta q_{in})$, where
$\eta=(k_{1}-k_{2})/k_{1}<\eta_{C}$ is the efficiency of the engine.

Since stochastic output work and input heat per cycle are proportional to each
other, stochastic efficiency $\tilde{\eta}=w_{out}/q_{in}$ is in this model
deterministic and given by $\eta$, i.e.
$\rho_{\tilde{\eta}}=\delta(\tilde{\eta}-\eta)$. The present model thus
represents a simple example where the large deviation theory of fluctuating
efficiency does not apply. The reason is the failure of the large deviation
principle: even though the work and heat by themselves obey the large
deviation principle, the stochastic efficiency is independent of the number of
cycles over which they are measured. The model yields a nontrivial PDF for
$\tilde{\eta}$ if considered in the underdamped regime, where the stochastic
work is still given by Eq. (86) and the stochastic input heat (88) acquires
another contribution $(p_{x}^{2}-p_{y}^{2})/(2m)$ from momentum degrees of
freedom. The PDFs for $p_{x}$ and $p_{y}$ are still of the form (84) with
$k/T=1/(mT_{h})$ for $z=p_{x}$ and $k/T=1/(mT_{c})$ for $z=p_{y}$. The rest of
the calculation follows along similar lines as in Eqs. (85) and (87) and we
leave it as an exercises for the interested reader.

The PDF (87) yields all moments of $w_{out}$, $q_{in}$, and also the internal
energy difference per cycle, $\Delta u=q_{in}$. Due to the close relation of
work and heat to changes in internal energy in this model, it is not
surprising that the second moment of work is determined by heat capacity of
the working medium [44]. This relation of fluctuations to heat capacity was
used in Ref. [44] as an argument for diverging work and power fluctuations in
the critical heat engine proposed in Ref. [144]. However, this negative effect
can be circumvented by employing adiabatic branches where the system is not
disconnected from the bath [7].

The simplicity of the PDF (87) allows to directly demonstrate validity of the
detailed fluctuation theorem (47) for heat engines for this model. Due to the
proportionality of $w_{out}$, $q_{in}$, and $\Delta u$, the joint PDF is given
by

$\rho(w_{out},q_{in},\Delta u)=\delta(w_{out}-\eta\Delta u)\delta(w_{out}-\eta
q_{in})\rho_{w_{out}}(t_{p}).$ (89)

While this might not be obvious at first glance, the used protocol is time-
reversal symmetric. To see this, it is enough to realized that the reversed
protocol can be plotted on top of the forward one after a suitable shift in
time. We conclude that the joint PDF for the reversed process is again given
by Eq. (89). This allows us to explicitly evaluate the ratio in Eq. (47):

$\frac{\rho(w_{out},q_{in},\Delta u)}{\rho(-w_{out},-q_{in},-\Delta
u)}=\exp\left(-\frac{k_{1}T_{c}-k_{2}T_{h}}{k_{1}-k_{2}}\frac{w}{2T_{c}T_{h}}\right)=\exp\left[\frac{1}{T_{c}}q_{in}(\eta_{C}-\eta)\right],$
(90)

where the second equality follows from symmetry of the $\delta$-function with
respect to sign reversal and the third one is obtained after the substitution
$w_{out}=\eta q_{in}$.

####  5.2.2 Arbitrary protocol

In the breathing parabola problem, one can calculate analytically the variance
of output work for an arbitrary protocol for the stiffness and temperature on
the basis of Eq. (32). This is possible because the Green’s function for the
Fokker-Planck equation

$\frac{\partial}{\partial t}p(x,t)=\mathcal{L}(t)p(x,t),$ (91)

describing the PDF of the particle position, $x$, can be obtained analytically
[33]. Namely, it is given be the Gaussian PDF

$G(x,t|x^{\prime},t^{\prime})=\frac{1}{\sqrt{2\pi\sigma^{2}(t|x^{\prime},t^{\prime})}}\exp\left(-\frac{(x-m(t|x^{\prime},t^{\prime}))^{2}}{2\sigma^{2}(t|x^{\prime},t^{\prime})}\right),$
(92)

where $m(t|x^{\prime},t^{\prime})=\left<x(t)\right>$ and
$\sigma^{2}(t|x^{\prime},t^{\prime})=\left<[x(t)]^{2}\right>-\left<x(t)\right>^{2}$
are average and variance of particle position at time $t$ conditioned on its
initial position $x^{\prime}$ at time $t^{\prime}$. These functions obey the
ordinary differential equations

$\displaystyle\frac{d}{dt}m(t|x^{\prime},t^{\prime})$ $\displaystyle=$
$\displaystyle-\frac{1}{\gamma}k(t)m(t|x^{\prime},t^{\prime}),$ (93)
$\displaystyle\frac{d}{dt}\sigma^{2}(t|x^{\prime},t^{\prime})$
$\displaystyle=$
$\displaystyle-\frac{2}{\gamma}k(t)\sigma^{2}(t|x^{\prime},t^{\prime})-\frac{2k_{B}}{\gamma}T(t),$
(94)

with the initial conditions $m(t^{\prime}|x^{\prime},t^{\prime})=x^{\prime}$
and $\sigma(t^{\prime}|x^{\prime},t^{\prime})=0$, and the well-known solution

$\displaystyle m(t|x^{\prime},t^{\prime})$ $\displaystyle=$ $\displaystyle
x^{\prime}\exp\left(-\gamma^{-1}\int_{t^{\prime}}^{t}dt^{\prime\prime}\,k(t^{\prime\prime})\right),$
(95) $\displaystyle\sigma^{2}(t|x^{\prime},t^{\prime})$ $\displaystyle=$
$\displaystyle
2k_{B}\gamma^{-1}\int_{t^{\prime}}^{t}dt^{\prime\prime}T(t^{\prime\prime})\exp\left(-2\gamma^{-1}\int_{t^{\prime\prime}}^{t}dt^{\prime\prime\prime}\,k(t^{\prime\prime\prime})\right).$
(96)

The PDF for $x$ during the limit cycle then follows by
$p(x,t)=\lim_{t^{\prime}\to-\infty}G(x,t|x^{\prime},t^{\prime})$. The
equations (93) and (94) are most easily derived from the Langevin equation
(11) corresponding to the Fokker-Planck equation for $p(x,t)$.

In Fig. 6, we show average power, power fluctuations, and efficiency
calculated using this Green’s function for the protocol

$\displaystyle k(t)$ $\displaystyle=$
$\displaystyle\displaystyle{\frac{1}{\sigma_{0}^{2}}\frac{k_{B}T_{h}}{(1+b_{h}t)^{2}}-\frac{\gamma
b_{h}}{1+b_{h}t}},\quad T(t)=T_{h},\quad t\in[0,t_{h}),$ (97) $\displaystyle
k(t)$ $\displaystyle=$
$\displaystyle\displaystyle\frac{1}{\sigma_{f}^{2}}\frac{k_{B}T_{c}}{[1+b_{c}(t-t_{h})]^{2}}-\frac{\gamma
b_{c}}{1+b_{c}(t-t_{h})},\quad T(t)=T_{c}\quad t\in[t_{h},t_{p}).$ (98)

that maximizes $W_{out}$ for fixed entropy change in the system during the hot
isotherm, $\Delta S=k_{B}\log{\sigma_{f}/\sigma_{0}}$, and durations $t_{h}$
and $t_{c}$ of the isotherms [10, 38]. The durations of the adiabatic branches
are assumed to be negligible compared to $t_{c}$ and $t_{h}$ and thus
$t_{p}=t_{c}+t_{h}$. The parameters $\sigma_{0}^{2}$ and $\sigma_{f}^{2}$
stand for the variances of the particle position at the beginning and end of
the hot isotherm, and $b_{h}=\left(\sigma_{f}/\sigma_{0}-1\right)/t_{h}$ and
$b_{c}=\left(\sigma_{0}/\sigma_{f}-1\right)/t_{c}$. In the figure, we plot the
output power and its fluctuations as functions of the scaling parameter
$\Omega$ defined by the equations

$\sigma^{2}_{f}\propto\Omega^{-\xi},\quad t_{p}\propto\Omega^{(\chi-1)\xi},$
(99)

with $\sigma_{f}^{2}/\sigma_{0}^{2}>0$, $\xi>0$ and $\chi\in(0,1]$. In the
limit $\Omega\to\infty$, such driven Brownian heat engine can provide
diverging output power with limited fluctuations and reversible efficiency
[7]. Such a performance is for steady-state heat engines forbidden by
thermodynamic uncertainty relations reviewed in Sec. 4.4.

Note that in Eqs. (93)–(98) we reintroduced the Boltzmann constant $k_{B}$.
This is because we use in the figure the experimentally relevant parameters
$\gamma\approx 1.89\times 10^{-8}$ kg/s, $T_{c}=293.15$ K and $T_{h}=5273.15$
K [7]. Further, we took $\sigma^{2}_{f}=\Omega^{-\xi}$,
$\sigma_{f}^{2}/\sigma_{0}^{2}=3$, $\xi=3$, $\chi=0.05$,
$t_{c}=t_{h}=t_{p}/2$, and

$t_{p}=\frac{2\gamma^{1-\chi}}{T_{h}\eta_{C}\Delta
S}(\sigma_{f}-\sigma_{0})^{2(1-\chi)}.$ (100)

###  5.3 Solar cell as steady-state heat engine

$\mu_{l}$$\left|d\right>$$\left|u\right>$$\mu_{r}$$L_{ud}^{h}$ \+
$L_{ud}^{c}$$L_{du}^{h}$ \+ $L_{du}^{c}$$L_{ur}$$L_{ru}$$L_{ul}$$L_{lu}$

Figure 8: A simple model of solar cell: the two-level quantum dot (black
energy levels in the middle) is connected to two cold leads at different
chemical potentials $\mu_{l}<\mu_{r}$ (blue energy levels). The transitions of
electrons between the leads and the dot are induced solely by thermal
fluctuations of the substrate (solid blue transitions). When occupied, the
quantum dot can be excited/de-excited both by fluctuations from the substrate
(solid blue transitions) and by photons arriving from the hot sun (red dashed
transitions). The cell performs work by pumping electrons against the gradient
$\mu_{r}-\mu_{l}$ of chemical potential.

In this section, we review derivation of power and its fluctuations for the
simple model of solar cell depicted in Fig. 8 and used in Sec. 4.4 to
demonstrate limitations imposed on the performance of steady-state heat
engines by the thermodynamic uncertainty relations.

The considered solar cell has three microstates. Denoting them as 0 (no
electron in quantum dot), $d$ (electron in lower state of the dot), and $u$
(excited dot), the rate matrix in the GME (1) for the probability vector
${\mathbf{p}}(t)=[p_{0}(t),p_{d}(t),p_{u}(t)]^{\intercal}$ reads

$L=\begin{pmatrix}-L_{dl}-L_{dr}&L_{ld}&L_{ru}\\\
L_{dl}&-L_{ld}-L^{c}_{ud}-L^{h}_{ud}&L^{c}_{du}+L^{h}_{du}\\\
L_{ur}&L^{c}_{ud}+L^{h}_{ud}&-L_{ru}-L^{c}_{du}-L^{h}_{du}\end{pmatrix}.$
(101)

For Fig. 6, we employ the frequently used transition rates following from the
Fermi-Dirac and Bose-Einstein statistics for electrons and phonons [97]:

$L_{sr}=\Gamma/[1+\exp(x_{sr})],\quad L_{rs}=\Gamma/[1+\exp(-x_{sr})],$ (102)

with $x_{rs}=(E_{s}-\mu_{r})/T_{c}$, $r=l,r$, $s=u,d$, and

$L^{r}_{ud}=\Gamma_{r}/[\exp(x_{r})-1],\quad
L^{r}_{du}=\Gamma_{r}/[1-\exp(-x_{r})],$ (103)

with $x_{r}=(E_{u}-E_{d})/T_{r}$, $r=c,h$. Further,
$\Gamma=\Gamma_{h}=\Omega\Gamma_{0}$ and $\Gamma_{c}=\Omega^{-3/2}\Gamma_{0}$.
All the four pairs of rates satisfy the local detailed balance condition (3).

In order to evaluate the average power of the solar cell and its fluctuations
measured by the constancy (57), it is useful to construct the tilted rate
matrix for the output work and use the large deviation result (43). If the
solar cell transports a single electron from the low to the high chemical
potential, it performs work $\Delta\mu=\mu_{r}-\mu_{l}$. The work done during
the reversed process is $-\Delta\mu$. To construct the tilted rate matrix for
work, we thus need to multiply the rate $L_{ru}$ by $\exp(-s_{w}\Delta\mu)$,
the rate $L_{ld}$ by $\exp(s_{w}\Delta\mu)$, and keep the remaining transition
rates unchanged. The resulting tilted rate matrix reads

$L(s_{w})=\begin{pmatrix}-L_{dl}-L_{dr}&\exp(s_{w}\Delta\mu)L_{ld}&\exp(-s_{w}\Delta\mu)L_{ru}\\\
L_{dl}&-L_{ld}-L^{c}_{ud}-L^{h}_{ud}&L^{c}_{du}+L^{h}_{du}\\\
L_{ur}&L^{c}_{ud}+L^{h}_{ud}&-L_{ru}-L^{c}_{du}-L^{h}_{du}\end{pmatrix}.$
(104)

Its largest eigenvalue $\lambda_{max}(s_{w})$ then determines the so-called
scaled cumulant generating function,

$\lambda_{max}(s_{w})=\frac{1}{t}\log\chi(s_{w}),$ (105)

through Eq. (43). Finally, Eq. (40) implies that the average power and
constancy can be obtained as

$P=-\left.\frac{\partial}{\partial
s_{w}}\lambda_{max}(s_{w})\right|_{s_{w}=0},\quad\Delta_{P}=\left.\frac{\partial^{2}}{\partial
s_{w}^{2}}\lambda_{max}(s_{w})\right|_{s_{w}=0}.$ (106)

These formulas can be easily evaluated numerically. Nevertheless, the present
system allows for explicit expressions [97] following from the results of Ref.
[145].

##  6 Concluding remarks

Processes of converting the ‘disordered’ thermal energy called as heat into an
‘ordered’ work are of vital importance not only for our society but also for
the whole biosphere. At the macroscale, power output and efficiency of heat
engines are universally limited by laws of classical thermodynamics. At the
microscale, the second law can be formulated in terms of symmetry relations
for fluctuations of entropy and its implications are far from being completely
understood. Here, we have reviewed recent findings revealing how and to which
extend these fundamental symmetries control fluctuations in performance of
microscopic heat engines. Furthermore, we have also provided a general
overview of theoretical tools of stochastic thermodynamics and discussed basic
phenomenology of probability density functions for work and heat.

The review is devoted to small systems subjected to the stochastic Markovian
dynamics in contact with one or more equilibrium heat reservoirs.
Thermodynamically consistent definitions of work, heat, and entropy for the
corresponding individual stochastic trajectories are well established.
Applying them to microscopic heat engines, one should distinguish between two
situations. Steady-state heat engines operate under time-independent non-
equilibrium conditions in contact with several heat reservoirs and deliver a
stochastic output work proportional to excitation currents. On the other hand,
cyclic heat engines are driven by periodic variation of their energy spectrum
and the bath temperature and operate in a time-periodic steady state. Their
stochastic output work is determined by the time spent in the individual
microstates during the cycle. Mean values of output works for steady-state and
cyclic heat engines obey the same limitations imposed by the second law.
However, their fluctuations exhibit strikingly different statistics.

Besides the corresponding probability densities, these differences are
revealed in trade-off relations for efficiency, power, and power fluctuations
of heat engines derived from thermodynamic uncertainty relations. For steady-
state heat engines, they imply that the more deterministic the power, the
smaller the efficiency. In contrast, cyclic heat engines can operate
arbitrarily close to the Carnot efficiency and deliver a positive and stable
output power.

Unlike the averages of stochastic work $w_{out}$ and heat $q_{in}$, mean value
of the fluctuating efficiency $\tilde{\eta}=w_{out}/q_{in}$ is not bounded by
the second law. In fact, its probability density usually exhibits heavy tails
and $\left<\tilde{\eta}\right>$ does not exist. More insights into the
behavior of fluctuating efficiency can be obtained by employing the
fluctuation theorem for entropy production that generalizes the second law to
individual stochastic trajectories. It implies the fluctuation theorem for
heat engines that analogously generalizes the Carnot efficiency and reveals
interesting features of statistics of the stochastic efficiency. Namely, if
evaluated from heat and work measured over extended periods of time, the most
likely value of $\tilde{\eta}$ equals to the standard definition of efficiency
$\eta=\left<w_{out}\right>/\left<q_{in}\right>$. Furthermore, the rate
function for fluctuating efficiency, describing this behavior, attains a
special value when $\tilde{\eta}$ equals the Carnot efficiency. For time-
reversal symmetric protocols, it corresponds to the least likely efficiency
and, for time-asymmetric protocols, to the efficiency which is the same likely
for forward and time-reversed driving.

In addition to general derivations, all these fascinating features can be
intuitively understood, tested, and their assumptions violated using
paradigmatic exactly solvable models of stochastic thermodynamics: driven two-
level system and harmonic oscillator. In addition to being analytically
tractable, these models are also of vital experimental importance as they
represent good approximations to the most frequently used experimental setups.

Despite the amount and diversity of the presented results, we believe that
there is still much more to come. In particular, the thermodynamic uncertainty
relations valid for steady-state heat engines can be applied to an arbitrary
transport process not necessarily driven by a temperature gradient. While
these machines often cannot be categorized as heat engines, the thermodynamic
uncertainty relations should still limit their performance in terms of
transport coefficients, their fluctuations, and transport efficiency. Of
particular interest are processes driven by information [23, 22, 80, 82, 81]
and transport in systems of many interacting particles [146]. Another twist in
the theory is expected for systems in contact with non-equilibrium reservoirs,
where the very definitions of work and heat are still subjects of keen
discussions [147, 148, 45, 149, 150, 46, 151], and thus the results valid for
cyclic and steady-state heat engines operating with equilibrium reservoirs
cannot be taken for granted. Fluctuations in coherent open quantum systems
have a similar status [31] as they break validity of most of the classical
results [152, 52, 53]. Finally, it is not unlikely that other general
relations similar to the thermodynamic uncertainty relations will be
established and provide new insights into the fundamental laws governing
performance of microscopic machines.

Financial support by the Czech Science Foundation (Project No. 20-24748J). VH
also thanks for support by the Humboldt foundation.

## References

## References

  * [1] Carnot, S.  _Réflexions sur la puissance motrice du feu et sur les machines propres à développer cette puissance_ (Bachelier, Paris, 1824).
  * [2] Clausius, R.  Ueber die bewegende Kraft der Wärme und die Gesetze, welche sich daraus für die Wärmelehre selbst ableiten lassen.  _Ann. Phys._ 155, 500–524 (1850).  URL https://doi.org/10.1002/andp.18501550403.
  * [3] Clausius, R.  Ueber eine veränderte Form des zweiten Hauptsatzes der mechanischen Wärmetheorie.  _Ann. Phys._ 169, 481–506 (1854).  URL https://doi.org/10.1002/andp.18541691202.
  * [4] Thomson, W.  Ii. on the dynamical theory of heat, with numerical results deduced from mr. joule’s equivalent of a thermal unit, and m. regnault’s observations on steam.  _The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science_ 4, 8–21 (1852).  URL https://doi.org/10.1080/14786445208647064.
  * [5] Kubo, R.  _Thermodynamics: An advanced course with problems and solutions_ (North-Holland Publishing Company, Amsterdam, 1968).  In cooperation with Hiroshi Ichimura, Tsunemaru Usui, Natsuki Hashitsume.
  * [6] Callen, H. B.  Thermodynamics and an introduction to thermostatistics (1985).
  * [7] Holubec, V. & Ryabov, A.  Cycling tames power fluctuations near optimum efficiency.  _Phys. Rev. Lett._ 121, 120601 (2018).  URL https://doi.org/10.1103/PhysRevLett.121.120601.
  * [8] Seifert, U.  Stochastic thermodynamics, fluctuation theorems and molecular machines.  _Rep. Prog. Phys._ 75, 126001 (2012).  URL https://doi.org/10.1088/0034-4885/75/12/126001.
  * [9] Chvosta, P., Holubec, V., Ryabov, A., Einax, M. & Maass, P.  Thermodynamics of two-stroke engine based on periodically driven two-level system.  _Physica E_ 42, 472–476 (2010).  URL https://doi.org/10.1016/j.physe.2009.06.031.
  * [10] Schmiedl, T. & Seifert, U.  Efficiency at maximum power: An analytically solvable model for stochastic heat engines.  _EPL (Europhysics Letters)_ 81, 20003 (2007).  URL https://doi.org/10.1209/0295-5075/81/20003.
  * [11] Calvo Hernández, A., Roco, J. M. M., Medina, A., Velasco, S. & Guzmán-Vargas, L.  The maximum power efficiency 1-√$\tau$: Research, education, and bibliometric relevance.  _Eur. Phys. J. Special Topics_ 224, 809–823 (2015).  URL https://doi.org/10.1140/epjst/e2015-02429-4.
  * [12] Tu, Z.-C.  Abstract models for heat engines.  _Front. Phys._ 16, 33202 (2021).  URL https://doi.org/10.1007/s11467-020-1029-6.
  * [13] Sekimoto, K.  _Stochastic energetics_.  Lecture notes in physics, 799 (Springer, Berlin, 2010).  URL https://doi.org/10.1007/978-3-642-05411-2.
  * [14] Evans, D. J. & Searles, D. J.  The fluctuation theorem.  _Adv. Phys._ 51, 1529–1585 (2002).  URL https://doi.org/10.1080/00018730210155133.
  * [15] Harris, R. J. & Schütz, G. M.  Fluctuation theorems for stochastic dynamics.  _J. Stat. Mech._ 2007, P07020–P07020 (2007).  URL https://doi.org/10.1088/1742-5468/2007/07/p07020.
  * [16] Kurchan, J.  Non-equilibrium work relations.  _J. Stat. Mech._ 2007, P07005–P07005 (2007).  URL https://doi.org/10.1088/1742-5468/2007/07/p07005.
  * [17] Jarzynski, C.  Equalities and inequalities: Irreversibility and the second law of thermodynamics at the nanoscale.  _Annu. Rev. Condens. Matter Phys._ 2, 329–351 (2011).  URL https://doi.org/10.1146/annurev-conmatphys-062910-140506.
  * [18] Bochkov, G. N. & Kuzovlev, Y. E.  Fluctuation–dissipation relations. achievements and misunderstandings.  _Phys.-Usp._ 56, 590–602 (2013).  URL https://doi.org/10.3367/ufne.0183.201306d.0617.
  * [19] Marsland, R. & England, J.  Limits of predictions in thermodynamic systems: a review.  _Rep. Prog. Phys._ 81, 016601 (2018).  URL https://doi.org/10.1088/1361-6633/aa9101.
  * [20] Seifert, U.  From stochastic thermodynamics to thermodynamic inference.  _Ann. Rev. Cond. Matt. Phys._ 10, 171–192 (2019).  URL https://doi.org/10.1146/annurev-conmatphys-031218-013554.
  * [21] Horowitz, J. M. & Gingrich, T. R.  Thermodynamic uncertainty relations constrain non-equilibrium fluctuations.  _Nat. Phys._ 16, 15–20 (2020).  URL https://doi.org/10.1038/s41567-019-0702-6.
  * [22] Parrondo, J. M. R., Horowitz, J. M. & Sagawa, T.  Thermodynamics of information.  _Nat. Phys._ 11, 131–139 (2015).  URL https://doi.org/10.1038/nphys3230.
  * [23] Lutz, E. & Ciliberto, S.  Information: From Maxwell’s demon to Landauer’s eraser.  _Phys. Today_ 68, 30–35 (2015).  URL https://doi.org/10.1063/PT.3.2912.
  * [24] Bustamante, C., Liphardt, J. & Ritort, F.  The nonequilibrium thermodynamics of small systems.  _Phys. Today_ 58, 43–48 (2005).  URL https://doi.org/10.1063/1.2012462.
  * [25] Ritort, F.  Single-molecule experiments in biological physics: methods and applications.  _J. Phys. Condens. Matt._ 18, R531–R583 (2006).  URL https://doi.org/10.1088/0953-8984/18/32/r01.
  * [26] Ciliberto, S., Gomez-Solano, R. & Petrosyan, A.  Fluctuations, linear response, and currents in out-of-equilibrium systems.  _Annu. Rev. Condens. Matter Phys._ 4, 235–261 (2013).  URL https://doi.org/10.1146/annurev-conmatphys-030212-184240.
  * [27] Ciliberto, S.  Experiments in stochastic thermodynamics: Short history and perspectives.  _Phys. Rev. X_ 7, 021051 (2017).  URL https://link.aps.org/doi/10.1103/PhysRevX.7.021051.
  * [28] Benenti, G., Casati, G., Saito, K. & Whitney, R. S.  Fundamental aspects of steady-state conversion of heat to work at the nanoscale.  _Phys. Rep._ 694, 1–124 (2017).  URL https://doi.org/10.1016/j.physrep.2017.05.008.
  * [29] Gillespie, D. T.  _Markov Processes_ (Academic Press,, San Diego, 1992).
  * [30] Kampen, N. G. V.  _Stochastic processes in physics and chemistry_ (Elsevier, Amsterdam, 2007).
  * [31] Breuer, H.-P., Petruccione, F. _et al._ _The theory of open quantum systems_ (Oxford University Press, Oxford, 2002).
  * [32] Holubec, V., Chvosta, P., Einax, M. & Maass, P.  Attempt time Monte Carlo: An alternative for simulation of stochastic jump processes with time-dependent transition rates.  _EPL (Europhysics Letters)_ 93, 40003 (2011).  URL https://doi.org/10.1209/0295-5075/93/40003.
  * [33] Risken, H.  _The Fokker-Planck Equation_ (Springer, Berlin, Heidelberg, 1996).
  * [34] Blickle, V. & Bechinger, C.  Realization of a micrometre-sized stochastic heat engine.  _Nat. Phys._ 8, 143–146 (2012).  URL https://doi.org/10.1038/nphys2163.
  * [35] Martínez, I. A. _et al._ Brownian Carnot engine.  _Nat. Phys._ 12, 67–70 (2016).  URL https://doi.org/10.1038/nphys3518.
  * [36] Mart inez, I. A., Rold an, E., Dinis, L. & Rica, R. A.  Colloidal heat engines: a review.  _Soft Matter_ 13, 22–36 (2017).  URL http://dx.doi.org/10.1039/C6SM00923A.
  * [37] Speck, T.  Work distribution for the driven harmonic oscillator with time-dependent strength: Exact solution and slow driving.  _J. Phys. A_ 44, 305001 (2011).  URL http://stacks.iop.org/1751-8121/44/i=30/a=305001.
  * [38] Holubec, V.  An exactly solvable model of a stochastic heat engine: optimization of power, power fluctuations and efficiency.  _J. Stat. Mech._ 2014, P05022 (2014).  URL https://doi.org/10.1088/1742-5468/2014/05/p05022.
  * [39] Holubec, V. & Ryabov, A.  Efficiency at and near maximum power of low-dissipation heat engines.  _Phys. Rev. E_ 92, 052125 (2015).  URL https://link.aps.org/doi/10.1103/PhysRevE.92.052125.
  * [40] Ryabov, A., Dierl, M., Chvosta, P., Einax, M. & Maass, P.  Work distribution in a time-dependent logarithmic–harmonic potential: Exact results and asymptotic analysis.  _J. Phys. A: Math. Theor._ 46, 075002 (2013).  URL https://doi.org/10.1088/1751-8113/46/7/075002.
  * [41] Kwon, C., Noh, J. D. & Park, H.  Work fluctuations in a time-dependent harmonic potential: Rigorous results beyond the overdamped limit.  _Phys. Rev. E_ 88, 062102 (2013).
  * [42] Holubec, V., Kroy, K. & Steffenoni, S.  Physically consistent numerical solver for time-dependent Fokker-Planck equations.  _Phys. Rev. E_ 99, 032117 (2019).  URL https://doi.org/doi/10.1103/PhysRevE.99.032117.
  * [43] Ryabov, A. _et al._ Transport coefficients for a confined Brownian ratchet operating between two heat reservoirs.  _J. Stat. Mech._ 2016, 093202 (2016).  URL https://doi.org/10.1088/1742-5468/2016/09/093202.
  * [44] Holubec, V. _et al._ Thermal ratchet effect in confining geometries.  _Entropy_ 19 (2017).  URL https://doi.org/10.3390/e19040119.
  * [45] Holubec, V., Steffenoni, S., Falasco, G. & Kroy, K.  Active Brownian heat engines.  _Phys. Rev. Research_ 2, 043262 (2020).  URL https://link.aps.org/doi/10.1103/PhysRevResearch.2.043262.
  * [46] Gronchi, G. & Puglisi, A.  Optimization of an active heat engine.  _Phys. Rev. E_ 103, 052134 (2021).  URL https://link.aps.org/doi/10.1103/PhysRevE.103.052134.
  * [47] Šubrt, E. & Chvosta, P.  Exact analysis of work fluctuations in two-level systems.  _J. Stat. Mech._ 2007 (2007).  URL https://doi.org/10.1088/1742-5468/2007/09/p09019.
  * [48] Imparato, A. & Peliti, L.  Work probability distribution in single-molecule experiments.  _Europhysics Letters (EPL)_ 69, 643–649 (2005).  URL https://doi.org/10.1209/epl/i2004-10390-3.
  * [49] Holubec, V.  _Non-equilibrium Energy Transformation Processes: Theoretical Description at the Level of Molecular Structures_ (Springer, New York, 2014).
  * [50] Touchette, H.  The large deviation approach to statistical mechanics.  _Phys. Rep._ 478, 1–69 (2009).  URL https://www.sciencedirect.com/science/article/pii/S0370157309001410.
  * [51] Speck, T. & Seifert, U.  Distribution of work in isothermal nonequilibrium processes.  _Phys. Rev. E_ 70, 066112 (2004).  URL https://link.aps.org/doi/10.1103/PhysRevE.70.066112.
  * [52] Miller, H. J. D., Scandi, M., Anders, J. & Perarnau-Llobet, M.  Work fluctuations in slow processes: Quantum signatures and optimal control.  _Phys. Rev. Lett._ 123, 230603 (2019).  URL https://link.aps.org/doi/10.1103/PhysRevLett.123.230603.
  * [53] Scandi, M., Miller, H. J. D., Anders, J. & Perarnau-Llobet, M.  Quantum work statistics close to equilibrium.  _Phys. Rev. Research_ 2, 023377 (2020).  URL https://link.aps.org/doi/10.1103/PhysRevResearch.2.023377.
  * [54] Maes, C. & Netočný, K.  Time-reversal and entropy.  _J. Stat. Phys._ 110, 269–310 (2003).  URL https://doi.org/10.1023/A:1021026930129.
  * [55] Jarzynski, C.  Nonequilibrium equality for free energy differences.  _Phys. Rev. Lett._ 78, 2690–2693 (1997).  URL https://link.aps.org/doi/10.1103/PhysRevLett.78.2690.
  * [56] Crooks, G. E.  Entropy production fluctuation theorem and the nonequilibrium work relation for free energy differences.  _Phys. Rev. E_ 60, 2721–2726 (1999).  URL https://link.aps.org/doi/10.1103/PhysRevE.60.2721.
  * [57] Sinitsyn, N. A.  Fluctuation relation for heat engines.  _J. Phys. A: Math. Theor._ 44, 405001 (2011).  URL https://doi.org/10.1088/1751-8113/44/40/405001.
  * [58] García-García, R., Domínguez, D., Lecomte, V. & Kolton, A. B.  Unifying approach for fluctuation theorems from joint probability distributions.  _Phys. Rev. E_ 82, 030104 (2010).  URL https://link.aps.org/doi/10.1103/PhysRevE.82.030104.
  * [59] Verley, G., den Broeck, C. V. & Esposito, M.  Work statistics in stochastically driven systems.  _New J. Phys._ 16, 095001 (2014).  URL https://doi.org/10.1088/1367-2630/16/9/095001.
  * [60] Campisi, M.  Fluctuation relation for quantum heat engines and refrigerators.  _J. Phys. A: Math. Theor._ 47, 245001 (2014).  URL https://doi.org/10.1088/1751-8113/47/24/245001.
  * [61] Gingrich, T. R., Rotskoff, G. M., Vaikuntanathan, S. & Geissler, P. L.  Efficiency and large deviations in time-asymmetric stochastic heat engines.  _New J. Phys._ 16, 102003 (2014).  URL https://doi.org/10.1088/1367-2630/16/10/102003.
  * [62] Proesmans, K., Cleuren, B. & den Broeck, C. V.  Stochastic efficiency for effusion as a thermal engine.  _EPL (Europhysics Letters)_ 109, 20004 (2015).  URL https://doi.org/10.1209/0295-5075/109/20004.
  * [63] Polettini, M., Verley, G. & Esposito, M.  Efficiency statistics at all times: Carnot limit at finite power.  _Phys. Rev. Lett._ 114, 050601 (2015).  URL https://link.aps.org/doi/10.1103/PhysRevLett.114.050601.
  * [64] Jiang, J.-H., Agarwalla, B. K. & Segal, D.  Efficiency statistics and bounds for systems with broken time-reversal symmetry.  _Phys. Rev. Lett._ 115, 040601 (2015).  URL https://link.aps.org/doi/10.1103/PhysRevLett.115.040601.
  * [65] Proesmans, K., Dreher, Y., Gavrilov, M. c. v., Bechhoefer, J. & Van den Broeck, C.  Brownian duet: A novel tale of thermodynamic efficiency.  _Phys. Rev. X_ 6, 041010 (2016).  URL https://link.aps.org/doi/10.1103/PhysRevX.6.041010.
  * [66] Park, J.-M., Chun, H.-M. & Noh, J. D.  Efficiency at maximum power and efficiency fluctuations in a linear Brownian heat-engine model.  _Phys. Rev. E_ 94, 012127 (2016).  URL https://link.aps.org/doi/10.1103/PhysRevE.94.012127.
  * [67] Vroylandt, H., Bonfils, A. & Verley, G.  Efficiency fluctuations of small machines with unknown losses.  _Phys. Rev. E_ 93, 052123 (2016).  URL https://link.aps.org/doi/10.1103/PhysRevE.93.052123.
  * [68] Proesmans, K. & Van den Broeck, C.  The underdamped Brownian duet and stochastic linear irreversible thermodynamics.  _Chaos_ 27, 104601 (2017).  URL https://doi.org/10.1063/1.5001187.
  * [69] Gupta, D. & Sabhapandit, S.  Stochastic efficiency of an isothermal work-to-work converter engine.  _Phys. Rev. E_ 96, 042130 (2017).  URL https://link.aps.org/doi/10.1103/PhysRevE.96.042130.
  * [70] Gupta, D.  Exact distribution for work and stochastic efficiency of an isothermal machine.  _J. Stat. Mech._ 2018, 073201 (2018).  URL https://doi.org/10.1088/1742-5468/aace09.
  * [71] Verley, G., Esposito, M., Willaert, T. & Van den Broeck, C.  The unlikely Carnot efficiency.  _Nat. Commun._ 5, 4721 (2014).  URL https://doi.org/10.1038/ncomms5721.
  * [72] Verley, G., Willaert, T., Van den Broeck, C. & Esposito, M.  Universal theory of efficiency fluctuations.  _Phys. Rev. E_ 90, 052145 (2014).  URL https://doi.org/10.1103/PhysRevE.90.052145.
  * [73] Manikandan, S. K., Dabelow, L., Eichhorn, R. & Krishnamurthy, S.  Efficiency fluctuations in microscopic machines.  _Phys. Rev. Lett._ 122, 140601 (2019).  URL https://link.aps.org/doi/10.1103/PhysRevLett.122.140601.
  * [74] Rana, S., Pal, P. S., Saha, A. & Jayannavar, A. M.  Single-particle stochastic heat engine.  _Phys. Rev. E_ 90, 042146 (2014).  URL https://link.aps.org/doi/10.1103/PhysRevE.90.042146.
  * [75] Proesmans, K. & den Broeck, C. V.  Stochastic efficiency: five case studies.  _New J. Phys._ 17, 065004 (2015).  URL https://doi.org/10.1088/1367-2630/17/6/065004.
  * [76] Rana, S., Pal, P., Saha, A. & Jayannavar, A.  Anomalous Brownian refrigerator.  _Physica A_ 444, 783–798 (2016).  URL https://www.sciencedirect.com/science/article/pii/S0378437115009541.
  * [77] Suñé, M. & Imparato, A.  Efficiency fluctuations in steady-state machines.  _J. Phys. A: Math. Theor._ 52, 045003 (2019).  URL https://doi.org/10.1088/1751-8121/aaf2f8.
  * [78] Cerino, L., Puglisi, A. & Vulpiani, A.  Kinetic model for the finite-time thermodynamics of small heat engines.  _Phys. Rev. E_ 91, 032128 (2015).  URL https://link.aps.org/doi/10.1103/PhysRevE.91.032128.
  * [79] Vroylandt, H., Esposito, M. & Verley, G.  Efficiency fluctuations of stochastic machines undergoing a phase transition.  _Phys. Rev. Lett._ 124, 250603 (2020).  URL https://link.aps.org/doi/10.1103/PhysRevLett.124.250603.
  * [80] Rosinberg, M. L. & Horowitz, J. M.  Continuous information flow fluctuations.  _Europhys. Lett._ 116, 10007 (2016).  URL https://doi.org/10.1209/0295-5075/116/10007.
  * [81] Paneru, G., Dutta, S., Sagawa, T., Tlusty, T. & Pak, H. K.  Efficiency fluctuations and noise induced refrigerator-to-heater transition in information engines.  _Nat. Commun._ 11, 1012 (2020).  URL https://doi.org/10.1038/s41467-020-14823-x.
  * [82] Paneru, G. & Pak, H. K.  Colloidal engines for innovative tests of information thermodynamics.  _Adv. Phys. X_ 5, 1823880 (2020).  URL https://doi.org/10.1080/23746149.2020.1823880.  https://doi.org/10.1080/23746149.2020.1823880.
  * [83] Esposito, M., Ochoa, M. A. & Galperin, M.  Efficiency fluctuations in quantum thermoelectric devices.  _Phys. Rev. B_ 91, 115417 (2015).  URL https://link.aps.org/doi/10.1103/PhysRevB.91.115417.
  * [84] Agarwalla, B. K., Jiang, J.-H. & Segal, D.  Full counting statistics of vibrationally assisted electronic conduction: Transport and fluctuations of thermoelectric efficiency.  _Phys. Rev. B_ 92, 245418 (2015).  URL https://link.aps.org/doi/10.1103/PhysRevB.92.245418.
  * [85] Cuetara, G. B. & Esposito, M.  Double quantum dot coupled to a quantum point contact: a stochastic thermodynamics approach.  _New J. Phys._ 17, 095005 (2015).  URL https://doi.org/10.1088/1367-2630/17/9/095005.
  * [86] Crépieux, A. & Michelini, F.  Heat-charge mixed noise and thermoelectric efficiency fluctuations.  _J. Stat. Mech._ 2016, 054015 (2016).  URL https://doi.org/10.1088/1742-5468/2016/05/054015.
  * [87] Tang, G., Thingna, J. & Wang, J.  Thermodynamics of energy, charge, and spin currents in a thermoelectric quantum-dot spin valve.  _Phys. Rev. B_ 97, 155430 (2018).  URL https://link.aps.org/doi/10.1103/PhysRevB.97.155430.
  * [88] Denzler, T. & Lutz, E.  Efficiency fluctuations of a quantum heat engine.  _Phys. Rev. Research_ 2, 032062 (2020).  URL https://link.aps.org/doi/10.1103/PhysRevResearch.2.032062.
  * [89] Martínez, I. A. _et al._ Brownian carnot engine.  _Nat. Phys._ 12, 67–70 (2016).  URL https://doi.org/10.1038/nphys3518.
  * [90] Barato, A. C. & Seifert, U.  Thermodynamic uncertainty relation for biomolecular processes.  _Phys. Rev. Lett._ 114, 158101 (2015).  URL https://doi.org/10.1103/PhysRevLett.114.158101.
  * [91] Gingrich, T. R., Horowitz, J. M., Perunov, N. & England, J. L.  Dissipation bounds all steady-state current fluctuations.  _Phys. Rev. Lett._ 116, 120601 (2016).  URL https://doi.org/doi/10.1103/PhysRevLett.116.120601.
  * [92] Dechant, A. & ichi Sasa, S.  Current fluctuations and transport efficiency for general langevin systems.  _J. Stat. Mech._ 2018, 063209 (2018).  URL https://doi.org/10.1088%2F1742-5468%2Faac91a.
  * [93] Liu, K., Gong, Z. & Ueda, M.  Thermodynamic uncertainty relation for arbitrary initial states.  _Phys. Rev. Lett._ 125, 140602 (2020).  URL https://link.aps.org/doi/10.1103/PhysRevLett.125.140602.
  * [94] Zhang, Y.  Comment on “Fluctuation Theorem Uncertainty Relation” and “Thermodynamic Uncertainty Relations from Exchange Fluctuation Theorems”.  _arXiv e-prints_ 2019, arXiv:1910.12862 (2019).  URL https://arxiv.org/abs/1910.12862.
  * [95] Hasegawa, Y. & Van Vu, T.  Fluctuation theorem uncertainty relation.  _Phys. Rev. Lett._ 123, 110602 (2019).  URL https://link.aps.org/doi/10.1103/PhysRevLett.123.110602.
  * [96] Timpanaro, A. M., Guarnieri, G., Goold, J. & Landi, G. T.  Thermodynamic uncertainty relations from exchange fluctuation theorems.  _Phys. Rev. Lett._ 123, 090604 (2019).  URL https://link.aps.org/doi/10.1103/PhysRevLett.123.090604.