{'fraction_non_alphanumeric': 0.029213483146067417, 'fraction_numerical': 0.0048689138576779025, 'mean_word_length': 4.362449799196787, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Operational derivation of Boltzmann distribution with Maxwell’s demon model

The resolution of the Maxwell’s demon paradox linked thermodynamics with information theory through information erasure principle. By considering a demon endowed with a Turing-machine consisting of a memory tape and a processor, we attempt to explore the link towards the foundations of statistical mechanics and to derive results therein in an operational manner. Here, we present a derivation of the Boltzmann distribution in equilibrium as an example, without hypothesizing the principle of maximum entropy. Further, since the model can be applied to non-equilibrium processes, in principle, we demonstrate the dissipation-fluctuation relation to show the possibility in this direction.


II. EFFECT OF TOFFOLI GATES
The effect of the Toffoli gate as an error operation is also worth studying, since errors can be any arbitrary logical operations and it is well known in computer science that arbitrary logical operations can be simulated by NOT and Toffoli gates as far as the operation is logically reversible 3 .
The Toffoli gate works on three bits, two of which are control bits and the other one is the target bit.
The state of the target particle is flipped when the two control bits are in the excited state ('1' in the tape M), thus the flip of the target is activated with probability pp * , where p * = (pN − 1)/(N − 1) is the probability of finding the second control particle in the excited state Φ 1 when the first one is also in Φ 1 . The flip operation on the target is applied to the particle in Φ 1 with probability p * * = (pN − 2)/(N − 2) and the resulting ratio of those in Φ 1 will be p − 1/N . Similarly, if the target was in Φ 0 the ratio p will be changed to p + 1/N . Therefore, the average change of the Shannon entropy is where the second term (1 − pp * )H(p) represents the case of no activation of the flip on target.
With the above ∆H, the change in F due to a random Toffoli operation can be computed as We have used the equilibrium condition, Eq. (5) in the main text, in the third equality. The effect of the random Toffoli gate is essentially the same as that of the random NOT (corresponding to ∆H with pp * = 1 in Eq. (1)) except for the overall probability factor p 2 for having two 1's in the control bits.
Thus, the sum of the second order contribution from the simple random NOT (=flip) and Toffoli operations is That is, the change ∆F by the random NOT and Toffoli gates strengthens the local stability of the cost function F near the equilibrium, which is also expected from the convexity of the entropy function. This further supports our definition of equilibrium in the thermo-Turing model. It is also worth noting that the quantity in the square bracket is the effective computational complexity 4 .

III. NOTE ON THERMODYNAMIC AND INFORMATION-THEORETIC ENTROPIES
In our previous paper 5 , using the scenario of Maxwell's demon, we showed that the thermodynamic entropy coincides with the information theoretic entropy in the optimal case of the memory reset. In this section, we attempt to look at the same problem from a different perspective going back to the the basic thermodynamics.
Let us recall how the thermodynamic entropy was introduced in the context of Carnot's theorem.
Let the work exerted towards the outside be W (i → f ) for an isothermal state change i → f , which is in general different from the change of the internal energy U i − U f . An invisible energy flow that contributes to the energy balance is called heat Q exchanged between the system and the heat bath. Thus, the energy conservation is written as Carnot's theorem claims that the maximal heat flow from the heat bath in isothermal process is proportional to the temperature T of the heat bath, where the maximization is made over all possible intermediate processes between the initial and the final states 6 . The coefficient S th is defined as the increase of the thermodynamic entropy.
Now go back to our thermo-Turing model. Clearly, our F in Eq.
(2) of the main text is the negative of the work that can be exerted outwards, Letting the minimum of F in Eq. (6) be equal to Eq. (3) in the main text, we have Since −U i + U f = pϵN in our model, we arrive at the equivalence between the thermodynamic and the information-theoretic entropies; It is interesting to see that both the thermodynamic and the information theoretic entropies are defined as a limit, while the former is physically realized in the quasi-static limit and the latter is achieved by the optimal limit of the data compression. The quasi-static processes means that the operation has to be slow enough compared with microscopic processes. This can be viewed as an aspect of the Markovian process, in which the information on the earlier configuration is lost due to, e.g., the multiple-scattering of particles by the cylinder wall. The corresponding process in our model is the erasure of information, which occurs when the partition in the memory cell is removed. To lose the information stored in the memory, we need to wait for a while until it becomes impossible to infer the history of molecule's trajectory.
As a byproduct, we can see that the extensivity of the thermodynamic entropy follows from that of the Shannon entropy. Note also that Eq. (8)