Conditional action and quantum versions of Maxwell's demon

We propose an explanation of the decrease of entropy of a quantum system due to the action of Maxwell's demon using results of quantum measurement theory and provide a couple of examples that illustrate and confirm our proposal.


I. INTRODUCTION
Since its first appearance in 1867, the thought experiment of James Clerk Maxwell has given rise to many ideas and probably more than a thousand papers [1]. In the thought experiment a demon controls a small door between two gas chambers. When single gas molecules approach the door, the demon opens and closes the door quickly, so that only fast molecules enter one of the chambers, while slow molecules enter the other one. In this way the demon's behavior causes one chamber to heat up and the other to cool down, reducing entropy and violating the 2 nd law of thermodynamics.
Among the most influential defenses of the 2 nd law are those of Szilard [5] and Landauer/Bennett [6], [7]. Szilard proposes his own version ("Szilard's engine") of the original thought experiment that consists only of one gas particle which can be found in the right or the left chamber of a cylindrical box divided by a piston. Depending on its position an isothermal expansion of the one-molecule gas is performed to the left or to the right thereby converting heat from a heat bath completely into work, see Figure 1. Szilard argues that the entropy decrease of the system is compensated by the entropy costs of acquiring information about the position of the gas particle ("Szilard's principle"). His arguments are formulated within classical physics and not easy to understand, see also the analysis in [8] and [4].
Based on Landauer's calculations [6] on the thermodynamics of computing Bennett has shifted the focus from the entropy costs of acquiring to erasing information [7]. He argues that for a cyclic operation of a Szilard engine converting heat completely into work the memory device that contains the information about the initial measurement should be set to a default value each time. This erasure of information produces at least the entropy needed to compensate the entropy decrease caused by the engine. This explanation ("Landauer's principle") has today been adopted by the main stream of physicists, but has also been criticized by a minority of scholars, see [3], [4], [9] and further references cited there. For the present paper it will be sensible to distinguish between the principle that erasure of memory produces entropy ("Landauer's principle" in the narrow sense) and the position that this effect constitutes the solution of the apparent paradox of Maxwell's demon (henceforward called "Landauer/Bennett principle").
Whereas the arguments of Szilard and Landauer/Bennett are mainly classical, it appears plausible FIG. 1: Schematic representation of Szilard's engine. A volume is separated by a piston into two chambers VR and VL of equal volume. A molecule is localized by a measurement in one of these chambers and, depending on the result of the measurement, an isothermal expansion of the one-molecule gas in contact with a heat bath will be performed to the right or to the left. In the figure we show the case where the molecule has been found in the left chamber and the expansion is performed to the right.
that a proper account of entropy increase due to measurements should be discussed within the realm of quantum theory. A first attempt of a quantumtheoretical account of Szilard's engine has been given by W. H. Zurek [10], followed by [11] - [14]. More recently, the paradigm of Maxwell's demon has been used in connection with quantum information theory, especially quantum error correction, see [15] and [16].
Zurek in his [10] considered a one-particle quantum system in a box described by a Gibbs ensemble and calculated the increase of free energy due to the measurement of whether the particle is in the right or in the left chamber. In the section of his paper headlined "Measurement by 'quantum Maxwell's demon' " Zurek presented a model of the measurement using ideas of decoherence and finally also incorporated the Landauer/Bennett issue of memory erasure. However, the complete entropy balance remains opaque. In terms of content, it would be plausible to regard the paper as a quantum mechanical justification for the Szilard principle. But then the statement in the summary "Moreover, we show that the ultimate reason for the entropy increase can be traced back to the necessity to 'reset' the state of the measuring apparatus, which, in turn, must involve a measurement." appears as an unfounded tribute to the Landauer/Bennett principle. Therefore the general message is not quite clear. Further, there are three questions left open: • Are the information-theoretic concepts used in [10] only an illustration of the theoretical account or are they crucial to solve the Maxwell's demon problem? This question is the more important since there exist suggestions of extending the framework of statistical mechanics by information-theoretic notions, see, e. g., [17], [18].
• Similarly, are the ideas from decoherence, see also [11] and [12], really necessary to solve the Maxwell's demon problem?
• Since the paper follows very closely the details of Szilard's engine, one wonders which assumptions and approximations are decisive for the solution presented and which are only made for convenience. In other words, a more abstract representation of the "quantum Maxwell's demon" would be desirable.
In the present paper we will pursue a similar approach but try to amend and extend Zurek's results in the way indicated above. Our explanation of the apparent paradoxical results of Maxwell's demon acting on a quantum system (also called "object system") will be given in three steps: • First we define the concept of "conditional action" that comprises the original version of Maxwell's demon as well as Szilard's engine and Landauer's erasure of memory. The mathematical representation of "conditional action" on quantum systems results in a special kind of instruments, in the sense of [21], that we will call "Maxwell instruments".
• We show that the total operation of a Maxwell instrument may decrease the von Neumann entropy of the object system depending on the initial state. If this happens we will call the Maxwell instrument "demonic".
• A demonic Maxwell instrument always has a physical realization of the following kind: The object system is extended by an auxiliary system and the total system undergoes a unitary time evolution followed by a Lüders measurement at the auxiliary system. If reduced to the object system the final state will have a smaller entropy than at the beginning although the total entropy will increase in accordance with what a 2 nd law of quantum mechanics presumably would predict.
It has been criticized [3], [4] that the Landauer/Bennett defense of the 2 nd law against Maxwell's demon in turn presupposes the 2 nd law. We avoid these pitfalls of circularity since we do not assume any general 2 nd law in quantum mechanics but only a few well-established theorems about the increase of von Neumann entropy during Lüders measurements and state separation. Actually we would not know how to formulate such a general 2 nd quantum law. In this respect the role of Maxwell's thought experiment is different in classical and in quantum theory: In classical theory it is a potential paradox since it seems to contradict the well-established 2 nd law. In quantum theory it is rather a tool to find such a general 2 nd law. Fortunately, Maxwell-demonic interventions can be formalized within the realm of quantum measurement theory where already fragments of a 2nd law exist that are sufficient to explain the demon's actions.
The paper is organized as follows: In Section II we recapitulate some well-known definitions and results from quantum measurement theory for the convenience of the reader. These concepts are applied in Section III to explain why the conditional action of Maxwell' demon possibly lowers the entropy of the object system but leads to an at least equal amount of entropy increase in some auxiliary system. The following section IV contains two simple examples illustrating the former considerations. A classical version of "conditional action" will be sketched in Section V, followed by a Summary in Section VI. We have deferred some proofs (A) and the explicit construction of a measurement dilation of a Maxwell instrument (B) into the Appendix, as well as the detailed account of Szilard's engine (C) according to our approach.

II. OPERATIONS AND INSTRUMENTS
In the following sections we will heavily rely upon the mathematical notions of operations and instruments. Although these notions are well-known it will be in order to recall the pertinent definitions adapted to the present purposes and their interpretations in the context of measurement theory. In order to keep the presentation as simple as possible we restrict ourselves to the case of finite dimensional Hilbert spaces H and refer the reader to the literature on the general case of separable Hilbert spaces.
Let Then T will be called an operation. It may be tracepreserving or not.
Operations are intended to describe state changes due to measurements. By definition, a Lüders measurement (without selection according to the outcomes) induces the state change where (P n ) n∈N denotes a complete family of mutually orthogonal projections P n ∈ B + (H). Then L is an example of a trace-preserving operation. Note that the map (1) is defined for all ρ ∈ B(H) whereas the physical interpretation holds only for statistical operators ρ, i. e., for positively semi-definite operators with Tr(ρ) = 1. We mention the following representation theorem for operations, see, e. g., [21], prop.7.7, or [16], chapter 8.2.3. A is an operation iff it can be written as with the Kraus operators A i : H → H and a finite index set I. Comparison of (1) and (2) shows that for the Lüders operation one may choose I = N and A n = P n for all n ∈ N .
In (1) we have considered the total state change without any selection. If we select according to the outcome of the Lüders measurement we would obtain a family of (not trace preserving) operations L n (ρ) = P n ρ P n , n ∈ N , that describe conditional state changes. This situation can be generalized in the following way. Let N be a finite index set. Then the map I : N × B(H) −→ B(H) will be called an instrument iff • I(n) is an operation for all n ∈ N , and • Tr n∈N I(n)(ρ) = Trρ for all ρ ∈ B(H). The second condition can be rephrased by saying that the total operation I(N ) defined by will be trace-preserving. The special case (3) will be referred to as a Lüders instrument.
The comparison with the definition 7.5 of [21] shows that, besides neglecting convergence conditions, we have specialized the general definition of an instrument to the case of a finite outcome space N . Measurements of continuous observables like position or momentum would require to consider elements of the σ-algebra of Borel subsets of, say, Ê N for the first argument of the instrument.
This generalization is not necessary to be considered in the present paper.
We will need a second representation theorem, this time formulated for instruments. It is called a measurement dilation and can be physically viewed as a realization of a non-Lüders instrument J by a time evolution and a Lüders instrument on a larger system. Thus let K be another Hilbert space, φ ∈ K a vector with φ = 1 and corresponding projection P φ and V : H ⊗ K −→ H ⊗ K a unitary operator. Further, let (Q n ) n∈N be a complete family of mutually orthogonal projections in K. Then the map D K,φ,V,Q : N × B(H) −→ B(H) defined by will be an instrument. Here Tr K denotes the partial trace that reduces a state of the total system to a state of the subsystem given by the Hilbert space H. If J is a given instrument then D K,φ,V,Q will be called a measurement dilation of J iff J = D K,φ,V,Q . The mentioned representation theorem guarantees the existence of measurement dilations for any given instrument, see Theorem 7. 14 of [21] or Exercise 8. 9 of [16]. The last reference also contains an explicit construction procedure for D K,φ,V,Q that will be reproduced for the special case of a Maxwell instrument in Appendix B and will henceforward be referred to as the "standard realization".

III. THE QUANTUM VERSION OF MAXWELL'S DEMON (QMD)
The activity of Maxwell's demon can be abstractly characterized as performing a conditional action, i. e., an action depending on the results of a previous measurement. Additionally, it is required that this conditional action leads to an entropy decrease of the system if applied to a certain set A of admissible initial states. In this paper we will interpret these notions quantum mechanically, especially the states as statistical operators ρ of a so-called object system defined on some Hilbert space H, and the measurement as a Lüders instrument where n runs through some finite index set N and (P n ) n∈N is a complete family of mutually orthogonal projections. The total Lüders operation represents the state change after the Lüders measurement without any selection. More general instruments may be used to model the demon's measurement but this possibility will not be considered in the present paper. Further, the entropy is taken as the von Neumann entropy [19] S(ρ) = −Tr (ρ log ρ) , where log is chosen as the natural logarithm. It is wellknown [19], [16], [24] that the entropy of a state never decreases during a Lüders measurement, i. e., Hence a Lüders measurement alone cannot be used to model a QMD. Additionally, we need to give a quantumtheoretical definition of a conditional action relative to a Lüders measurement. This will be done by considering a family (U n ) n∈N of unitary operators in H such that the combined state change will be given by the instrument henceforward called a "Maxwell instrument", with total operation ("Maxwell operation") Again the Kraus operators A n = U n P n of the operation J(N ) may be read off the representation (12). We stress that we will use the mathematical notion of an instrument that was originally designed to characterize state changes due to measurements in order to describe the more general state changes caused by a measurement and a conditional action. A similar approach has been adopted in chapter 12.4.4 of [16] in connection with quantum error correction.
It can be shown that a Maxwell operation always decreases the entropy of the corresponding postmeasurement state: For a proof see Appendix A.
It is obvious that the U n are not uniquely determined by (11), for example, U n must only be defined on the support of P n and can be arbitrarily extended to its orthogonal complement. In other words: the conditional action must be only defined for those cases where the condition holds.
In passing we note that the concept of "conditional action" is also used in quantum teleportation, see [16], chapter 1.3.7. Here Alice makes two quantum measurements and sends her results to Bob via a classical communication channel, who in turn performs certain operations depending on the measurement results. However, the total entropy increases during teleportation and hence it cannot be considered as a QMD.
It is well-known that in the case of a more general instrument than that of Lüders type a statement analogous to (10) may fail, i. e., a generalized measurement can decrease entropy, see [16], Exercise 11.15. We will provide two examples in Section IV showing that this may also happen for an instrument of the form (12) and hence the Maxwell instrument is a possible candidate for a QMD.
We know from classical thermodynamics that the decrease of entropy of some system would not contradict the 2 nd law of thermodynamics if it is accompanied by an equal or larger increase of entropy in some other parts of the world. This strategy of explaining the decrease of entropy can also be tried in the case of quantum mechanics. It is highly plausible that the demon needs some auxiliary system to perform the measurement and the conditional action. We will call this auxiliary system again the "demon" and assume that it can be modelled as another quantum system with Hilbert space K. How can the quantum demon be realized? It is tempting to use the measurement dilation sketched in Section II that was originally intended to merely give a physical realization of a non-Lüders measurement. But there is no reason not to apply this construction to Maxwell instruments J as well.
Hence we will assume that at the beginning the state of the combined system, object system and demon, is assumed to be where P φ is a one-dimensional projector in K. Then a unitary time evolution V of the combined system takes place with the resulting state being followed by a Lüders measurement at the demon with projectors Q n : K → K. This leads to a (not normalized) state Finally this state is reduced to the object system by performing the partial trace Tr K . This yields the measurement dilation of J of the form (17) with corresponding total operation Before entering into the proposed solution of the mentioned paradox we would like to point out that the measurement dilation (17) in a sense reverses the temporal order of measurement and (conditional) action. In the original description of the demon we imagine a measurement followed by an action depending on the result of that measurement. In the dilation (17) there is first an unconditioned time evolution of the combined system followed by a state change due to a Lüders measurement at the demon and the state reduction. This resembles the difference between a classical computer that executes an "if-else" command thereby performing a conditional action and a quantum computer that performs all possible actions simultaneously until a final measurement selects which condition is satisfied. Such a realization seems strange at first sight but is a consequence of our decision to describe the demon purely as a quantum system.
Coming back to the apparent violation of a tentative 2 nd law it is clear that the entropy of the quantum state remains constant during the first steps of the operation D(N ): since the entropy is additive for tensor products, vanishes for pure states and is unitarily invariant. By the following Lüders measurement the entropy increases (or remains constant) according to (10): If we reduce ρ 12 to both subsystems, the entropy further increases: This is a consequence of the so-called subadditivity of the von Neumann entropy, see [16], 11.3.4. The inequality (23) is compatible with the condition for a QMD since it only implies This means that the decrease of the entropy of the object system will be, at least, compensated by an increase of the demon's entropy. In this case the total entropy of the object system and the demon does not decrease in accordance with a tentative 2 nd law.

IV. EXAMPLES
A. Erasure of N qubits As a first example of a demonic Maxwell instrument E and its standard realization we consider a system with a Hilbert space being an N -fold tensor product of twodimensional ones and an orthonormal basis of vectors |n , n ∈ N ≡ {0, . . . , 2 N − 1} where n is identified with the string of length N consisting of its binary digits. Especially, 0 represents the string consisting of N zeroes. Further we choose an initial Lüders measurement with projectors P n = |n n|, n ∈ N , and the unitaries U n corresponding to the Maxwell instrument (11) such that for all n ∈ N . After a short calculation we obtain for all statistical operators ρ in H and hence the description of the Maxwell instrument E as "erasure of N qubits" seems adequate. Since the entropy decrease of the corresponding Maxwell operation is maximal and we may call it "demonic". Its standard realization is given by K = H, φ = |0 , Q n = P n for all n ∈ N and After a short calculation we obtain, in accordance with (29), where and Moreover, by virtue of (10). This means that the standard realization of the Maxwell instrument E erasing N qubits proceeds by shifting the post-measurement state of the Lüders measurement corresponding to (27) into an auxiliary system of the same size as the object system. According to (35) this overcompensates the decrease of entropy due to the erasure. Since we have not precisely stated a quantum version of Landauer's principle (in the narrow sense) we cannot claim that this would represent a proof of this principle. A possible obstacle would be that such a principle is usually formulated to make a statement about all possible realizations of the erasure process, whereas we have only said what would be obtained for realizations by measurement dilations E = D K,φ,V,Q .
Note finally that the usual statement about the entropic costs for erasure of at least k B log 2 per bit (reintroducing the Boltzmann constant k B ) follows from if all p n ≡ Tr (ρ P n ) are equal and hence p n = 2 −N which entails − n∈N p n log p n = N log 2.

B. A simple model of a QMD
Similarly as in the case of Szilard's engine [5] we simplify the QMD scenario to a one-particle problem. Further, we consider only two pairs of yes-no-properties of the particle: • Position: right or left (r/l), • Speed: hot or cold (h/c).
This leads to a 4-dimensional Hilbert space H = 4 spanned by the four orthogonal states |rh , |rc , |lh , |lc . For the Lüders measurement we assume As the conditional action we choose This means that, if the particle is found at the right hand side and being hot then it is transferred to the left hand side without changing its speed: The action of U 1 onto the other three basis vectors is irrelevant since it models a conditional action and will only be applied in the case where the first Lüders measurement has the result "yes" and yields the post measurement state |rh . If the measurement result is "no" then U 2 will be applied, i. e., there will be no action.
Next we restrict the class A of admissible initial states to those of the form where 0 < p < 1. This means that initially the particle is in a mixed state with probability p of being "hot" irrespective of its position. It follows that initially the entropy will be The initial entropy S0 of the total system (= the initial entropy of the object system) (orange curve), the final entropy S1 + S2 of the total system (blue curve), and the final entropy S1 of the object system (green curve). We see that always S1 < S0 but S1 + S2 > S0 if 0 < p < 1.
The final state ρ 1 according to (12) will be having the entropy Comparison with (41) yields and hence the model is a proper QMD since the action of the demon leads to a decrease of the object system's entropy. Our next aim is to construct a measurement dilation of the form (17) following the prescription given in Appendix B. Hence we choose K = 2 with standard basis φ = 1 0 and ψ = 0 1 , and The linear operators in H ⊗ K = 4 ⊗ 2 ∼ = 4 ⊕ 4 will be represented by 2 × 2-matrices the entries of which are 4 × 4-matrices. This simplifies the calculation of partial traces. With this convention we set One may confirm by direct calculation that with the above definitions D K,φ,V,Q is indeed a measurement dilation of the considered Maxwell instrument. Additionally, we will explicitly calculate the measurement dilation for admissible initial states stepwise using the fact that all states will be diagonal in the standard basis of 4 ⊕ 4 . First we note that Since V (ρ ⊗ P φ ) V * is already diagonal we obtain From this we obtain the partial trace ρ 1 as the sum of the two diagonal blocks of ρ 12 : in accordance with (42) and its entropy (43). Analogously, the final state of the demon is obtained by taking the traces of the block matrices and has the form with entropy (53) This leads to see Figure 2, and hence the decrease of entropy of the object system is overcompensated by the increase of the demon's entropy in our example. A remarkable detail of our example is the fact that the state of the combined system after the interaction commutes with all projections ½ ⊗ Q n and hence the entropy increase due to the Lüders measurement vanishes. The final entropy increase is completely due to the separation of the total state into reduced states of the subsystems. It has been argued against Szilard's principle that there are also reversible measurements and hence this principle alone is not sufficient to defense the 2 nd law against the Maxwell's demon objection, see [7], chapter 5. Our example yields a counter argument closely related to Zurek's consideration of mutual information [10]: In the quantum case there are also entropy costs of state separation that might suffice to compensate the entropy decrease of the object system even if the measurement is reversible (adiabatic).

V. CLASSICAL CONDITIONAL ACTION
It will be instructive to investigate the classical counterpart of the conditional action relative to a (Lüders) measurement introduced in Section III. To this end we consider probability distributions defined on a finite set I of elementary events and subject to the condition A "measurement" will be represented by a partition of I, i. e., a disjoint union As usual, we define the Shannon entropy [20], up to a factor log 2, by Then a "classical conditional action" relative to the measurement (I j ) j∈J will be defined by a map that is injective on the subsets I j , i. e., if i 1 , i 2 ∈ I j for some j ∈ J and i 1 = i 2 then φ(i 1 ) = φ(i 2 ) holds. Each conditional action gives rise to a new probability distribution q : I → [0, 1] defined by that has, in contrast to the quantum case, always a lower (or the same) entropy: Proof of Eq. 62: If φ is a global bijection then (62) is satisfied with equality. Now assume that exactly two events are mapped onto the same one, say, φ(1) = φ(2) = i and p 1 , p 2 > 0. Then we conclude, for j = 1, 2, which means that the fusion of two probabilities p 1 and p 2 to q i decreases the corresponding term of the entropy. From this the general case follows by induction.
We will give an elementary example. Let I = {1, 2, 3, 4, 5, 6} denote the numbers of a die and p i = 1/6 their probabilities. The measurement detects whether the dice roll is low or high, corresponding to the partition I = I 1 ⊎ I 2 = {1, 2, 3} ⊎ {4, 5, 6}. If the dice roll is low, the die is flipped so that the new roll is high. If the dice roll is already high, nothing is done. This describes the conditional action The new probability distribution q generated by the conditional action will be given by q 1 = q 2 = q 3 = 0 and q 4 = q 5 = q 6 = 1/3. It has the entropy H(q) = log 3 whereas H(p) = log 6, in accordance with (62).

VI. SUMMARY
We have given an explanation of the apparently paradoxical entropy decrease of a quantum system caused by the external intervention analogous to but more general than Maxwell's demon. This explanation follows Szilard's principle [5] and its quantum version given by Zurek [10] in so far as it includes the demon's state into the entropy balance. But we extend these approaches by introducing the concept of "conditional action" and its mathematical description in terms of a "Maxwell instrument". The quantum-mechanical description of the demon can then be accomplished by using tools from quantum measurement theory [21], especially the "measurement dilation" of a Maxwell instrument. The entropy decrease due to the conditional action of Maxwell's demon thus appears as a special case of the entropy decrease due to a non-Lüders measurement and has an analogous explanation, see [22], [23] or [24]. Of course, we have not shown that all physical realizations of Maxwell's demon would be compatible with a tentative 2 nd law, but only those described by measurement dilations.
The relation of our explanation to the Landauer/Bennett principle proves to be ambivalent. On the one hand there is no contradiction: If the conditional action is intended to be part of a cyclic process it would be necessary to reset the state of the demon to its initial value. This is only possible by another conditional action performed by a second demon and ends up with an increased entropy of the second demon's state. But on the other hand it would not be entirely appropriate to call this process an "erasure of memory" since in our approach the function of the demon cannot be reduced to a mere memory, but also includes the role of a measuring device and of a control unit for the conditional action. Moreover, the reset of the demon's state was motivated by getting started a cyclic process. If this reset necessarily increases the entropy of some other part of the environment, this simply means that it has not achieved its goal and hence is superfluous. From this perspective the Landauer/Bennett principle appears as a possible appendix to Szilard's principle but can hardly be viewed as "the ultimate reason for the entropy increase" [10].
It has been argued [4] that current explanations of Maxwell's demon using principles connecting information and entropy are not yet based on firm grounds. It is therefore worth mentioning that our approach does not rely on concepts from information theory, notwithstanding the frequent citation of a textbook [16] on quantum information theory and the use of von Neumann entropy. One may object, what is information anyway, if not the result of measurements used to trigger conditional action? But what one is actually concerned with here is the methodological distinction between specialization and generalization. It may be possible to introduce new concepts that fit specific situations without extending the theory in question. However, this must be strictly separated from the situation where new terms and laws are required to generalize the theory. Conceptual parsimony can be helpful to clearly distinguish between these two cases.
which completes the proof of Proposition 1.
If the initial state ρ and the family of projections P n , n ∈ N , is given, one may ask which choice of the unitary operators U n , n ∈ N , would minimize the entropy S 1 = S n∈N U n P n ρP n U * n ? We conjecture the following result.
Let (ψ µ ) µ∈M be an orthonormal basis in H and φ (n) µ µ=1,...,dn an eigenbasis of P n ρ P n such that for all µ = 1, . . . , d n and n ∈ N . We assume that the order of the indices µ is chosen such that the eigenvalues of P n ρ P n are monotonically decreasing: for all n ∈ N . Then an optimal choice of the U n is given by the conditions for all µ = 1, . . . , d n and n ∈ N . This means that the U n merge the eigenspaces of P n ρ P n as much as possible such that the largest corresponding eigenvalues are added thereby decreasing the entropy of the state. The above choice is not unique since, e. g., global permutations of the eigenvalues do not change the entropy. Of course, it is not clear in general whether this decrease of entropy leads to S 1 < S 0 . Only in the latter case we would call the resulting Maxwell instrument "demonic". If the choice of the P n , n ∈ N , also remains open the problem becomes trivial: Upon choosing the P n , n ∈ N , one-dimensional the above optimal choice of the U n yields a pure state with vanishing entropy, as in the case of erasure of N qubits in Section IV A. Let a Maxwell instrument of the form (11) be given, i. e., J(n)(ρ) = U n P n ρP n U * n , n ∈ N . (B1) Following [16] we want to explicitly construct a measurement dilation of J of the form (17). To this end we choose K = N and an orthonormal basis |n n∈N in K. Let φ ∈ K be one of these basis vectors, say, φ = |1 . Further, letP n denote the eigenspace of the projector P n corresponding to the eigenvalues 1 and |ni i=1,...,dimPn some orthonormal bases inP n such that P n = i |ni ni| , for all n ∈ N . (B2) Moreover, letQ n ≡ H ⊗ |n and Q n = |n n| denote the projector onto the one-dimensional subspace spanned by |n for all n ∈ N . We define a linear map V 1 : . . , dimP n and n ∈ N .
Proof: Let |mj1 and |ni1 be two arbitrary vectors of the orthonormal basis ofQ 1 obtained from the orthonormal basis of H considered above. Then we conclude which completes the proof of Lemma 1.
Next we extend the partial isometry V 1 to a unitary operator V : H ⊗ K → H ⊗ K. This completes the definition of the quantities K, φ, V, Q required for the measurement dilation. It remains to show that J = D K,φ,V,Q . To this end we write Further, and since Tr Q n = 1 for all n ∈ N . The latter expression equals J(n)(ρ) = U n P n ρ P n U * n (B2) = i,j U n |ni ni|ρ|nj nj|U * n , (B18) thereby proving that the above construction is a correct measurement dilation of J.
Next we calculate the reduction of the final state to the demon subsystem and obtain The corresponding entropy amounts to the Shannon entropy In connection with the Szilard principle the following result is interesting: The total entropy of the composed state after the measurement dilation D K,φ,V,Q constructed above exceeds (or equals) the entropy of the state after the corresponding Lüders operation, (B21) Proof of Proposition 2: With the definitions (A1) -(A3) we conclude from the concavity of the von Neumann entropy, see (11.86) in [16], (B22) This further implies and (B21) immediately follows.

Appendix C: The Szilard engine revisited
We will reconsider the Szilard engine, but in contrast to the simplified model in section IV B, adopt a more realistic description of the one-molecule gas and the isothermal expansion after position measurement. In doing so, we will stick to [10] as far as possible, but emphasize the differences to the present approach.
In classical thermodynamics there are various equivalent formulations of the 2 nd law including the impossibility of a perpetuum mobile of the second kind. This is a cyclic process transforming heat completely into work without further changes of the environment. The Szilard engine is designed as a possible realization of such a perpetuum mobile but in the present paper we will concentrate on the entropy balance, against the grain, so to speak.
The one-molecule gas is initially confined to a cylindrical box V with volume V that will be separated into two chambers V R and V L with equal volumes V/2 by the adiabatic insertion of a piston. Contrary to [10] we will neglect the preparatory process of insertion of the piston since it is only needed for a cyclic process but would be irrelevant for the entropy balance. The Hilbert space of the gas will be chosen as The isothermal expansion cannot be described by a unitary operator acting only on H g . Thus we have to extend the object system by a heat bath with Hilbert space H b and take the Hilbert space of the object system as We note that these Hilbert spaces are infinitedimensional. Strictly speaking, we are restricted to the finite-dimensional case according to the general assumption in Section II but we do not expect that this will cause any problem. Initially the state of the object system is assumed to be given by the product state where ρ R , ρ L and ρ b are Gibbs states with the same temperature T corresponding to suitable Hamiltonians. The Hamiltonian for the gas is the one-particle kinetic energy with the boundary condition of vanishing wave functions at the boundaries of V R and V L . Due to symmetry considerations we will assume The projectors of first Lüders measurement will be P R and P L corresponding to projections onto the subspaces H L and H R , resp., see (C1). These projectors commute with ρ 0 and thus the corresponding total Lüders operation (1) alone would not change the state ρ 0 . But we have to perform a conditional action: Depending on the result of this measurement one of two possible isothermal expansions will be performed that are described by unitary operators U R , U L : H → H. Hence the state of the object system after the conditional action will be One expects from physical reasons that after the isothermal expansion one would obtain a one-dimensional gas filling the box V in thermal equilibrium with the heat bath. Hence both density operators in (C5) will be equal to a Gibbs state of the form ρ g ⊗ ρ b , but with a slightly lower temperature than T . However, we will not need this strong thermalization assumption but only the weaker one that can be justified by symmetry considerations: where the second approximation follows from (C5). Eq. (C6) implies This further gives the following result for the entropy decrease due to the conditional action: The last approximation (C12) follows from S(ρ g ) This entropy decrease has not been calculated directly by Zurek in [10] but follows from his result ∆A = k B T log 2 (C16) for the increase of free energy A of the gas due to the position measurement, see [10] Eq. (20), if we take into account the thermodynamical identity and that the intrinsic energy E of the gas does not change due to the measurement. (Note that we have used dimensionless entropy units in this paper and hence set Boltzmann's constant k B to 1.) Zurek also considers in [10], section "Measurement by 'quantum Maxwell's demon' ", a measurement dilation similar to that considered in this paper, but only for the pure Lüders measurement, not for the conditional action. Nevertheless, he obtained an entropy increase of ∆S = k B log 2 of the demon's state that exactly compensates the entropy decrease of the gas calculated above, and related this entropy increase to the loss of "mutual information", see [10] Eq. (36). It will be instructive to compare these considerations with the measurement dilation scheme considered in Section III applied to the Szilard engine model.
We choose the demon's Hilbert space as K = 2 with orthonormal basis (r, ℓ) and projectors Q R = |r r|, Q L = |ℓ ℓ|. The initial state of the demon will be chosen as φ = r. Further we choose a unitary operator V : for all ψ R ∈ H R , ψ L ∈ H L , and ψ ∈ H b .
The factors of the initial state ρ 0 = ρ g ⊗ ρ b will have spectral decompositions of the following form where we have used that the eigenvalues p i of ρ R are the same as those for ρ L due to symmetry. After a straight forward calculation using (C20) and (C21) we obtain for the total state ρ 12 after the interaction the expected result ρ 12 = V (ρ g ⊗ ρ b ⊗ |r r|) V * = ρ 1 ⊗ 1 2 (|r r| + |ℓ ℓ|) , (C22) with ρ 1 according to (C6). Since ρ 12 commutes with ½ ⊗ Q R and ½ ⊗ Q L the final Lüders measurement does not change this state: (C23) analogously to the measurement dilation considered in [10]. The difference to our calculation is that we have no correlation between object system and demon in the final state ρ 12 and the separation into partial traces considered in Section II is superfluous.
Consequently, the total entropy during the conditional action will be constant since the entropy of the demon increases by ∆S d = log 2 as can be directly read off the final demon's state in (C22), and the entropy of the object system decreases according to S(ρ 0 ) − S(ρ 1 ) = − log 2, see (C11) and (C15).
We should a remark on the role of approximations in the present problem of Szilard's engine. These approximations simplify the presentation but are not crucial for the total entropy balance that is guaranteed by the measurement dilation as explained in Section III. For example, if we cancel the approximation, that the isothermal expansion reaches the same state in both cases, see (C6), then in the final state ρ 12 after the interaction a small correlation would remain. The following measurement and the separation of the states of subsystems would lead to a small further increase of entropy without changing the final result substantially. A variant of the Szilard engine without any need for approximations would be obtained by replacing the final isothermal expansion by an adiabatic expansion without any heat bath. Of course this runs counter to the original motive of constructing a cyclic heat engine.