The irreversibility cost of purifying Szilard's engine: Is it possible to perform erasure using the quantum homogenizer?

Erasure is fundamental for information processing. It is also key in connecting information theory and thermodynamics, as it is a logically irreversible task. We provide a new angle on this connection, noting that there may be an additional cost to erasure, that is not captured by standard results such as Landauer's principle. To make this point we use a model of irreversibility based on Constructor Theory - a recently proposed generalization of the quantum theory of computation. The model uses a machine called the"quantum homogenizer", which has the ability to approximately realise the transformation of a qubit from any state to any other state and remain approximately unchanged, through overall entirely unitary interactions. We argue that when performing erasure via quantum homogenization there is an additional cost to performing the erasure step of the Szilard's engine, because it is more difficult to reliably produce pure states in a cycle than to produce mixed states. We also discuss the implications of this result for the cost of erasure in more general terms.


Introduction
Erasure is essential for information processing and thermodynamics. The clearest realisation of the connection between erasure and thermodynamics is Bennett's application of Landauer's Principle to solve the Maxwell's Demon paradox [1]. The erasure of a demon's information about a system is essential for the demon to extract work in a cycle, and the erasure process has an irreducible entropy cost. This is most manifest in the case of the notorious Szilard engine, the single-particle realisation of Maxwell's Demon (figure 3). For Szilard's engine to operate in a cycle, there must be a final step of memory erasure; and this is the step associated with an irreducible entropy cost -see [2]. In the quantum model for Szilard's engine, memory erasure must transform a qubit from a mixed state to a pure state [3]. This is a non-unitary process, whence the irreducible entropy cost of this step.
Here we consider whether there could be an additional cost to performing the erasure task via a particular method. This cost, as we shall illustrate, is associated to how well erasure can be performed using the so-called quantum homogenizer [4], orig-inally proposed as a unitary model to approximate the related non-unitary task of thermalization.
In particular, we consider how far a machine can approximately realise the mixed-to-pure transformation needed for erasure, and approximately remain unchanged, so that it can work in a cycle. Various open-system dynamics can implement this transformation [5], at the cost of causing changes to the environment in various ways. The quantum homogenizer can be used to implement this transformation, by partially swapping the mixed qubit to be erased with a qubit from a large reservoir of initially pure qubits. The protocol has been implemented experimentally for small numbers of qubits using NMR and photons, see e.g. [6,7].
In this paper we show that while a quantum homogenizer could in theory be constructed to perform a pure-to-mixed transformation to arbitrary accuracy -crucially, while working in a cycle -such a homogenizer cannot be constructed to perform a mixed-to-pure transformation in a cycle. Specifically, in the mixed-to-pure case, the homogenizer deteriorates too quickly to perform the task indefinitely in a cycle. We conjecture that this captures an additional cost to operating Szilard's engine with the homogenizer, which goes beyond the entropy cost traditionally associated with erasure. We point out that this cost is not directly captured by a traditional analysis of entropy changes in terms of von Neumann entropy -meaning that there may be more constraints to performing erasure than was previously thought.
This cost is associated with the so-called constructor-based irreversibility [7], which we build on in this paper. This type of irreversibility is exact and scale-independent, in contrast to many definitions of irreversibility using statistical mechanics. It has to do, informally, with the fact that a constructor, defined (following von Neumann [8]) as a machine that can be programmed to execute a task and retain the ability to perform it again, could be allowed for a task, but not for its transpose (i.e., the task where the inputs and outputs are switched). The fact that erasure is a task that may not necessarily be performable in a cycle, while its transpose is, suggests that erasure may have an additional link to irreversibility, beyond its traditional connection to the second law via Landauer's principle and Maxwell's Demon. This hints at the intriguing possibility that the second law can be updated in a stronger form, where it is exact and nonprobabilistic, just like the law of conservation of energy is, [9].

Constructor-based irreversibility
Our approach to explaining irreversibility is based on Constructor Theory (CT) [10][11][12][13]. In CT we define attributes as sets of states [10]. The basic objects in the theory are tasks, defined as sets of ordered pairs of input and output attributes specifying a transformation on a physical system, or substrate. One can then state the fundamental laws of physics in terms of whether tasks are possible or impossible and why, where possible and impossible are defined as follows. A constructor for a task is a system capable of performing the task to arbitrarily high accuracy, while maintaining its ability to cause the transformation again. A task is possible (T ) if it can be performed by a constructor, and impossible (T × ) otherwise. For a possible task, there is no fundamental restriction on how closely a perfect constructor could be approximated by a sequence of (imperfect) actual machines.
Generalizing this idea, one can conjecture the following "constructor-based" irreversibility. Consider a possible task T , that sends some input attribute x to an output attribute y. Its transpose T ∼ is defined to have the inputs and outputs of T switched, so it has input attribute y and output attribute x. Then the task T is possible, while its transpose T ∼ need not be possible, even with time-reversal symmetric dynamics [7]: The existence of a machine that can approach a perfect constructor for a task T does not imply that such a machine exists for the task T ∼ in the reverse direction. This is because a machine approximately capable of performing a task in a cycle is not necessarily able to perform the transpose task in a cycle to the same degree of approximation, simply by having its dynamics reversed. The asymmetry holds even if the underlying dynamical laws are time-reversal symmetric, like those of quantum theory.
A model was recently proposed to illustrate this kind of irreversibility, based on unitary quantum theory [7]. Specifically, transforming a qubit from a pure state to a mixed state is possible, while transforming a qubit from a mixed to a pure state is not necessarily possible, even if this transformation is done via a series of unitary, time-reversal symmetric interactions. We first discuss this irreversibility in full generality within the formalism of quantum theory, and then demonstrate it when the task is performed by the quantum homogenizer [4].

Quantum model for a constructor
Here we discuss a general quantum model for a constructor, and provide an argument for the constructor-based irreversibility [14]. Consider the composite system of two quantum systems, C and S, with total Hilbert space H = H C ⊗H S . Fix a unitary law of motion U describing their interaction. We can fix a task T = {x → y}, where x is the attribute associated with the density operator ρ x and y is the attribute associated with the density operator ρ y . For simplicity, from now on we will only consider attributes that do not change unless acted upon. In quantum theory, these attributes correspond to stationary states. Consider now the set of states of C defined as follows: This is the set of states of C with the property that, when C is initialized in one of those states, and presented with the substrate S in the state ρ x with the attribute x, it delivers the substrate in a state with attribute y. Note that in the final state C and S can be entangled. Hence, C may no longer be Following homogenization, all the reservoir qubits, and the homogenized system qubit, are within some distance d of the original reservoir qubit state, where d can be made arbitrarily small as the size of the homogenizer is made arbitrarily large. Figure 2: The quantum homogenizer, consisting of N identical reservoir qubits, which each interact via the partial swap with the same system qubit. Here we consider re-using the machine to homogenize n system qubits, as depicted above for a mixed-to-pure transformation, which may not be possible. Figure 3: Szilard's Engine. The "demon" extracts work by measuring a particle's position in a box, inserting a sliding wall, then letting a weight be pulled up by the particle's pressure on the wall. The information stored about the particle must be erased to repeat the cycle, by transforming a mixed into a pure state.
able to cause the transformation again once it has performed it once.
We can check that Σ T is a convex set by considering how a convex combination of N density T , cause a system state ρ x to evolve under the unitary U : T is a convex set. Now let us proceed with a recursive definition of a family of sets: for all n > 1, with the property that ∀ρ ∈ Σ (n) T is the set of states of C that can perform the task T consecutively n times, as depicted in Figure 4.
After n times C may lose its ability to cause the task once again. A constructor is a special kind of environment which keeps this ability indefinitely. As such, it must be defined as the limit point of the sequence of sets {Σ (n) A necessary condition for C to be a constructor for the task T under the law of motion U is that the set exists and it is non-empty. That the task T is possible implies, in quantum theory, that there exists a non-empty set Σ C T with the above properties. T is evolved using unitary U to transform a system from ρ x to ρ y , it is left in a state in the set Σ (i−1) T . The lines between each ρ y and Σ (i) T indicate that they may be entangled.

The limit of a constructor
A non-empty set Σ C T defines a perfect constructor for a task: one which is able to perform the task arbitrarily well, an arbitrary number of times. In practice, if this machine is physically realized, it will not be a perfect constructor due to its inevitable deterioration from interactions with its environment. However, the existence of the non-empty set Σ C T indicates that there is no limit to how well a perfect constructor for task T can be approximated by a physical machine.
For example, a CNOT gate and a qubit in the |1 state together form a constructor for the task of transforming a state |0 to a state |1 . This can be done by re-using the qubit in the |1 state as the control qubit with any number of target qubits in the state |0 . However, physical CNOT gates cannot be implemented with no errors, and qubits cannot be prepared in the |1 state without errors. The transformation |0 to |1 is possible because there is no limit to how far the errors can be reduced in the CNOT implementation and |1 state preparation.

Constructor for transpose task
We shall now argue that under quantum theory's time-reversal symmetric laws, the existence of a nonempty constructor set Σ C T does not imply that a non-empty constructor set for the transpose task T ∼ , Σ C T ∼ , must also exist. This statement holds even under the time-reversal U † of the dynamical law.
Consider again the task T = {x → y}. Assume now that, according to time-reversal symmetry, all unitaries and their transposes are allowed. Assume also that T is possible, so that the set Σ C T exists and is non-empty under a given unitary U . This fact does not imply that the set Σ C T ∼ must also be non-empty under U † , the time-reversal of U . For the inverse evolution U † applied to C prepared in Σ C T and to the substrate S initialized in the attribute y, does not necessarily retrieve the substrate in the attribute x. Hence we have the key result that C initialized in the attribute Σ C T is not necessarily a constructor for the task T ∼ under the inverse unitary U † .
This result can be understood as follows. If it is possible to perform the task T = {x → y}, then in particular it must be possible to perform the task T consecutively on n systems for arbitrary n -meaning that the set Σ (n) T is non-empty. One might then think that it must be possible to perform T ∼ = {y → x} consecutively on n systems for arbitrary n by reversing the unitary interaction -meaning that as a result, the set Σ (n) T ∼ is also non-empty. This is false. As depicted in Figure 4, there can be entanglement (or more generally, correlations) between the system and machine following their interaction via U . Therefore to dynamically reverse the process in Figure 4 to convert n systems in the state ρ y back to n systems in the state ρ x using U † , we need to prepare a very special initial state on the machine subspace. This initial state must not only have a reduced state in Σ (0) T (the final state of a machine after performing the forwards task T n times), but also be entangled in a particular way with each of the n systems to be transformed (all the systems ρ y shown in the top row of Figure 4).
However for the task T ∼ = {y → x} to be possible, we require that any system having the attribute y interacting with any machine state in Σ C T ∼ will be transformed to a state having the attribute x, independently of whether the system is initially entangled with the machine or not. In other words, the transformation should work for any system whose reduced state is initially ρ y , whether or not it is initially entangled with the machine, but this is not the case. If we applied the inverse unitary between the machine in Figure 4 with a system which was in the correct reduced state ρ y but not entangled with the machine in the correct way, then the inverse unitary would not in general transform the system to have the reduced state ρ x . For let us denote by U (ρ C ⊗ ρ x )U † = ρ out the global state of the machine and system after the interaction U . We know that, by unitarity, Unlike the particular state ρ out , a generic joint system and machine state, with reduced density operators ρ y on the system and ρ C on the machine, may not have the right correlations to allow U † to lead the joint state to ρ C ⊗ ρ x . Hence while ρ C in Σ C T may well be a state that represents a constructor for T , its existence does not imply that a constructor should exist for the transpose task T ∼ , even when dynamical laws are unitarily reversible.
This argument shows that irreversibility in Constructor Theory, stating that a task is possible but its transpose need not be, is compatible with timereversal symmetric laws, in an exact way. This is because of the fundamental difference between a task being possible and a dynamical law being allowed. We will now look at a particular implementation of this constructor-based irreversibility within an eraser, implemented in a qubit model for homogenization.

The quantum homogenizer
The concept of re-using the same physical entity to perform a task occurs frequently in thermodynamics. When an item is put in a refrigerator to be cooled, it is expected that the refrigerator will retain the ability to perform the same task with a new item. Eventually, after cooling many items, any physical refrigerator breaks down and loses the ability to perform the task. Here, the physical entity is the quantum homogenizer, a set of initially identical reservoir qubits. The new input with each use is a fresh system qubit, and the task is to homogenize the state of that system qubit, such that it becomes close to the state of the original reservoir qubits. An effective homogenizer will also remain itself almost unchanged by the interaction, retaining the ability to perform the task again. We will compare the effectiveness and robustness of this machine in two scenarios: each input system qubit is pure, and the original reservoir qubits are maximally mixed ("pure-to-mixed"); and each input system qubit is maximally mixed, and the original reservoir qubits are pure ("mixed-to-pure").
The quantum homogenizer is a machine consisting of N identical reservoir qubits (figure 2). These each interact, one by one, with the system qubit (the qubit whose state is to be transformed) via a unitary partial swap: The partial swap is a combination of the identity, 1 and swap operation, S, weighted by the coupling strength parameter η. It has been shown that if the system qubit interacts with N reservoir qubits via the partial swap, then as N → ∞, the system qubit state converges to the original state of the reservoir qubits, for any coupling strength η = 0 [4]. Furthermore, all of the reservoir qubits after the interaction are within some distance d of their original state (see figure 1), which can be made arbitrarily small as coupling strength η → 0. In the limit of the best possible homogenization, any system qubit ρ is sent to the reservoir qubit state ξ, with all the reservoir qubits remaining unchanged: where U k := U ⊗ (⊗ j =k 1 j ) denotes the interaction between the system qubit and the k th reservoir qubit. The information about the original system qubit state is seemingly erased, despite all the interactions being unitary and thus informationpreserving. The information has actually become stored in the infinitesimal entanglement between infinitely many reservoir qubits, which sums to a finite value [4].
Application to Szilard's engine. Elaborating on recent studies, we show how the task of transforming a pure state to a mixed state is constructortheoretically possible using the quantum homogenizer, while the transpose task (mixed-to-pure) need not be [7]. The latter is the key task in the erasing step for a Szilard engine, inviting the question: does erasing a mixed state to a pure state in a cycle have an entropic cost in addition to Landauer erasure's cost, due to the task's impossibility using the homogenizer? The analysis shown in this paper provides a basis from which to investigate a potential additional cost of erasure.

Relative deterioration
Here we show that in the weak coupling limit (η 1), the quantum homogenizer can only be used as a constructor for the pure-to-mixed task and not the mixed-to-pure task. To conclude whether or not a task can be performed to arbitrary accuracy in a cycle by the homogenizer, one can consider the evolution of a quantity called the relative deterioration [7]. This accounts for both the error in performing the task, to quantify the potential for arbitrary accuracy, and the robustness of the machine with multiple iterations, to quantify the potential for performing the task again.
The accuracy in performing the task can be quantified as the fidelity of the output system qubit with the original state of the reservoir qubits. If the fidelity is close to 1, then the homogenization has been performed to high accuracy. Therefore one can define the error n N as this quantity subtracted from 1: where n and N are the total number of iterations and reservoir qubits respectively. Similarly, the robustness of the reservoir as it is used multiple times is the fidelity of the final reservoir state with the original reservoir state: The robustness δ n N defined in this way is 1 if the reservoir is unchanged after homogenization. The effects of error and robustness on performance of the task can be summarised using their ratio, namely relative deterioration R n N : Relative deterioration scales with error and robustness such that in the limit of large number of iterations and large number of reservoir qubits (the condition for best accuracy), then there are two cases: 0 Task is possible, ∞ Task need not be possible. (11) If R n N → 0 in the limit n, N → ∞ then the deterioration with number of iterations increases slower than the error decreases with reservoir size. This means the task can be performed to arbitrary accuracy in a cycle, so a constructor exists for this task. If R n N tends to ∞ in the limit n, N → ∞ then deterioration with number of iterations increases faster than error decreases with reservoir size. This means the task cannot be performed to arbitrary accuracy in a cycle by the homogenizer. Therefore, the homogenizer is not a constructor for this task.
The fidelity in the robustness expression is difficult to calculate analytically. Instead, the entire reservoir state can be approximated as the tensor product of the individual reservoir qubit states, where each ξ n j = Tr 1 (U (ρ n j−1 ⊗ξ n−1 j )U † ) is the local state of the j th reservoir qubit after n iterations. Physically, the approximation amounts to neglecting the entanglement between the reservoir qubits. This is justified in the weak coupling limit, since inter-qubit entanglement becomes negligible for low η [4].
Then the expression for the denominator of the relative deterioration, which measures the robustness of the machine, becomes: The derivations and final expressions for system and reservoir states, error, robustness and relative deterioration for the pure-to-mixed and mixed-topure transformations can be found in the Appendix.
Patterns in relative deterioration. The error and robustness for N = n = 60, η = 0.5 are shown in figure 5.
Error decreases with increasing reservoir size, and increases with number of iterations, as expected. Conversely, robustness decreases with number of iterations as the reservoir deteriorates from its initial state with repeated use. The robustness also decreases with increasing reservoir size, as more reservoir qubits deteriorate from their initial state. The error for the mixed-to-pure case increases more with n than for the pure-to-mixed case, and robustness for the mixed-to-pure case decreases more quickly and sharply with n than for the pure-to-mixed case. These patterns indicate that the pure-to-mixed task can be performed more reliably than the mixed-topure task.
The relative deterioration reveals an asymmetry in the possibility of the two tasks. For a weak coupling of η = 0.01, the surfaces of relative deterioration for the two directions of the task are shown in figures 6(a) and (c). For large N and n, R n N → 0 for the pure-to-mixed case and R n N → ∞ for the mixedto-pure case. Using equation 11, the pure-to-mixed task is possible while the mixed-to-pure task is not possible when using the quantum homogenizer.
The second column of figure 6 shows that for the strong coupling regime, the relative deterioration remains significantly higher in the mixed-topure case than the pure-to-mixed case. However, the relative deterioration for large n and N is increasing and not tending towards 0 for the pure-tomixed transformation. As can be seen more clearly in Figure 7, the relative deterioration decreases until around N = n = 20, then begins increasing for larger N = n.
This remains consistent with the pure-to-mixed transformation being possible using the homogenizer, since it need not be possible for all coupling strengths in order to be a possible task. It makes  sense that the homogenizer has greatest reusability for small coupling strengths, as it is in the weakcoupling limit that the reservoir qubits are left almost unchanged after interacting with the system qubit. Additionally, in the strong coupling regime there is significant entanglement between the reservoir qubits that has been neglected due to the approximation in equation 13. This has increasing impact as N = n increases, demonstrated by the analysis of von Neumann entropy in section 2.2. This entanglement must be accounted for to determine conclusively how the relative deterioration behaves in the large n and N limit for strong coupling.

Von Neumann entropy
Now we will explain why von Neumann entropy is insufficient to capture the constructor-based irreversibility shown by the relative deterioration, and hence the additional cost of erasing mixed states to pure states. In any unitary evolution, the overall entropy must remain constant [15]. In the pure-tomixed task, the system qubit entropy increases by 1, so the entropy of the reservoir qubits must decrease by 1. The entropy changes occur in the opposite direction (but same magnitude) for the mixed-topure task. After each homogenization, the total of the reservoir entropies from the two tasks should remain constant, since one reservoir has decreased in entropy by the same amount that the other increased in entropy. The changes in entropy are symmetrical for the pure-to-mixed and mixed-to-pure cases, and do not indicate an entropic cost beyond what is expected from Landauer's principle. Therefore von Neumann entropy is insufficient to explain the asymmetry found in relative deterioration in the weak coupling regime.
We demonstrate this by considering the total entropy of the individual reservoir qubits from both tasks, S tot . If the changes in entropy for the two tasks are equal and opposite, then the total entropy should remain constant as the homogenizer is used multiple times. This holds providing the entanglement between the reservoir qubits is negligible, because entanglement between qubits contributes negative entropy [16]. Hence, S tot is also an indicator of entanglement in the reservoirs. The total entropy of N maximally mixed and N pure reservoir qubits is N . Therefore, the more that S tot deviates from N as number of iterations n increases, the greater the amount of entanglement. Since entanglement becomes negligible in the weak coupling limit [4], S tot should remain constant with n for weak coupling, but be greater and vary with n for strong coupling, where the entanglement is significant. Figure 8 confirms and quantifies this prediction, with the strong coupling surface extending significantly higher in entropy than the weak coupling surface. The difference between the surfaces is a measure of the additional entanglement for strong coupling. This shows that entanglement is significant for strong coupling, but not accounted for in the states used to calculate relative deterioration. This supports our hypothesis in section 2.1 that the approximation to neglect entanglement has greater impact for strong coupling when N = n is large.
The weak coupling surface remains at a constant S tot with increasing n, indicating that the entanglement is negligible, and the changes in von Neumann entropy for the pure-to-mixed and mixed-topure tasks are equal and opposite, hence not a cause of irreversibility.

Resources required for homogenization
Now we will compare the resources required for the pure-to-mixed and mixed-to-pure homogenizations. We can consider the size of the homogenizer needed to achieve a certain number of homogenizations all to a given accuracy, for a fixed coupling strength.
Plotting the number of qubits required against number of qubits that can be homogenized to the desired accuracy (number of cycles) we find that the mixed-to-pure transformation requires consistently larger homogenizers than the pure-to-mixed transformation, indicating that the mixed-to-pure transformation requires more resources for repeated use (see Figure 9). Furthermore, the mixed-to-pure resources increase more steeply than pure-to-mixed, showing that the increase in resources required become more significant for a greater number of homogenizations.
Similarly we can invert this relationship to conclude that the lifetime of a mixed-to-pure homogenizer of a given size is consistently lower than that of a pure-to-mixed homogenizer, since it can be used fewer times to achieve the same accuracy. This relationship reinforces the conclusion drawn from the asymmetry in relative deterioration: that the mixedto-pure transformation is more difficult to perform in a cycle than the reverse process.

Comparing approximate and exact results
In the analytic calculation of robustness, we approximated the fidelity of the used reservoir with the original reservoir by treating the entangled reservoir as a product state of its composite qubits (equation 13). We justified this approximation using the fact that the entanglement between reservoir qubits tends to zero for the limit of weak coupling. However, since we use relative deterioration to demonstrate an asymmetry between the mixed-to-pure and pure-to-mixed transformations, one may consider whether the asymmetry could be related to the approximation rather than being a fundamental feature of the transformations. A motivation for this could be that neglecting entanglement seems like a natural way to introduce irreversibility in a system: it amounts to a form of coarse-graining or neglecting information, as is typical for standard derivations of irreversibility.
In response to the latter argument, we note that the irreversibility suggested by the asymmetry in relative deterioration is of a different sort to the irreversibility from neglecting information about a system. Constructor-based irreversibility comes from the possibility to perform a transformation arbitrarily well in a cycle, which does not imply  that the reverse transformation can be performed arbitrarily well in a cycle; this irreversibility does not emerge by reversing the dynamics of the system. By contrast, neglecting information about a system (or coarse-graining) leads to irreversibility emerging in an approximate or statistical way, such that all evolution of a system is ultimately dynamically reversible if all information about the system is known, and not necessarily reversible if there is neglected information. Therefore, constructor-based irreversibility is not of the type of irreversibility that would naturally emerge from neglecting entanglement in the reservoir.
Another reason that we would not expect the approximation to be the cause of asymmetry is that it is used in the same way for both the mixed-to-pure and pure-to-mixed transformations, neglecting entanglement between reservoir qubits in both cases, hence one would expect that it also affects the patterns in relative deterioration in a similar way for both cases.
To furthermore verify the validity of our approximation, we performed exact simulations of the quantum homogenizer and compared these to the approximation. Since the exact simulations become computationally large quickly with number of qubits, we have limited the simulations to maximum of a 3x3 homogenizer, where three system qubits are transformed by a three-qubit reservoir. Specialising to the case where N = n (number of reservoir qubits = number of cycles), we compared the robustness and relative deterioration for the pure-to-mixed and mixed-to-pure transformations, with and without the approximation. We found good agreement between the approximate and exact results for both coupling strengths 0.01 and 0.1. The relative deterioration for coupling 0.01 up to a size 3x3 homogenizer is show in Figure 10, demonstrating that the predicted asymmetry in relative deterioration holds for an exact calculation and is consistent with the approximation.

Comparison to other approaches
The notion of re-using quantum machines to perform a task has been studied in a variety of contexts in the field of quantum thermodynamics, for instance through the study of "catalysts" in the resource theory of thermodynamics [5,17]. Our work contrasts to many of these studies in that we do not impose energy conservation or thermal states in the analysis, hence it is a more general model of irreversibility in quantum interactions rather than being a phenomenon specific to thermodynamics. Furthermore, the notion of "embezzling" has been introduced whereby it appears that using fidelity as a measure of a task's effectiveness is too weak a condition to derive results about irreversibility, when the catalyst has unbounded size [17]. This contrasts to our discussion of relative deterioration -this measure shows an irreversibility even when our catalyst has unbounded size and fidelity is used in the dis-tance measure.

Alternative erasers
We have shown that erasure of a mixed to a pure state using the quantum homogenizer is more difficult than the reverse process. A pertinent question is whether or not this is a special case or a signature of a more general phenomenon, which makes it difficult to generate pure states. One way to assess this would be to consider a different machine that can approximate the task and be approximately reused, and consider the behaviour of a measure of relative deterioration for such a machine.
Comparison of homogenizer with SWAP. A candidate for this could be a large reservoir of initially identical qubits, where each interaction of the system with the reservoir is a random swapthe system qubit is swapped with a randomly selected reservoir qubit. Then as the reservoir becomes large, the system qubit becomes increasingly unlikely to be mistakenly swapped with a previous system qubit rather than one of the original reservoir qubits. There are some key differences between these implementations of erasure. Firstly, with the homogenizer, there is no intrinsic limit on how many times the eraser can be re-used, while still performing erasure to some effectiveness. By contrast the SWAP eraser will either perform perfect erasure or no erasure at all. While the homogenizer deterministically performs erasure with some accuracy, a SWAP eraser would probabilistically perform either perfect or no erasure. It may be that there are certain conditions under which one of the homogenizer and SWAP erasers is more optimal than the other, rather than one being conclusively the best eraser to consider for a task.
Comparison of quantum and classical erasure. Furthermore we could investigate a toy-model for classical erasure and consider whether the same difficulty of erasure arises. This way we can deduce whether the additional cost of erasure is specific to quantum theory or a more general feature of erasure that works across different regimes. A potential model with which to investigate one form of classical erasure could for instance be through a Controlled-SWAP eraser. Instead of partial swap interactions between system and reservoir qubits, this would instead implement a Controlled-SWAP gate. Each gate is controlled on a qubit in a weighted superposition, where the amplitude of the |1 state varies analogously to the coupling strength in the partial swap, with a system and reservoir qubit as the targets. Such a setup would have fewer quantum effects in play for the homogenization, since there would be no interference and entanglement generated between the reservoir qubits, and between the system qubits. The comparison between the Controlled-SWAP eraser and the quantum homogenizer will be discussed in [18].
In addition the different erasers can be used as models for different types of physical systems. The homogenizer is closely related to the collision model commonly used to model thermalization processes, with the weak-coupling regime being physically motivated to model systems of interest. By exploring and comparing the limitations and constraints on different forms of erasure, we can reveal how far the limits of erasure vary depending on the environment and physical model being considered. Having said this, there are particular motivations for paying special attention to the quantum homogenizer as an eraser. It is the only machine that can perform erasure and remain arbitrarily close to its initial state [4]. Furthermore there are interesting properties of entanglement that would not emerge with a SWAP or classical eraser, since the information stored in the system qubit becomes spread out across the reservoir qubits in infinitesimal pieces of entanglement, which aids the catalytic behaviour.

Interpretation of the additional cost of erasure
Our work suggests that there may be an additional cost to erasure when using the quantum homogenizer. While we can conjecture that this cost holds for other forms of erasure, this broader conclusion is not shown by this work. If the cost does not hold for all forms of erasure, then that invites further questions about the space of erasers that are bound by the additional cost. For instance, it may be that the cost appears for quantum but not classical models, or for deterministic but not probabilistic models, or for models with weak coupling between the system and eraser but not for strong coupling. This outcome would also leave open the possibility for other processes or transformations to exhibit constructorbased irreversibility, perhaps connected by a common property of the homogenizer that is different to information erasure. Alternatively, if the cost does hold for other forms of erasure, then this suggests a link between constructor-based irreversibility and information erasure. The cost would have practical implications for any implementation of Szilard engines and programmable nanomachines that depend on repeated information erasure. We could then consider whether the irreversibility can be formulated as a constraint on erasure in a more general setting than quantum theory, in terms of CT principles.
Another natural future development of this work is to better characterise the additional cost of erasure, for instance by expressing the relative deterioration in terms of a type of entropy. We leave these investigations for future work.

Conclusions
We have analysed a model of "constructor-based" irreversibility, which is exact, scale-independent and compatible with the time-reversal symmetric dynamics of quantum theory. We gave a general proof showing how this irreversibility is consistent with quantum theory, and demonstrated an example implementation using the quantum homogenizer. Specifically, the quantum homogenizer cannot be used in a cycle to transform a qubit from a mixed to a pure state, the erasure step of Szilard's engine, but it can be used in a cycle to perform the transpose task. This irreversibility suggests there is an additional cost to the erasure of quantum information, and hence to constructing a reliable implementation of Szilard's engine. We have quantified how entanglement builds in the homogenizer using von Neumann entropy, and shown that von Neumann entropy is insufficient to capture the additional cost of quantum erasure. We have also demonstrated the difference between the pure-to-mixed and mixed-topure tasks through different bounds on the resources required to perform each task in a cycle, with the resources for the latter consistently exceeding those required for the former. Future investigations could examine whether this additional difficulty of generating pure states is specific to the quantum homogenizer or a general feature of erasure. Expressing irreversibility in the way we have demonstrated for erasure could ultimately help us update the status of the second law to be as exact and universal as the conservation of energy.

A Recurrence relations
Here we show how the states of system and reservoir qubits are affected by the partial swap operation, leading to recurrence relations for the states. We begin by calculating the effect of the partial swap operation between some reservoir qubit in the state ξ and system qubit ρ, with Bloch vectors parallel along some direction B: The overall resulting state from a unitary operation U acting on the two qubits is given by U (ρ ⊗ ξ)U † . Here U is the partial swap (equation 6), which generally entangles the two qubits. We will only be interested in the reduced density operators, defined as: where Tr i denotes the partial trace over system i, here labelling the 1 st or 2 nd state in the tensor product. Using these reduced states in subsequent calculations means that entanglement between the two qubits is neglected. This approximation is dealt with by specialising to the limit of weak coupling, where the entanglement is negligible [4].
Computing the partial traces gives the local reservoir qubit state ξ = 1 2 (1 + α σ · B) and system qubit state ρ = 1 2 (1 + β σ · B), where with c ≡ cosη and s ≡ sinη. Now we can generalize equations 18 to arbitrary interactions across the reservoir and over many iterations of the quantum homogenizer. When a reservoir qubit interacts with a new system qubit, the number of iterations I is increased by one (since each reservoir qubit only interacts with a system qubit once per iteration). The index j, labelling the position of the reservoir qubit within the entire reservoir of N qubits, stays the same for the interactions of a given reservoir qubit. Hence, if β ≡ β I j then β = β I+1 j . On the other hand, if α ≡ α I j then the system qubit after the partial swap has interacted with the next reservoir qubit in the same iteration, so j is increased by 1 and I stays constant: α = α I j+1 . This means the states for general number of iterations I and reservoir qubit position j can be written: and where we have solved the recurrence relations in terms of the initial system and reservoir states. The equations can be de-coupled by substituting expression 21 into 20, such that the recurrence relation for the reservoir qubit state becomes entirely in terms of previous reservoir qubit states. The same can be done for the system qubit recurrence relation by substituting 20 into 21. The resulting recurrence relations are: Now the initial conditions for the pure-to-mixed and mixed-to-pure transformations can be substituted into the expressions to derive specific recurrence relations. For the pure-to-mixed case, the initial conditions are a pure system qubit at the start of each iteration (β I 0 = 1) and every reservoir qubit being maximally mixed before the first iteration (α 0 j = 0). Then the recurrence relations for the pure-to-mixed case are: Similarly, for the mixed-to-pure case we use the initial conditions α I 0 = 0 and β 0 j = 1 to find:

B Symmetries between states
The information to derive all four states is in fact contained within each one, so e.g. equation 25 is enough to compute the other three. This is due to three independent symmetries constraining the Bloch vectors: where the states with and without a tilde denote the mixed-to-pure and pure-to-mixed tasks respectively. Equation 28 can be derived by summing equations 18 and 19, with careful attention to the indices, and using the initial condition that the Bloch vector sizes sum to 1 since one of them is 1 and the other is 0. Then equation 28 can be derived by induction as follows.
The sum of Bloch vector sizes for the reservoir qubits on their 0 th iteration and system qubits on their 0 th interaction with the reservoir is always 1: Also, expressing equations 18 in terms of the indices, and summing them together, gives the general relation: Then by induction, one can deduce: For the special case where j = I, then: as required.
Equations 29 can be inferred by direct substitution of the indices into the equations 24 to 27. They also follow logically when one keeps track of which qubits have interacted with one another. homogenization for a pure system qubit interacting with many mixed reservoir qubits (large j) is equivalent to deterioration for a pure reservoir qubit interacting with many mixed system qubits (large I).

C Error and robustness
Here we derive the expressions for error, robustness and relative deterioration in terms of the Bloch vector sizes α and β, providing the expressions shown in table 1.

Pure to Mixed
Mixed to Pure  Table 1: Expressions for error and robustness for the pure-to-mixed and mixed-to-pure tasks.
These quantities are all defined in terms of the fidelity between quantum states, which is a measure of similarity between states. It is 0 for orthogonal states, 1 for identical states, and for two pure states it simply reduces to the inner product. A general result for fidelity of two qubits is [19]: F (ρ, ξ) = Tr(ρξ) + 2(detρdetξ) 1/2 .
Using equations 14 and 15, the fidelity can be expressed in terms of Bloch vector sizes: Hence, using equations 24 to 27, one can compute the fidelity between any system and reservoir qubits for any values of I and j.
The error is given by: The fidelity of a system qubit with the original reservoir qubit can be calculated using equation 35. For the pure-to-mixed case, α 0 j = 0 giving fidelity: For the mixed-to-pure case, α 0 j = 1 giving fidelity: Subtracting these from 1 to find the error, one deduces that the error for the pure-to-mixed case is: and for the mixed-to-pure case is: The robustness is given by: For the pure-to-mixed case, α 0 j = 0, giving: For the mixed-to-pure case, α 0 j = 1, giving: Inserting these fidelities into the expression for robustness gives for the pure-to-mixed case, and for the mixed-to-pure case. Putting these expressions together, one finds the relative deterioration for the pure-to-mixed case is: and in the mixed-to-pure case is: