1. Introduction
The last few decades have seen a revolution in non-equilibrium statistical mechanics [
1,
2,
3,
4,
5,
6] with the realization that many thermodynamic processes are governed by exact relations such as the Jarzynski equality [
1] and the Crooks fluctuation theorem [
2]. An example of such a result can be found in ref. [
7], which derives expressions governing the work dissipated by a system undergoing some driven process. Specifically, a simple formula is derived that relates the minimum amount of dissipated work, versus the actual amount dissipated, as a function of the initial statistical state of the process.
In this paper, we consider a physical system that undergoes an interaction with its environment as described by a driven classical or quantum–mechanical process. By extending the result mentioned above [
7], we calculate how much non-equilibrium free energy the system gains during this interaction. We also consider how the gain of free energy can be optimized by a judicious choice of the initial state. Optimizing the gain of free energy is physically meaningful, because the free energy gain sets a bound on the amount of work that the system can extract and store by interacting with a thermal environment: the maximum amount of work that can be extracted is equal to the non-equilibrium free energy minus the free energy at thermal equilibrium.
As a motivating example, consider a photosynthetic organism: before the sun rises in the morning, the organism must invest resources in order to prepare its photosynthetic machinery for harvesting free energy from the sun. When the sun sets in the evening, it stops photosynthesizing and uses the harvested free energy to survive the night, reproduce, etc. All else being equal, the organism should prepare its photosynthetic machinery in the state that maximizes the gain of free energy, since this will typically translate into higher fitness.
In the next section, we formulate our general setup and use it to calculate the free energy gain as a function of the initial state. Importantly, our calculation takes into account the preparation of the initial state as well as the extraction of free energy into a work reservoir. State preparation and work extraction may utilize external heat baths, possibly at two different temperatures.
In our first result, we derive simple necessary and sufficient conditions to guarantee that for a given interaction with the environment, free energy gain can be optimized by varying the initial state. We then derive a simple information–theoretic formula that describes the dependence of the free energy gain on the initial state. Using this formula, we relate the free energy gained when the process begins in an optimal initial state versus that gained when the process begins in a suboptimal initial state. Finally, we show that the problem of identifying the optimal initial state exhibits two distinct regimes, depending on the bath temperatures involved in state preparation versus work extraction. When work extraction happens at a lower temperature than preparation, the problem involves the maximization of a concave function, and it can be easily solved by gradient ascent. In this regime, a biological species in which each successive generation harvests more free energy is headed for the global maximum. On the other hand, when work extraction happens at a higher temperature than preparation, the objective may become nonconcave, and gradient ascent may become stuck in a suboptimal solution. At the end of this paper, we illustrate our results on an information engine.
Our results complement existing research on work extraction and free energy harvesting in classical and quantum thermodynamics [
6,
8,
9,
10,
11,
12,
13,
14,
15,
16]. Such research typically considers how extractable work depends on properties of the physical process—such as its speed of evolution [
17,
18], constrained control [
19,
20], or stochastic fluctuations [
21,
22]—given some fixed initial state. Here, we consider the complementary question of how extractable work depends on the initial state, given a fixed physical process. See also refs. [
23,
24,
25,
26,
27] for related results concerning the dependence of entropy production on the initial state.
3. Free Energy Harvesting
Suppose that the system has access to an internal work reservoir (e.g., a battery), which is used for state preparation and work extraction. Suppose also that the system also has access to two heat baths at temperatures
and
. The system undergoes the following four-stage procedure, which is also illustrated in
Figure 1:
(A)
Preparation: The system begins in an unprepared state
and Hamiltonian
. It is then driven to the prepared state
and Hamiltonian
while coupled to the internal work reservoir and heat bath at temperature
. Given Equation (
1), the work extracted during this transformation is bounded by
(B) Interaction/Free energy harvesting: The system is disconnected from the work reservoir. It then undergoes a fixed interaction with the environment, which may contain any number of thermodynamic reservoirs, free energy sources, and external work reservoirs (e.g., the sun). At the end of this stage, the system has Hamiltonian and state . Here, is the quantum channel (completely positive and trace-preserving map) that describes the system’s evolution due to the interaction with the environment.
(C)
Work Extraction: The system is coupled to the work reservoir and the heat bath at temperature
. It is then driven from state
and Hamiltonian
to final state
and Hamiltonian
. According to Equation (
1), the maximum work that can be extracted during this transformation is
(D) Reset: The system is disconnected from the internal work reservoir and then undergoes another interaction with the environment. As a result of this interaction—which, in some cases, may be a simple relaxation — the system ends in state and Hamiltonian . This completes the cycle, thereby preparing the system for Stage A. In the special case where and , the Reset stage is not necessary.
Figure 1.
Four-stage protocol used to harvest free energy from the environment. During the Preparation stage, the system is coupled to the internal work reservoir and a heat bath at temperature . During Interaction, the system harvests free energy from the external environment. During Work Extraction, the system is coupled to the internal work reservoir and a heat bath at temperature . During Reset, the system is again coupled to the external environment.
Figure 1.
Four-stage protocol used to harvest free energy from the environment. During the Preparation stage, the system is coupled to the internal work reservoir and a heat bath at temperature . During Interaction, the system harvests free energy from the external environment. During Work Extraction, the system is coupled to the internal work reservoir and a heat bath at temperature . During Reset, the system is again coupled to the external environment.
As a concrete—though still highly idealized—example of our setup, one might imagine a simple photosynthetic system, such as Bacteriorhodopsin in archaea [
20,
30]. During Preparation, the organism spends free energy (by hydrolyzing ATP) to synthesize the Bacteriorhodopsin protein from free-floating amino acids. During Interaction, the protein uses solar energy to pump protons across the cellular membrane, thereby increasing the membrane potential. During Work Extraction, the membrane potential is used by ATPase to synthesize ATP. Reset may occur by consumption of any additional ATP and degradation of the Bacteriorhodopsin protein back into amino acids. We note that in this system, Preparation and Work Extraction steps may occur at different temperatures.
We now calculate a bound on the work that can be extracted using this four-stage process. Since the system only interacts with the work reservoir during Stages A and C, the total amount of extracted work is
Equations (
5) and (
6) then imply the upper bound
, where we define
Observe that
is a function of the initial state and that it consists of two terms. The first term is the gain of non-equilibrium free energy during the Interaction with the environment (Stage B). The second term is the loss of non-equilibrium free energy during the Reset (Stage D).
We may also rewrite
in the following form:
where
and
refer to Gibbs states corresponding to
and
respectively.
This expression follows by combining Equations (
3) and (
8) and rearranging, while also defining the “baseline” term
Observe that Equation (
9) expresses
as the gain of availability, Equation (
4), during the transition from
to
), plus a constant offset (
).
In the following, we will generally be interested in the dependence of
on the initial state
. In Equation (
8), this dependence is captured by first term, the gain of non-equilibrium free energy, since the second term does not depend on
(nor on the channel
). In Equation (
9), this dependence is captured entirely by the gain of availability, since
again does not depend on
(nor on the channel
).
For convenience, we will often refer to simply as the “free energy gain”.
4. Increasing Free Energy Gain
We now consider the problem of maximizing the free energy gain
with respect to the initial state
. Before proceeding, we note that maximizing free energy gain is not always the same as maximizing extracted work
W. The two optimization problems are equivalent when the the Preparation and Work Extraction stages are thermodynamically reversible, so that the bounds (
5) and (
6) are saturated. The optimization of free energy gain
is relevant when Preparation and Work Extraction stages are thermodynamically optimal. Moreover, because
always sets an upper bound on extractable work, maximizing
is also relevant when the precise details of Preparation and Work Extraction are unknown, varying, or simply undefined.
To study the problem of optimizing
, we first consider a few special cases. First, suppose that
is a (generalized) Gibbs-preserving map that transforms the initial Gibbs state to the final Gibbs state
,
. This situation applies if the driving by the environment is sufficiently slow so that the system remains in equilibrium throughout (quasistatic driving), or if the system is allowed to equilibrate at the end of its interaction with the environment. Then, by monotonicity of relative entropy [
31],
Combining with Equation (
9) implies that
for all
whenever
. That is, if
maps
to
and the temperature of Work Extraction is less than or equal to the temperature of Preparation, it is impossible to extract more work than
regardless of the initial state. Moreover, since
, one cannot do better than the naive strategy of setting the initial state to
, i.e., letting the system relax fully to equilibrium for Hamiltonian
and temperature
.
On the other hand, suppose that
is not Gibbs preserving, so
. Suppose we still choose the initial state as
. Equation (
9) then gives
where the last inequality follows from the positivity of the relative entropy between different states. Thus, if
is not Gibbs preserving, there is always at least one initial state for which
is strictly greater than
. Moreover, generally,
can be increased even further by optimizing the choice of the initial state.
These conditions are formalized by the following statement.
Theorem 1. (1a) If , there exists some ρ with only if .
(1b) If , there always exists some ρ with .
As a special case, consider the situation where the quantum channel is the identity ( for all inputs) and the Hamiltonians are equal. In that case, only if . Then, Theorem 1 implies that free energy can be gained beyond if and only if . In this special case, the interaction with the environment provides no free energy, so free energy can only be gained using a temperature difference between the baths, as in a heat engine.
6. Optimal Initial State
We now consider the problem of optimizing the initial state so as to maximize free energy gain. Consider the initial state
that is a local or global maximizer of
. Then, according to Theorem 2, for any other initial state
with
,
Equation (
16) provides a simple formula for computing the free energy gain that is lost when the system is prepared in the “wrong” initial state: it is given by comparing the relative entropy between the “wrong” and “right” (i.e., optimal) states at the beginning of the process with the the same relative entropy at the end of the process, multiplied by the temperatures
and
.
Next, we consider the difficulty of finding the optimal state
. As we now show,
is a concave function of the initial state if the temperature of Preparation is no cooler than the temperature of Work Extraction. The proof is found in
Appendix B.
Theorem 3. is a concave function of ρ if .
Any local maximizer of a concave function must also be a global maximizer. Thus, Theorem 3 implies that as long as
, the global optimization of free energy harvesting can be accomplished by a simple procedure, e.g., gradient ascent in the space of density matrices [
25]. Consider an adaptive system that undergoes the same free energy harvesting process many times. Each time the system goes through the free energy harvesting cycle, it has the opportunity to vary its initial state
to try to increase the free energy gain. The concavity of free energy maximization implies that if the adaptive process is able to alter the initial state to improve the amount of free energy harvested in each round, then the adaptive system is headed for the global optimum, and will not become stuck in a local optimum.
A population of photosynthetic bacteria, for example, exhibits genetic variation in the individuals’ molecular mechanisms for performing the Preparation, Interaction, and Work Extraction stages, all of which impact the viability of the individual organisms and their ability to reproduce. In general, we expect that the more efficient an individual bacterium is at harvesting free energy, the more viable it will be, resulting in its offspring forming a larger fraction of the population in subsequent generations. Focusing only on the free energy harvesting stage, we see that genetic variations which increase the amount of free energy harvested—e.g., a small change in the structure of a photo-harvesting chromophore which provides greater overlap with the absorptive spectrum of the chromophore and ambient light conditions—will guide the population as a whole to adapt its composition to become more efficient at energy harvesting.
The concavity of free energy gain as a function of the initial state of the bacteria implies that if the free energy harvesting is suboptimal, then there is always a nearby initial state that improves the free energy gain. The only way for the adaptive process to become stuck in a local optimum is if the genetic variation in the population is unable to explore fully the space of initial probabilistic states.
If Work Extraction occurs at a warmer temperature than Preparation, however, in general, there is no guarantee that is concave. In this case, finding the global optimum may be a much harder problem, and gradient ascent may become trapped in suboptimal local maxima.
Finally, we note that Equation (
16) only holds for those
that obey
. This condition is equivalent to the requirement that the support of
falls within the support of
. For this reason, the applicability of Equation (
16) is most general in those cases where the optimizer
has full support. In our final result, we provide some simple sufficient conditions for
to have full support. The proof is found in
Appendix B.
Theorem 4. Any (local or global) maximizer σ of has full support if and has full support for all ρ, or if .
7. Example
We illustrate our results using a simple example of a two-level system. The system can be considered as a model of an “information engine” which gains free energy by interacting with a heat bath and a low-entropy environment [
34,
35].
For simplicity, we begin by focusing on the classical case, where all Hamiltonians, states, and channels are diagonal in the same basis. We use classical notation p (instead of ) to indicate the actual initial probability distribution of the system, q (instead of ) to indicate the optimal initial distribution, and P (instead of ) to indicate the classical transition matrix (conditional probability of outputs given inputs). We also use the notation to indicate the classical relative entropy (also known as Kullback–Leibler divergence) and for the Shannon entropy.
The engine is modeled as an overdamped two-level system with energy gap , with energy function . The engine is coupled to the environment, another two-level system with a uniform energy function, . The engine and environment are weakly coupled, so their joint energy function can be decomposed as . Also, initially at time , the engine and the environment are statistically independent: . Then, over the time interval , the two systems relax freely while connected to a heat bath at temperature . The environment and the engine have coupled transitions: the transition in the engine occurs only when the environment simultaneously undergoes a transition, and this is vice versa for the transition. No transitions occur in/out of microstates where the engine and environment occupy different levels, .
Suppose the engine is used to extract work using the four-stage protocol shown in
Figure 1. We assume that Stage A (Preparation) starts and ends with the same Hamiltonian (
), and that the unprepared state is the Gibbs state
at some temperature
(
). During Stage B (Interaction), the engine evolves according to a transition matrix
P, which is defined below. Finally, we assume Stage C (Work Extraction) starts and ends with the same Hamiltonian (
) and that the final state is the Gibbs state
at some temperature
.
The net amount of extracted work is bounded
by the gain of availability:
This result follows from Equation (
9) and the fact that
(given our assumptions). At the same time, our results imply that
can be expressed as
where
is a maximizer of
, as given in Equation (
16), which is valid whenever
q has full support. A simple sufficient condition for
q to have full support is for environment distribution
to have full support; this follows from Theorem 4 and because then
has full support for all
p (see Equation (
21) below). The function
and the optimizer
q will depend on the parameters of the problem: the energy gap
, the initial environment distribution
, and the temperature of Preparation (
), Interaction (
T), and Work Extraction (
).
To construct
P, we assume that the engine and environment undergo continuous-time Markovian dynamics, which are represented by the rate matrix
where
is the transition rate from state
j to state
i with the four states referring to
,
,
.
R obeys local detailed balance for the energy function
and interaction temperature
. We consider the limit of a long relaxation, corresponding to the following joint transition matrix:
The transition matrix of the engine subsystem
X is computed by marginalizing
and it can written explicitly in matrix notation as
We now illustrate our results with some numerical experiments. In
Figure 2, we show the gain of availability
as a function of the engine’s initial distribution
p, which is computed using Equation (
17). Since the engine only has two microstates,
p is fixed by probability
of microstate
, as shown on the horizontal axis. The different subplots correspond to the different initial distribution of the environment
. The other parameters are set to
and
. We show the location of the optimal initial distribution
q found by numerical optimization, and the value of
is computed using using our information-theoretic expression (
17). We also show the location of the initial equilibrium distribution
.
We comment on some interesting aspects of the results in
Figure 2. First,
is a concave function of the initial distribution, which is in accordance with Theorem 3. We also verify our main result, showing that the thermodynamic (
17) and information-theoretic (
18) expressions for
are equivalent. Note that maximum availability gain is non-monotonic in
. In
Figure 2b, the environment starts from the maximum entropy state
; in this case, the optimal initial distribution is the equilibrium one (
), and it is not possible to harvest strictly positive availability (
). On the other hand, strictly positive availability can be harvested when the environment is biased to microstate
, see
Figure 2a, or
, see
Figure 2c,d, but the optimal strategy differs in these two cases. When the environment is biased to
(
), the optimal initial distribution is biased to
relative to equilibrium (
). Conversely, when the environment is biased to
(
), the optimal initial distribution is biased toward
relative to equilibrium (
). This reflects the balance between two effects. On one hand, there is an advantage to biasing the engine’s initial distribution toward
, because the transition
harvests
energy from the heat bath. On the other hand, availability can also be harvested by decreasing the Shannon entropy of the engine, i.e., by increasing
This quantity is shown as the dashed red line in
Figure 2. It can be seen that this second effect shifts the optimal distribution toward
relative to equilibrium, and it becomes stronger when the environment is more concentrated on state
.
Figure 2d shows that
q has full support even though
does not have full support (so
does not have full support for all
p; see Equation (
21)). This demonstrates that Theorem 4 is only a sufficient, but not necessary, condition for the optimizer
q to have full support.
In
Figure 3, we consider the same system but now setting the temperature of Work Extraction higher than that of Preparation and Interaction,
. As above, different subplots correspond to different initial distributions of the environment. To emphasize interesting features, we make several changes with respect to
Figure 2: we explore different initial environment distributions, the scale of the y-axes are different, and for simplicity, we do not show the change of Shannon entropy
.
When
, Theorem 3 no longer applies and the function
may become non-concave, as seen in
Figure 3b–d. Moreover,
Figure 3b,c show that
may even have multiple local maxima. Note that in these two plots, the shape of
changes and the identity of the higher local maxima switches, even though
undergoes a very small change. In
Figure 3a–c, we verify that the thermodynamic (
17) and information-theoretic (
18) expressions for
are equivalent. For systems with several local maxima/minima, we verified that this equivalence holds regardless of which critical point is chosen as
q. Note that
is necessary but not sufficient for non-concavity, since
remains concave in
Figure 3a. Also,
Figure 3d,
does not have full support and Theorem 4 no longer holds. In this case, the optimal initial distribution
does not have full support, so our information-theoretic expression no longer applies.
In our last numerical experiment, we consider this system in the quantum regime. We define a quantum channel
that dephases any input state
in the reference basis
; then, we apply the transition matrix
P in this basis:
The Hamiltonians used for Preparation and Work Extraction are allowed to be coherent (non-diagonal) with respect to the reference basis. Specifically, we consider the same Hamiltonian with energy gap
but rotated by angle
with respect to the reference basis:
The net amount of extracted work is bounded by the gain of availability:
where
and
indicate Gibbs states for
and
, respectively. As above, our results imply that
can also be expressed as
where
is a maximizer of
. Equations (
25) and (
26) are simply the quantum versions of Equations (
17) and (
18).
Figure 4 shows the results for four values of
, which varies the amount of coherence. The other parameters are chosen as in
Figure 3b (
). For each
, we use Equation (
25) to calculate the value of
for two sets of states
, which are always indexed by the (lower energy) eigenvalue
. First, solid lines indicate
for states
diagonal in the reference basis,
. Second, dashed lines indicate
for states
diagonal in the same basis as the optimal initial state
. Vertical lines indicate the location of
in this optimal basis. We also plot the values of
calculated using our information-theoretic expression Equation (
26), verifying that it matches those calculated using Equation (
25) for both sets of states.
There is no coherence in
Figure 4a, so we effectively recover the classical case shown in
Figure 3b. For higher
,
Figure 4b–d demonstrate that availability gain can be increased by preparing the initial state in the correct basis. Moreover, we verified that the optimal state
is not diagonal in either the reference basis nor the basis of the rotated Hamiltonian
. The optimal basis arises from the balance of two effects: the cost of preparation (which favors
being in the same basis as
H) versus the free energy dissipated when
is dephased by
(which favors
being in the reference basis). Under the optimal strategy, the engine gains availability not only by increasing energy or decreasing entropy but also by harvesting coherence with respect to the basis of
.