 which is the first time I give such a course in Trieste, so it's really a great honor for me. This will be an introductory course in which I'll try to explain some of key concepts in stochastic thermodynamics, which is an emerging field within statistical physics. Of course, this is a school, so I'm not expected to, I have a tentative schedule, but this doesn't mean the schedule can change, so if you have doubts or questions, please make me any question during the lectures, because this is meant to be like that, right? So this is, as I say, a tentative schedule of the course. These are the topics that I will try to discuss in these nine lectures. Okay, this is an analogy for a cycling stage in the Tour de France, in which we have different curves, so we will go through different curves in this path, and what counts in this course is not to reach the top of the mountain the fastest possible, but to learn and to stop in each of these curves and to understand and to realize the beauty of this landscape and of this field. These are some key references that I recommend you to take an eye, and especially for the beginning of the course, I will follow the book of Sekimoto, which has the foundation of stochastic thermodynamics. There is also a nice book I can recommend, which will appear this year by Luca Pellitti and Simone Pigolotti, so it's not yet published, but when it's published, I highly recommend you to read it, because I could take an eye on it. There are some nice reviews in theory, which are few of them. This is a field that is exploring and growing a lot, and also on experiments. The nice thing of this field is that there are experimental and theoretical advances that are being put together. So for those of you who are more interested in the theoretical parts, go through the second group of reference, and also for those of you who want to know more about experiments, you can find this nice reference here. All right, so what is stochastic thermodynamics? So as you know, thermodynamics is a field that aims to understand how one type of energy is transformed into another type of energy. For example, we have a car in which you have the fuel. The fuel gives you heat. It's one type of energy that is used later on by the car to move in the road. So this is called work. So we are aiming to understand how energy is transformed into different forms, and also how disorder changes in physical systems, which is called entropy, we'll discuss later. But typically, classical thermodynamics was focusing on big systems, macroscopic systems. Now there is a new field that studies the thermodynamics of small systems, such as this red particle that I'm showing here below. This red particle, sorry, it's a colloidal particle. It's the size of a micron. It is in a thermal bath, and it's being exerted an external force on this particle, so the particle fills the force. It has a net direction, but so it's on average moving to the right, but sometimes there are also red events, I don't know if you see in the slide below, there are red events in which the particle moves also backward. So we try to understand this type of fluctuations of red events in terms of its thermodynamics, so how much energy is being absorbed by the particle in order to move backwards, for instance. As I said, this is a fruitful field. There are many experiments. Here are examples. For instance, molecular motors can be described with stochastic thermodynamics, colloidal heat engines, which I will discuss full lecture on this, also electrical circuits, and quantum dots, which are small devices in which you can see electrons passing one by one. So this is a schematic figure of how this field is growing. Here you can see the number of articles published every year in which the word stochastic thermodynamics appears. So it's really growing a lot in the last years. It is a young field. Okay, many of you maybe were born after the beginning of this field, and I consider this by a meeting paper, 1998, in which it was established a connection between stochastic processes and mesoscopic dynamics and thermodynamics. This is what I will discuss today in my lecture. So my lecture today is on the first floor. So when you do thermodynamics, you have to start with the basics. And the most basic law in thermodynamics is the first law. What does the first law say is the following. The energy of a system, which is here, this I illustrate with a green square, can change in two ways. One way is an external agent is applying a force, for example, in the system. And the energy of the system is being changed by the external agent. And another way is it's called heat, which is the change of the energy in the system due to the interaction with an environment. An environment is something different to an external agent. This is very important. So an external agent can use useful energy to move things. This is work. Heat is something that comes from the thermal processes. Input the system and change its energy. So the first law says that the energy of the system can change in two ways. It has two phases, heat and work. I will use this sign convention, which means that if I do work on the system, I consider work positive. And also, if heat flows on the system, we consider it positive. So when these fluxes enter the system, we consider positive. And when they go out of the system, we consider them negative. This is also called the thermodynamic sign convention. And where does stochastic thermodynamics lie? So it is basically the path that I'm illustrating here, taking from Seikimotus' book. So as you know, statistical mechanics has connected the micromechanics, so microscopic properties, for example, the positions and velocities of all the molecules in a gas with its thermodynamics, which is the behavior or quantity that affects the macroscale, so the system at bigger scales. This path has been worked by statistical mechanics. On the other side, the projection methods have established a link between the micromechanics and the mesoscopic scale stochastic dynamics. So we can look at the system with all position and momentum of the atoms, or we can coarse-grain and have a point of view that is further point of view in which we don't see all the molecules, but we model the entire, all the interactions of the small molecules with the colloid as anoints. This is called stochastic dynamics. And this can be done using projection methods, as, for example, in a classic paper by Sonsik. So stochastic dynamics aims to introduce a framework that goes from the mesoscopic scale to the macroscopic, and it does like a shortcut, well, it's a framework to introduce or to define what is heat, what is work, what is entropy production, and what are the thermodynamics laws that apply to small systems that are affected by flat basins. For example, motor, particle, electronic system, etc. So this is the path on where we are going to sit, and what I'm going to discuss in this lecture. As an appetizer, the first model that was discussed in this context was the Langevin equation. So as you know, Langevin equation emerges from microscopic dynamics. So we have in the left, we have a big colloid that interacts with many small particles from the environment. And we could do a description of this with all atoms, all the positional momentum of all the atoms. But we can also simplify this description and describe the system with a mesoscopic point of view, in which we coarse-grain all the variables from the bath, and we say they apply a noise on the system. The system, for example, can be described by the position of this colloid. And then there are forces that are applied to the system. Of course, there is the force from the bath. There is the friction force. It's the first term in the equation I put below. There is a potential that is created by an external agent. There is an external force. So the external agent can also apply forces that are non-conservative. This is what I call F. And finally, there is this xi, which is the thermal noise, which we often model as a Gaussian white noise. So it's a Gaussian number, which has zero mean and delta to correlation. So the main question that I'd like to discuss in this lecture is how can we define heat along a single trajectory of this colloid. So we look at the colloid on the right. We measure its position as a function of time, and we will see that this position is noisy, as what I'm showing in the blue trace in the bottom. So the question is the following. What is the heat absorbed by the colloid along this trajectory? So this is the question I'd like to discuss in this lecture. So for this, is there a question? For this, I prepared some lectures, some notes that I'm going to share now with you, all of you. I hope this works now. Okay. I think you see my one note. So you see my notes, right? Yes. Okay, perfect. So as you see, I have divided my notes in two parts. So the first part will be the theory, which I will write live. So I highly recommend you to follow me with your pen or pencil. And the second part will be more on experiments, which I already prepared. So, right, this is the first time I use this application. So please be patient. So we are going to consider this type of setup in which we have a particle or a system that is one dimensional. It moves in 1D. And it's in a potential, vxt. So the potential can change in time. So this could be a potential at time zero, at time equals to one. This means that there is an external agent changing the potential. Additionally, there is an external force, which is this F, which I put in red. And the system is in a thermal bath at a temperature T. So for simplicity, I'm considering that there is an isothermal environment, but one can also generalize this to multiple environments or different temperatures. Okay, so we have this system. And the dynamics of the system is often described by an equation like this, which will be mv. This is mass times acceleration equals the gamma v. So this is the friction force that the fluid is doing on the system. And then there are different forces. One will be, okay, sorry, I think it's for simplicity. I'll call this u. I think it's better. So let me call this uxt and uxt prime. So this will be u prime xt. This is the conservative force. And then there will be also another conservative force, which will be fxt. And then plus anis. This will be the equation of motion. It's a Langevin equation here. Okay, this is a Langevin equation. One d Langevin equation of motion for the center of mass of this part. Of course, remember that v is exact. Okay, this is important. All right, so as I said, this is a Gaussian white noise. So it's our h is zero. And it's autocorrelation base sin t sin s equals 2 kbt. This is Einstein relation, gamma, delta, t minus t prime. Okay, so this is our starting point. And first of all, what we will do for simplicity is to consider that the mass is very small, which is the same as saying that we will look at the trajectories in a time window, which is larger than the momentum relaxation time, which is in this system is very simple. It's just m over gamma. You can do this or you can say m small. And this is the same as saying we are going to do the over time limit. In the over time limit, this equation becomes, okay, we put this to zero. And we can say this is x dot, move this to the left and or equivalently just say zero equals this. Okay, zero in the over time limit equals gamma x dot minus u prime plus, right. So what is the heat associated to this trajectory? This was introduced in the paper of Sekimoto of 1998, 1997, 1998, and it has a very intuitive reasoning. So we will say, first of all, we define delta q of t, which is the heat exchange between t and t plus dt. Okay, so we look at the system at time t, we look at the system at t plus dt. And we know what is x at t. And we know this x at t plus dt. With this, we should be able to define a notion of heat along the trajectory. So the way it's done is as follows. We will say that here in this equation, there are different forces applied to the system. Some of them come from the external agent and some others come from the bath. So which forces come from the bath? Okay, first of all, this one, this comes from the bath. This is a friction force, that the molecules of the bath exert in the system. Second, we have the noise, which also comes from the bath. So this is one force that comes from the bath, x dot t, and then this is another force that comes from the bath, x dot t. These are forces that the bath are doing at time t on the system. So what is the consequence of energy? In the end, the consequence of energy is like a force like displacement here. So we have a force down from the bath. And then there is a displacement of the particle, which we call it d x t. So at time t, the trajectory has changed by an amount d x t. You see it's nothing but x at t plus d t minus x at t. This is stochastic, and this is also stochastic. So this is the definition of second model for the heat done from time t to time t plus d t, forces done by the environment to the system at time t times the displacement of the system at time t. A very important point is, what is this circle here? This circle here means Stratonovich product. Which I will discuss a bit later, but mainly the Stratonovich product means that one has to be very accurate and very careful on how you do this type of products, especially when we sum, because this will be along a trajectory. This will be between t and t plus d t. But we would like to compute the heat from time 0 to a bigger time, let me call it tau for example. So we will need to sum along this trajectory. If we sum, we will do an integral. We want to know now the heat over a time t. We will do an integral between t equals to 0 and tau. We want for example to know what is the heat up to time tau. And this is, as you see, is a stochastic integral. Stochastic integrals are extremely, they depend extremely on how you do them, which conventionally you use. But mainly by now, let me just tell you, I mean, the best thing is you see my lecture from biophysics in Q and S diploma, is that this is taken as the midpoint rule. And we, in Stratonovich calculus, one uses the same rules and is standard calculus. This is the thing you have to know by now. Later I will explain this more. Okay. So this is a nice equation. So we know what is the Q now, but it is not very useful because the main point is what is this. So you go to the lab, you don't know what is the noise, especially many times you don't even know what is U and F. So this is not easy to measure. What we can do instead is we take this and in the Langevin equation, we say that minus gamma x dot plus xi equals U prime plus F. So you can also write this Q of t in a simpler way. I'm calling Q of tau, but it doesn't matter. You can say Q of tau. We can write it as the integral between zero and tau of instead of writing this, we will write U prime x t minus F x t times dx. This can be measured because often we know the potential, we know the force, and we look at the trajectory so we can do this easy. Right. So this is easier to tackle. Now it is very important that what you see here, we can also call all this item here. We can call it all this F of x t. This is the total force applied in the system at time t. There is one part that is conservative, comes from a potential, and there is another that is non-conservative that comes from an external idea. All right, so this can be also written, given having said this, as minus the integral of F x t. It's even simpler. Okay, I'm zero. Okay, so with this, we introduce the heat, and what is very important, something new. A key insight from here is the formula. Give me a second, I'm trying to Okay, I didn't want to do this. Sorry. Give me a second. So what is very important is that this, I could also write it as, in the following way, I can also write it as a functional of a trajectory. I could call it x t. This is often, I will use this notation for an entire trajectory. This will be x times zero up to x times t. Sometimes I will use this notation just to emphasize that this is a quantity that depends on the entire trajectory. Sometimes I will call it q t, and sometimes I will also call it q sub t. This is the same thing. This is just notation. So that would just write it. What is important here is that this reveals a way in which if you look at the single trajectory, you have x times t, you will have something that fluctuates, and associated to this trajectory, we will have a single trajectory for the heat as well. So we will have for this trajectory, this will have a given amount of heat. Okay, this looks very similar to this, but it doesn't need to be like this. It is very important that this can be, depending on the forces, can take a totally different story. But what you see is that if you have a different trajectory now, you evaluate this integral and you will have a different trajectory for the heat. This is important because in classical thermodynamics we always say heat is not a state function. It does not depend only on the initial and the final state of the system, but it depends on the entire trajectory. It is not a state function, and now we have an expression on how to calculate it for an engine. Okay, I hope this is clear, more or less. The next thing I will do is to define the work. So the work here, give me a second. Stochastic work, I can define it as follows. Let me look now, stochastic. So remember, okay, one second, this is not very good. Stochastic work will say what is the work done between T and T plus T. So here there are two sources and two possibilities. First of all, remember that the external agent changes the potential in time. So this, when you have a system, the system doesn't move, but its energy is being lowered, this is considered as a change in energy, which we call work, in the same way in which, when you have two-level system, you have the particle here and this barrier is lowered. So if this barrier suddenly is, sorry, if this barrier and the particle are moved like this, this is work, okay? It is very important. Here we have changed the energy of the system externally. Whereas if what happens is the following, if the particle jumps like this, this energy that has taken the particle to jump is taking it from somewhere, and it's taken from the bath. So these types of jumps are considered as hit. So what is very important is that externally, if you change the potential, this is, and the particle does not move, this is considered as work. And we can formalize, formulate these theoretically, as follows. We can say that there is a component for the work, which is written like this. We can say, okay, sorry, I'm making a mess, partial u with respect to lambda evaluated at x t times d lambda. This is, this part, the change of the potential due to the control, the change in a control parameter in the system. I will show you later examples and you will see what does this mean, but what I'm saying, and I can say it now very, very theoretically, is that here the dependency is through a tiny dependent parameter lambda t, okay? Actually, I can show you an example, which I'm going to discuss later, which is when you have a harmonic potential and you move it at a fixed velocity, you move the center of the harmonic potential, here lambda t is just the position of the center of the, of the trap, okay? So it is just a way of saying I have a parameter that is controlled externally by the agent, okay? So this is this term. I recall that this would be, for example, changing the height of the potential without the particle moving. You see that here there's no dx, so it doesn't imply jumps, okay? And then there's a second term, which is this force. This force is external. It comes from an agent, so then it has, it must be considered, its energy changes, it must be considered as work. So we must add here also fxt, and we also use that one here, okay? So there are two terms in the work. The first, this is the driving conservative, or we could say, okay, manipulation of the potential, manipulation. And the second is the external work. So this is done by external force, external. Okay, so this is something that looks measurable. We can also integrate this over the trajectory, like in the heat. And now the question is, do we have a first law here or not? Let me go up and take the equation for the heat. So we were saying, I take this equation and I'm plugging here. This would be dqt equals, I said partial u with respect to x evaluated at xt, circle dxt, minus fxt dx. Okay, now there's an important point that I didn't say, what does this mean? So this means, if I want to be very, very clear, this means partial of u xt with respect to x evaluated at x equal xt. Okay, so you have to do the derivative of the form of the potential and evaluate it at the point at which you are observing the tangent. Okay, this is what this means. I'm just using simple notation, just not to make this too boring. Okay, yes, we can advance and discuss physics more than a month. All right, so having said this, we have this equation and what I will do now is a sum. So a sum dwt plus delta qt. Okay, very important. I'm using deltas because they are not same functions. This is standard notation in thermodynamics. So I sum these two things and you see this and this cancel each other. So we just have, just using simple notation, partial u with respect to lambda d lambda, which I can also write as partial u with respect to t. Okay, xt dt, I can also write it like this because the potential depends on time through lambda plus partial u with respect to x evaluated at xt dx. All right, and what is this? So this in Stratonovic calculus is du. Okay, so in Stratonovic calculus it's just like standard calculus. The differential of a function is partial derivative with respect to dt plus partial derivative with respect to x dx. So this means we have a first law of stochastic thermodynamics that is valid for any trajectory. Okay, so for every trajectory, we can measure the heat and the work and the sum is the energy change if we define the heat and the work in the way I'm saying. All right, so this is the way we do stochastic thermodynamics, at least the first law, and of course there are many extensions. So I'm just discussing by now one desystems, but one curiosity that I could tell you is, okay, for example, if we can do this in ito, if we can also do this in ito calculus, it just becomes a bit more difficult understanding the terms, but one can also, one extension is making the first law in ito, ito formulation. I will just show the main steps because otherwise it will be too mathematical in my opinion. So just as a reminder, what is the Stratonovich integral and the Stratonovich integral when you have something like this? Okay, I'm simplifying notation, so this is x of time s from zero to t. When you have the Stratonovich integral, what you do, this is the limit when a equals to infinity. This is like doing the trapezoidal rule in the integral. It is i equals to zero to n minus one of f, what's it called? f, the force evaluated, the function f evaluated at x ti plus x ti, ti plus one divided by two times the difference of x, which will be x at ti plus one minus x of ti. This is the way we do, this is Stratonovich, if you do ito, actually I can just write it here, this is Stratonovich, if you do ito, the way we do it is like this, we put a point, close point, and the key point here is that instead of evaluating this integrand at the midpoint, this will be time ti, this will be time ti plus one, instead of evaluating here that we do in Stratonovich, we evaluated at the initial point. So in ito, what we do is just this. Okay, this is called ito calculus in stochastic process. Okay, so we just take this, I am making a mess, so we take this, sorry, and now I don't know how to zoom out. Okay, I have a problem now, BU. Very good. So you have just this, right, so let me just go 90%, perfect. So this is ito calculus and of course there are theorems that relate ito to Stratonovich, there is a theorem that I can cite, which you can use, a theorem is the following, if you have a process x that is described by this equation plus g, gdb, okay, where g can be a function of x, so this can be multiplicative noise and this is ito, the theorem is the following, you can do as follows, fxs is Stratonovich integral dxs equals to the ito integral dxs plus an extra term that contains dt, so there will be t, right here is t0 to t and then there is g square xss divided by 2 times f prime, derivative with respect to x, xss ds, so the difference between these two integrals is just an extra term that goes with dt, okay, so if you apply this theorem here and here you can transform these terms that go with Stratonovich and brother, you can transform them in ito and add dt terms and I'm going just to show you the final result for the sake of time, which is the following, so you can show that the delta q at time t is minus f, this is what we got before, minus f dx, so we can write it as minus f ito dx and now there is an extra term and this term becomes just minus d, this is the diffusion coefficient fxt times dt, so it's the same as before but it has an extra dt term and just as a reminder of what is d, d is kdt divided by 2, so you can show this using this theorem, the same way you can show that dwt is, okay, for my show before which is partial du dt plus f Stratonovich dx and this you can show it's partial d, du dt plus f ito dx plus d f prime xt dt, so it's very similar as well, there's also only, okay, sorry, let me let me say the problem with it, okay, there is a difference of this dt as well and when we sum them, we get a very similar result, we get delta qt plus delta dwt, you will see that, you have partial du dt, you also have partial xudx, you can check yourself and then the next term that you get is plus d, second derivative of xudt and d, remember, you can show that dx square equals mainly 2d dt in an even equation, so then this means that this is partial du dt plus partial xud, ito dx plus one-half second derivative with respect to xudx square, so this is nothing but ito's lemma for du, okay, so we recover the first law also in it, you can check this later, it's not very complicated and there are also quite some papers on this, but now I want to focus on examples because the best way you can learn stochastic thermodynamics is doing examples, this you will see also in your exam, which I will discuss later, but the way I highly recommend you to learn stochastic thermodynamics is you make an example and you try to see with this heat or this work and if all this makes sense to you or not, all right, so for this. Sir, can you repeat again why Stratonovich is preferred over ito in these systems? Okay, so there are different reasons, sorry, I wanted to ask why in the definition it is Stratonovich not the ito, in the definition of ito. Yes, I understand the question, it's a very good question and there are different reasons to think about it, so one way is very natural because when you have a system that is stochastic and you want to know how much heat happened in a very short time interval, it is natural that in this short time interval the force that you should consider is the average force between time c or time t, just because there is no instantaneous response of the system, it doesn't exist, so this stochastic process in the end comes from other aging dynamics that is microscopic, so taking into account here in a small delta t, the average force makes sense in this way. There are also more technical reasons, so you can also show these from projection methods, if you follow the reference by Swansea, which appears in the book of Sekimoto as well, you can start from a description with all positional momenta and do a coarse graining of your fast variables and get a calculate the heat out of this coarse graining and the result that you get out of it is the stratonomic, so it also makes sense when you pass from micro to mesoscopic, but the best thing I can really highly recommend you because there's not only one reason, so there are many, it's to read chapter four in the book of Sekimoto where there are many arguments in favor of this form, which is the stratonomic case, but this doesn't mean, okay, it's something very important you have to take into account is you can use the calculus you want, okay, the calculus you want. The only thing is that you should, if you assume this formula, you have a clear identification of the first law. If you put something else, I don't know, I don't know, but this is very natural, so if you assume this you can do this in Ito or in any calculus because in the discretization you can put the point anywhere you want, so you could also do generalized alpha calculus where you put your discretization here, you can do it as well, but things will become more and more complicated mathematically just because you have to carry on these terms, okay. Thank you. Any other question? Professor, I have a question that in the definition of heat there is two term, one was the friction force due to the friction in bath and other was due to the noise, but why don't we have any term that is related to agent? It might be like that we heat is transferred from surroundings to the bath or to the particle of the whole system, the particle and the bath makes. So this is because we are considering a small delta T, so we consider the heat between T and T plus DT, so we say in DT, so it cannot be, so we are saying that if the agent does something, it does directly on the system. DT is so small that there is no time that the agent does something on the bath and then the bath does something on the system, so we are simplifying the analysis in this way. DT is so small that either there is energy that comes from the bath or it comes from the agent and it comes from this equation. I have one more question that is, can you repeat why we have manipulation term in the definition of work? We have two terms in the definition of work. One was, yes, okay, I think here, there is external and manipulation. Yes, why do we have a manipulation term in the definition of work? Okay, this is what I was trying to explain you before, so give me a second because I'm trying to make this bigger and smaller, sorry. Okay, this is because, all right, it can happen. Okay, let me do a simple example. As always, in stochastic thermodynamics, the best and a simple example, you have a two-level system like this. Okay, you have the particle here and now what you do is you change the potential but the particle doesn't move. So these are two energy levels. This is at energy zero and this is at energy E, okay, and now I say, I take this level and I erase it. Okay, you follow me? Yes, I'm following you, yes. So when a system, so when the particle does not jump between the levels and the energy level is increasing its energy, I consider this change of energy as work because there is a manipulation of the potential and the particle is not changing the state but it's changing the energy because someone is changing the energy landscape. Thank you. Okay, and that is what enters in here, okay, partially with respect to lambda d lambda. Okay, that is exactly this type of energy exchange, right? Thank you very much. All right, great, it's clear. So as I said, the best is to work with examples and this is only one class of models, so land-driven systems are just one class of models but one can also formulate all this and I'll try to be brief because next I want to explain something on experiments. I can also formulate this, this is another extension or okay, for discrete systems and there's most of the people in working in stochastic thermodynamics work on discrete systems. I like both but there's a lot of discrete Markov jump processes. This is very important because there is a big amount of literature on this, okay? So here we consider discrete states so there are different energy levels and a system that can have one or many particles but for simplicity I consider one particle which can jump between different states with some brains, okay? Here what we can think of is that there are energy levels for example for state one, for state two, for state three that change with time. So we can have something like this, this will be the energy versus time and we will have three energy levels. The energy level one is for example like this in time, the energy level two which can do something else. Of course it can cross each other and this is very, very general what I'm saying and the energy level three which could be like this. What we will look is a trajectory of this particle jumping within the states. The particle would be for example in state two and it would jump to another state and in state three and we jump to another state, jump, jump and so on. So we are saying this is a discrete Markov jump process in continuous time. So we have a trajectory that is jumping within states so when we are in an energy level without jumping we are doing work so this is the change here, this is work. When we jump within states we are using dissipating or absorbing heat, okay? And this is the way I mean in very simple terms the way one does stochastic thermodynamics with these systems. So in a bit mathematical way I will do a more formal way if I neglect what I can do is we define a trajectory. We will have x0, x1 up to xf final time and what I'm going to say is that we will have xk will be the state in tk plus one and these are the times at which the jumps happen. t1 will be the time for the first jump, t2 the time of the second jump and so these are the jumps and we are saying that at time tk there is a jump from xk to xk plus one that is different to xk, okay? So within this picture one can also define the work. So typically what one does is mainly w up to time tau equals the stochastic work and k equals to 0 to n, there are n jumps I'm saying and one sums between tk, tk plus one of the change of the energy in xk, okay? I'm saying this is for example e1t, this is e2t, this is e3t. Now I'm saying that the system is in state xk so this is the energy in xk at time t is changing in time from external agent and there is dt and then one can also add for example an external work. So this is I mean not so common, typically people when they work in a microprocessor they don't consider external forces but you can also add it, this will be the energy from state minus k minus one to xk due to an external force, okay? This is like the fdx from an external agent and this is the manipulation work and the same thing will happen, okay? We can also do this for the heat, so the heat up to time tau will be mainly when we have and so mainly will be the energy jump, the energy change in the jumps. We have k equals one to n of e xk at time tk minus e at time at xk minus one at time tk. Remember it's very important here that the heat is for jumps and we consider the jumps are infinitely fast. At time tk there is a silent jump that's why we are using here tk and tk, okay? And then one can also add here something like an external energy exchange which will be just minus this, okay? This is analogous to what I showed before. This is the energy input from an external agent in a jump. We say external agent can only act on the system when there are jumps, as we were doing before there was fdx and then here the x is jump between states. All right, and here you can also show that this obeys a first law. So this, if you sum these two things, you can convince yourself and w plus w tau plus q of tau equals e at x final at time tau minus e at x, you know, at times z. So the same story as for continuances. All right, so I will finish my lecture. I think I only have one hour, so it's a pity. Just showing you an example that has connections to experiments and a good review on experiments is the one I'm showing here. This is a good example in which people have done this in the lab with an optical tweezers. This is a highly focused laser that can trap microscopic particles and one can control where is this laser at time t. So you can move the laser, for example, the center of this trap at a fixed velocity, which will be like moving a harmonic potential at a fixed velocity. Here we are moving the center of the harmonic potential at a fixed velocity. So this is the potential. Here there is the control parameter, which we say is linear with time, something like this. And in a single trajectory, the particle will follow the center of the trap like I'm showing here. And associated to this trajectory will have the work. How do we do the work? It's very simple. There is no external force, only a potential. This will be partially with respect to lambda d lambda. Lambda is here. So partially with respect to lambda is minus kappa x minus lambda, but lambda is v v s and d lambda d lambda here is v d s v d t. Actually, I put it here. So this is the integral. This is what you get for the heat. Sorry for the work. So what you say is you get this integral and kappa is positive because it's the strength of the potential. v is positive and v s is positive. So this formula is very enlightening because it tells you when x is above v s, so this is lambda v s. So when the particle is here, is on the right of the center, this term is negative. It means you are extracting work from the agent. So when x is on top, so it's advancing the motion of the trap, the work is negative. Whereas when x is below the position of the trap, so it's dragging behind. So the trap is here, but the particle is behind. The work is positive. So we are doing work on dragging the particle with us. That's why this when it's below, we have w greater than c. What is very important, these fluctuations can rise to very, very different values of the work. So if you do a different trajectory, so for example, now you have a different trajectory for x, which could be like this, this leads to a different value of the work. So at the end of the day, you can also look at a distribution of work at time t. This will be what is the probability to find a value of work of work w at time t. Sorry, but this is too thick. Let me just... But I think you just realize this. What is the probability to get an amount of work w at time t? And this you can look at different times, at the long times, short times, anywhere. The nice thing is this problem is very simple. You can solve it even analytically. You can calculate this distribution analytically. This has been shown in this PRD paper from 2007. And here they show the bars are the values you obtained from the experiment. So you produce an experiment, you analyze the trajectories, you measure the work, and this gives a distribution, is these bars, and the line is this formula. Of course, at time t, I'm not saying what it is, but it's explaining the paper. And it just tells you that the distribution is Gaussian. So you can have a non-equilibrium process with Gaussian distribution. In general, non-equilibrium processes are non-Gaussian for the distribution of work, but this is a very simple process. It's a linear. It's just a spring drawing a particle. So because it's linear, the distribution of work, it's Gaussian. The same happens with the heat. This is the bars are experimented and the line is theory. So it's very, very accurate. We can measure heat at the units of KVT. This is very, very small amount of heat. It is really, really good, this experimental setup. And if you do this in equilibrium, you just don't move the particle, you still have heat. And this is an important insight that in equilibrium, the work has delta distribution. So in equilibrium, remember, this should be, the work should be just the free energy change. But the free energy change between having the particle here or having the particle here, this is V equals to zero. Free energy change is zero here because the distribution doesn't change. So then the distribution of the work becomes just delta W. This may not be very trivial for you, but in the next lecture, we'll go on this because I will discuss the second law. But in equilibrium, the distribution of work is like this. It's just delta centered at zero. But the distribution of heat, they calculate in this paper, you can read, is non-gausson. So it has this shape, which has, this is the vessel function. It has zero mean, but it's non-gausson. So this is a good take home, take home message. In equilibrium, the heat has a broad distribution. It has an amplitude of the order of KVT. This is what this is saying. This is of the order of KVT for the heat. But the work has zero variance in equilibrium. It's just nothing, we're not doing work in equilibrium. But there is heat factorization in equilibrium, okay. And I just finished because I'm just without time, just to tell you that this is a paradigmatic model in experiments for a non-German equation and thermodynamics. But there are many paradigmatic models for discrete Markov process. And one is seeing an electron box, which you can see in this ruby. And actually, I took this from a PhD student, he is a PhD student, which is Helpy Singh from India. And here they look at, it's a tunnel junction where you can see an electron. It's a very low temperature. You can see electrons jumping in and out. So effectively, they have like a two-state model and they can change the energy of this this is called an island with an electric voltage. So you can do this type of dynamics in which you have one energy level growing and the other decreasing. And you can observe these trajectories and compute the work and the heat in the same way I was explaining briefly before. So just to let you know that this field is very nice because we can measure this in the lab and then compare with theoretical calculations. It's not just in the black world, which is a very nice insight. So with this, I finished by today. And maybe it was a bit fast, but I hope you got a bit of an idea. Of course, it's on YouTube so you can check and ask me questions later. But maybe I open this for a question if there is any question. Hi, sir. I had one question, like maybe slightly general in a sense. Now, in this example, which you mentioned, this S-Synx work, just switching the gate itself will cost energy, right? Do they calculate such, I mean, do they consider such energy costs also? Yes, of course. Well, they do not consider, sorry. In the end, they can see what is the energy of the island. But of course, plugging in your, let's see, maybe it's easier to discuss in terms of the optical tweezers. So here, there is an energy, an effective potential that the particle is feeling, which you can measure even, you can do histograms and fit to a Gaussian distribution and get an effective potential. But here we don't take into account the energy that you use plugging in the laser. This is out of this description, because this also costs work. It costs electricity, and it costs heat as well. This is taken out of this description. And this is very important. So we are doing thermodynamics in a small system, and also considering the direct interaction of the system, which for us is a particle or an electron, and a potential that we can control. But of course, there are other sources of work and heat that are not taken into account. With that, we cannot use stochastic thermodynamics. The general question was like doing this, I mean, to do this minute amount of work, we are actually spending way more energy than what we are extracting. I mean, it just seems slightly inefficient. Yeah, sure, sure. But the main idea of this field is to inspire what will happen in the future in which we will be able, or people will be able to manipulate things at low energy expenditure. Right now, these are only platforms to test theoretical subs. But in the future, one can also hope that we will do this without so much laser power. This would be possible. But by now, these are big experiments in which you have heat and so on. And you want to understand the heat flow at very, very small scales, which you can understand stochastic thermodynamics, not of the entire device. That's microscopic and classical thermodynamics. Yes, thanks. Okay, so thank you very much, Edgar.