 Do we start? OK. So the floor is yours. Hello, can we start? OK, so it's a pleasure to be here. Thanks, Matteo, for the invitation, and thanks to ACTP, and so on. And it's a pleasure to lecture such a variety of people and from everywhere, from all. But I guess everybody's physicists are well, but there is somebody from computer science that my course will be, I mean, it's the physics of information, and in particular, the thermodynamic consequences of information. So yeah, I'm Juan Parondo from Spain, and Leah will be from ITTP. She already introduced herself. She will be the teacher assistant or the assistant for the exercises, and so on. And also, we'll lecture probably one of the lessons as well. This is the outline of the talk, why we are studying this topic, why we are studying the connection between thermodynamic information, mainly because even at the beginning of thermodynamics, so in the 19th century, in 1865, one of the fathers of thermodynamics and statistical mechanics, which is Maxwell, already realized that thermodynamics has a problem. The laws of thermodynamics depend on the information that we have about the system. And he illustrated this with something called the Maxwell demon, something that Kelvin put that name to the idea, to the original idea of Maxwell. So because of this idea of the Maxwell demon, this was 1865, and during the 19th century and during the 20th century and during the 21st century, we are studying this idea of Maxwell, the Maxwell demon. And studying this idea means studying the relationship between thermodynamics and information. And now I would say a branch of thermodynamics by itself. And we usually call it thermodynamics and information. And this is what we are going to study in this course. This is the outline. It's a little bit ambitious, so I don't know if we will be able to cover everything. You have these slides now in the website of the course. And right before coming here, we sent also some exercises, a collection of exercises that correspond to each of the lessons. So we have 10 lessons for more or less one per day, although some of them are shorter. And these exercises, the exam, somebody were worried about the exam. The exam will be a simplified version of this exercise. Of course, different exercises, but more or less, if you are able to do the exercises and so on, you will pass the exam without any problem. So the idea is to get the exercises, which is a PDF. And then you can solve it during the afternoon. I will be here the whole day, because I live here. We cannot escape. So I will be, from now on, my office is in UN Room, which is there. So you can go from, I don't know, the whole afternoon. And Leah will be here around. So it will be the afternoon here. So you can try the exercises. Of course, I encourage you to try the exercises by yourself. This is the only way to learn and to learn. This is the only way to learn or to check whether you have learned or not. Because sometimes you think you understand something. And then when you try to do the exercises, you see that it's not so easy. So I encourage you to do the exercises. And the planning is that on Friday, we will have a session in the afternoon. Well, you will have a session with Leah to solve the exercises. Some people can't solve it here or whatever. And the rest of the afternoon, we are available. I mean, you can ask questions to us. But we will not have an official session. This is the plan. You want to change it to the kind you can try. So let's start. The lesson today is just an introduction to the subject. But it's an introduction where we are going to review, let's say, the history of Maxwell-Demon from 1865, from 19th century to the 70s of the last century, so to the 1970, more or less, where people like Charles Bennett and Rolf Landauer introduced new ideas into the program. So it is going to be today just a bit of history. It's a kind of historical presentation of the topic. But with this presentation, you already have a lot of ingredients to think and to work on the problem of thermodynamics and information. So you will see that the exercises are like four pages. But the first page is just lesson one. So with the tools that we are going to study in this session, you will be able to do a lot of things on the topic. And the rest of the course is going to be a more mathematical tools to deal with the problem. Lesson two is information theory, because if we are going to study the link between information and thermodynamics, we need information theory. So maybe you have here about Shannon information, mutual information. All these concepts, we are going to study this in detail tomorrow. And the third day is basic concepts of thermodynamics. Well, I guess most of you have studied the course on thermodynamics. But there are new results, especially on non-escalable thermodynamics. And this actually, for many of you here, this third lesson, stochastic thermodynamics, is useful by itself. Because we will try to give you an introduction on how to deal with thermodynamics of small systems, which is something that you will study maybe in other courses, like biophysics and so on. And then these four, five, six, seven is the core of the course, which is how information and thermodynamics are related. And sorry, there is a change here. I changed it in the outline. I think Monica uploaded the outline of the course or not. It should be an outline, a PDF with some bibliography, some references, this one. So the outline is already the new version, but I forgot to change it here. So information flows, which is now something that people is using a lot to understand small machines, Brownian machines and things like that and molecular machines. These 10 goes in eight, and creating information on Maxwell v. Machines in the phase space, which is a little bit more advanced, will be the last two lessons. And I'm not sure if we will be able to cover them or not. The plan is to cover everything. So let's see. Of course, you can interrupt me whenever you like. So let's start with the first lesson, which is why we are studying these things. And the reason is this idea by Maxwell. Most of this history that I'm going to tell you, this is a Maxwell demonist. Let's put some dates. This is 1865, just after in 18, or 1867. 1867, sorry. In 1865, Maxwell discovered something very important for statistical mechanics, which is anybody can guess what is the first thing you study about the statistics of the Maxwell distribution of velocities, that the temperature is related with the average kinetic energy. In a gas, there are some very slow particles, and there are very fast particles. And this is what made Maxwell think that if some being, some agent could order the particles, the fast ones on one side and the slow ones on the other side, then this agent could defeat the second law of thermodynamics. And this is 1867. Cedar engine, which is probably the most important modification of the Maxwell demon, is 1912. And then you see the really important points in this history are really, so 65, 1912. This is more or less half a century. And then we had to wait another half a century until 1970 for Landauer and Bennett to add a new aspect or a new idea to this problem of the thermodynamic information of the Maxwell demon. And now in the 21st century, in 2005 and 2010, people like Takahiro Sagaba, like me, like Jordan Horowitz, came and added a new way of looking at this. So it is a history of where the biggest steps are separated by half a century, more or less. Well, our contribution is not the biggest step. But it was the formalization of everything. Sometimes what I said is that what we are doing now, people working on thermodynamics of information, is to understand Bennett. Bennett is the big guy in this business. And what we are trying to do is to understand what he did and trying to formalize what he did in a more systematic way. And also something that happened in the last 10, 20 years is that we can manipulate nanoparticles and microparticles and we can manipulate the small systems. And this means that we can have experimental realizations of the Maxwell demon. And if you are really interested in this history, there is this book. This is a classical book. This is the second edition, which is much larger than the first edition. And it's a collection of papers on the Maxwell demon collected by Lef and Rex, those two diseases. And this is a very popular book. And here in the cover, you see Maxwell and the demon here. OK. So what is the Maxwell demon? As I said, this goes back to 1867. The first time that this idea appeared was in a letter from Maxwell to a friend. The friend is called Tate. And then, I think, in 1872, he published this in a book, in a very important book by Maxwell, which is the theory of gases or something. And the idea is this one, I don't know if you can read here, is that actually the story is that Tate wrote a book on thermodynamics. Thermodynamics was really something that had a very, I mean, Carnot book is 1822, but it is the formalization of thermodynamics is in the middle of the 19th century. So Tate wrote to Maxwell a letter. No, he sent the book and asked Maxwell for comments on the book. And then this is the style of Maxwell that he said, well, I cannot tell you too much about the book. Because, well, Tate was interested on the authorship of different resource, because he didn't want to be mad with Clausius, who was not very nice, and people like that. So he asked Maxwell for the authorship of different resource. But he said, I cannot tell you too much about that. But I can tell you some holes. A hole means that some flaws or some bad. And to pick a hole is just like, well, just an example of the problems of thermodynamics. To pick a hole, he presents the idea of the Maxwell demon. The second law at that time, there are many formulations of the second law. But one of the most basic formulations is that if two things are in contact, the hotter cannot take heat from the colder. Actually, this is, let's say, historically the first formulation of the second law, which is in Carnot's book actually in 1932. This is the idea that to build thermodynamics, this is the only thing you need. You need some basic irreversible process. And the most basic irreversible process is that heat flows from hot things to cold things. To reach equilibrium. And the nice thing of thermodynamics is that just picking one of these irreversible processes, you can construct the whole thermodynamics. Anyway, this is one formulation of the second law. Heat flows from hot to cold. Without, if there is no external agency, of course, air conditioning and heat pumps are counter-exampled, but we need energy to. So this is the second law tells you that spontaneously, heat flows from hot to cold. And if you want to reverse this flow, you need to put energy into the system, like a condition. And then he comes with this idea that let's have to gas in a container separated by a wall, and the wall has a gate or a door. And there is a finite being that can operate the wall. And he can also observe the paths and the velocities of all the molecules. Then what he has to do is to, if a fast molecule from the left comes to the wall, he opens the wall. And if a slow molecule from the right comes to the gate, he opens the gate. So he allows, with this observation and this operation, he allows fast particles to go from left to right and slow particles to go from right to left. So with this operation, he is transferring energy from the cold to the hot. So you can say, ah, but you need some energy to operate the wall. But in principle, the wall could be as small as little mass as you like. And in principle, there is no fundamental bound to make this operation. So the demon can, this is the demon. He, Maxwell didn't call it a demon, but he called it an intelligent, very observant, and neat-fingered being. And then Kelvin called him a demon. After that. So the demon can defeat the second law of the mononies. The demon can create a air conditioning for free. And of course, once you create a gradient of temperature, you can also make an engine. So you can have energy for free, not energy for free, but because you need to take it from a thermal bath. But you can have a perpetual mobility of the second kind. It's a perpetual mobility of the second, of the first kind. It's a perpetual mobility that can create energy. A perpetual mobility of the second kind is a motor that can take energy from the air. Here in the air, there is a lot of energy. Why cannot we extract this energy and create, we could solve the problem of energy in the world by taking energy from the air? Why can't we do it? Because this energy, we cannot extract energy from a single thermal bath. This is one of the statements of the second law of the mononies. So this demon could, in principle, defeat the second law, but using information. So immediately, people started to think, ah, this guy, this demon, needs information. And to gather this information, maybe there is a requirement of energy. External, did I say external energy? Ah, without, well, this is the language of Maxwell in 1967. External agency here means external work, I would say. External, some energy. But this is the, because, of course, this being is an external agency. This is what you mean, or that external agency means work. Actually, look at the conclusion. The hot system got hotter, and the cold colder, and yet no work has been done. Only the intelligence of a very observant that needs figures being, as it were. It's amazing how, in this single sentence, Maxwell precisely described the problem. The problem is first intelligence, because many people started to think, ah, intelligence is necessary here, it's not necessary, and so on. Second observant information, you need to measure. You need to gather information from the system. And third, need finger. Operationally, you can operate, you can manipulate things of the size of molecules, so I guess you have seen this story before, in courses of thermal inhibition, so yeah. Yeah, this is the story. The story, of course, went in these directions. First, people thought, wow, you have to open the door and close the door. Who knows if this is there. We will see that this is not, of course, the important thing is that this does not impose a fundamental bound to the world that you have. You can do, you can make this work as little as you like. This is the point. And this is why you can't repeat the second one. We will go back to this in the next version of the, no, no, no, the idea is that if the system is closed, and in principle, of course, this is the problem. The whole thing is closed. And of course, what Maxwell showed is that in principle, the entropy production of this closed system is negative. This is why we said that it's defeating the second law. No, no, no. But you are assuming that the second law is true. And we are in 1865. And people didn't know that the second law was true. So you cannot use the second law to prove the second law. You cannot assume that the entropy production should be positive. No. You are trying, you are putting into question the second law. So you cannot assume the second law. Yeah, yeah, yeah. Yeah, but again, you are assuming that the second law is true. Here we have to put into question the second law. So we cannot use the second law. You cannot use the fact that the entropy is positive or something like that. Because otherwise, there is no problem, of course. I mean, if you believe the second law, you can leave the room. There is no point of this course. Of course, in mind, we have, like the Simpsons, we say in this house, we respect the second law. But of course, we have in mind that the second law should be restored. But we have to explain it. And to explain why the second law is compatible with this, we cannot use the second law. We have to really work to understand the problem. OK? OK, so there are other versions. The one that the original Maxwell demon is this one is the fact that you can transfer energy from cold to hot. There is one much simpler, which is called the pressure Maxwell demon. Imagine that the demon just lets that particle from the left move to the right and not the other way around. Then you deplete this half of the container, and you accumulate particles in this part of the container. By doing so, and this is much simpler, this is just opened the door when a particle comes here and so on. And by doing so, you create a gradient of pressure. The pressure here is much bigger than here. So you can use this also to create with a piston. You can create work and so on. And then you defeat the second law as well. So and this is surprising. One could think that for that, because here you need some kind of processing information. And you need, ah, this particle is fast. It comes from the left. And then this particle is slow and so on. You have to infer, should I open or close? For this, it's just so simple that you just open when something comes here. Or if you can say, you let only particles to move in this direction and not in this direction. And this is what a valve does in many engineering area. No, we have a diode. A diode is what a diode does for electrons. So it allows in one direction and not in the other direction. So for this part of, for this version of the Maxwell daemon, one could think that there are a lot of automatic devices that do this job. And actually, for instance, Feynman in his lectures already discussed something called automatic Maxwell daemons, which is essentially a valve, something that can only allow particles in one direction or allow things to move in one direction. And this is a project, but we are not going to work on that. Maybe on Wednesday we will discuss something about this. Actually, this is amazing that doesn't work. Why a valve doesn't work? Well, let me just explain a bit here. When you have a valve or a door that can only open in one direction, think of a door that can open in one direction. This could be something like that with a spring here. And because you need to close the door, like that, like that. So you need to close the door. Because you can think of a door that can open only one direction. But when the door is opened, something can come. So the idea is that only particles can move from left to right. And when one particle tries to move like that, it closes the door. You could think of this. Why this doesn't work? Well, Feynman showed that this doesn't work in another context, but similar to this one. Because this should be so tiny to allow particles to move from left to right that it should be subject to thermal fluctuations as well as particles. So this is like another part. This is a single degree of freedom which suffers, I mean, which undergoes fluctuations exactly as a Brownian particle, or as a molecule. So it should be so tiny that it would have fluctuations by itself. And then it will not exhibit this asymmetric behavior. There will be the same probability to go from left to right than from right to left. And actually, there is a fundamental reason for that, which is the reversibility of the Hamiltonian dynamics. Maybe we will go to this in the last. OK, so these are two versions of the Maxwell demon. But most of the history of Maxwell demon, most of the research on the Maxwell demon uses a different version, which is the Seeler engine. Seeler has a field in the A. And the Seeler engine, you will see it's a little bit more difficult, especially for people doing statistical mechanics. But it's much simpler, especially because the demon has to do just a single measurement. And the single measurement is very simple. It's just one bit of information. And the Seeler engine is like a thermodynamic cycle, like the Carnot cycle. But it's much simpler. It's based on a single particle, a single molecule gas. It's a gas with just one molecule. And it's in a box where the walls are at the temperature T. This is not so easy to imagine or to imagine a simulation. But you can imagine that you have a particle that moves freely. So it moves in a straight line at constant velocity. But each time it collides with the walls, it thermalizes, which means that the outgoing velocity is a random variable and distributed according to the Maxwell distribution. So you have this system. It's a single particle in a box at temperature T. And there is an external agent. There is a demon who does the following. First, we insert, or the demon inserts a piston in the middle. For that, you don't need any work. It can be seen that this can be done without any work. If the particle is classical, in the quantum case, you need work. This is more, well, in the quantum case, at zero temperature, you need work. Because essentially, because of the uncertainty principle, you are confining the particle in a smaller volume. And then the kinetic energy, because Heisenberg and uncertainty principle should increase. But in classical, if the particle is classical, you don't need any work. Then you measure where the particle is. And you implement an expansion. And if you have a gas, now suppose that this is a gas, or it's a single particle. You have a gas. And you expand the gas. Reversibly, you get an energy. You extract work. This is what the engines in our cars are doing all the day. They extract work in expansion. And then, once you do this, you remove the piston. And you have a cycle. And you have a cycle. You have a system in contact with a thermal bath. And there is an external agent, which manipulates the engine and can extract work. This is the diagram of the energy. This is the engine, the particle. This is the thermal bath, which is supplying energy to the system, or absorbing energy to the system. This energy, the energy that the system exchanges with a thermal bath is called heat. So this is heat. And the energy that the system exchanges with external agent is called work. And we will use this convention for the science. Work and heat are positive if they go into the system. This is for the exercises. This is this convention. And as we are talking about extracted work, sometimes we talk about extracted work and will be minus W. W is usually always taken as the work that comes into the system. This is why the first law of thermodynamics is written like that. This is for a system which is in contact with a thermal bath. And if Q is negative, the system is dissipating heat. If Q is positive, the system is absorbing. And this is the external agent. And the exchange of energy between the system and the external agent is work. And if the work is put, oh, sorry. And this is the convention of science. It's a convention of what you could call actually the extracted work. With this convention of science, the extracted work is minus work. So now we can calculate these energy flows, these energy transfers, the piston. Yeah, it could be. It's not necessary. There are detailed simulations of these in some papers. And of course, it's problematic because you have the particle like that. And you have to implement a reversible expansion. If you remember from thermodynamics, a reversible expansion means that it must be quasi-static. So you must exert pressure equal to the pressure of the gas. But here the pressure of the gas is just kicks. So it's not so easy to imagine this. And actually, it has some problems, but I will address these problems in a moment. Yeah. You have a question? No. So for now on, we can think of the particle as a single molecule gas. And if you think of that, what is the extracted work? Well, you go to thermodynamics, and then you find this equation that this is the work when you move a piston. The volume changes under some pressure. And the work is given by this integral. And now if you use the idea that the expansion is reversible, the pressure is given by the ideal gas equation with just one particle. Remember, the ideal gas equation is NKT. We write it in terms of the number of particles. If you write it in terms of the number of moles, it's NRT. The R is the constant of gases. But here is K is the Boltzmann constant. And then if you integrate these at constant temperature, you get KT log of the ratio between the final and the initial volume. This is OK. No, if we expand the system, we extract work. If we compress a gas, we have to put work into the system. So this is negative when we compress. And this is positive when we expand. And if you put the numbers here, if the final volume, sorry, the initial volume, the expansion is here. We are expanding from a volume 1 half to a volume 1. And this gives you KT log 2, which is bigger than 0. So this means that we are extracting work. And we are doing this in a cyclic process. This is a violation of the second law of thermodynamics. Because we are extracting work. This is a perpetual mobility of the second kind. We are extracting work in a cycle from a single thermal bath. We can do this 10 to the 23 and get a joule or whatever. K is very small. But if we can, in principle, nothing prevents this to be repeated many, many times. And then we could get a microscopic amount of energy, a microscopic amount of energy. So this is defeating the second law. So now we have the problem. The problem of restoring this is the same problem as the original Maxwell-Diemann. But why is this so important? First, because the Maxwell-Diemann is very complicated. The Maxwell-Diemann must observe all the time of the particles. And it's not clear if he has to observe very far particles or very near particles or so on. And it's observing in a continuous time. Here the measurement, the observation, is just a single measurement. Moreover, it's a measurement of left-right. It's a binary measurement with same probability. So we know from information theory tomorrow we will make this more precise. It's only one bit of information. So here it's very clear the information involved in the process. And it's also very clear the energy that you can take in each cycle. So for one bit of information, you get KT log 2 of work. Or if you like, here the entropy, as you said before, what happens with the entropy of the universe? The entropy of the universe, if the demon has no effect on the entropy, the entropy of the universe, look, this is a cycle. So the entropy of the gas is constant. I mean, it's constant. It's a sixth cycle, periodic. It's periodic. So the only thing that changes is the external agent has no entropy. By definition, external agent has no entropy. So the only entropy is the one by the thermal bath. The thermal bath is losing energy because where this energy comes from? Why we can extract energy? Because we extract energy from the thermal bath. The particle, in expansion, the particle gives some energy to the piston and then recovers, in average, this energy when it collides with the part with the thermal bath with the walls at temperature 2. So here, if you like, in the CELAR engine, the change of entropy in the bath in one cycle is just q divided by t with a minus. So in this case, q is positive. So the thermal bath is giving energy. So this is kt log 2. This log is natural log. And the delta of the system is 0 in a cycle. So delta of the universe is minus k log 2. So apparently, this whole setup decreases the entropy of the universe in contradiction with the second law. So we have to solve this. This is a problem. We have to solve. We can say, ah, this is possible. We could maybe, in two centuries or in two millennia, build this thing. And then we could defeat the second law. This is one option that secretly most many people think. And the second option is to say, ah, no, this is impossible. We have to respect the second law. In this house, we respect the second law. So there must be something inherent. But look, it must be something fundamental. It cannot be something like, ah, the piston has some weight. No, it must be something that restored the kt log 2 in a fundamental way. So then people are starting to think, what can be what restores the second law? And most of the people until 1970 thought that the problem is in the measurement. So to measure, not so much on the operation. The operation is easy to show that that's not requires any work. So people thought, no, this is in the measurement. And people like Leo Riovin and more tried to find a minimal work needed to measure something. OK? But really to find a fundamental bound to the work needed for measuring something is impossible. And actually, this was discovered by Bennett in the 70s. Because Bennett found that it's not the measurement. Something more complicated is that you measure and then you have to really complete the cycle. You have to erase the result of the measurement. And it's the combination of the measurement and the erasure. What restores the second law? And this is the final answer that we are now trying to formalize. But this is essentially the answer. So if you try to find a fundamental inequality or the work needed to measure something, you will fail because this depends on the. Well, we will see this in detail. This is, oh my god, high tech. So can we transfer to this? I forgot to plug it because the battery's not there. OK. So some people is confused about what I said is true. That you will see in these days during the course, the effect of erasure and measurement and so on. But it's true that the first time that people see the CEDAR engine, especially people that are experts, like you are experts in the statistical mechanics and so on, people feel a bit uncomfortable because you have this particle colliding and so on. I usually want to explain this. You can avoid these doubts by using many CEDAR engines. If you use many CEDAR engines like here, you can start with many CEDAR engines. Insert the piston. You see that some of the particles get into the right, some on the left, some on the right, some on the left, et cetera, et cetera. Then you measure each of these guys. And you turn here. I have one animation, but it doesn't work. So OK. What you have to do is to align all the particles on the left, for instance. So you have to turn this one, turn this one, turn this one. And then connect all the pistons. And now you have an ideal gas here, microscopic, exerting a pressure with some fluctuations, but not so many. And then you can extract this work. So it's not, I mean, this is just to tell you, to convince you that all these problems of the CEDAR engine, that it's a single particle and so on, can be overcome. I mean, it can be solved. Even more importantly, at the end of this week, you will learn that for the CEDAR engine, you don't really need a single particle gas. You can do it with many other systems. For instance, you can do it with a Brownian particle. You know Brownian particles? No, I guess that they obey the Landgeben equation. So you can have a Brownian particle in one well. This is a potential well. And if you follow this protocol, this cycle, you extract, extract the KT log 2. And the protocol is to create a double well, and then lower the well where the particle is. So you need to measure. To complete this step, you need to measure. And the idea is that in any implementation of the CEDAR engine, first you need some symmetry breaking, some kind of two possibilities. Here is the piston. Here is the well. Then you have to measure. And then you have to complete the cycle using the information gathered in the measurement. So at some point, OK, there is surely some cost to measurement, and maybe the arrangement of measurement then. But I don't know why in the implementation we need to measure something about the piston. This is another question that people have. Why don't you just let the piston move and the piston will? Reveal. The piston will reveal where the particle is. No, this is what your question is. You say we need the measurement to implement a reversible operation. So this is what I don't get. Yeah, in the gas is because, OK, because you could leave the piston free, and then you have a free expansion. In a free expansion, if you remember, you don't get any work. To get work, you have to exert pressure against the force exerted by the gas. And this is why you get the work. So for that, you need the measurement. Here, you need the measurement to know which well you lower down. But here, I mean, if you don't use the pressure, you cannot apply this formula. Because, well, we write the work like that, but this is not the work. The work is the pressure exerted by the agent, which in a reversible expansion is equal to the pressure exerted by the gas, by definition. This is this type of subtleties in thermodynamics that are hard to learn. But the work is the pressure exerted by the external agent. So to perform this expansion, you need to exert the pressure. And otherwise, you don't get any work. In some books, you will see this. You will see that the demo, you know that this is going to move in this direction. So you put here a rope and here some weight. And then you have to put it in there. You have to measure it, because otherwise, you have to put the weight in there. So when the particle is here, you put it in this way. So in the book by Lef and Rex, the Maxwell-Demon book, you have all type of ingenious mechanisms to. Mechanisms that try to avoid the measurement, like you said, and it's impossible. Well, of course, yeah, what is a reversible expansion means that this is in thermodynamics, it's the same. If you have to exert the pressure a little bit smaller to get, but then you have to get, when you have a piston and you have two pressures on one side and the other, if they are different, you get accelerated motion. And if they are equal, you don't get any motion. So reversible expansion is an idealization in thermodynamics that is obtained in the limit when the two pressures are equal. Yeah, but this is you have the same problem in thermodynamics in normal gases. So I admit that I like this way of telling the story because it is, you know that this is not essential. I understand that all these things of the single molecule gas, or as you said, some people say, in the first collision, the piston already moves. So you could use the piston as kind of measurement device and so on. But the truth is that this is something that we have learned now that you don't need, for the CELAR engine, you don't need all these things. You only need symmetry breaking so that the system chooses between right left with priority 1 half. Then you have to measure, and then you can go back to the initial state. And in this process, you can get KT log 2. And actually, in this paper, this is a paper that I wrote in 2001, we found that it is not even necessary that the system is microscopic. You can have the same with macroscopic systems. This is, for me, was a kind of a revelation. And in this paper, I showed that using an EC model. And in an IC model, if you remember, if you have seen the IC model, it's a model of a ferromagnetic paramagnetic transition. You can go from no coupling between spins to some coupling between spins that align the spins. But then you have a phase transition. You have a symmetry breaking. So when you do that, the system can get magnetized upwards or downwards. Then you measure this quantity, which is macroscopic quantity. And then you can recreate the CELAR engine. I don't have the details in this paper. So it's not once you are convinced that the CELAR engine works, I mean that you can use this formula without any problem. You can use this formula. The CELAR engine is much easier. This is why in the exercises, we have used the CELAR engine. And the exercises are very simple. There are just modifications of the CELAR engine. For instance, you have to, one modification is that maybe your demo is a little bit stupid or a little bit drunk or something. And there is a probability that measures with some error. So that measures right when the particle is in the left. And this is the CELAR engine with error. And you can, it's very easy to solve it. Using just this formula. This is your first exercises that you have. OK, is it model? So any questions? No, no. You go back. When you say that you go back, it's like thermodynamic cycles. In a thermodynamic cycle, you have some parameters, maybe pressure, maybe volume, maybe something. And means that you make some process. And you go back to the same, to the initial values of your parameters. But the microstate will be. And you can decrease the entropy of the universe. And people will say, oh my god, but yeah, you can decrease. This is, we know this now. And people knew it. Even people in the 19th century that observed the Brownian motion knew that because of fluctuations, and this is, in fact, a fluctuation, you can get a decrease of entropy. Or you can extract work from a single thermal bar. But you cannot do it systematically. Do it systematically, you need the measurement. But it's true. Sorry, I don't get why we need to know where the particle is at the beginning. Because if we put the bar always in the middle of the volume, then it would be natural that the particle pushes the bar towards the end anyway. Yeah, but you need to exert the pressure. You need to oppose something to this motion. And to oppose this, you need the measurement. And you could say, ah, but the piston itself is revealing the position of the particle. But this is not enough. And it's more clear here. For instance, here, if you don't measure, well, here is also the same. Because suppose that you don't measure. You have to exert the pressure. So you exert the pressure in this direction. If you are lucky, as we said, OK, you are extracting work. If you are unlucky, and the particle is here, what you are doing is to compress. No, sorry. Yeah, if when, OK, you have to exert this pressure to get the work out of the system. Otherwise, you cannot. Can the pressure be simply the weight, the mass of the bar that we put in the middle? The? The weight that the bar, the constraint given by the bar in the middle. I mean, that the particle has to push the bar and to oppose its resilience. The particle does like that. So in each collision with the piston, it gives energy to the piston. And you, the external agent, somehow must to extract this energy. But it's true, as I said, if you have problems with the single molecule C-lar engine, forget about it. Think of this one. This is much simpler. And here, it's true that if you don't measure and you lower this weight, then you lose a lot of, I mean, you don't extract the KT log 2. Or think of this one. This is more complicated. So if you have any problem with the C-lar engine, just forget about the C-lar engine, because the physical details are not important in the C-lar engine. But it's true that many people have tried to do what you said. And actually, it's a pity that it doesn't work the simulation, but I mean the animation. But can you imagine here, why do you need to measure? Because you need to turn these ones, this and this to exert the pressure in the same direction. So in this case, it's more clear. In this case, I admit that I have the same doubts that you had at the beginning when I read the C-lar engine. I said, my god, this is the piston already moves and so on. All the questions that you are raising now is the questions that a normal person, Mateo and everybody that has studied the C-lar engine think of that like you see that you need to measure. Actually, now I have a question, I have a problem that I have to solve. But in the exercises, for instance, you are going to do the following. You are going to apply this formula all the time. But forget about pressures and so on. You apply this formula. And then what happens if you are wrong? For instance, if you think that the particle is here, but actually it's here, that you compress, you move like that and you compress the piston. This is actually a different protocol. When I say, well, I don't want to make things more complicated. Think just that you move the piston. You can move the piston by controlling the pressure or by controlling the velocity. This is another possibility. And actually this is probably much easier. You can have a protocol that you move this at a certain speed, very slow speed because it's reversible. And then you can extract also the work. But if you move in the wrong direction, you compress. And then the work becomes negative, the extracted work. This is what you are going to do in the exercise. But yeah, I understand all these questions. But I can't tell you. We could discuss for days on the seal or anything. But the physical details are not important. I can't hear. No, the work, he is asking if the work modifies the entropy of the universe. By definition, and we could tomorrow, on Wednesday, we will study this in thermodynamics. By definition, what is an external agent? An external agent is somebody or machine or whatever that modifies a parameter of the Hamiltonian of the system, like a field or in the case of the Carnot cycle is the volume, or else, and the temperature. So, well, temperature is not the parameter of the Hamiltonian. But anyway, the external agent is somebody who changes a parameter in the Hamiltonian. In principle, this can be done without any entropy change. The external agent can do that with constant entropy. So there is no change of entropy in the agent. And this is what we call work. By definition, work is any transfer of energy between a system and the rest of the world that doesn't change the entropy of the rest of the world. Maybe this is not a definition that you have been given in the school. But heat is any exchange of energy that changes the entropy of the rest of the world. And the simplest case is the energy transfer between a heat bath and a system. And then the change of entropy in the bath is q divided by t. But by definition, and this is the modern definition of heat and work, because heat and work are things that are not so easy to define. One of the problems of thermodynamics is that it starts with definitions of heat and work which are mechanical and are particular of certain situations. But if you start to think of nanosystems and so on, the typical definitions of heat and work that you find in the textbooks are useless. So heat is any exchange of energy that modifies the entropy of the rest of the world. Work is any exchange of energy that is not accompanied by any change of entropy in the rest of the world. OK? Anyway, let's see. So I would like to ask you, so what is the role of time here? Let's say when you introduce the protocol, when you change the potential. Here everything is quasi-static. Of course, in thermodynamics, you have the problem. You have equilibrium thermodynamics where everything is quasi-static. And this is important because it allows you to assume or to that the state of the system at any stage of your process is at equilibrium. And if you have finite speed protocols, you have what it is called finite time thermodynamics, which is very interesting, but it's more complicated. And here in thermodynamics information, we start with also reversible, I mean, quasi-static processes. You have also papers doing finite time information thermodynamics, which is what happens if all these things are done in finite time or finite speed, non-serious speed. But here we are only working with reversible processes. Thank you. And this is the OK. So, Cedar Engine, 1922. And things that people were working on, the entropy cost of measurement and so on. Until 1970, where Landauer found something which is kind of trivial, but it was a revolution in this business of not only on the Maxwell demon, but also on the thermodynamic consequences of information processing. And he found the following that some operations in a computer, for instance, or in information processing devices, they have some fundamental thermodynamic requirements or limitations. And the example that he showed was this process, which is called restore to zero. So imagine that you have a computer, you have, let's say, a memory. It's better to think of a hard drive because computers store bits using currents. So they are not in equilibrium. But suppose a device that stores information in equilibrium, and it is in equilibrium at an even temperature T. So your system has a lot of microstates. Of course, it's maybe a macroscopic system or a mesoscopic system. But well, people are trying to do now memories with single atom memories. But we are still a bit far from that. So your system is a physical system. So it will have microstates. And you know how it's called the set of all the microstates of a system? Face space, no? The face space. We call it face space. So the memory, the simplest model of a memory, well, the simplest, the universal model of a memory, I would say, is a system whose face space, this is the face space of the system, is split into two regions, zero and one. We call symmetric memory when these two regions have the same volume in face space. The volume in face space plays a very important role. It's related with the entropy, the Boltzmann entropy. So now suppose that this memory, I'd like to call this overwriting. Because this is when you have a hard drive and you're erasing could be, people call this eraser. But I prefer to call this overwriting in the sense that you write a zero, independently of what is the initial state. So if you write a zero in your hard drive, it doesn't matter what is the initial state, it goes to zero. So by this color, I mean that all this blue, of course, we are doing this for a single system, but you can think that you repeat it. Or you have an ensemble of systems, or you repeat it many times. The initial condition could be zero and one. And the final is zero. So in face space, this means that there is a shrinkage of the volume. So before your systems occupy your ensemble of systems, or could be in any point of the microsoft of the face space. And then the only face space available after the process is zero. So either using the second law, here we are using the second law, here you are using the second law, or the Liouville theorem, which is less, more fundamental. Liouville theorem is the theorem, I mean. Any Hamiltonian dynamics, who knows the Liouville theorem? Well, Liouville theorem tells you that if you have the face space, and you have a set, and you have a Hamiltonian dynamic, the volume of that set is constant. So this means that you cannot have this, or is that you cannot have this with just an external agent. You need something else. You need a thermal bath. Because you have to compensate this shrinkage by an increase of face space volume in the surroundings. You can interpret this in two ways, as Liouville theorem, because if I cannot decrease in a completely Hamiltonian dynamics, I cannot decrease the volume. So in this case, if I decrease the volume that these guys occupy, then I have to increase the volume elsewhere, in this case, in the surroundings. Or I can use the second law. This is Boltzmann entropy. I'm decreasing the Boltzmann entropy. So I have to increase the entropy of the surroundings. And the only way to increase the entropy of the surroundings is to connect this to a bath and to dissipate heat to the bath. How much heat should I dissipate? KT log 2. Because the decrease of volume is here. It's factor 2. The entropy is log of the Liouville theorem. It's more difficult, but you can do the same calculation with the Liouville theorem. You have to dissipate KT log 2. So this is interesting. That to do something as simple as overwriting in a hard drive that could be. So if you have your hard drive and you say erase it in the strong eraser, which makes zero all the disk, you have to dissipate KT log 2 per bit that you erase. And this is a fundamental bound. This is the important thing in all these things, of course. Everything depends on the technology and so on. But this is a fundamental bound. You could never go below this. You need this work, and you need to dissipate. This is, of course, we are far from here. People put things like the most loss of how much people is thinking how far we are from the Landauer bound. This is called the Landauer's principle. But people think that at some point we will reach this Landauer bound. So there are even proposals of how to change the processing of information, because this is called logically irreversible. This is called logically irreversible, that you cannot go back from this to this. So in a logical irreversible process, you have to dissipate energy. By the way, there is a lot of confusion with the Landauer principle. I mean, if you go to the literature, there are people who really, there are articles completely wrong, not even wrong. Articles that the only thing that they do is to add some confusion to the whole thing. Because, for instance, some people says, ah, Landauer principle says that you need to dissipate kt of 2 to erase information. This is not true. I can erase information by, here, you have a kind of barrier that you have a kind of barrier. Or suppose the simplest model of a memory, which is a Brownian particle in a double-walled potential. And this is 0, and this is 1. You can just lower the barrier, rise the barrier. Then you have erase, because the particle is here at the beginning, but at the end can be anywhere. This is not restored to 0. This is eraser. And you can do it with zero dissipation. This can be done with zero dissipation. So don't think that eraser is the important thing here is restored to 0, or overwriting. Also, another confusion in the Landauer principle is that people think that logical irreversibility, remember, logical irreversibility means that from the output, you cannot recover the input. Typical thing of a particle of non-1 to 1 function. Logical irreversibility means that the function, this is a Boolean function that maps from 0s and 1s to 0s and 1s. And this is logically reversible, but it's thermodynamically reversible. Precisely, the Landauer heat that is dissipated is to make the entropy of the universe constant. So the entropy of the universe here is constant. So it's reversible. Logical irreversibility does not mean thermodynamic irreversibility. Logical irreversibility means that you have heat dissipation. Well, you have two exercises, I think, on that, to see more in detail this. So we are going to finish, but what is Bennett's solution? I will explain it here. Well, what is Bennett's solution? Remember, the stiller engine. In the stiller engine, we have to measure, then we operate. So Bennett was in the office in the same corridor as Pro-Flandauer in IBM. And then, I guess they talk about this. And then, when Bennett saw this, then he said, OK, this can be applied to the demo. So I have the stiller engine. I have my demo. The demo has a memory. So the demo originally, for instance, is in 0. And then the demo measures, OK, we complete the cycle in the stiller engine, but the cycle is not completed. Because the demo has now, in his mind, the result of the measurement. Now it has to go back to the initial state. So it has to erase this information. And then, by erasing this information, he has to dissipate kT log 2, which compensates the kT log 2 that he extracted. And now everything is fine. So what Bennett saw is that our principal restores the second law in the whole story. So the thermodynamic cost is not in the measurement. It's in the ratio of the information. So you can measure with zero entropy production or zero dissipation or zero work. And you need to exert work to do that. We just need to restore the thermodynamic. But this is macroscopic. Microscopic means the microscopic state. But you need, the demo needs to, I mean, to start again. To start again, well, you could start from here as well. This is not a complete cycle. So you should go back to, this is not a microscopic state. Copic states are at these points here. This is a macroscopic. You want the, well, we will see this in our classes that this is called the informational state. And the informational state is macroscopic. So you have to go back. Because you said that people usually make a mistake. And they think that this, that you drew, is a ratio. But this is not a ratio because here you don't go to, you don't reduce the phase, you just. Yeah, when you can do this, you can go like that and then go like that. And then you don't know where it is. This is a racing information. But it has, it can be done without land hours principle. That's not applied to that. But then you need to go, in the case of the demo, you need to go to the same mesoscopic state. Well, we will see this in, let me finish just, well, another error in Bennett's solution that people have, Bennett had this very clear and tells this very clear in his papers, is that he found a possibility that the eraser is in the, that the compensation of KT log 2 is in the eraser. But you could have combinations. You can split this in KT log 2, this work, KT log 2 that compensates the exacting work. You can split it in measurement or eraser or the thermodynamic cost could be due to eraser and to measure. And there are some papers, old papers, showing that this can be, depending on how the memory of the demo is OK. I think for the exercises that you have to do, it's OK what we have already shown. You have a couple of exercises on the CELAR engine. This is just introduction, but most of the things that we are going to do in the rest of these two weeks are here, I mean here. The problems that this CELAR engine rises. So this is why you have a lot of exercises, just to work with the CELAR engine, the Landauer principle, and so on. And just to finish, there are some experimental realizations. This is one that we did with the group of, at IK4, with the group of Dimitri Petrov and Edgar Rodin, who maybe some of you know, he's here in ICT. He was involved. He was doing experiments. He's a theoretician, but he was in the lab as well at that time. And this is more or less the Brownian particle that splits into two. These are optical traps. By separating two optical traps, we could force the system to adopt one of the two decisions. As I said before, the only important ingredient in the CELAR engine is that this symmetry breaking. So you force the system to adopt a binary decision with probably one half, one half. This is also by Yucca Pecola. The group of Yucca Pecola, I think, with single electron boxes. And the electron can be, it's a kind of quantum dot that can be filled or empty. You have these two possibilities as well. And this is by Takahiro Sarawa was here. This is a bit different. This is just a, you can make a very simple Maxwell demon if you have a Brownian particle in the gravitational field. You can just wait until the, you know that the Brownian particle tends to go down, but sometimes the fluctuation goes up. So every time it goes up, you put some wall and then you, and the particle is gaining energy. And this is the kind of Maxwell demon because you need to, this is more related with the original Maxwell demon. OK, so that's it. The course will be just the theoretical framework to deal with these problems of how the information that I have about a system allows me to defeat the second law. This is essential. But we will, this is something that I like to do always when I teach thermodynamics information. There are two different tasks, very, very, and it's good that you separate these two tasks. The first task is to reformulate the second law or to incorporate the information into the second law. So now the second law doesn't work because I can extract KT log 2. So how I can incorporate information? And essentially, the answer is the Cilla-Renin. For each bit of information, I can take KT log 2. But we will generalize this. And there are interesting problems on that. So here you don't care to restore the second law or something. Here you just want to make thermodynamics that incorporates the information. And there are a lot of interesting problems here. For instance, how to use information in an optimal way and things like that. And the second, which is more fundamental, more philosophical, or more affects the foundations of physics, is, well, can we really defeat the second law? Or can we restore the validity of the second law? Of course, the answer is this one. We will restore the validity of the second law. How? Well, like Klandauer and Beredith, by taking into account the physical nature of the demo. And we will do this in 4, 6, and 7, to 10. We'll be more the second part of that. And this is enough for today. Good question, Mateo. You will figure it out. No, I think, OK. I think thermo-economic information is an important part of a statistical mechanism. So in this way, it is many tools that we will teach tomorrow and Wednesday, which are stochastic thermodynamics and information theory. These are used in complex systems in a regular way. I must admit that in this case, in the CILAR engine and so on, we are interested in the energy exchanging between the system and the surroundings and so on. And this is not so important for complex systems, although there are people trying to do the energetic cost of machine learning and things like that. So in principle, it's a research line that could be important. But you will learn tools which are really important for information theory and stochastic thermodynamics are really important for complex systems. Lunch? OK. So I have to pay the lunch? Ah, the lunch, yes. I have to pay everything and then you. I don't have to pay.