1. Introduction
The classical standard nonmagnetic Otto cycle is widely used in present-day technology, as it is the thermodynamic cycle most commonly found in automobiles engines. This cycle consists of two classical isochoric and two classical adiabatic processes. In the isochoric processes, the system interacts with either of two thermal reservoirs at temperatures 
 and 
, with 
, and each one of these processes is followed by a classical adiabatic process which enables work extraction. In this cycle, the results of the efficiency depend on the nature of the working substance (through its energy spectrum) and the contributions of work and heat are separate in its stages, which facilitates theoretical modelling. These characteristics favor its extension to its quantum version, which has been studied extensively in recent years [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19].
Otto quantum cycle similarly consists of four processes: two quantum isochoric processes and two quantum adiabatic processes. The quantum isochoric process is very similar to the classical one in the sense that both admit changes in the temperature of the system trough heat exchange with zero work performed [
20]. The quantum scenario requires that the energy-level populations of the working substance remain constant for each of the quantum states as the volume varies, ensuring that entropy remains unchanged. This implies that the quantum adiabatic processes should be realized in a time frame that avoids transitions between levels that can be generated while it is carried out. Deffner and Campbell define this difference [
21]: “
Quantum adiabatic processes form only a subset of classical adiabatic processes”. Therefore, the development of a classical and quantum Otto cycle differs not only in the time of their processes but also in the physical concepts involved. Moreover, it is essential to mention that the word “classical” should not be directly interpreted as if the working substance is “classical.” The notion of “classical” refers here to the four stages developed in the classical Otto cycle that are in thermodynamic equilibrium. On the other hand, the working substance of the quantum cycle reaches thermal equilibrium only in two stages of the cycle (the isomagnetic paths). Given the differences of the classical and quantum processes of the adiabatic Otto’s stage, two questions naturally arise: How are work performance and efficiency when these two approaches, classical and quantum, are applied to the same working substance? What conditions should fulfill the energy spectrum of the working substance in both approaches such that this difference is as small as possible?
In this work, we give a possible solution to these questions using as an example a magnetic Otto cycle under the classical and quantum thermodynamics formulations. In the magnetic Otto cycle, the two isochoric processes are replaced by two isomagnetic processes. Our first discussion entails a comparison between both thermodynamical approaches to explore why the classical work is greater than its quantum counterpart. We argue that the answer can be regarded as a consequence of a free energy principle for systems in thermal equilibrium. We analyze a particular case of a two-level system working under a magnetic Otto cycle, where we show that the total work extracted is equal under both formulations regardless of the magnetic dependence of the energy levels. Finally, we explore the consequences of including more energy levels and how this affects the behavior of thermal quantities and work as compared to the simple case of a two-level system.
  2. Quantum and Classical Magnetic Otto Cycle: Classical and Quantum Work
To describe the Otto cycle classical and quantum formulation, we show a schematic representation of an entropy (
S)–external field diagram in 
Figure 1. In our notation, 
T will refer to temperature and 
B to external magnetic field (both parameters in arbitrary units). The adiabatic and isomagnetic processes are represented in 
Figure 1 by horizontal and vertical lines, respectively.
The cycle is thermodynamically defined by the two heat reservoirs (hot and cold) and two extreme values of the external field, 
 and 
. Usually, the low temperature stage 
 corresponds to a low external field value 
 and the high temperature stage 
 corresponds to the high external field value (
). This is not true for all working substances [
22,
23] because we need to observe the behaviour of the entropy as a function of different temperature and external field parameters in order to know which specific values correspond to each point in the cycle. As an example, the entropy behavior in quantum dots [
22,
23] is such that the points where the temperature reservoirs are located are crossed with the fields values. Nevertheless, the conclusions obtained in this work can be applied to this kind of system regardless of the reservoirs are located in the cycle.
The cycle presented in 
Figure 1 operates following the sequence 
. The output power is defined as the work done per cycle divided by 
, with 
 being the duration of each cycle iteration. It is important to point out that, under this formulation, thermal equilibrium is reached at the thermal reservoirs for both classical and quantum Otto cycles. For the first isomagnetic stroke 
 (see 
Figure 1) with a hot reservoir at temperature 
 at point 
, the working substance reaches the temperature of the hot reservoir. For the second isomagnetic process, from 
 to 
 (see 
Figure 1), the system is put into contact with a cold reservoir at temperature 
 up to the working substance reaching the same temperature as the cold reservoir. Contrary are the cases of adiabats (classical and quantum case), where the systems are disconnected from the reservoirs and the external field is varied from 
 to 
 (process 
) and vice-versa (process 
). We use the superscript 
q for all quantum thermodynamics variables, while we use 
 for the classical ones.
In the quantum scenario, the heat absorbed 
 and released 
 are given by the following [
12,
20,
22,
23]:
      where 
 is the energy spectrum of the working substance evaluated in the low (high) temperature value in the cycle, 
 corresponds to the probabilities of occupation along the cycle, and the index 
s represents the different quantum numbers that characterise a quantum state of the working substance. To satisfy the adiabatic nature of the process under the quantum formulation, one way is that the probabilities of occupation must satisfy the following conservation condition:
Using these relations, we can define the total work per cycle:
Here, we can see one of the main difference between the classical and quantum approaches. While in classical thermodynamics we require the system to be in thermal equilibrium at every moment, here, we can see that, even if the points B and D do not fulfill this condition, the entropy conservation along the adiabatic paths can be made just with only two equilibrium points (A and C). Accordingly, the system reaches thermal equilibrium with the thermal reservoirs in the isochoric stages. This naturally means that the density matrix must be described as a thermal equilibrium state (Gibbs state), which is diagonal in the energy basis. Therefore, the entropy S of the system is simply , which is reduced to the thermodynamic entropy when the probabilities are calculated in equilibrium, i.e., where the temperature is defined at each point of the cycle.
On the other hand, the classical case does not require a strong conservation restriction of the population in Equation (
3), giving the possibility to have variations in thermal occupations along the adiabatic pathways. Furthermore, as the systems follow the classical thermodynamic formulation, they are kept in equilibrium in all positions of the 
 diagram, and the temperature can be defined at points 
B and 
D. A possible way to do this is to solve the total entropy differential equation 
 to obtain information about the relationship between 
T and 
B along the isentropic processes. The first-order differential Equation is given by the following:
Another possibility is simply to impose the classical adiabatic condition between the points A–B and C–D in the form of
      
Because in the classical case the working substance is always in thermal equilibrium, the internal energy 
 derived from the canonical partition function 
 is always well defined, i.e., 
. Accordingly, the incoming heat and released heat can be rewritten for the classical case as
      
According to these two expressions, the total work extracted in the classical formulation is given by
      
      in which we have separated the points where the working substance comes into contact with thermal reservoirs (points A and C) and the other points assumed in thermal equilibrium for the classical formulation (points B and D).
The efficiency of classical and quantum cases is defined accordingly in the following way:
At this point, we have obtained the quantum and classical expressions for the total work, as in Equations (
4) and (
9), respectively. To compare these two scenarios, we rewrite the quantum work in Equation (
4) as follows:
      where 
 and 
 are two expected values of energy in nonthermal equilibrium. This is where we can get a first relevant discussion to compare the classical and quantum approaches in Equations (
9) and (
11), respectively. According to thermodynamics, a system in equilibrium has the minimum value of energy for a given entropy. If this were not so, we can think that we could withdraw energy from the system (for example, in the form of work), keeping the value of the entropy constant, and then, we could return this energy to the system in the form of heat [
24]. This would leave the system with its initial state of energy but would cause the entropy to increase, violating the condition that, for a state in equilibrium, the value of the entropy corresponds to a maximum [
24]. Therefore, inspecting Equations (
9) and (
11), we can argue that the quantity 
 is always greater than 
 because B and D points in the quantum Otto cycle are in nonthermal equilibrium. As such, we can conclude that the classical work will always by greater than or equal to the quantum work because the first two terms in Equations (
9) and (
11) are the same. Consequently, we can write the condition for total work extraction as
      
This is a clear example of the robustness of thermodynamics. The result presented in Equation (
12) is nothing more than the condition that a reversible total work is always greater than or equal to the irreversible one:
In the next subsections, we show the analysis for two cases, a two-level and a three-level system. We begin with a toy two-level model in order to present a simple situation where classical and quantum approaches give analytical expressions for the thermodynamic quantities previously described. Even though this scenario its quite simple, an important conclusion is drawn regarding the condition of work in Equation (
12). By using this result, we study a three-level quantum dot-like system and explore first what parameter conditions must be considered to achieve equal works in Equation (
12) and, second, how to maximize the work difference between the classical and quantum cases.
  3. The Case of a Two-Level System
In this section, we address the case of a two-level system to guide the discussion towards a classical and quantum comparison of work and efficiency in the Otto magnetic cycle. For this purpose, let us consider a working substance described by two energy levels, 
 and 
, which are continuous and differentiable as a function of magnetic field. As usual, the thermal populations are given by the following:
      where 
 and 
 (with 
). The thermal populations satisfies the normalization condition 
. In this case of just two energy levels, we can write the von Neumann’s entropy as
      
If we associate this entropy with the one derived from thermal equilibrium, it is possible to obtain the differential equation that relates changes between temperatures and magnetic field along an isentropic path. Taking the total difference of Equation (
15), we get
      
      for which the solution is given by
      
      where 
 it is an integration constant. Equation (
17) is a general solution for the temperature regardless of the behavior of the energy levels upon the external field 
B. Replacing this solution as the thermal populations in Equation (
14), we found 
 and 
 to be only 
 dependent rather than 
B or 
T in the following form:
Figure 2 shows the probabilities of Equation (
18) and the entropy of Equation (
15), where for 
 (high-temperature limit), the entropy (blue line) reaches their maximum value of ln(2) and, for the case of 
 (low-temperature limit), 
 goes to one and 
 goes to zero as expected. An important consequent of this 
 dependence can be see analyzing the adiabatic paths in the Otto cycle of 
Figure 1. Due to the fact that 
 and 
 do not vary with 
T and 
B, their values are constant along the adiabatic processes; therefore, both classical and quantum works become the same in Equation (
12) because the quantum restriction on the population its automatically fulfilled. This result does not depend on how 
 and 
 behave upon 
B. With this, we can conclude that, for every two-level system in which the energies are continuous with 
B, there will be no difference on the mathematical analysis between the classical and quantum approaches except for conceptual interpretation about the physical processes.
 In this same line of discussion, we found another case for 
=
 (Equation (
12)) corresponding to the instance when the working substance in the classical adiabatic strokes satisfies the differential equation in the following form:
      for which the trivial solution corresponds to a linear relation between the magnetic field and temperature, that is 
, where 
 is an integration constant. Take as example a system for which the energy levels are mathematically described by 
, where 
j can take integer values from zero onwards; the thermal populations and the partition function for this system can be defined as follows:
Using the same reasoning as before, it can be deduced that this kind of system will have a linear dependence as in Equation (
19) between 
T and 
B during the adiabatic phase (i.e., 
). Replacing this solution in Equation (
20), we recover the same constant population behavior as before, giving as a consequence of the equality between the quantum and classical work Equation (
12).
  4. The Case of a Three-Level System
In order to show a case in which the quantum and classical work can coincide, we will take as an example a three-level system for which the spectrum in 
Figure 3a simulates (roughly) a graphene quantum dot under an external magnetic field [
23]. The chosen levels, all in arbitrary units, are given by 
, 
 and 
. This spectrum of energy exhibits a crossing between the levels 
 and 
 for 
 and is doubly degenerated for zero external magnetic field.
The thermodynamics quantities are calculated from the partition function 
, and the entropy 
S as a function of external magnetic field is presented in 
Figure 3b. At high temperature and low-external magnetic field region, the entropy tends to 
 because, at high temperature, all three energy levels have the same occupation and therefore the same probability. From the same figure, we note that some combinations of parameters at low temperature produce first a decrease of entropy for external magnetic field 
 and then an increase converging to 
 for high magnetic fields. This is due to the form of the 
 level in 
Figure 3a, since for high magnetic fields, it begins to be easier to populate it than the 
 level, which corresponds to a state that grows linear with the value of the external field. Consequently, in a region of high magnetic field and low temperature, we have only two populated states, obtaining the value of 
 for the entropy again.
To discuss the performance of the classic and quantum Otto cycles for the three-level system, we have selected two zones where we will apply the cycles displayed in the 
Figure 3b and in the diagram of temperature versus external field in 
Figure 4, obtained by using the classical conditions of an isentropic process described by the Equation (
6). The green geometric shape (zone 1) corresponds to a zone where the magnetic field and temperature are related to each other in a linear way, and the purple shape (zone 2) is a region where the temperature and the external field have a nonlinear relation between them. The work and efficiency for zone 1 is presented in 
Figure 5 for 
, 
 with an starting value of the external field given by 
 and the high magnetic field (
) is moving up to the value of 4.5. As we can see in the figure, both work and efficiency are the same regardless of the classical or quantum natures of the cycle operation. How can this be explained? A possible answer to this question is found in the 
T-
B diagram in 
Figure 4. If we recall the discussion from the previous two-level system section, it was found that there are two possible situations where classical and quantum works are the same. The first one occurs when the system has only two energy levels with any magnetic field dependence. Here, a constant population behavior appears that implies a fulfillment of the quantum’s restrictions, giving as a consequence the equality of work and efficiency with their classical counterpart. The second case was a particular situation in which all energy levels have a linear dependence with the external field. The result of this is a linear relationship between 
T and 
B appearing for the adiabatic strokes, and therefore, we recover the same population behavior of a two-level system. Therefore, both classical and quantum work are the same even if the system has a multilevel spectrum (where the 
 relation is linear).
In the present case, due to the set of chosen parameters, a linear dependence 
 is graphically found in 
Figure 4. What this tell us is that, even if the system does not have two levels or a spectrum with a linear magnetic field dependence, if there exists a zone in which a linear-like relationship can be found between 
T and 
B, the system will present a maximum quantum work. In other words, the quantum work will be equal to the classical one while the thermal machine operates inside that parameter set.
If we analyse the work and efficiency for zone 2 in 
Figure 6, where the parameters are given by 
 and 
 and the external field is in the range of 0.75 up to 1.50, we observe a drastic decrease in the quantum work and efficiency for points near the initial field value 
. Two things happen in that area which are fundamental to obtain these results. The first one is the fact that the function connecting the A–B and C–D paths in the 
T–
B diagram (adiabatic) in 
Figure 4 clearly does not have a linear relation 
. This implies that at least one of the two situations where the classical and quantum works are the same is not fulfilled, as described for the two-level system. A second observation can be made if we look at 
Figure 3a for the range of magnetic field involved in the process (zone 2). In this region, we see that the three levels play an important role in determining the thermal populations, and therefore, it cannot behave as a two-level system as the cycle operating the green zone 1 of the 
T–
B diagram in 
Figure 4. These results confirm that the inclusion of more energy levels causes a lower work and efficiency in the quantum Otto Cycle when the working zone on the 
T–
B diagram localizes in regions where no linear relationship between 
T and 
B can be found as well as when more than two levels play a significant role in the thermal populations.
We want to emphasize that the discussion of the two cycles presented in this work correspond to idealized cycles in which the output power of the machine is zero. In order to realize a more feasible Otto cycle for practical implementation protocol, this work can be extended in the shortcuts to the adiabaticity technique [
25,
26,
27]. Additionally, the use of quantum resources (such as quantum coherence, for example) can lead to an enhancement in the performance of the quantum version of the proposed cycle.