1. Introduction
Quantum thermodynamics, originally considered an extension of classical thermodynamics, has sharpened our understanding of the fundamental aspects of thermodynamics [
1,
2,
3,
4,
5,
6]. Along with the theoretical progress, experimental tests and validations of the principles are relevant in the realm. Simulation of the quantum thermodynamic phenomena [
7,
8,
9,
10], as one of the experimental efforts, has been intensively explored with specific systems, e.g., a single trapped particle for testing the Jarzynski equation [
11,
12], the trapped interacting Fermi gas for quantum work extraction [
13,
14], and the superconducting qubits for the shortcuts to adiabaticity [
15,
16]. These specific systems often have limited functions to test generic quantum thermodynamic properties. In quantum thermodynamics, the concerned system, as an open quantum system, generally evolves with the coupling to the environment. Simulations of open quantum systems have been proposed theoretically in terms of quantum channels [
17,
18,
19,
20,
21], and realized experimentally on various systems, e.g., trapped ions [
22], photons [
23], nuclear spins [
24], superconducting qubits [
25], and IBM quantum computer recently [
26,
27]. The previous works mainly focus on simulating fixed open quantum systems, where the parameters of the systems are fixed with the evolution governed by a time-independent master equation. To devise a quantum heat engine, it is necessary to realize tuned open quantum systems to formulate finite-time isothermal processes.
Simulation with generic quantum computing systems shall offer a universal system to demonstrate essential quantum thermodynamic phenomena. Yet, simulation of a tuned open quantum system remains a challenge mainly due to the inability to physically tune the control parameters and the difficulty to measure the work extraction. In quantum thermodynamics, the work extraction, as a fundamental quantity [
28,
29,
30], requires the tuning of the control parameters. Such requirement is achievable in the specifically designed system, e.g., the laser-induced force on the trapped ion [
11], the trapped frequency of the Fermi gas [
13,
14], and the external field in the superconducting system [
15,
16]. However, on a universal quantum computer, e.g., IBM quantum computer (ibmqx2), the user is forbidden to tune the actual physical parameters since the parameters have been optimized to reduce errors. An additional problem is the measurement of the work extraction. In classical thermodynamics, it is obtained by recording the control parameters and measuring the conjugate quantities, but such measurement is not suitable in the quantum region [
31].
In this paper, an experimental proposal is given to overcome the difficulty in simulating a finite-time isothermal process. We introduce a virtual way to tune the control parameters, i.e., without physically tuning the parameters. The dynamics are realized by quantum gates encoded the parameter change. As a demonstration, we realize the simulation of a two-level system on ibmqx2 [
32] for the isothermal processes, which are fundamental to devise quantum heat engines, yet complicated due to the coexistence of the changing Hamiltonian and the interaction with the thermal bath.
To implement the simulation on a universal quantum computer, we adopt a discrete-step method to approach the quantum isothermal process [
33,
34,
35,
36,
37,
38]: the isothermal process is divided into series of elementary processes, each consisting of an adiabatic process and an isochoric process. In the adiabatic process, the parameter tuning is performed virtually with the unitary evolution implemented by quantum gates. In the isochoric process, the dissipative evolution is carried out with quantum channel simulation [
23,
25,
39,
40,
41,
42] with ancillary qubits, which play the role of the environments [
18,
21,
26]. With this approach, we achieve the simulation of the isothermal process on the generic quantum computing system without physically tuning the control parameters. The piecewise control scheme distinguishes work and heat, which are separately generated and measured as the internal energy change in the two processes. In the current simulation, the energy spacing of the two-level system is tuned with the unchanged ground and excited states. The tuning of the energy spacing is virtually performed via modulating the thermal transition rate in the isochoric process.
In our proposal, the simulation with a universal quantum computer brings clear advantages. First, the arbitrary change of the control parameters is archived by the virtual tuning via the simulation of corresponding dynamics, avoiding the difficulty in tuning the actual physical system. In turn, the parameters can be controlled to follow an arbitrary designed function. Second, we can realize the immediate change of environmental parameters, such as the temperature. The effect of the bath is reflected through the state of the auxiliary qubits, which can be controlled flexibly with quantum gates.
2. Discrete-Step Method to Quantum Isothermal Process
In quantum thermodynamics, the concerned system generally evolves under the changing Hamiltonian while in contact with a thermal bath. The interplay between quantum work and heat challenges to characterize the quantum thermodynamic cycle on the microscopic level, where the classical method to measure the work via force and distance, is not applicable [
31]. For the timescale of the tuning far smaller than the thermal bath response time, the evolution is thermodynamic adiabatic, where the heat exchange with the thermal bath can be neglected, and the internal energy changes due to the performed work through the changing control field. The opposite extreme case with the unchanged control parameters is known as the isochoric process, where the internal energy changes are induced by the heat exchange with the thermal bath. Therefore, work and heat are separated clearly in the adiabatic and isochoric processes, and are obtained directly by measuring the internal energy change.
To simulate the general processes on a universal quantum computer, a piecewise control scheme is necessary to express the continuous non-unitary evolution in terms of quantum channels, where the evolution in each period is constructed by the simulations of open quantum systems [
21]. To separate work and heat, we adopt the discrete-step method by dividing the whole process into series of piecewise adiabatic and isochoric processes [
33,
34,
35,
36,
37,
38]. In
Figure 1, the discrete-step method is illustrated with the minimal quantum model, a two-level system with the energy spacing
between the ground state
and the excited state
. Such a two-level system can be physically realized with a qubit, as an elementary unit of the quantum computer. For the clarity of the later discussion, we use the term “two-level system” to denote the simulated system and “qubit” as the simulation system hereafter without specific mention.
The state of the two-level system is represented by the density matrix of the system qubit, and the thermal bath is simulated by ancillary qubits. Initially, the system qubit is prepared to the thermal state at the temperature T. The evolution of the tuned open quantum system is implemented with single-qubit and two-qubit quantum gates. The internal energy of the two-level system is , where the energy of the ground state is assumed as zero, and the population in the ground (excited) state is ().
For the system to be simulated, we use the discrete-step method to approach the finite-time isothermal process for the two-level system. The discrete isothermal process contains N steps of elementary processes with the total operation time , where () denotes the operation time in the isochoric (adiabatic) process. Each elementary process is composed of an adiabatic and an isochoric processes. We set the equal operation time for every elementary process , with the duration () for each isochoric (adiabatic) process.
In the adiabatic process, the system is isolated from the thermal bath and evolves under the time-dependent Hamiltonian. Such a process is described by a unitary evolution with the time
. The performed work is determined by the change of the internal energy at the initial and the final time. For a generic adiabatic process, the unitary evolution of the system can be simulated with the single-qubit gate acted on the system qubit. In this paper, we consider the adiabatic process as the quench with zero time
, occurred at time
As the result of the quench, the energy spacing is shifted from
to
, while the density matrix
remains unchanged after the quench. At the initial time
, the energy is quenched from
to
after the initial preparation. The performed work for the quench at time
reads
To obtain the performed work, we only need to measure the excited state population of the system qubit at the beginning of each isochoric process.
In the isochoric process of the
j-th elementary process (
), the two-level system is brought into contact with the thermal bath at the temperature
T. The evolution is given by the master equation
with
Here, is the Hamiltonian of the system during the period , is the average photon number with the inverse temperature , and () is the transition operator. In this process, the change of the internal energy is induced by the heat exchange with the thermal bath, and no work is performed. During the whole discrete isothermal process, the work is only performed at the time .
We explicitly give the equations for each element of the density matrix according to Equation (
2). The populations in the ground and excited states satisfy
and
. The off-diagonal elements
and
satisfy
and
. With the unchanged energy eigenstates, the diagonal and the off-diagonal elements of the density matrix evolve separately during the whole isothermal process.
3. Simulation with Quantum Circuits
In this section, we first show the simulation of one elementary process in the circuit. The simulation is formulated for the adiabatic and the isochoric processes as follows.
Adiabatic process. In the superconducting quantum computer, e.g., IBM Q system, the tuning of the physical energy levels of qubits is unavailable for the users. The physical parameters are fixed at the optimal values to possibly reduce noises and errors induced by decoherence and imperfect control.
We consider the Hamiltonian of the simulated two-level system as
with the piecewise tuned energy spacing
We will show that the tuning of the energy spacing only affects the thermal transition rate. In the simulation, the thermal transition is simulated through the quantum channel simulation, and can be flexibly modulated by single-qubit gates acted on the ancillary qubits. Therefore, we do not have to physically tune any parameters of the quantum computer, and just algorithmically modulate the simulated thermal transition instead. We propose a virtual tuning of the energy spacing with details explained as follows.
In the virtual process, we need to simulate the unitary evolution of the adiabatic process with single-qubit gates acted on the system qubit. For the adiabatic process, i.e., the quench, the state of the system does not evolve in a short period. We just pretend that the energy of the simulated system is tuned from to in the j-th adiabatic process. This virtual tuning of the energy is reflected by the modulation of the transition rate in the simulation of the isochoric process.
Isochoric process. The dynamical evolution of the isochoric process can be simulated with the generalized amplitude damping channel (GADC)
where
is divided into two sub-channels, the amplitude damping channel
and the amplitude pumping channel
The corresponding Kraus operators are
,
,
and
. The coefficient
(
) shows the probability of excitation (de-excitation) of the two-level system induced by the thermal bath. The evolution time of the
j-th elementary process is encoded in the control parameter
via
With infinite operation time, the ideal discrete isothermal process is realized by setting , where the system reaches thermal equilibrium at the end of each isochoric process.
For the initial thermal state
, the off-diagonal element remains zero throughout the whole process in the current control scheme. In this situation, the evolution by Equation (
7) is simplified as
For an initial state with non-zero off-diagonal elements, the off-diagonal elements does not affect the evolution of the populations. This comes from the fact that the diagonal and the off-diagonal elements satisfy separate differential equations by Equations (
4) and (
5).
Figure 2 shows the quantum circuit to simulate the isochoric process. The two sub-channels
and
are realized with an ancillary qubit initially prepared in the ground state. The circuits for these two sub-channels are illustrated in
Figure 2a. The meaning of each gate is explained at the bottom of
Figure 2. Such simulation circuits are extensively studied in the field of quantum computing and quantum information that we will not explain the setup in detail [
40].
To achieve the random selection of the two sub-channels, we design two simulation methods, the hybrid simulation, and the fully quantum simulation, as shown in
Figure 2b,c, respectively. The former uses one ancillary qubit for each elementary process under the assist of a classical random number generator (CRNG). The latter utilizes fully quantum circuits with two ancillary qubits for each elementary process. In
Table 1, we summarize the simulation procedure for the adiabatic and the isochoric processes.
3.1. Hybrid Simulation of Isochoric Process with Classical Random Number
Generator (CRNG)
With the limited number of qubits, it is desirable to reduce the unnecessary usage of qubits. For the quantum channel of the system qubit, one ancillary qubit is inevitably needed to simulate the non-unitary evolution of the open quantum system [
42]. In this method, one qubit represents the two-level system, and each elementary process adds one more ancillary qubit. Therefore, it requires
qubits to simulate the
N-step isothermal process.
In the hybrid simulation, the CRNG is used to select the sub-channel
or
for the isochoric process in the
j-th elementary process, as shown in
Figure 2b.
l denotes the
l-th simulation of the discrete isothermal process. For each isochoric process, the CRNG generates a random number
with uniform distribution. The sub-channel
is selected as
(
) when the random number satisfies
(
).
3.2. Fully Quantum Simulation of Isochoric Process
For the system with adequate available qubits, the selection of the two sub-channels can be realized on fully quantum circuit by adding two ancillary qubits for each elementary process, as shown in
Figure 2c. In each step, one more ancillary qubit is used, prepared to the super-position state
through the
gate with
. This method requires
qubits to simulate the
N-step isothermal process.
Currently, we have solved the problem of separating work and heat. The unitary evolution of the adiabatic process requires isolation from the environment, while the isochoric process needs contact with the environment. Switching on and off the interaction with the thermal bath is complicated and requires enormous efforts, especially in the quantum region for a microscopic system. Fortunately, the design of the quantum computer with a long coherent time ensures the isolation from the environment. The simulation of the quantum channel is designed to simulate the effect of the environment. The advantage of quantum channel simulation over the real coupling to the environment is the flexibility to tune the control parameters, e.g., the temperature, the coupling strength, et al.
The whole evolution of the isothermal process is realized by merging the circuit of each elementary process. In
Figure 3, the circuit for the two-step isothermal process is shown as an example.
Figure 3a shows the excited state population
with the tuned energy spacing
in a two-step isothermal process. The energy spacing is increased from
to
in two steps, while the excited state population decreases from
to
.
Figure 3b shows the quantum circuit for the hybrid simulation on ibmqx2. With the five qubits, it is feasible to simulate a four-step isothermal process on ibmqx2. Due to the limited qubit number, the initial state is prepared as a pure state to mimic the thermal state in the current simulation. The populations in the energy eigenstates of the pure state is equal to those of the thermal state, while the non-zero off-diagonal elements lead to the coherence as the superposition of the excited and the ground states. As stated in the description of the isochoric process, such coherence does not affect the evolution of the populations. With another ancillary qubit, a thermal state of the two-level system can be initially prepared through the entanglement between the system and the ancillary qubit.
In the hybrid simulation, the sub-channel
of each elementary process is selected as either the amplitude damping
or the pumping one
. For an
N-step isothermal process, there are
selections of the sub-channels
. The circuit of each selection with
and 4 is implemented on ibmqx2. For each selection, the excited state population
at each step is obtained by repeated implementations of the corresponding circuit. The work in each selection, namely the microscopic work, is given by
The performed work of the whole process is the average of the microscopic work
Figure 3c shows the fully quantum simulation realized on ibmqx2. With the five qubits, it is possible to realize at most two-step isothermal process, since the qubit resetting process is not permitted on ibmqx2. In the fully quantum simulation, the same circuit is implemented repetitively, and the excited state population
is obtained by measuring the state of the system qubit. The performed work for the simulated system is given by
Since ibmqx2 does not allow the user to reset the state of the qubit, each elementary process requires new ancillary qubit(s). With the ability to reset the ancillary qubit, two (three) qubits are enough to complete the simulation with the hybrid simulation (fully quantum simulation) by resetting the ancillary qubit(s) at the end of each isochoric process. This control scheme is realized in Ref. [
25] to simulate repetitive quantum channels on a single qubit.
4. Testing Scaling of Extra Work
One possible application of the thermodynamic simulation is to test the
scaling of the extra work, where
indicates the operation time of the finite-time isothermal process. In equilibrium thermodynamics, the performed work for a quasi-static isothermal process is equal to the change of the free energy
[
43]. The quasi-static isothermal process requires infinite time to ensure equilibrium at every moment. For a real isothermal process, irreversibility arises accompanied with the extra work. For a fixed control scheme, it is proved that the extra work decreases inverse proportional to the operation time at the long-time limit [
44,
45,
46,
47]. Such
scaling has been verified for the compression of dry air in the experiment [
48].
The superconducting quantum circuit provides an experimental platform to study quantum thermodynamics. We demonstrate the scaling behavior of the extra work in finite-time isothermal process can be observed with the current experimental proposal. Here, the parameters of the simulated two-level system are chosen as and for convenience. The energy spacing is tuned from to in N steps of elementary processes.
In
Figure 4, the
scaling of the extra work is shown with the ibmqx2 simulation results (
Supplementary Materials) for different operation time
(blue dashed curve) and 10 (red solid curve). For large step number
N, it is observed that the extra work is inverse proportional to the step number as
[
33,
37,
38]. The free energy difference of the final and the initial state, namely the performed work in the quasi-static isothermal process is
With the chosen values of the parameters, the explicit value of the free energy difference is . Since the total operation time is , the scaling is consistent with the scaling of the extra work in finite-time isothermal processes. The discrete isothermal processes are simulated on ibmqx2 for and 4 with the hybrid simulation (empty squares) and with the fully quantum simulation (pentagrams).
Figure 5 compares the simulation results on ibmqx2 and the numerical results. In (a) and (b), the work distribution of the hybrid simulation results (blue solid line) is compared to the exact numerical results (gray dashed line), with the operation time
in (a) and
in (b). For the hybrid simulation on ibmqx2, the maximum step number is
with the five qubits. To mimic the random selection of the sub-channel, we simulate every possible selection of the sub-channels in the isochoric processes and measure the state populations of the system qubit. For each selection, the corresponding circuit is implemented on ibmqx2 for 8192 shots. The average work is obtained by summing the work in each selection with the corresponding probability
(
). If the random selections of the sub-channels are possible,
should be determined by the CRNG. Yet, here the probability of the selection
is not implemented in the experiment but calculated with
since the random selection of the two sub-channels cannot be implemented on ibmqx2.
Figure 5c,d show the excited state population of the system qubit for the fully quantum simulation of two-step isothermal process on ibmqx2. The operation time of each isochoric process is
in (c) and
in (d). The excited state populations
at
and
are obtained by implementing 40960 shots of the corresponding circuits. Compared to those of the numerical result (gray bar), the ibmqx2 simulation results (blue bar) are larger, since the noises in the quantum computer generally lead to a more mixed state. At the end
of the process, the most quantum gates are used, and the absolute error reaches about
. The fidelity between the simulation and the numerical results
is explicitly
and
for the second step
in (c) and (d), respectively.
The performed work in both the hybrid simulation and the fully quantum simulation is obtained according to Equations (
12) and (
13), as listed in
Table 2. In
Figure 4, the extra work in the ibmqx2 simulation results exceeds that of the numerical result due to the accumulated error in long circuits. The error mainly comes from the two-qubit gates, since the error probability in two-qubit gates (from
to
) greatly exceeds that of single-qubit gates (from
to
) [
32]. The computing accuracy might be improved by using either quantum error correction or quantum mitigation [
49]. Limited to the precision of operation on ibmqx2, the results deviate from the theoretical expectations.
The current simulation scheme have only considered the commutative Hamiltonian at different steps
and the adiabatic process as the quench with zero time
. It can also be generalized to the discrete isothermal process with finite-time adiabatic processes, where the effect of the non-commutative Hamiltonian will increase the extra work [
50]. For a generic adiabatic process, the unitary evolution of the two-level system should be simulated with the single-qubit gates on the system qubit. The off-diagonal elements of the initial density matrix cannot be neglected, since the changing ground and excited states lead to the interplay between the off-diagonal elements and the populations. Besides, the current simulation can be simplified for the ideal discrete isothermal process, where the perfect thermalization of the isochoric processes allows simulating each elementary process separately by preparing the equilibrium states at the beginning of the adiabatic processes [
38].
With the limited number of qubits, we only show a few data points in
Figure 4. It requires either more usable qubits or the ability of resetting to simulate the discrete isothermal process with a larger step number
N in experiment. Another topic is to test the optimal control scheme [
36]. For the given operation time
, the control scheme is optimized to reach the minimum extra work. The lower bound of the extra work is related to the thermodynamic length [
44,
46,
51,
52], which endows a Riemann metric on the control parameter space. The current experimental proposal might also be utilized to measure the thermodynamic length of the isothermal process for the two-level system.