Skip to content

Commit d40d3e0

Browse files
Fixed formatting
1 parent e2c7943 commit d40d3e0

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

tutorials-v5/time-evolution/024_v5_paper-mesolve.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,23 @@ In this notebook we will consider several examples illustrating the usage of the
3434
```python
3535
import matplotlib.pyplot as plt
3636
import numpy as np
37-
from qutip import (QobjEvo, SESolver, UnderDampedEnvironment, about, basis,
38-
brmesolve, fidelity, mesolve, qeye, sigmam, sigmax, sigmaz,
39-
spost, spre, sprepost)
37+
from qutip import (
38+
QobjEvo,
39+
SESolver,
40+
UnderDampedEnvironment,
41+
about,
42+
basis,
43+
brmesolve,
44+
fidelity,
45+
mesolve,
46+
qeye,
47+
sigmam,
48+
sigmax,
49+
sigmaz,
50+
spost,
51+
spre,
52+
sprepost,
53+
)
4054
from qutip.solver.heom import HEOMSolver
4155

4256
%matplotlib inline
@@ -531,22 +545,24 @@ adi_me_res = mesolve(H_adi, psi0, tlist, c_ops=c_ops_me, e_ops=e_ops)
531545

532546
```python
533547
# HEOM
534-
max_depth = 4 # number of hierarchy levels
548+
max_depth = 4 # number of hierarchy levels
535549

536550
wsamp = 2 * np.pi
537551
w0 = 5 * 2 * np.pi
538552
gamma_heom = 1.9 * w0
539553

540554
lambd = np.sqrt(
541-
0.5 * gamma / (gamma_heom * wsamp)
555+
0.5
556+
* gamma
557+
/ (gamma_heom * wsamp)
542558
* ((w0**2 - wsamp**2) ** 2 + (gamma_heom**2) * ((wsamp) ** 2))
543559
)
544560
```
545561

546562
```python
547563
# Create Environment
548564
bath = UnderDampedEnvironment(lam=lambd, w0=w0, gamma=gamma_heom, T=1e-10)
549-
fit_times = np.linspace(0, 5, 1000) # range for correlation function fit
565+
fit_times = np.linspace(0, 5, 1000) # range for correlation function fit
550566

551567
# Fit correlation function with exponentials
552568
exp_bath, fit_info = bath.approx_by_cf_fit(

0 commit comments

Comments
 (0)