Skip to content

Commit 7c89900

Browse files
committed
Update 023_dysolve_propagator.md
1 parent 398815f commit 7c89900

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tutorials-v5/time-evolution/023_dysolve_propagator.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ This notebook shows how to compute time propagators with Dysolve using QuTiP. Dy
2222

2323
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.
2424

25-
### One qubit example using `DysolvePropagator`
26-
2725
Let's start by importing the necessary packages.
2826

2927
```python
30-
from qutip.solver.dysolve_propagator import DysolvePropagator
31-
from qutip import sigmax, sigmaz
28+
from qutip.solver.dysolve_propagator import DysolvePropagator, dysolve_propagator
29+
from qutip import qeye, sigmax, sigmay, sigmaz, tensor, about
3230
```
3331

32+
### One qubit example using `DysolvePropagator`
33+
3434
We have to define what $H_0$, $X$ and $\omega$ will be. Let's say $H(t) = \sigma_z + \cos(10t)\sigma_x$.
3535

3636
```python
@@ -66,9 +66,6 @@ This returns a single time propagator $U(t_f, t_i)$.
6666
We proceed like the previous example.
6767

6868
```python
69-
from qutip.solver.dysolve_propagator import dysolve_propagator
70-
from qutip import qeye, sigmax, sigmay, sigmaz, tensor
71-
7269
# Define the system
7370
H_0 = tensor(sigmax(), sigmaz()) + tensor(qeye(2), sigmay())
7471
X = tensor(qeye(2), sigmaz())
@@ -87,6 +84,5 @@ Us = dysolve_propagator(H_0, X, omega, times)
8784
### About
8885

8986
```python
90-
from qutip import about
9187
about()
9288
```

0 commit comments

Comments
 (0)