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
Copy file name to clipboardExpand all lines: tutorials-v5/time-evolution/023_dysolve_propagator.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ This notebook shows how to compute time propagators with Dysolve using QuTiP. Dy
22
22
23
23
For the moment, Dysolve can be used with the class `DysolvePropagator` and the function `dysolve_propagator` from QuTiP's solvers. They follow a similar structure to the class `Propagator` and the function `propagator`, another solver that also computes time propagators.
24
24
25
-
Let's start by importing the necessary packages.
25
+
Here, we import the necessary packages.
26
26
27
27
```python
28
28
from qutip.solver.dysolve_propagator import DysolvePropagator, dysolve_propagator
@@ -33,15 +33,15 @@ import numpy as np
33
33
34
34
### One qubit example using `DysolvePropagator`
35
35
36
-
We have to define what $H_0$, $X$ and $\omega$ will be. Let's say $H(t) = \sigma_z + \cos(10t)\sigma_x$.
36
+
We have to define what $H_0$, $X$ and $\omega$ will be. For example, $H(t) = \sigma_z + \cos(10t)\sigma_x$.
37
37
38
38
```python
39
39
H_0 = sigmaz()
40
40
X = sigmax()
41
41
omega =10.0
42
42
```
43
43
44
-
Some options can be defined. `max_order` will be the order of approximation used when calculating a propagator. The higher this integer is, the more precise the results will be (at a cost of taking more time to calculate). `a_tol` is simply the absolute tolerance used in the calculations. Finally, a time propagator can be computed using subpropagators of time increment `max_dt`. Let's say `max_dt` is set to 0.25, then the propagator $U(1, 0)$ will come from the multiplication of the supropagators $U(0.25, 0)$, $U(0.5, 0.25)$, $U(0.75, 0.5)$ and $U(1, 0.75)$. This allows for more precise results when the evolution is over a long period of time. In our case, let's keep `a_tol` and `max_dt` to their default value, but let's change `max_order`.
44
+
Some options can be defined. `max_order` will be the order of approximation used when calculating a propagator. The higher this integer is, the more precise the results will be (at a cost of taking more time to calculate). `a_tol` is simply the absolute tolerance used in the calculations. Finally, a time propagator can be computed using subpropagators of time increment `max_dt`. If `max_dt` is set to 0.25, then the propagator $U(1, 0)$ will come from the multiplication of the supropagators $U(0.25, 0)$, $U(0.5, 0.25)$, $U(0.75, 0.5)$ and $U(1, 0.75)$. This allows for more precise results when the evolution is over a long period of time. In our case, we keep `a_tol` and `max_dt` to their default value, but we change `max_order` to 5.
45
45
46
46
```python
47
47
options = {'max_order': 5}
@@ -61,7 +61,7 @@ t_f = 1
61
61
U = dy(t_f, t_i)
62
62
```
63
63
64
-
This returns a single time propagator $U(t_f = 1, t_i = -1)$. To verify that the $U$ is correct, let's compare it to what `propagator` would return.
64
+
This returns a single time propagator $U(t_f = 1, t_i = -1)$. To verify that the $U$ is correct, we compare it to what `propagator` would return.
65
65
66
66
```python
67
67
# Solve using propagator
@@ -99,7 +99,7 @@ times = [-0.1, 0, 0.1]
99
99
Us = dysolve_propagator(H_0, X, omega, times)
100
100
```
101
101
102
-
Again, let's compare the results with `propagator`.
0 commit comments