## Abstract

With increasing interest in the control of systems at the nano- and mesoscopic scales, studies have been focused on the limit of the energy dissipation in an open system by refining the concept of the Maxwell’s demon. To uncover the underlying physical principle behind a system controlled by a demon, we prove a previously unexplored set of fluctuation theorems. These fluctuation theorems imply that there exists an intrinsic nonequilibrium state of the system, led by the nonnegative demon-induced dissipative information. A consequence of this analysis is that the bounds of both work and heat are tighter than the limits predicted by the Sagawa-Ueda theorem. We also suggest a possible experimental test of these work and heat bounds.

## INTRODUCTION

In the history of physics, the well-known Maxwell’s demon was proposed to act as a rebel against the authority of the thermodynamic second law (*1*). It decreases the entropy in a thermally isolated system and finally rescues the whole universe from the heat death. Despite the myth of its existence (*2*, *3*), the demon reflects the habitus of the universal system, especially at microscales: The system interacting with a demon becomes open and thus behaves far away from thermal equilibrium. There is a deep connection between the nonequilibrium thermodynamics involved in the Maxwell’s demon and the information theory, such as in the much-studied cases of Szilard engine (*4*) and Landauer principle (*5*, *6*). The physical nature of information may be revealed by the study on the demon. For this reason, many efforts have been devoted to this direction. The related works have shown their importance in the theoretic and experimental areas of nano- and mesoscopic system analysis and control (*7*–*15*).

As a central concept in modern thermodynamics, the entropy production quantifies the energy dissipation in a stochastic system. One of the fundamental properties of the entropy production is that it follows the Jarzynski equality (*16*) or the integral fluctuation theorem, which is regarded as the generalized second law from a microscopic perspective. To analyze the demon’s effect, several pioneering works attempted to construct an improper entropy production, which disobeys the Jarzynski equality (*17*–*22*). This thought follows the original idea of Maxwell. One representative of this construction was given by Sagawa and Ueda (*23*, *24*), where a fluctuation theorem (Sagawa-Ueda theorem) has been developed for the improper entropy production by taking into account the information acquired by the demon. Correspondingly, a generalized second law arises from this fluctuation theorem: The demon cannot extract work more than the acquired information on average. This result gives plausible interpretation on the Szilard’s engine and many other models, respectively. However, there are still unsolved problems in the frameworks of this kind for the following reasons.

First, the improper entropy production arises because the system dynamics is measured in an inconsistent manner where a part of the demon’s contribution is missing. Thus, the improper entropy production measures the energy dissipation incorrectly. Intuitively, the demon controls not only the system state but also the energy exchanges, such as the work and heat between the system and the baths. Thus, the demon contributes to the entropies in both the system and the baths. With this thought, one can construct different improper entropy productions by neglecting any part of the demon’s contribution (from either the system or the baths, or parts of them). Correspondingly, there exist different fluctuation theorems for these entropy productions, which can lead to different second law inequalities for work or heat. The first question is which inequality is more appropriate? Second, the equality in a second law inequality always represents the thermal equilibrium state of the system. However, a system is supposed to be in a nonequilibrium state when controlled by a demon. This indicates that if the demon works efficiently, then the equality in the second law in previous frameworks does not always hold. It has been reported by several works (*25*–*28*) in the examples of the information processing that the upper bound of the extracted work is less than the bound predicted by the Sagawa-Ueda theorem. This reveals the fact that when the system is at a controlled nonequilibrium state, there exists an additional energy dissipation, which is not estimated by the previous frameworks. The second question is where this energy dissipation originated?

The motivation of this paper is to draw a clearer picture of the Maxwell’s demon. We note the fact that the controlled system actually follows the second law when the dynamics is properly measured. One can quantify the correct entropy productions at different coarse-grained levels for the demon’s control. Every improper entropy production can give rise to a missing part of the demon’s contribution. None of these entropy productions fulfills the task of complete characterization of the demon unless we take the total contribution into account. The puzzle of the demon obviously involves the interactions between the system and the demon during the whole dynamics. In the thermodynamics, it is appropriate to describe these interactions by using the informational correlation—the dynamical mutual information (*29*–*31*) defined as *x*(*t*) and *y*(*t*) represent the two simultaneous trajectories of the two interacting systems, respectively, and *p* denotes the probability (density) of the trajectories. With this quantification at the trajectory level, it is natural to introduce the concept of dissipative information (*32*–*36*) to quantify the time irreversibility of the dynamical mutual information* _{I}* rightly quantifies the demon’s total contribution. For a complete thermodynamical description, one should develop a set of fluctuation theorems, which includes not only the entropy production in the system but also the dissipative information, rather than the construction of improper entropy productions. The fluctuation theorems on the entropy productions reflect the nonequilibrium dynamics in the controlled system. Different from the ordinary fluctuation theorems for one single system, the fluctuation theorem on the dissipative information quantifies the nonequilibrium interactions or binary relations. It is thus reasonable to believe that when the demon works efficiently, there exists an intrinsic nonequilibrium state (due to the binary relations) characterized by a positive averaged dissipative information. This is the source of the inevitable energy dissipation in many cases of the demon.

## RESULTS

### Fluctuation theorems and inequalities

Let us consider that a demon controls a system that is coupled with several thermal baths. The system and the demon are initially at the states *x*_{0} and *y*, respectively. Then, the demon performs a control to the system with a protocol Γ(*y*) based on *y*. For simplicity, the correspondence between *y* and Γ(*y*) is assumed to be bijective. Consequentially, the system’s trajectory *x*(*t*) is correlated to the demon state *y*. As a reasonable assumption, the demon does not alter the control protocol while the demon state *y* is unchanged during the dynamics. Driven by thermal baths, the stochasticity of the system allows the time-reversal trajectory *x*(*t*) denoted by *x*_{t}.

When Γ(*y*) or *y* is displayed explicitly in the system dynamics, an entropy production can be given by log ratio between the probabilities (densities) of *x*(*t*) and *y**X*∣*Y* means that the thermodynamical entity of the system (*X*) is controlled by a given protocol of the demon (*Y*). In addition, σ_{X∣Y} can be viewed as the total stochastic entropy change consisting of the contributions from the system and the baths at the microscopic level (*37*). This is because the total entropy change can be given by the second equality in Eq. 2. Here, Δ*s*_{X∣Y} = −log *p*(*x*_{t}∣*y*)−[−log *p*(*x*_{0}∣*y*)] quantifies the stochastic entropy difference of the system between the final and initial states; *Q*_{X∣Y} = − *T*δ*s*_{X∣Y}, which has been proven in the detailed fluctuation theorem in the Langevin or Markovian dynamics (*38*, *39*). Thus, δ*s*_{X∣Y} is recognized as the (stochastic) entropy change in the baths. On the other hand, when the demon’s control Γ(*y*) or the demon state *y* is unknown in the system dynamics, the entropy production can be measured properly at the coarse-grained level. That is to say, one needs to average or integrate the demon’s control information out of the dynamics, i.e., to obtain the marginal probability *p*[*x*(*t*)] = ∑* _{y}p*(

*y*)

*p*[

*x*(

*t*)∣

*y*] with implicit control conditions. Then, another entropy production, which is a coarse-grained version of σ

_{X∣Y}, can be given by

In the second equality in Eq. 3, * _{X}* quantifies the total entropy change at the coarse-grained level with the lack of the demon’s control information. An illustrative case for showing the differences between the entropy productions can be found in Fig. 1. It is interesting that both σ

_{X∣Y}and σ

*follow the Jarzynski equalities*

_{X}_{X∣Y})〉 is taken over the ensembles of the system and the demon’s state. One should note that for every protocol, σ

_{X∣Y}obeys the detailed Jarzynski equality under every possible control protocol, i.e., 〈 exp ( − σ

_{X∣Y})〉

_{X∣Y}= 1, where the average 〈·〉

_{X∣Y}is taken over the ensemble of the system while

*y*is fixed. For a complete view of the controlled nonequilibrium thermodynamics of the system, it is appropriate to take the average of the detailed Jarzynski equality on both sides over the ensemble of the demon’s state with the notation 〈·〉 ≡ 〈〈·〉

_{X∣Y}〉

*. Notice that together, the two Jarzynski equalities in Eq. 4 provide a new sight that the second law holds for the system at both two levels of the knowledge of demon’s control.*

_{Y}In general, the two entropy productions shown above are different from each other. The gap between them indicates the demon’s contribution to entropy production, which is exactly the dissipative information σ* _{I}* shown in Eq. 1, where the trajectory

*y*(

*t*) is fixed at a single value of state

*y*. This can be seen from the following relationship

The detailed contributions of the demon to the system and the baths can be revealed by the decomposition of dissipative information and the relations between the entropy changes shown in Eqs. 2 and 3 in the following equalities

Here, Δ*i* = *i*_{0} − *i*_{t} is the information change of the system during the dynamics, with *40*, *41*); *42*–*44*) from the demon to the system along the forward-in-time and backward-in-time trajectories, respectively. The information transfer is an informational measure of how the dynamics of the system depends on the demon by using the comparison between the system dynamics at different coarse-grained levels under the demon’s control (*p*[*x*(*t*)∣*x*_{0}, *y*] and *p*[*x*(*t*)∣*x*_{0}]). In Eq. 5B, the second equality identifies the role of Δ*i* that it can be regarded as the demon’s contribution to the entropy change in the system; the third equality indicates that δ*i* depicts the demon’s contribution to the baths. Then, the role of dissipative information is clear: It describes how the demon influences the entropy production through the nonequilibrium binary relation or interaction (see Fig. 2). Moreover, this effect can be quantified precisely in the following fluctuation theorem

This is a new fluctuation theorem, which is quite different from the Jarzynski equality because it is for the nonequilibrium thermodynamics of the binary interactions between the systems rather than for a single system.

To resolve the puzzle of the demon, we first review the construction of the improper entropy productions. A construction, η = Δ*s _{X}* + δ

*s*

_{X∣Y}is an improper entropy production because it violates Jarzynski equality 〈 exp ( − η)〉 ≠ 1, and the two entropy changes Δ

*s*and δ

_{X}*s*

_{X∣Y}are measured at different levels of the knowledge of the demon’s control according to Eqs. 2 and 3. On the other hand, η arises because Δ

*i*is neglected in σ

_{X∣Y}, η = σ

_{X∣Y}− Δ

*i*, suggested by Eq. 5B. This indicates that in Eq. 4, the Jarzynski equality for σ

_{X∣Y}can be satisfied by adding the contribution of Δ

*i*to η. This is the core of Sagawa-Ueda theorem, which emphasizes Δ

*I*= − Δ

*i*as the key characterization of the demon. Following the similar idea, one can construct different improper entropy productions. For instance, consider η′ = Δ

*s*

_{X∣Y}+ δ

*s*, where Δ

_{X}*s*

_{X∣Y}and δ

*s*are measured in an inconsistent manner in the dynamics, thus 〈 exp ( − η′)〉 ≠ 1. By adding δ

_{X}*i*into η′, one has σ

_{X∣Y}= η′ + δ

*i*, which gives rise to the same Jarzynski equality for σ

_{X∣Y}in Eq. 4. However, neither Δ

*i*nor δ

*i*quantifies the total demon’s contribution because Δ

*i*gives the demon’s influence on the system, while δ

*i*gives the demon’s influence on the baths. Therefore, only the dissipative information σ

*involving both the demon’s control on the system and baths can take into account the overall contribution of the demon. Unlike in previous works, the relation in Eq. 5A, together with the corresponding set of fluctuation theorems in Eqs. 4 and 6, provides the full clear picture of Maxwell’s demon.*

_{I}We further derive a series of inequalities to obtain the bounds on the dissipative entities (entropy productions and dissipative information). By applying Jensen’s inequality 〈 exp ( − *O*)〉 ≥ exp ( − 〈*O*〉) to Eqs. 4 and 6, respectively, we have

The first two are the second law inequalities at different coarse-grained levels of the demon’s control corresponding to the Jarzynski equalities in Eq. 4, while the last inequalities about σ* _{I}* shows the previously unknown feature of the nonequilibrium behavior brought by the demon. To see this, take the average on both sides of Eq. 5A over the ensembles; we have 〈σ

_{X∣Y}〉 = 〈σ

*〉 + 〈σ*

_{X}*〉. Combining with Eq. 7, one sees that 〈σ*

_{I}_{X∣Y}〉 quantifies the true (utmost) entropy productions in the system. A lower bound of 〈σ

_{X∣Y}〉 different from that obtained from the second law in Eq. 7 (which is zero) is given by the following inequality

In Eq. 8, 〈σ_{X∣Y}〉 = 0 at the finest level indicates that the system is in a quasi-static (equilibrium) process, where every control protocol is applied infinitely slowly. Such a demon does not work efficiently in practice. High efficiency means achieving the control in a finite time, which leads to a nonequilibrium process. Consequentially, the lower bound of 〈σ_{X∣Y}〉 is always a positive number rather than 0. Although measured properly, 〈σ* _{X}*〉 does not reflect the true nonequilibrium thermodynamics of the system because of the coarse-graining. Meanwhile, 〈

*σ*〉 does not need to be strictly positive when the system is actually in nonequilibrium. However, there always exists a positive dissipative information (〈σ

_{X}*〉 > 0), which is contained in the true entropy production 〈σ*

_{I}_{X∣Y}〉. This is due to the nonequilibrium part of the dynamical mutual information for the binary relationship between the demon and the system. The exceptions can be seen in the cases where a demon controls the system with a unique and deterministic protocol or noise-free protocols; we have 〈σ

*〉 = 0 as 〈σ*

_{I}*〉 = 〈σ*

_{X}_{X∣Y}〉 during the dynamics. Otherwise, there exists an intrinsic nonequilibrium state of the system in general, which is characterized by an inevitable energy dissipation given by 〈σ

_{X∣Y}〉 = 〈σ

*〉 > 0.*

_{I}We should stress that the dissipative information given by Eq. 1 may fail to work as a dissipative entity when the demon state can change during the dynamics. This is because there is no fluctuation theorem or inequality that can guarantee the universal nonnegativity of the average of Eq. 1 (*32*, *34*). However, we can show that with the proper categorization of the individual subdynamics of the system and the demon from the total dynamics, the fluctuation theorems in Eqs. 4 and 6 and the inequalities in Eqs. 7 and 8 still hold for the system and the demon in the subdynamics, respectively. This indicates the universality of the presented fluctuation theorems and the inequalities about the demon model. The subdynamics categorization method and the detailed derivations are shown in section S3.

### New bounds for work and heat

A consequence of Eq. 8 is that the bounds on the heat and work should be revised beyond the second law. To see this, let us assume that the system is coupled with a thermal bath with temperature *T* for simplicity. Then, the system dynamics can be given by the Langevin dynamics. The Hamiltonian of the system depends on the system state and the control protocol denoted by *H*(*x*, *y*) ≡ *H*(*x*, Γ(*y*)) [*y* and Γ(*y*) is one-to-one correspondence to each other]. The change in the Hamiltonian, depending on concrete demon state, can be given by Δ*H*_{X∣Y} = *H*(*x*_{t}, *y*) − *H*(*x*_{0}, *y*). With the assumption of the local detailed balance condition (*38*), the entropy production can be given in terms of the stochastic heat absorbed by the system σ_{X∣Y} = Δ*s*_{X∣Y} − *T*^{−1}*Q*_{X∣Y}, where the heat can be given by *Q*_{X∣Y} = − *Tδs*_{X∣Y}. According to the thermodynamic first law, stated as Δ*H*_{X∣Y} = *Q*_{X∣Y} + *W*_{X∣Y} with *W*_{X∣Y} being the stochastic work performed on the system, σ_{X∣Y} can be rewritten in terms of the work σ_{X∣Y} = *T*^{−1}[*W*_{X∣Y} − Δ*F*_{X∣y}]. Here, Δ*F*_{X∣y} is the Helmholtz free energy difference depending on the concrete demon state *y*, given by Δ*F*_{X∣y} = 〈Δ*H*_{X∣Y}〉_{X∣Y} − *T*〈Δ*s*_{X∣Y}〉_{X∣Y}. The probability weights in the averages of the state variables in Δ*F*_{X∣y} should be distinguished at the initial and final states: The weights *p*(*x*_{0}∣*y*) and *p*(*x*_{t}∣*y*) with concrete demon state *y* are used for *x*_{0} and *x*_{t}, respectively. Then, according to the inequality for σ_{X∣Y} in Eq. 7, we reach the ordinary second law inequalities for the heat and work

Here, Δ*F*_{X∣Y} = 〈Δ*F*_{X∣y}〉* _{Y}* = 〈Δ

*H*

_{X∣Y}〉 −

*T*〈Δ

*s*

_{X∣Y}〉 is recognized as the averaged free energy difference of the system controlled by the demon, and Δ

*F*

_{X∣Y}no longer depends on concrete demon states.

Note that different constructions of improper entropy productions can lead to the same form of the second law in Eq. 9. For example, the Sagawa-Ueda theorem suggested to use the coarse-grained entropy change 〈Δ*s _{X}*〉 instead of the true entropy change 〈Δ

*s*

_{X∣Y}〉 but still use the true heat and work given in Eq. 9 in the statement of the second law. The reason is that the entropy change 〈Δ

*s*〉 and the true heat and work in Eq. 9 can be measured properly in practice. On the other hand, the correlation between the demon and the system may be unknown in practice. This correlation can be quantified by the information change 〈Δ

_{X}*i*〉 = 〈Δ

*s*

_{X∣Y}〉 − 〈Δ

*s*〉 by noting the relation in Eq. 5B. Then, the averaged heat 〈

_{X}*Q*

_{X∣Y}〉 in Eq. 9 can sometimes be greater than the coarse-grained entropy change, i.e., 〈

*Q*

_{X∣Y}〉 ≥

*T*〈Δ

*s*〉, and the second law is seemingly violated. Following the Sagawa-Ueda theorem, the free energy difference can be given as follows (

_{X}*40*)

*H*

_{X∣Y}〉 is used the same as in Eq. 9 but with a different entropy change 〈Δ

*s*〉. Then, the averaged work 〈

_{X}*W*

_{X∣Y}〉 in Eq. 9 does not satisfy the second law seemingly, since 〈

*W*

_{X∣Y}〉 can sometimes be less than the free energy difference Δ

*F*, i.e., 〈

*W*

_{X∣Y}〉 ≤ Δ

*F*. According to the Sagawa-Ueda theorem, by adding the information change into the entropy change 〈Δ

*s*〉 and the free energy difference Δ

_{X}*F*, the averaged heat and work can satisfy the following second law inequalities

This can clarify the equivalence between the second law inequalities given in Eq. 9 and those given by the Sagawa-Ueda theorem. Furthermore, the terms 〈Δ*s*_{X∣Y}〉 and Δ*F*_{X∣Y} in Eq. 9 can be recognized as the true/complete entropy change and the true/complete free energy difference with the complete knowledge of the demon control. In this sense, we refer to Eq. 9 as the complete form of the second law. On the other hand, all the improper entropy productions are generated by decomposing the total entropy production σ_{X∣Y} in different ways, and thus, they can lead to the same complete form in Eq. 9.

Now, we take the dissipative information into account. By noting Eq. 8, we reach tighter bounds for the heat and the work compared to Eq. 9*F*, the information change 〈Δ*i*〉, and the entropy change 〈Δ*s _{X}*〉 are used in the Sagawa-Ueda theorem, as shown above. Here, we obtain a smaller upper bound for the heat and a larger lower bound for the work than the ordinary second law in Eq. 9, which can also be formulated by the Sagawa-Ueda theorem. These tighter bounds clearly indicate the nontrivial nonequilibrium state of a system controlled by a demon. On the basis of the above discussion, the looser bounds of the heat and work in the second inequalities (see also Eq. 9) represent the equilibrium limit while the demon does not work efficiently. However, when the environments are complex and noisy, the interacting systems have to pay positive amounts of energy dissipation costs to maintain the connections to each other. These necessary energy dissipations can show how far the systems are away from the equilibrium but cannot be predicted by (the complete form of) the second law in Eq. 9. This is because the second law (and other generalized forms) is based on the entropy production, which can only provide the equilibrium bound (looser bounds in Eq. 10) for the total dissipation. On the other hand, the dissipative information can quantify the energy dissipations led by the interactions by the amount of

*T*〈σ

*〉. This yields the tighter bounds in Eq. 10. Here, we stress again the looser bounds in Eq. 10 (the last equalities) can be predicted by the Sagawa-Ueda theorem by taking the information change into account, as discussed above.*

_{I}Usually in the practical model of Maxwell’s demon such as the Szilard’s type demon, the action of the demon is divided into two different processes: measurement and feedback control. In the measurement process, the demon observes the system and acquires the information of the system state. The demon needs to match its state with the system during the measurement, and the system can be viewed as the outer controller of the demon. Here, we can use *X* to present the demon and *Y* to denote the system (observed by the demon) in the measurement process. In this situation, an inevitable heat from the demon *X* to its environmental bath, or say, the measurement heat *Q _{mea}* can be generated from the demon

*X*during the information acquirement (

*45*,

*46*), which is the negative heat (−

*Q*

_{X∣Y}) from the bath to the demon

*X*,

*Q*= −

_{mea}*Q*

_{X∣Y}=

*T*δ

*s*

_{X∣Y}, where δ

*s*

_{X∣Y}is the entropy change in the bath. In the feedback control process (we let demon =

*Y*and controlled system =

*X*), the demon

*Y*extracts a positive work

*W*from the system

_{ext}*X*with an additional energy dissipation, which is the negative work performed on the system

*W*= −

_{ext}*W*

_{X∣Y}. Then, the bounds for

*Q*and

_{mea}*W*can be given by the complete form of the second law in Eq. 9, where the equalities hold for infinitely slow quasi-static or equilibrium processes. However, if the demon works efficiently, then we come to a nonequilibrium situation where an amount of positive energy dissipation is necessary and originated from the dissipative information. Thus, new bounds for the heat

_{ext}*Q*from the demon and the work

_{mea}*W*from the system can be given by Eq. 10 in the form of

_{ext}In Eq. 11, the equivalent relationship between the Sagawa-Ueda theorem and the complete form of the second law has been shown in the last equalities, where Δ*F* and 〈Δ*s _{X}*〉 denote the free energy difference and the entropy change with incomplete knowledge of the demon. We give the interpretation about Eq. 11 as follows.

The information change 〈Δ*i*〉 = *I*_{0} − *I _{t}* can often be negative in the measurement process because the final mutual information between the system and the demon is always larger than the initial mutual information. If the initial mutual information

*I*

_{0}and the entropy change 〈Δ

*s*〉 can be neglected in the measurement process, then we have that the true entropy change is equal to the information obtained from the system, 〈Δ

_{X}*s*

_{X∣Y}〉 = −

*I*. For example, the demon and the system are often uncorrelated at the beginning of the measurement process, where

_{t}*I*

_{0}= 0. In addition, the demon can be in the same equilibrium state at the initial and final time of the coarse-grained dynamics, and then we have 〈Δ

*s*〉 (see the measurement case in the “Illustrative Cases” section below). Then, the inequality for the measurement heat reduces to 〈

_{X}*Q*〉 ≥

_{mea}*T*〈σ

*〉 +*

_{I}*TI*≥

_{t}*TI*in Eq. 11. The looser bound

_{t}*TI*is the minimal energy requirement for the demon to obtain the information

_{t}*I*from the system in the equilibrium or noise-free (no-measurement-error) limit. The dissipative information

_{t}*T*〈σ

*〉 quantifies the additional energy cost for the demon to establish the correlation to the system under the nonequilibrium and noisy condition. Thus, we have the tighter lower bound 〈σ*

_{I}*〉 +*

_{I}*TI*for the heat in Eq. 11. This means that there is more heat generated in the measurement than the estimations given by the complete form of the second law.

_{t}On the other hand, the information change 〈Δ*i*〉 = *I*_{0} − *I _{t}* can usually be positive in the feedback control process. This is because the demon can use the (initially) obtained information

*I*

_{0}to extract work, and the correlation between the demon and the system can decrease after the control

*I*<

_{t}*I*

_{0}. If the final mutual information

*I*and the incomplete free energy difference Δ

_{t}*F*can vanish in the control process, then we find that the initial information

*I*

_{0}works as the true/complete free energy difference in this situation, Δ

*F*

_{X∣Y}= −

*TI*

_{0}. For example, in the model of the Szilard’s type demon, the controlled system is assumed to be at the same equilibrium state at the initial and final time of the dynamics, and then we have the incomplete free energy difference Δ

*F*= 0. This equilibrium state of the system can be independent of the demon. The demon and the system are correlated right after the initial time

*I*

_{0}> 0 and finally uncorrelated at the end, where

*I*= 0. Then, we have the inequality for the work from Eq. 11 as 〈

_{t}*W*

_{ext}〉 ≤

*TI*

_{0}−

*T*〈σ

*〉 ≤*

_{I}*TI*

_{0}. The looser bound for the work,

*TI*

_{0}, has been predicted by the Sagawa-Ueda theorem, which represents that the work can be extracted under the equilibrium or noise-free condition. However, the tighter upper bound

*TI*

_{0}−

*T*〈

*σ*〉 indicates that there should be a waste of information that cannot be used to extract work in the nonequilibrium and noisy operations. This wasted information can be quantified by the dissipative information 〈

_{I}*σ*〉. This means that there is less work extracted in the feedback control than the estimations given by the Sagawa-Ueda theorem.

_{I}### Illustrative cases

To illustrate our idea in this paper, we calculate the cases of the information ratchets shown in Fig. 3, which can be tested in the experiments. A potential with the two wells is exerted on a confined particle. The height between the two wells is equal to *V* > 0. While under the equilibrium, the probabilities that the particle is at the lower and the higher well can be quantified by *p _{l}* = [1 + exp ( −

*V*)]

^{−1}and

*p*= 1 −

_{h}*p*, respectively, (

_{l}*p*> 1/2). An outside controller can control the particle by reversing the profile of the potential, i.e., by raising the lower well up to

_{l}*V*and lowering the higher well down to 0. The action of the controller is assumed to be fast enough before the particle reacts. For no loss of generality, the temperature of the environmental bath is assumed to be at

*T*= 1.

If the particle works as a demon [shown in Fig. 3 (A and B)], then the particle is supposed to measure the state of the controlled system at first. The state of the particle is denoted by *x* = 0 or 1 when at the left or the right well, respectively. The system state can be represented by the location of the lower well with the value of *y* = 0 or 1 with equal probability *p*(*y* = 0) = *p*(*y* = 1) = 1/2. The particle is initially under the equilibrium until the system state changes. Correspondingly, the potential is reversed by the system immediately, and the particle starts measuring the current system state. When the equilibrium is achieved, the final state *x*_{t} of the particle is taken as an observation of *y*. The probability of the measurement error can be given by the probability of the particle at the higher well *p*_{Xt∣Y}(*x _{t}* ≠

*y*∣

*y*) =

*p*. On the other hand, the measurement precision is characterized by the probability of the particle at the lower well

_{h}*p*

_{Xt∣Y}(

*x*=

_{t}*y*∣

*y*) =

*p*. By noting the definitions and relationships shown in Eq. 2, the averaged measurement heat generated by the particle can be given by 〈

_{l}*Q*〉 = (1/2 −

_{mea}*p*)

_{h}*V*, and the entropy change can be evaluated by 〈Δ

*s*

_{X∣Y}〉 = −

*I*(see eqs. S26 to S28). Here,

_{t}*I*= log 2 −

_{t}*S*≥ 0 is the final mutual information that measures the correlation between the observation

*x*and the state

_{t}*y*(

*40*,

*41*), where the Shannon entropy

*S*is given by

*S*= −

*p*log

_{l}*p*−

_{l}*p*log

_{h}*p*. Then, according to Eq. 11 and as shown in the above discussions, the tighter bound of 〈

_{h}*Q*〉 in this case can be given by

_{mea}Here, the dissipative information 〈σ* _{I}*〉 can be calculated by using the probabilities of the forward and backward trajectories

*x*(

*t*) = {

*x*

_{0},

*x*} and

_{t}*p*increases as the potential height

_{l}*V*increases, higher precision also raises up both the averaged measurement heat and the lower bound of the energy dissipation quantified by the dissipative information in this case. The numerical results can be found in Fig. 4 (A and B).

Next, we use a demon to extract positive work from the particle system [shown in Fig. 3 (C and D)]. In this case, the state of the particle can be denoted by *x* = *l* or *h* when at the lower or the higher well, respectively. Initially, the particle is under equilibrium. The demon measures the state of the particle at first and obtains the observation *y*. The demon plays the feedback control according to the observation *y*. When the particle is observed to be at the higher well, the demon reverses the potential immediately and extracts an amount of work *W _{ext}* =

*V*. After the control, the demon does nothing until the particle goes to the equilibrium again. For a practical thought, the demon’s measurement can have a random error, and this error certainly lowers the efficiency of the work extraction. Here, we simply assume that the measurement error occurs with stable probability

*p*

_{Y∣X0}(

*y*≠

*x*

_{0}∣

*x*

_{0}) = ϵ. By using Eq. 2 and noting the thermodynamical first law, the extracted work can be given by 〈

*W*〉 = (

_{ext}*p*− ϵ)

_{h}*V*, on average, and the true/complete free energy difference is equal to the mutual information change during the dynamics, Δ

*F*

_{X∣Y}= −

*I*

_{0}(see eqs. S30 to S33). Here, the incomplete free energy difference suggested by the Sagawa-Ueda theorem (see Eq. 11) vanishes in this case, Δ

*F*= 0. The mutual information

*I*

_{0}=

*S*−

_{Y}*S*≥ 0 represents the initial correlation between the demon and the particle, where the Shannon entropies can be given by

_{ϵ}*S*= −

_{Y}*p*log

_{y}*p*− (1 −

_{y}*p*) log (1 −

_{y}*p*) and

_{y}*S*= − ϵ log ϵ − (1 − ϵ) log (1 − ϵ), with

_{ϵ}*p*=

_{y}*p*(1 − ϵ) +

_{l}*p*ϵ representing the probability of the observation

_{h}*y*=

*l*. Then, because of Eq. 11 and as shown in the above discussions, the bound of 〈

*W*〉 can be given by

_{ext}Here, the mutual information *I _{c}* =

*S*−

_{Y}*S*≥ 0 measures correlation between the demon and the particle right after the control, where the Shannon entropy is

*S*= −

*p*log

_{l}*p*−

_{l}*p*log

_{h}*p*. It is important to note that

_{h}*I*is actually the information that is not used to extract the work but can merely dissipate into the bath as the dissipative information 〈σ

_{c}*〉 =*

_{I}*I*. This result can be verified by evaluating Eq. 1 (see eq. S18). For this reason, the demon can only extract work less than the mutual information difference before and after the control, quantified by

_{c}*I*

_{0}−

*I*. We can see that higher measurement precision characterized by 1 − ϵ can increase the averaged extracted work (with fixed potential height

_{c}*V*); meanwhile, the inevitable dissipative information is decreased by the increasing precision in this case. The numerical results are shown in Fig. 2 (C and D). Also, we can note that the dissipative information 〈σ

*〉 bounds the entropy production 〈σ*

_{I}_{X∣Y}〉 from the below in both the cases of the measurement and feedback control [see Fig. 4 (B and D)]. This verifies the inequality in Eq. 8.

On the other hand, we find that the tighter upper bound in Eq. 13 is equivalent to the information process second law (*26*–*28*) by noting *I*_{0} − *I _{c}* =

*S*−

*S*. Here,

_{ϵ}*S*and

*S*can be regarded as the Shannon entropies of a “0,1” tape before and after the information processing, respectively (

_{ϵ}*25*). This indicates that the proposed fluctuation theorems in this paper can be applied to the area of thermodynamics computing from a general perspective. In addition, the looser bounds for the heat and work in Eqs. 12 and 13 are predicted by the second law (Sagawa-Ueda theorem), and these bounds can only be achieved in the quasi-static (or equilibrium) or noise-free control protocols.

Here, we also relate our case of the work extraction to the efficacy parameter γ, which appeared in the experimental and theoretical works (*8*, *23*). Here, γ can be shown as the departure of the fluctuation of an improper entropy production σ = σ_{X∣Y} − *i*_{0} from unity, i.e.,_{X∣Y} is the total (proper) entropy production and satisfies the fluctuation theorem in Eq. 4, and *i*_{0} is the initial stochastic mutual information with average 〈*i*_{0}〉 = *I*_{0} ≥ 0. The final mutual information *I _{t}* is supposed to vanish after the control. The parameter γ was interpreted as the efficacy parameter of the demon, and the demon can behave better under a high value of γ. However, that appears to be not the case. By applying the Jensen inequality to Eq. 14A, we can obtain the following inequality for γ,

_{X∣Y}〉 = 〈σ〉 −

*I*

_{0}has been used in Eq. 14B. We see that the lower bound in Eq. 14B can be negative, especially at the high values of γ. However, a negative bound of the total (or proper) entropy production 〈σ

_{X∣Y}〉 cannot be achieved. Thus, the parameter γ appears to be lack of the physical meaning of the efficacy of the demon in this situation. More detailed discussions and derivations can be found in the “Meaning and bounds of the parameter γ” section in section S2. From the perspective of our theory and by noting Eq. 13, the following ratio can be used to quantify the demon’s best efficacy that can be achieved instead of γ

From Eq. 13, η_{max} satisfies the inequality as follows*W _{ext}*〉 to the maximum work

*I*

_{0}that can be extracted in the quasi-static or noise-free limit. Thus, η measures the true efficacy of the demon in the work extraction. Equation 15B gives a clear physical meaning to the ratio η

*:η*

_{max}*quantifies ratio of the maximum work*

_{max}*I*

_{0}−

*I*to the quasi-static or noise-free limit work

_{c}*I*

_{0}, with the minimal wasted (or dissipative) information (

*I*) considered. In the presented case of the work extraction,

_{c}*p*

_{Y∣X0}(

*y*=

*x*

_{0}∣

*x*

_{0}) = 1 − ϵ. Here,

*y*=

*x*

_{0}indicates the correct measurement. The meanings of the entropies

*S*,

*S*, and

_{Y}*S*have been provided in the above case of the work extraction. When the error-free condition

_{ϵ}*p*(

*y*=

*x*

_{0}∣

*x*

_{0}) = 1 is achieved, the best efficacy η

*can go up to 1 (see Fig. 5). Thus, this η*

_{max}*follows the intuition that the measurement accuracy can enhance the efficacy of the work extraction.*

_{max}## DISCUSSION

Traditional analysis on the Maxwell’s demon focuses on how the second law is violated by the system and is rescued by some hidden demon-induced entities. These entities were believed as the key characterization of the demon. In contrast, we show that the system does not disobey the second law whether the demon is hidden or not, which can be seen in the set of fluctuation theorems (Eq. 4) for the entropy productions when they are correctly measured (Eqs. 2 and 3). Intrinsically, the nonequilibrium behavior of the system led by the demon is due to the time-irreversibility of the binary relationship between them, which is quantified by the dissipative information (Eq. 1). In addition, we prove another new fluctuation theorem for this dissipative information (Eq. 6). This theorem (Eq. 6) combining with the other fluctuation theorems (Eq. 4) for the entropy productions gives a precise quantification of the effect of the demon. An apparent result following these theorems is that there exists an inevitable energy dissipation originated from the positive dissipative information, which leads to the tighter bounds for the work and the heat (Eq. 11) than that estimated by the complete form of the second law or the Sagawa-Ueda theorem (Eq. 9). We also suggest a possible realization of the experimental estimation of these work and heat bounds, which can be measured and tested. These results offer a general picture of a large class of the models of the Maxwell’s demon.

## MATERIALS AND METHODS

### Proof of the fluctuation theorems

The probabilities (densities) *p*[*x*(*t*)∣*y*] and *p*[*x*(*t*)] are assumed to be nonnegative and to be normalized, i.e., *p*[*x*(*t*)∣*y*], *p*[*x*(*t*)] ≥ 0, respectively, ∫*p*[*x*(*t*)∣*y*]*Dx*(*t*) = 1 and ∫*p*[*x*(*t*)]*Dx*(*t*) = 1. Besides, we need that the differentials, with respect to the time-forward and backward trajectories, are equal to each other, i.e.,

In the last equation for σ* _{I}*, by noting the relation in the probabilities that

## SUPPLEMENTARY MATERIALS

Supplementary material for this article is available at http://advances.sciencemag.org/cgi/content/full/7/23/eabf1807/DC1

This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial license, which permits use, distribution, and reproduction in any medium, so long as the resultant use is **not** for commercial advantage and provided the original work is properly cited.

## REFERENCES AND NOTES

**Acknowledgments:**

**Funding:**Q.Z. thanks the support of National Natural Science Foundation of China (NSFC-91430217).

**Author contributions:**Q.Z. carried out the mathematical derivations, performed the analysis, and wrote the manuscript. J.W. initiated and supervised the research, performed the analysis, and wrote the manuscript.

**Competing interests:**The authors declare that they have no competing interests.

**Data and materials availability:**All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Additional data related to this paper may be requested from the authors.

- Copyright © 2021 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim to original U.S. Government Works. Distributed under a Creative Commons Attribution NonCommercial License 4.0 (CC BY-NC).