Skip to content

Maxwell Demon and Information

A Maxwell demon is a feedback controller that uses information about microscopic degrees of freedom to choose a thermodynamic action. The modern lesson is not that the second law fails. It is that the thermodynamic bookkeeping must include the measurement record, controller, memory, feedback operation, and eventual reset.

The useful question is operational: given a measurement outcome, what protocol is applied, how much work is extracted or supplied, how much heat is exchanged, and what happens to the record afterward?

A measurement-feedback cycle has four stages:

  1. Prepare a system in a state ρ\rho with Hamiltonian HH and possibly a heat bath at temperature TT.

  2. Measure the system and store an outcome yy in a memory.

  3. Choose a control protocol Λy\Lambda_y depending on yy.

  4. Reset the memory and controller if the engine is to run cyclically.

The measurement is described by an instrument:

p(y)=Tr⁡Iy(ρ),ρy=Iy(ρ)Tr⁡Iy(ρ).p(y) = \operatorname{Tr}\mathcal I_y(\rho), \qquad \rho_y = \frac{\mathcal I_y(\rho)} {\operatorname{Tr}\mathcal I_y(\rho)}.

The feedback protocol depends on the conditional state ρy\rho_y, not merely on the averaged post-measurement state. If the outcome is ignored, the state becomes

ρ′=∑yIy(ρ),\rho' = \sum_y\mathcal I_y(\rho),

and the controller has no record to condition on. See Selective and Nonselective Measurements and Quantum Instruments.

Let WW denote work done on the system, so negative WW means work extracted from the system by the controller. Without feedback, the average work satisfies

⟨W⟩≥ΔF.\langle W\rangle \ge \Delta F.

With measurement and feedback, an idealized information-corrected bound has the form

⟨W⟩≥ΔF−kBT ⟨I⟩,\langle W\rangle \ge \Delta F - k_B T\,\langle I\rangle,

where ⟨I⟩\langle I\rangle is the average information gained by the measurement, measured in nats. Equivalently, the average extracted work obeys

⟨Wext⟩≤−ΔF+kBT ⟨I⟩.\langle W_{\mathrm{ext}}\rangle \le - \Delta F + k_B T\,\langle I\rangle.

For a cyclic engine, ΔF=0\Delta F=0, so information can increase the extractable work by at most kBT⟨I⟩k_BT\langle I\rangle before memory reset costs are included.

This is not free work. It is a bound on what feedback can do using a physical record. Returning the demon to its initial state costs thermodynamic resources, as described by Landauer Principle.

A schematic Sagawa–Ueda feedback relation is

⟨exp⁡[−β(W−ΔF)−I]⟩=1.\left\langle \exp \left[ -\beta(W-\Delta F)-I \right] \right\rangle = 1.

Here II is a stochastic information term associated with the measurement outcome and the underlying microscopic alternative. The precise definition depends on the measurement model and reverse protocol.

Jensen’s inequality gives

⟨W⟩≥ΔF−kBT ⟨I⟩.\langle W\rangle \ge \Delta F - k_B T\,\langle I\rangle.

The important point is structural: feedback modifies the fluctuation relation by adding an information term to the entropy budget. A claimed demon cycle should state the measurement model, the feedback map, and the memory reset.

For the no-feedback version, see Jarzynski Equality and Crooks Relation.

The Szilard engine is the cleanest classical model. A single particle is in a box coupled to a heat bath at temperature TT.

The ideal cycle is:

  1. Insert a partition, dividing the box into left and right halves.

  2. Measure which side contains the particle.

  3. Attach a piston on the empty side and let the particle expand isothermally, extracting work.

  4. Remove the partition.

  5. Reset the memory that stored “left” or “right.”

For an unbiased particle position, the measurement record contains one bit. The isothermal expansion can extract

Wext=kBTln⁡2W_{\mathrm{ext}} = k_B T\ln2

in the reversible limit. Resetting the one-bit memory costs at least

Qbath≥kBTln⁡2.Q_{\mathrm{bath}} \ge k_B T\ln2.

The full cycle does not violate the second law. The apparent gain from feedback is paid back when the demon’s memory is restored.

Feedback value depends on measurement quality. Suppose a binary variable XX is equally likely to be 00 or 11, and the demon records a binary outcome YY that is correct with probability qq. Then

P(Y=X)=q,P(Y≠X)=1−q.P(Y=X)=q, \qquad P(Y\ne X)=1-q.

The mutual information in nats is

I(X:Y)=ln⁡2+qln⁡q+(1−q)ln⁡(1−q).I(X:Y) = \ln2 + q\ln q + (1-q)\ln(1-q).

The information-assisted work advantage is bounded by

kBT I(X:Y).k_B T\,I(X:Y).

When q=1q=1, the record is perfect and I=ln⁡2I=\ln2. When q=1/2q=1/2, the record is independent of the particle side and I=0I=0. A noisy record cannot support the same feedback work as a perfect record.

For the general correlation measure, see Mutual Information.

Quantum demons require extra care because measurement can disturb the state being controlled. A quantum feedback protocol must specify:

  • the POVM or instrument producing the outcome;
  • the conditional post-measurement state;
  • the feedback operation chosen for each outcome;
  • whether the record is classical, quantum, or coherently stored;
  • how the memory and controller are reset.

An unread measurement may change the system through backaction, but it does not provide usable feedback information. A selective measurement provides a record, but that record is a physical memory. A coherent controller may avoid a classical record at an intermediate stage, but then the controller’s quantum state and correlations must be included in the thermodynamic accounting.

See Measurement Backaction for the measurement side of this distinction.

Consider a qubit with Hamiltonian

H=ϵ∣e⟩⟨e∣.H = \epsilon |e\rangle\langle e|.

A demon measures the energy. If the outcome is ee, it applies a feedback operation that lowers the excitation and extracts work ϵ\epsilon in an idealized work storage device. If the outcome is gg, it does nothing.

If the excited-state probability is pep_e, the average extracted work before memory reset is

⟨Wext⟩=peϵ.\langle W_{\mathrm{ext}}\rangle = p_e\epsilon.

This expression is not a complete engine analysis. The energy measurement creates a record with entropy

H(pe)=−peln⁡pe−(1−pe)ln⁡(1−pe),H(p_e) = - p_e\ln p_e - (1-p_e)\ln(1-p_e),

and resetting that record at temperature TT costs at least

kBTH(pe).k_B T H(p_e).

If the qubit is itself thermal at the same temperature and the cycle returns all devices to their initial states, the full accounting cannot produce net work from a single bath. The measurement-conditioned step is only one part of the cycle.

For any proposed demon protocol, record:

  • the system Hamiltonian and bath temperature;
  • the measurement instrument and outcome probabilities;
  • the conditional state for each outcome;
  • the feedback protocol applied for each outcome;
  • the work and heat sign conventions;
  • the entropy or mutual information of the record;
  • how the memory and controller are reset;
  • whether the final system, bath, and memory states match the beginning of the cycle.

Without these entries, the word “demon” often hides missing thermodynamic bookkeeping.

  1. Counting work extracted during feedback but ignoring memory reset.

  2. Treating an unread measurement as if it supplied usable information.

  3. Assuming every measurement has a fixed kBTln⁡2k_BT\ln2 cost.

  4. Ignoring measurement backaction in a quantum feedback protocol.

  5. Using mutual information in bits while writing a bound that assumes nats.

  6. Calling a one-shot noncyclic process a violation of the second law.

  7. Treating the controller as external magic rather than as a physical system with entropy and energy.

Starting from

⟨exp⁡[−β(W−ΔF)−I]⟩=1,\left\langle \exp \left[ -\beta(W-\Delta F)-I \right] \right\rangle = 1,

derive ⟨W⟩≥ΔF−kBT⟨I⟩\langle W\rangle\ge\Delta F-k_BT\langle I\rangle.

Solution

Jensen’s inequality gives

exp⁡[⟨−β(W−ΔF)−I⟩]≤1.\exp \left[ \left\langle -\beta(W-\Delta F)-I \right\rangle \right] \le 1.

Taking the logarithm,

−β(⟨W⟩−ΔF)−⟨I⟩≤0.-\beta(\langle W\rangle-\Delta F) - \langle I\rangle \le 0.

Therefore

β(⟨W⟩−ΔF)+⟨I⟩≥0.\beta(\langle W\rangle-\Delta F) + \langle I\rangle \ge 0.

Using β=1/(kBT)\beta=1/(k_BT),

⟨W⟩≥ΔF−kBT⟨I⟩.\langle W\rangle \ge \Delta F-k_BT\langle I\rangle.

For a symmetric binary variable measured correctly with probability qq, verify that the mutual information is

I(X:Y)=ln⁡2+qln⁡q+(1−q)ln⁡(1−q).I(X:Y) = \ln2 + q\ln q + (1-q)\ln(1-q).
Solution

For a uniform binary variable, H(X)=ln⁡2H(X)=\ln2. The conditional uncertainty after observing YY is

H(X∣Y)=−qln⁡q−(1−q)ln⁡(1−q),H(X|Y) = - q\ln q - (1-q)\ln(1-q),

because each reported value has the same probability of being correct or incorrect. Therefore

I(X:Y)=H(X)−H(X∣Y)=ln⁡2+qln⁡q+(1−q)ln⁡(1−q).I(X:Y) = H(X)-H(X|Y) = \ln2 + q\ln q + (1-q)\ln(1-q).

For q=1q=1, this gives I=ln⁡2I=\ln2. For q=1/2q=1/2, it gives I=0I=0.

An ideal Szilard engine extracts kBTln⁡2k_BT\ln2 from a bath using a perfect one-bit record. The memory is then reset at the same temperature. What is the best possible net work over the full cycle?

Solution

The expansion step can extract

Wext=kBTln⁡2.W_{\mathrm{ext}} = k_BT\ln2.

Resetting an unbiased one-bit memory costs at least

Wreset≥kBTln⁡2.W_{\mathrm{reset}} \ge k_BT\ln2.

Thus the net extracted work obeys

Wnet≤kBTln⁡2−kBTln⁡2=0.W_{\mathrm{net}} \le k_BT\ln2-k_BT\ln2 = 0.

The reversible ideal can approach zero net gain. Real implementations dissipate more and have negative net extracted work over the complete cycle.

  • L. Szilard, “On the decrease of entropy in a thermodynamic system by the intervention of intelligent beings,” Zeitschrift für Physik 53, 840, 1929.
  • R. Landauer, “Irreversibility and heat generation in the computing process,” IBM Journal of Research and Development 5, 183, 1961.
  • C. H. Bennett, “The thermodynamics of computation: a review,” International Journal of Theoretical Physics 21, 905, 1982.
  • T. Sagawa and M. Ueda, “Generalized Jarzynski equality under nonequilibrium feedback control,” Physical Review Letters 104, 090602, 2010.
  • T. Sagawa and M. Ueda, “Fluctuation theorem with information exchange: role of correlations in stochastic thermodynamics,” Physical Review Letters 109, 180602, 2012.
  • J. M. R. Parrondo, J. M. Horowitz, and T. Sagawa, “Thermodynamics of information,” Nature Physics 11, 131, 2015.