 Okay, so yesterday We discussed the detail balance condition in physics In physics is this one and we derived it by imposing the detail balance condition on a Markov chain Plus the Boltzmann state or the thermal state or Gibbs state where we like our canonical ensemble For a steady state But if there was a discussion that we can now use the condition and apply even though we have Proof this condition for our thermal equilibrium. We can now use the condition to go beyond thermal equilibrium How well first for instance We can have driving and driving Means that the energies depend on some parameter That I change or depend on time. So It's like a spin For instance, you know that the energy levels in a spin one half in the presence of a of a magnetic field are given by the magnetic field So if I increase the magnetic field I increase the level the gap between the levels or I increase let's say Yeah, in principle, I increase this energy and I decrease this energy. You know when I Increase the field So this is what I'm external agent can do. You can have also These are non-equilibrium. Let's say non-equilibrium Constraints or non-equilibrium situations one is driving the other one could be that the temperature Depends on the state. So I have some states and I will I will show you one example of this. I can have a system with four states And and and the transitions between one and two Can be used by a thermal bath at temperature t1 and also from four to three But the vertical transitions, sorry t1 And this can be induced by another bath And this can happens even in in experiments so you can have different temperatures and We can have also Some of the transitions can be mediated by By a fuel by some chemical and this is what we will discuss in a moment today as well so you can have The quibble, you know that a thermal bath is called a thermostat, no When you have the equivalent to a thermal bath for particles, you know that a thermal bath exchange energy with a system and The the the flow of energy is given by the temperature. No, so the bath is characterized by a temperature You can have also a reservoir of particles when you have a reservoir of particles And you exchange particles, of course when you exchange particles you also exchange energies You exchange energy and what characterizes the transport between the of particles between the reservoir of the system is the chemical potential So you have a chemical potential This is usually called a thermostat Because you keep the bath is such that it doesn't matter how much energy the bath absorbs or so The temperature is always the same let's say the bath has an infinite heat capacity and and When you have a reservoir of particles with a mu this is usually called a chemostat And this chemostat can be out of equilibrium like for instance everything in in biology all the motors that you have in biology they they have they Use ATP as a fuel and so there is a chemostat non-equilibrium chemostat of ATP and ADP Which is out of equilibrium and this is what allows all the molecular motors to work. So another way is In these non-equilibrium situations Is It's non-equilibrium chemostats This could be said the different temperatures could be also said non-equilibrium thermostats and and you can have Of course both you can have the three things knowing some Nanomachines you can have a fuel Which is the non-equilibrium chemostat sometimes for instance in artificial motors the Nobel Prize of chemistry of Four years ago, and so it was for three people doing artificial motors chemistry in chemistry and Usually they use light as a fuel but light is also a kind of light is characterized by some mu and so you can have a Well light is not because all these cases the bats are in equilibrium So when you have light from a laser, this is not an equilibrium, but anyway, this is another way of of Driving a system out of equilibrium But the thing is that in all these situations even though they are out of equilibrium you can use the retail balance condition This is an example for instance if I have yesterday I cooked this example If you have Let's say you have an energy epsilon. This is the energy epsilon here epsilon here zero here and zero here Okay, and now suppose that That I have different temperatures if you want to do make models simple models of of Motors or things like that or mark of change The best thing is to to consider the extreme Cases and for instance what is extreme case in the case? I want two different temperatures extreme case is that one is zero and the other is infinity So this is a and and we are going to do that No, no, no, no, no, no, no, no, this is the thing remember this condition we derive this condition Assuming detail balance global detail I mean zero current and Boltzmann distribution for the steady state the point is that if you now Take different temperatures things like that then the system is not going to be Boltzmann But this equation is true So yeah, yeah, yeah, but if you have these type of things For instance the detail balance condition between one and two So between one and two It's going to be the exponential of minus t1 beta 1 so kt1 and Now the energy this minus this which is actually and so on and so on and between three and two between two and three is In this case, this is minus epsilon. So it's plus epsilon kt2 So you see that there is no There is a local. This is called local detail balance because But but this is a this is this is a problem with the names, you know in mathematics local in mathematics detail balance means Zero current locally Actually local detail balance is a bad expression because the tail is when you say the tail balance is local that locally every current is zero but but in physics We call look we call detail balance this one and when this this this equation and when this equation is is fulfilled locally because maybe beta is Depends on I and J is you have different bath and so on then we see we call it local detail balance But I think it's not a very good Expression I would say No, the only difference is that this beta Is the same for the whole thing or the whole network and here the beta changes Okay, this is the gap. Yeah. Yeah, you are right. This is the Then let's say the argument is that the gammas depend on the dynamics And actually on the local dynamics if you if you if you can derive the gammas from a theory for instance using Kramis Kramis problem is that you have a Brownian particle or a Brownian degree of freedom between two worlds and you calculate the rate at which there are jumps and this depends only on these two guys so it's it's It's it's reasonable to assume that if if if this condition is valid when t1 is equal to t2 It's a still valid when t1 is different from t2 Because it's a dynamical Because the gammas depend on the dynamics of the system and not on the rest of the No, no, no, okay I've derived this Let's say the argument is the following. No, I have a dynamics given by my gammas and I buy I know that when all the temperatures are equal The system must relax so I derive this equation for the gammas now. I said ah, I have different temperatures and Then I claim using this argument that the gammas Are not affected Local properties. I say this condition is still fulfilled by the by the gammas even out of equilibrium. Okay but I admit We don't have this is a kind of phenomenological approach Although it's very fundamental because it's a statistical mechanics But I agree that for a good theory you need a theory that derives the gammas from Hamiltonian dynamics or From what two mechanics and so on and we have these theories. We have the gammas as I said yesterday you can use more approximation to get the gammas and and you can use Classical mechanics you can use the Kramer's approach to get the gammas No, what you are assuming is that the bus is in equilibrium the here we have two baths But the system kind of not necessarily is in equilibrium Okay Yeah Okay, so that's an example of this. What do you think is going to happen? For instance, if T goes to if T is if T1 is a So T1 is zero No, let's say T1 infinity and T2 zero What do you think is going to happen for these guys ratio will be one and for these guys This was so the temperature is so high that They don't care what is the energy and here there will be is only one direction of motion This is completely reversible so you can go jump for instance you can jump from here to here But never back and from here to here are never back So do you think there will be a current here or something if the particle is here what happens? It goes down. It never goes up now it starts to move like that because it is infinite temperature and from time from But suddenly I mean there is a chance that moves here and now it cannot go back. So there will be a current like that And you can actually The car this current this current is easy to it's easy to write the current for instance in this in this What is it in this in this one? What is the current the current is the stationary probability in one? Let's let's call Well One one important thing detail balance does not tell you what is the value of the gammas. It's just a condition so to complete the model we have to We have a choice for instance. We could say that in this case there We could say that Gamma one to two This is the this is the detail balance condition no because still what is infinity So if it is infinity, this is one No, this is zero. This is one and then you have the two. Let's call these gammas and Here if T2 is zero This means that it is plus infinity. So this is zero So gamma 32 So T2 is zero. So the system can never go up or go down here This is zero and we have to fix the other ones gamma two to three and Gamma Four to one. Let's let's let's to make things simple We can make it like that and we still have This horizontal one four to three three to four and let's call gamma. So everything depends on gamma This is a choice that obeys detail balance and But we can have other choices We could call this gamma one gamma two gamma three With this choice, you see that the current between one and two All these currents are equal. This is because we are in the stationary regime So the current here must be equal to the current here the current here the current here otherwise there will be an imbalance and we The the probabilities are not stationary So this will be a gamma minus ps 2 Gamma and this must be equal to j 2 to 3 and j 2 to 3 is just is just p 2 and Rate from from fc from 2 to 3 Which is gamma and you can have and this is also equal to j 3 to 4 and j 3 4 to 1 and we call this j So and now you have You have a bunch of quick do have many equations. No this equation this equation you can solve with this I mean, it's just one line and you will find that the probability of You can do it as a very simple exercise the probability of 2 and I think it's probability of 2 and 4 are equal and It's 1 over 6 and the probability of 1 and 3 is 1 over 3 so particles Are more populated in the in these states where the energy is of course, this is bigger than 0 So in the let's say ground the states or in the states of minimal energy are more populated and the current Which has units of time minus 1 is gamma divided by 6 So you have a Non-equilibrium situation. This is a but this is a thermal motor This is the nice thing of this discrete of these master equations. You can cook models I mean, you can cook models that using two temperatures you have a motion or You have if you exert some force you can have work You cannot hear calculate efficiency and efficiency should be smaller than car not efficiency Something that people in thermodynamics like a lot is to calculate the power the power is well in this case We don't have an effort so You cannot calculate the car the power right there the power and the The efficiency at maximum power and a lot of funny things. Yes Why is Yeah, this is a good. Well, it depends on the nature this the master equation The nice thing is the formalism that can be applied to many systems. It can even apply to population dynamics or so It what you said it depends on the on the on the Physical nature of the system But you can imagine this actually we have a collaborator that is doing this in lovin with optical tweezers. So he has a Four wells well, it is a this is from top So you have four wells, which are the four states and then to jump from one to the other you have some corridors here So here the potential is a potential. No, which is very high in the middle You have two wells like a egg box No, and you have a and you can go like that to go from two to three as you said In this experiment you need to cross a barrier. So it's not this instantaneous of course if you think of the of of These states like that you tend to think that it goes to zero instantaneously, but it is not true not even not even for for Quantum systems You need in quantum systems. You have a probability per unit of time to jump which is given by these More approximation or also by the golden Golden Fermi rule and in classical systems. You need to cross a barrier. So you can assume it depends On on the model that you have so we have only the energies of these three forest states but in between we can have barriers and And this is telling you that you have this For instance from two to three We'll have something like that Well, if the temperature is zero, so no, you are right Yeah, you are right that you should have something like that. Yeah, maybe The model is not Well, I should maybe you are right But what it is important is that you can cook up these models with and they are consistent thermodynamically In the sense that if t1 is equal to t2 you get equilibrium so if you had some some efficiency Efficiency would be smaller than cannot so they are Sometimes in these extreme cases. They are a little bit artificial But the nice thing is that they are consistent And this is also a message if you want to make models of something that of course these are like toy models, but Sometimes you want to really they are the first step to for a realistic model and this is also a message that you can learn that Sometimes it's better to go to the simplest case in this case. Well, I took this this is the simplest case because the all the all the transitions become either completely reversible or completely Reversible I mean completely Symmetric so It's a nice tool now if we now that we know that this creates a current We can go to more realistic cases We can go to t1 bigger than t2 and I'm pretty sure I've done the calculations, but if you Bigger than t2 you will you will see a car. So this is the kind of artificial model But I think it's a good lesson to learn that sometimes you have to go to this extreme But very easy. I mean you can solve the master equation Just in five minutes. So I think it's a it's a good idea to start. Yeah Well, and but also This example, this is a very simple example to show you that the you can use this equation Remember to derive this equation. We assume zero current everywhere Detail balance in the mathematical sense of the word of the expression But now assuming that this only depends on the dynamics and that I can extend this condition to more complicated situations I Obtain non-equilibrium Models which have an interesting behavior in this case. It's a thermal motor is using like our cycle is using Bats in different temperatures to create motion. Okay so This was just a note For what we saw yesterday Well, let me at the end of the class today We will see the non-equilibrium chemostats and reading driving is this one So yesterday I started to look at the driving The driving is By the way, this has nothing to do with the sealer engine But it will be our tool for next week to address the problem of when a Molecular machines can be considered Maxwell demons or not. So this is why I'm doing this so Yesterday when I consider it was this case a Driving and again when we have a driving we have a system We have a thermal bath at a given temperature And we have an external agent and we have a heat and Work you can of course combine now external agent with two thermal baths and things you can do all the combinations These are the three main sources of non-equilibrium for this type of models and systems. I Discuss this one Now I'm going to discuss this one and later on this one Okay, so what about the driving? Well the driving Introduces something interesting, which is the first law of thermodynamics and the second law and so on so in yesterday I think I I Introduce the the The average energy which goes a sum over all possible states of the probability I'm using this notation Times the energy and then we calculate how this energy changes in time And we saw that there are two terms the first term is the Evolution is this the change Due to the external agent and the second one is the change due to the evolution of the probability Did I write this yesterday? No, I write I would this yesterday, you know, so And I I wrote the same for general Hamiltonian systems. Remember when we also so you can always Split the change in the energy of the system as a Driven driven system, of course if the system is not driven, this is zero and This is due to the action of the agent So this is the work and this is due to the interaction of between the system and the thermal bath So this is heat and actually this time we are going to check Precisely why this is heat and we will see that this is heat using the retail balance condition You can prove that this is heat and this is what we are going to do now So this is work and this is heat And yeah, if we now we can use let me write the let me write here the Condition want to keep also this thing because it is a We are going to Check all these points in the list So let's let's talk about the heat the the work. Sorry. The work is that the sum over I of E I The energy of a state I and then the derivative remember the master equation We wrote the master equation like that Is the sum of all the current coming from n elsewhere to I? This is a sum over J. So I will have here a sum over J Should put J different from I but if we if we agree that J the current from I to I or from J to J is 0 I can skip this you can because Impressibly like that, but I hate this notation because sometimes the notation here the sum is only over J and Sometimes we use this notation to sum over J and I when J and I are different. So it is a so let's assume that J J Too many J's J J I 0 for all I and that's it. So this is a J J I Of T That's it. No Now we are going to do so I can write this like a sum over all possible pairs Remember that this is essentially J different from I but I will not indicate this any anymore and This is a there is a nice way of writing this Which is using the anti symmetry of the of the of the current remember the current is Anti-symmetric, so the current from I to J is equal than the current from J to I remember big well Just keep this as the as the outline of the lecture today, but Space is limited. So Remember that G. Remember what is G the current from I to J is PI Gamma I to J minus PJ Gamma J to I Gamma's now depend on time because of course because of this condition So we have anti-symmetry here, so we can split this into We can If we change, okay, let's let's do it like that. We can split this into one half And and some Here minus And I can change here The order, okay, this is the same because I just change and I divide by two this sum is the same as this one So it's a stupid step. It's a stupid step, but because these these Indices are Dummy variables, I'm summing I can change here J by J and I so I can put here J And here I can put J I And now I have the same factor So I can write this as one half this sum Let me skip I Minus J J J I now let me And this is a sum over I and J, but now this is symmetric. You see this is anti-symmetric This is anti-symmetric. So everything is symmetric. So I can just Each pair of I J contributes the same So I can instead of divide by two I can restrict my sum to I Smaller than J. I got this expression and This is we are going to do this trick many times. So We have something Times the current and we can always split it like that and why this is interesting because Mathematically it's not very interesting, but a physical is very interesting because in here is My transition. These are the energies. I usually like this type of diagram where the energy is in the vertical axis and What is this? Actually, I prefer to call this Let me a switch again the indexes. I should because I'm more familiar It's the same. I can this remember this is anti-symmetric. This is anti-symmetric because it's just a Difference so the whole thing is symmetric So, okay, I have the heat. Let's let's write this equation like that heat is this thing and why and This is Actually, this is the the number of transitions from I to J in a given time or per unit of time, sorry and This is the heat In a transition why why Ej minus ei which is this difference. Why this is the heat Anybody can tell me when when I'm when my system jumps from I to J The energy increases where this energy come from It comes from the external agent or it It comes from the bath because the standard agent is moving the jump is due The the jump are not due to the external agent. The standard agent only changes the the energies of the states So this is energy that comes from the bath So now we have a very nice expression which is heat is in each transition J from I to J In each transition I to J I multiply the heat involved in this transition or the heat Which is the energy supplied by the bath in this transition times the number of transitions per unit of time and then I get Yeah, nice sum over all transitions and then I get the heat per unit of time. Yeah. Yeah Yeah, yeah, sorry minus this Remember the definition I remember the definition of J Jij Is PI this is a gamma ij Minus PJ Gamma J I And it's symmetric because it's the net flow of of probability from I to J So this net flow is minus the pride from J to I There were more questions. No more questions with over there. There was a question. Sorry. No Yeah Well, I introduce the factor one half Here I introduce it because I just I have this know And then I put it twice. This is the same as this because it's just to change the This is equal to this Because of the asymmetry of the anti symmetry of this So I have to include the one half and then I remove the one half by by here. I'm counting pairs twice And I don't have so one way well, I could I could keep these and put this But it is better to The one half is just to count Every pair just once not not twice No, no q dot. Okay the goal of this expression of this calculation First is because we are going to repeat it many times, but it is to to check that this This comes from this That this is is is the Is the heat? Well, the goal is to have two expressions for the heat because we are going to use this to prove now the second law In the end Okay, we that we have not proved anything. I mean we have a we have from here you can more or less a Guess or Conclude that this is the energy that this is the heat that this is there because this is the energy provided by the agent Because it is the agent is doing this and this is the energy provided by the bath So I mean to prove that this is the radio This is not necessary But this is an extra check if you like where we can have an Interpretation of this expression which is equal to that one in terms of transitions So it's a it's a nice expression in the sense that it allows us to decompose the heat Into contributions coming from each transition This is a it's not a proof Because we we don't need a proof actually and something which is also very interesting Is that now we can use the Now we can use them we can use this This detail balance condition and you see here is in the exponent so if I take logarithms and I Multiply by KT. I get this nice expression. Okay, or I'm I'm following I'm having and Using the ice I guess different from the notes, but it's okay. You have to be careful with the With the indexes, but this is there So we can also write this the heat as KT the sum over I It's more than J of the current times The log of gamma J I and gamma I j and we are going to use now in a moment To derive a second law for for This system. Yeah This is a very good question Not necessarily because if it is a if it is a true quasi static process Then the probabilities will be equal to the instant equilibrium so it's But it's true that if the process is very fast then the whole Formalism of the master equation fails and all these gambas When we assume that there is a detail balance condition We are assuming that the process is not super fast, but but the system can be out of equilibrium. This is for sure so I'm talking about classical system in classical systems when you have wells when you discretize a classical system is because you have a separation of time scales and a time scale within the the system and a time scale of jumps so This means that the driving must be in between To keep the detail balance condition to be true Okay This is for instance used many times in in in bio physics in conformations of proteins in proteins. Yeah, you don't have this problem You have what you have this separation huge separation of time scale. Okay So far so good. Now. Let's go to the second law the second law of thermodynamics We have a first law. No, we have this is the first law. This is the first law Now let's try to to derive a second law for this type of systems and for the second law What we what we are going to do actually what we are going to do to prove is I that Shannon entropy is a good thermodynamic entropy at the beginning of the course I said no Shannon entropy is not always a good candidate for a semi-native proper Entropy here. It turns out that it is but we are going to prove it and so we take the Shannon entropy As the as the entropy of my system We use the natural logarithm and we use the Boltzmann constant in front So this is a this is the number whose units are Jules divided by Kelvin which is the units of of entropy and We are going to calculate First the derivative of this with respect to time and this derivative. I have to make the derivative of a product So I first make the derivative of this which is I will use p dot plus PI And then the derivative of this with respect to time So I have to make the derivative of the logarithm, which is one one minus PI and Then p and then the derivative of this with respect to time So this is the derivative of the entropy now this cancels with these and then I have P dot which is different from zero, but the sum of p dot The sum of p dot is the derivative This is the time derivative I can take the derivative here is the derivative of the sum of PI and the sum of PI because of normalization is one So this is this is the derivative With respect to time of sum of I This is one all the time. So this is zero So this is zero this cancels so now I have That is And I am going to repeat almost equally this argument I have that s dot this is s dot is equal to minus k the sum of PI dot Log of PI and now I use the question of motion The question of motion is This is a sum over j of g ij as I did before so it is very similar to what I did before Minus k the sum of ij of G ij Time log of PI So now I have this current times something that depends on this on the state i so I can use the state district It's very it's very common So I I Use the anti-symmetry to write the same thing, but with a minus and I use the anti-symmetry So I use that this is j i this is just the anti-symmetry of the so this is the same as this Yeah, from j to I sorry. Yeah I own from j to I and to keep ij here. I'm going to not now I can swap the indexes And I can do it here or here so I will do it here So this is a this is the sum of over ij. I swap the indexes Now this is I can here if I swap the indexes I have to change the sign But if I have if I change this if I swap the indexes in the whole expression I just they are dummy variables. So this is the trick. So this is ij log pj Okay, and then this is minus k divided by 2 but I can Instead of divided by 2 I can just restrict the sum to Verse only and then I have j ij log pi minus log pj Okay No with plus so it's log p i Divide minus log p a j which is not pj here in the denominator signs are correct because Okay, it's the same and is the idea is always the same is to Express the the change of something in this case is s in the last case was heat as a contribution So this is like say the the change of entropy in my system When my system jumps from i to j it's not so trivial as in the case of the energy Before this was the the change of energy This is the the idea is to is to describe this these derivatives as contributions from each transition So That's it But I want the second law and this doesn't look like a second law So the entropy of the system is not increasing and it It must not increase I mean sometimes the entropy of the of the system can decrease what the second law tells us is that what What is the unknown the entropy of the Of the universe and what is the entropy of the universe or let's call it total entropy What is the entropy of the universe if if we agree if we assume that the entropy that the shadow entropy is this entropy of the system Is the entropy of the system? Plus let's put t Plus the entropy of the bath and the entropy of the bath is Here we can use the Claus's equation. It's q entropy Delta of the entropy of the bath In any process is minus q divided by t So this is s dot Minus q divided by t Okay, and now if I use this expression for q and This expression for s what I get is the following It's total. I have the everything divide. I have k Here and I have a sum I J and I have J I J in both cases So I can use this and now I have q divided by t. So this T disappear So I have the log of PI divided by PJ Minus as I said this T cancels with this T this case here minus log of Gamma J I Gamma I J if I now group everything I Have gamma this is minus. So this goes to the numerator. So I have PI T gamma I J PJ Gamma J. This is the entropy production in my master equation Due to driving or due to whatever of course if Yeah, and this could depend on T as well, and what do you what do you think about this expression? There is a nice thing of this expression that remember J J I J This PR PI gamma I J Minus PJ Gamma J I So look at the sign of these When this is positive Look at the sign of the of the of the logarithm The logarithm is positive is if its argument is bigger than one When is this bigger than one that when this is bigger than this? But when this is bigger than this this is positive So the sign of the log is equal to the sign of the J It's one is just So this is always positive So the sum is always positive So we have the sec we have a second law here Sorry, it's total in in thermodynamics. We call the change of entropy in the universe. We call it Entropy production because it's then it's an entropy that has been created Entropiness is not conserved. Yeah, it's more difficult because well you can write this as log of PI minus log of PJ And you can see this as a change on on the log And the shadow on entropy is minus K the the The average of the law, so it's a bit like that Yeah, because each term in the sum Look at one term in the sum Look at the sign of the current The current is positive if this is bigger than this but this is in the new this is the numerator and this is the denominator So whenever the current is positive This is bigger than one and the log is positive Whenever the current is negative, this is smaller than one And moreover, there is a nice interpretation of this because what is this? This is the reversibility that one can observe at the time T Because this is the number of jumps from I to J Divide by the number of jumps from J to I so it's a kind of measure of the irreversibility of the two Actually, it's related with the cool back library divergence that we Discuss and Edgar and has a lot of Results using that the entropy production is Related quantitatively to the irreversibility of a process of the Resurivity of a situation because this is a given situation. So this is also a very nice interpretation Yeah, I would then say well, we don't have this is not the proof of the second law I mean the second law is this is just a Proof that they that the second law That you have a set let's say you have a second law for the Shannon entropy if you consider that this the entropy of the system So it's not the proof of the second law that say in a physical terms I would say that it is a proof that in the in the formalism of the master equation you can Use the entropy of the the Shannon entropy of the system as a thermodynamic entropy but it's not fundamental because particular because Whenever you have a master equation the master equation already contains the second law inside the equation because in in when you use master equation is because You coarse-grained. Let's say you forget about the details of the bath and This uses already irreversibility. So for the point of view of fundamental Statistical mechanics, this is not a really proof of the second law It's a proof that the that you can have a second law in the context of a master equation And you can talk about and this is at the end of the day. This is a At the end I mean in in in thermodynamics There is a lot of discussion with this but my my point of view is that You can only define entropy for equilibrium system. So at the at the end of the day, you have your system and You have your bath or or rest or reservoirs and What you compute in an experiment for instance when you go you you are a biophysicist and then you measure Something in the stationary regime you assume that the entropy here is constant and Actually, what you are always measuring or calculating is the entropy in the baths So and and this is this is true entropy. Let's say This is the kind of this is this is Shannon entropy. This is okay But this is I wouldn't say that this is a physical entropy. I would say that this is the channel This is a channel entropy that allows you To predict things about this which is what you measure at the end Well, you can measure this but I mean this is this is what you measure using thermodynamics This is Q divided by T or free energy or things like that, but this is a long discussion Not everybody will answer the same as the Miliano will say Channel entropy is It's entropy and so on but I don't think so Well, this is aside. We were discussing this is Ultimately this comes from that But why because when whenever you use the master equation, you are already Assuming that your that you look at the system and And you don't have access to the details of the bath so you are and and this you you have a course grading in in the very in the Basic assumptions of the master equation you already have a course rating which corresponds to these filaments that you say But this is like previous to the whole formalism This what I've done here is just to show you that we can talk about entry production and things like that Using Shannon entropy for the system. This is the main thing. Okay more No, they say I am by definition Of course, if I had there is an external a if the standard in this switching some field or Well, that's a need to be a human being it could be a Computer or something like that. It has a lot of entry production But the idea is that the interaction between the system of the external agent does not it's not a companion I mean does not imply any Entropy increase in this in the environment so by the fini, let's say this is my definition of heated that external agent is Is a way of exchanging energy which is work without necessarily increasing the entropy of of their environment and And this is how we model this like a parameter in the Hamiltonian changing Taking to hand that for my dynamics. It's a it's a very it's a highly it's a very practical Branch of physics, but it's it's full of idealizations when you study for my name is in detail in foundations of studies are because Realized that it's full of Idealization and this is one of those Okay, so now I want to Yeah, the entropy is this one minus key. Ah, okay Okay, this is Clausius equation. I said yesterday that the question is one of the most strange equations in physics because it has been the definition of This this equation You have different ways of proving this. Well, the best way of proving this is to consider that This is that the bath is in a canonical state So for the canonical state Because by definition and we are talking about idealizations, but by definition a thermal bath is something It's a system that it's in the in the canonical state And then you can compute the entropy of the canonical state the shadow entropy or or the yeah Let's say the shadow entropy and then you can prove this that if you have an increment of energy this is this is Delta of energy in the environment in the bath and you can prove this using the canonical ensemble Depending on how do you consider more fundamental if you remember a statistical mechanics in the undergraduate Actually, this equation is is the definition of temperature When you when you when you say that one over T is this thing for equilibrium systems This is this this is just that this is Delta s and and Delta is Q You have Delta s equal Q divided by T. So If you consider that the entropy is the basic quantity in a statistical mechanics is like that Then Then this Clausius equation is the definition of temperature actually temperature the model definition of temperature is this one We don't define We don't define entropy in a statistical mechanics Function of in terms of the temperature because the entropy is more basic than the temperature So we define temperature like that Yeah, the idea of Non-equilibrium thermodynamics Non-equilibrium statistical mechanics you always need that the environment is in equilibrium Non-equilibrium environments is a mess. I doubt that you can even do thermodynamics with non-equilibrium environments although there are people I have papers with but I Doubt that you can If you look at all the growth muscle all the classical books on non-equilibrium thermodynamics Do you realize that any entropy production is calculated using these or Using the same for the number of particles or things like that So you you know that when what a system is in equilibrium You can always use this equation Plus PDB, I think it's P, T, D, B minus mu, T, D, N When a system is in equilibrium, you can always use this equation and this equation contains things that are Mess arable if you like This is thermodynamics, so in thermodynamics you can use this equation And in non-equilibrium thermodynamics, ultimately you are always Assuming that something is in equilibrium either local equilibrium or Bats in equilibrium and things like that. Otherwise, it's not it doesn't You can still say that shadowing entropy is an entropy, but then you have to be very careful and at the end Also at the end of the day entropy is just a tool and the important thing is energy I mean this is also Because some people is focused on entropy or entropy. Entropy is a tool What you want to finally to prove is that for instance that you know the work is bigger than delta F and things like that so entropy is a tool and then And then Yeah The important thing is this this changes here, okay Okay, this is very big Foundations of the marriage which are really I don't even have a clear ideas and maybe Edgar and Matthew have different opinions of that No, no, no, this is the first half the first example that I show you in the class is to show that You can if you have detail balance global detail balance you have current zero current But if you have driving we have studied three possibilities of the party from equilibrium Keeping detail balance local details balance through one is the first thing that I did two temperatures If you have two temperatures, you can have current even though you have detail balance So detail balance the expression is very unfortunate because it in in mathematics details balance means zero current in physics Detail balance means this condition Which only induces zero current if the betas are the same if there is no driving If there is no any source of non-equilibrium in the system so And we call this local detail balance, although maybe it's not very good expression Okay But look at the first example that I saw here Yeah, yeah, yeah, but you have detail balance So this is the nice thing that balance is a tool that can allow you to extend It's derived in equilibrium. Well in the derivation that I've made because there are other derivations and It's like a condition that any rate has to obey but you can You can you only need to obey this condition locally and then if you globally Your detail balance condition has different temperatures or driving or as we are going to see some Chemical Potentially chemostats then you can have Okay, so I Wanted to extend this to chemical motors But because you have the session to this afternoon. No, yeah, you have the session this afternoon. So I'm going I am going to do something that I hate which is jumping from so We still have remember that there are sources of non-equilibrium But I think it's great that you have so many questions that we are we are slow, but I think it's much better to learn the things in detail than having a lot of information so I Today I explained different different non-equilibrium thermostats. Well, I explained I just I just Show you an example you can cook example Driving which is this thing we have proved well in this case. We have proved the first law the second law and so on And they are a non-equilibrium chemostats and this is going to be on Monday. I know I Yeah, you you mind if you Lecture on Tuesday Okay, so this is in Monday, okay Or maybe no, maybe this is this is on Tuesday because then we can connect it with other stuff And now so this is lesson three, no And now let me in the last five minutes and 15 minutes. Let's go to lesson four Which is information and the second law I will be very brief because okay we have spent a lot of time talking about thermodynamics and so on and We have derived a very very powerful tool and the powerful tool is the the second law For non-equilibrium states. We said that When information is involved in a process essentially what we have is some non-equilibrium states So we have this nice expression That if I want to drive a system from a net non-equilibrium state Initial one to a final one. This means that I have a raw Hamiltonian And a raw Remember that the the non-equilibrium free energy depends on the Hamiltonian So it's just the average of the Hamiltonian over raw Minus T and the channel entropy of the row So I have some initial states on Hamiltonian and I drive my system or I measure or I do different things And I get the final one. So now I can apply this Inequality to different processes the first one the easiest one is feedbacks. So let's do feedback and measurement So I have a system With an initial condition. I will assume that the system is in contact with a thermal bath Like in the case. This is the the sealer engine essentially. So I have a bath And I have an external agent The paradigmatic example of this Is is the the sealer engine So I run my system and at some time TM I measures I measure some quantity M and Then I run a protocol until a given time tall This is the duration of the cycle to goes to infinity because it is a quasi static Process, I'm going to cause well. No, this is this is general for any process Doesn't need to be quasi static So and in principle I can apply I cannot apply the second this law to Well, I could have I could apply to everything but here something will something happens here in the measurement I have I Have a probability distribution for instance in the case of the of the sealer engine the particle can be everywhere and if I measure and I obtain a number Let me call this mess And I obtain an outcome of my measurement Then I have to update. I have a post I have a to update the a The probability distribution using my the information that I have Remember that this is essentially the budget theorem. This is a this is a This is Well, this is conditioned to some measurement So now it's we have to just apply what we have learned before what is the entropy after the measurement of x is the entropy before minus The mutual information between x and n. So that's it everything that we have that we have Learned in the first lesson or in the second lesson. Sorry on Tuesday. We can just apply it here Yeah, and is the outcome of the measurement. This is the time of measurement. Sorry So we measure and we perform some feedback. So now let's calculate the free energy The non-equilibrium free energy so the there is a nuclear free energy post and an equilibrium free energy previews the measurement and this is the Well, this is this is the increment of free energy due to the fact that we have measured and and What is this? Well, we assume that the measurement doesn't change that's changed raw But we assume that it was it doesn't change the Hamiltonian. So the measurement does not cost any energy We could include this but for for so the only difference is is in the in the entropy of the row. So this is a minus t the entropy of raw post minus the entropy of raw or if you if you want k t and Let's put h. This was the Shannon entropy. So it's k. Remember that usually we use s for for For the thermo and for the entropy express is the same quantity s and h and s and h But usually I Comment the first day that I have some doubt of what notation to use mathematicians use h for the Shannon entropy And if this is we use s It's the same quantity, but s is expressed in terms in units of the Boltzmann constant. So One way of is to say that s is equal to k times h or I should have used s all the time Maybe at the beginning anyway This is a k t and this is a Post minus pre is Minus I so I have k t I so They increase there is an in there is an increase of free energy Due to the measurement of course this involves some heat With you some some work because of the second law But now this is what Leah will address on Monday But now we are trying to address the first task of of of thermodynamics of information Which is we don't care about the cost of measurement for the moment. Leah will address this We only want to incorporate the information into the second law So what we have is that a measurement Decreases the entropy this is something that we know for is as in the Seeler engine the particle can occupy all the box And when you measure you have a compression for free. Let's say now you go from the whole box to just Half of the box so Any measurement Decreases the entropy and because free energy is minus entropy increases the Entropy or the free energy of a system. So any measurement is expected to decrease the entropy, but you can also Decrease the so I mean the even the This mutual information It's it's a it's how much I expect to learn Before the measurement, but after the measurement The state and Can be in a single case. Yeah, this is now this is in average. Yeah, of course if you have Okay, we have to discuss here the difference between talking about So the the post the post measurement Depends on on what you have obtained this is a Row mx Row x divide by row n No, so it depends on m on the value so for instance if I have my Seeler engine with with And I put the wall here instead of in the middle I can measure left and right if I measure right I decrease The decrease of entropy is larger than if I measure right, but now I'm talking about averages, so you have a you have a Entropy of this thing Which depends on m if I if I average these over all possible m's then I get h x m And this is what I have so it is it is always So why you are neglecting the change in energy the engineer idea Because you can you can include a change in energy, but it is it is easier in the sense that if you Average the change in energy Over the possible Measurement then you you get exactly Yeah, yeah It's a yeah, yeah, because they're all the marginal doesn't change. This is one thing the marginal This is one of the assumptions of a measurement in classical mechanics that in classical physics that They they the if you make the marginal Which is this one this by definition is equal to row x pray So the measurement doesn't change the marginal the measurement only allows you to classify the possible result and so on okay, so You have these That the measurement Decreases the entropy and increases the free energy. So I start with some free energy here I do my work in the first part of the Of the process and I reach a new state which is the pray then the measurement Transform these Increases the the free energy and I complete My process like that and here I have another word and if I neglect if I neglect the work in the measurement which is as I said something that Leah will discuss on Monday Then what I get what is the total work? The total work is work one plus work two This is bigger. I can apply the second law to each part So this is bigger than the increment of free energy in the first part and W2 is bigger than the increment in the second part and now I have here prep minus post I Have a minus kti So I get That W is bigger than Delta F Delta F is post Sorry, this is plus no I know Delta F is final minus initial and Then I have pray minus post which is minus kT. I And this is the second law for feedback processes This is the second law for feedback processes the work that I have to do is Reduced by the information gathered in the measurement It's minus because this remember this is the work that I have to do Extracted work is the negative if I have a cycle This is zero and I can extract energy from a single thermal bath How much energy kti? In the case of the serial engine This bound is saturated because I remember is there is in the in the error-free measurement I is The entropy of the answer which is one bit. I get one bit But I I have to express this in nuts. So I get kT log 2 So in the in the serial engine I get kT log 2 These after no to this afternoon in the exercise You will do the same with the error free with the error measurement. So in the error measurement you have to calculate the You most of you did the exercise of the optimal protocol and so on and you calculated the word you get when you have error Now you will see that this is exactly the mutual information and you will also Discuss the reversibility of the process in the optimal protocol and this is Yeah, we discussed it. So this was a bit fast, but I wanted to to show before tonight this afternoon So again, I think this is the expected work This is everything is have this take an average over many many measurement then this inequality All these things of second law and things like that are in areas you can somebody said on Monday or Tuesday you can avenge you can mom a few I mean For a while or if you are lucky to beat the second law the second law is recovered only in average Which is something that also is interesting by itself. It's a problem okay So see you on Monday because I'm For the weekend so on tonight to this afternoon you have the Exercise session with Aliyah on Monday. She will lecture on the on lesson five and Tuesday and Wednesday we started with information flows with chemical motors and so on This is a this is a sax, but you have I Don't know you have signed this I think it was Everybody's time now after lunch