You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In QuTiP`Qobj` and `QobjEvo` classes for the very heart of almost all calculations that can be performed.
20
-
With them, open quantum system with various interactions and structures can be simulated by using the wide variety of solvers provided.
19
+
In QuTiP, the `Qobj` and `QobjEvo` classes form the very heart of almost all calculations that can be performed.
20
+
With these classes, open quantum systems with various interactions and structures can be simulated by using the wide variety of solvers provided.
21
21
Most of the time, these solvers are given an initial state, a Hamiltonian and an environment that is often described using rates or coupling strengths.
22
22
QuTiP then uses numerical integration to determine the time evolution of the system.
23
23
24
24
QuTiP v5 introduces a unified interface for interacting with these solvers.
25
+
This new interface is class-based, allowing users to instantiate a solver object for a specific problem.
25
26
This can be useful when the same Hamiltonian data is reused with different initial conditions, time steps or other options.
26
-
A noticable speed-up can thus be achieved if solvers is reused multiple times.
27
+
A noticable speed-up can thus be achieved if solvers are reused multiple times.
27
28
28
-
Upon instantiation, one first supplies only the Hamiltonian and the collapse operators (e.g., collapse operators for a Lindabladian master equation).
29
+
Upon instantiation, one first supplies only the Hamiltonian and the collapse operators (e.g., collapse operators for a Lindbladian master equation).
29
30
Initial conditions, time steps, etc. are passed to the `Solver.run()` method which then performs the simulation.
30
31
31
32
In this notebook we will consider several examples illustrating the usage of the new solver classes.
@@ -69,7 +70,7 @@ print(H)
69
70
The dynamics of such a system is described by the Schrödinger equation
70
71
71
72
$i \hbar \dfrac{d}{dt} \ket{\psi} = H \ket{\psi}$.
72
-
Therefore, we can use `SESovler` to calculate the dynamics.
73
+
Therefore, we can use `SESolver` to calculate the dynamics.
73
74
74
75
```python
75
76
se_solver = SESolver(H)
@@ -93,9 +94,9 @@ plt.show()
93
94
### Manual Stepping Interface
94
95
95
96
A new feature in QuTiP v5 is that time steps can be controlled manually.
96
-
This is specficially useful if the Hamiltonian depends on external control parameters such as field strength.
97
-
Such parameters can be updated in euch step using the optional paramter`args`.
98
-
In paractice, this can look like this:
97
+
This is specifically useful if the Hamiltonian depends on an external control parameter such as a field strength.
98
+
Such parameters can be updated in each step using the optional parameter`args`.
99
+
In practice, this can look like this:
99
100
100
101
```python
101
102
t =0
@@ -111,13 +112,13 @@ while t < 40:
111
112
### Solver and Integrator Options
112
113
113
114
Another change in QuTiP v5 is that the `options` argument takes a standard Python dictionary.
114
-
This should increase future felxibility and allow different solvers to provide individual sets of options more easily.
115
+
This should increase future flexibility and allow different solvers to provide individual sets of options more easily.
115
116
The complete list of options can be found in the online documentation for each solver.
116
117
117
-
As an example of frequently used options, we show `store_states`, determining whether the output should include the system state at each time step and `store_final_state` determening the same but for the final state.
118
-
`method` is another common option, specifying the ODE integration method as well as its specific options.
119
-
Also shown here are `atol`to control the precision (absolute tolerance),
120
-
`nsteps`controls the maximum number of steps between two time steps and `max_step` giving the maximum allowed integration step of the default Adams ODE.
118
+
As an example of frequently used options, we show `store_states`, determining whether the output should include the system state at each time step, and `store_final_state`, determining the same but for the final state.
119
+
`method` is another common option, specifying the ODE integration method.
120
+
Specific options related to the numeric integration depend on the chosen method; here, we show `atol`controlling the precision (absolute tolerance),
121
+
`nsteps`controlling the maximum number of steps between two time steps, and `max_step` giving the maximum allowed integration step of the default Adams ODE integration method.
In general, the Schrödinger equation describes the dynamics of any quantum system.
138
-
Once systems become large or we consider continious system, however, solving it often comes impossible.
139
+
Once systems become large or we consider continuous systems, however, solving it often becomes impossible.
139
140
Therefore, master equations of various types were developed and have now become the most common way to describe the dynamics of finite (open) quantum systems.
140
141
Generally, a master equation refers to a first-order linear differential equation for $\rho(t)$ which is the reduced density operator describing the quantum state.
141
-
In QuTiP `mesolve` is the general solver we use to solve such master equations.
142
+
In QuTiP,`mesolve` is the general solver we use to solve such master equations.
142
143
Although it supports master equations of various forms, the Lindbladian type is implemented by default.
Next to the density operator $\rho(t)$ and the Hamiltonian $H(t)$, this equation includes the so-called collapse (or jump) operators $C_n = \sqrt{\gamma_n} A_n$.
148
-
They define the dissipation due to contanct with and environment.
149
-
$\gamma_n$ can hereby be understood as rates describing the frequency of transitions between the states connected by the operator $A_n$.
149
+
They define the dissipation due to contact with an environment.
150
+
The rates $\gamma_n$ describe the frequency of transitions between the states connected by the operator $A_n$.
150
151
151
152
To continue our example of the two qubits, we now connect them to an evironment using the collapse operators $C_1 = \sqrt{\gamma} \sigma_{-}^{(1)}$ and $C_2 = \sqrt{\gamma} \sigma_{-}^{(2)}$ where $\sigma_{-}^{(i)}$ takes qubit (i) from its excited state to its ground state.
152
153
This time, however, we will be using the `mesolve` solver.
@@ -174,7 +175,7 @@ plt.show()
174
175
### Global Master Equation - Born-Markov-secular approximation
175
176
176
177
In the previous example, the collapse operators acted *locally* on each qubit.
177
-
However, depending on the considered approximation different kinds of collapse operators are found.
178
+
However, depending on the considered approximation, different kinds of collapse operators are found.
178
179
One example for this is when the qubits interact more strongly with each other than with the bath.
179
180
One then arrives at the *global* master equation under the standard Born-Markox approximation.
180
181
Although the collapse operators still act like annihilation and creation operators here, they now act on the total coupled eigenstates of the interacting two-qubit system
@@ -185,20 +186,16 @@ with rates
185
186
186
187
$\gamma_{ij} = | \bra{\psi_i} d \ket{\psi_j} |^2 S(\Delta_{ij})$.
187
188
188
-
The $\ket{\psi_i}$ are the eigenstates of $H$ and $\Delta_{ij} = E_j - E_i$ are the difference of eigenenergies.
189
+
The $\ket{\psi_i}$ are the eigenstates of $H$ and $\Delta_{ij} = E_j - E_i$ are the differences of eigenenergies.
189
190
$d$ is the coupling operator of the system to the environment.
which depends on details of the environment such as its spectral density $J(\omega)$ and temperature through the Bose-Einstein distribution $n_{th} (\omega)$.
195
+
which depends on details of the environment such as its spectral density $J(\omega)$ and, through the Bose-Einstein distribution $n_{th} (\omega)$, its temperature.
195
196
$\theta$ denotes the Heaviside function.
196
197
197
-
By assuming spectral density to be flat:
198
-
199
-
$J(\omega) = \gamma / 2$
200
-
201
-
and considering zero temperature, we can write
198
+
By assuming spectral density to be flat, $J(\omega) = \gamma / 2$, and considering zero temperature, we can write
202
199
203
200
$S(\omega) = \gamma \theta(\omega)$.
204
201
@@ -211,7 +208,6 @@ def power_spectrum(w):
211
208
else:
212
209
return0
213
210
214
-
215
211
defmake_co_list(energies, eigenstates):
216
212
Nmax =len(eigenstates)
217
213
collapse_list = []
@@ -241,21 +237,20 @@ me_global_res = mesolve(
241
237
)
242
238
```
243
239
240
+
It is interesting to note that the long-time evolution leads to a state that is close to the coupled ground state of the two qubit system:
print(f"Fidelity with ground-state: {fidelity:.6f}")
248
246
```
249
247
250
-
It is interesting to note that the long-time evolution leads to a state that is close to the coupled ground state of the two qubit system.
251
-
252
-
253
248
### Solver comparison
254
249
255
250
In the following, we compare the results of the local and dressed (global) Lindblad simulations from above with the Bloch-Redfield solver.
256
251
The Bloch-Redfield solver is explained in more detail in other tutorials, but we use it here to solve the weak-coupling master equation from a given bath power spectrum.
257
252
For small coupling strengths, the results from the local and global master equations both agree with the Bloch-Redfield solver.
258
-
However, this changes when considering stronger couplings where the local master equation deviates from both the global as well as the Bloch-Redfield approach.
253
+
However, this changes when considering stronger couplings where the local master equation deviates from the result of the global and the Bloch-Redfield approach.
259
254
260
255
```python
261
256
# weak coupling
@@ -359,12 +354,12 @@ plt.legend()
359
354
plt.show()
360
355
```
361
356
362
-
<!-- #region -->
363
357
## Part 2: Time-Dependent Systems
364
358
365
-
366
-
Finally, we compare the results with another `mesolve` considering the rotating-wave approximation, the Bloch-Redfield solver and the HEOMSolver.
367
-
<!-- #endregion -->
359
+
Finally, we consider another example: a driven system, where the Hamiltonian is time-dependent.
We solve this problem with a direct `mesolve()` simulation, with a time-independent simulation in the rotating-wave approximation (see the QuTiP v5 paper for details), with the Bloch-Redfield solver and with the HEOMSolver.
0 commit comments