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
+38-3Lines changed: 38 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,8 @@ Let's start by importing the necessary packages.
26
26
27
27
```python
28
28
from qutip.solver.dysolve_propagator import DysolvePropagator, dysolve_propagator
29
-
from qutip import qeye, sigmax, sigmay, sigmaz, tensor, about
29
+
from qutip.solver.propagator import propagator
30
+
from qutip import qeye, sigmax, sigmay, sigmaz, tensor, CoreOptions, about
30
31
```
31
32
32
33
### One qubit example using `DysolvePropagator`
@@ -39,7 +40,7 @@ X = sigmax()
39
40
omega =10.0
40
41
```
41
42
42
-
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 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`.
43
+
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`.
43
44
44
45
```python
45
46
options = {'max_order': 5}
@@ -59,7 +60,23 @@ t_f = 1
59
60
U = dy(t_f, t_i)
60
61
```
61
62
62
-
This returns a single time propagator $U(t_f, t_i)$.
63
+
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.
0 commit comments