Skip to content

Commit 3d2c226

Browse files
authored
Merge branch 'qutip:main' into fitting-heom
2 parents 8999b52 + ad896bb commit 3d2c226

File tree

15 files changed

+3026
-34
lines changed

15 files changed

+3026
-34
lines changed

.github/workflows/nightly_ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
cd ..
6666
python -m pip install git+https://github.com/qutip/qutip-qip
6767
python -m pip install --no-deps git+https://github.com/qutip/qutip-jax
68+
python -m pip install --no-deps git+https://github.com/qutip/qutip-qoc
6869
6970
git clone -b master https://github.com/qutip/qutip-qtrl.git
7071
cd qutip-qtrl
@@ -95,7 +96,7 @@ jobs:
9596
run: |
9697
jupyter kernel &
9798
cd notebooks
98-
find . -name '*.ipynb' -exec pytest --nbmake --overwrite --nbmake-timeout=600 {} +
99+
find . -name '*.ipynb' -exec pytest --nbmake --overwrite --nbmake-timeout=900 {} +
99100
rm template.ipynb
100101
101102
- name: Create Notebook Artifact

.github/workflows/notebook_ci.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
folder-path: tutorials-v${{ matrix.qutip-version }}
3030
#use config file to define 403 and 405 errors as valid links
3131
#(APS blocks this link check)
32-
config-file: mlc_config.json
32+
config-file: mlc_external_config.json
3333

3434
- name: Setup Conda
3535
uses: conda-incubator/setup-miniconda@v3
@@ -59,14 +59,15 @@ jobs:
5959
- name: Install QuTiP
6060
run: |
6161
pip install --upgrade pip
62-
python -m pip install jax jax[cpu] equinox diffrax
62+
python -m pip install "jax<0.7.0" "jax[cpu]<0.7.0" equinox diffrax
6363
git clone -b ${{ matrix.qutip-branch }} https://github.com/qutip/qutip.git
6464
cd qutip
6565
pip install -r requirements.txt
6666
pip install .
6767
cd ..
6868
python -m pip install git+https://github.com/qutip/qutip-qip
6969
python -m pip install --no-deps git+https://github.com/qutip/qutip-jax
70+
python -m pip install --no-deps git+https://github.com/qutip/qutip-qoc
7071
7172
git clone -b master https://github.com/qutip/qutip-qtrl.git
7273
cd qutip-qtrl
@@ -97,7 +98,7 @@ jobs:
9798
run: |
9899
jupyter kernel &
99100
cd notebooks
100-
find . -name '*.ipynb' -exec pytest --nbmake --overwrite --nbmake-timeout=600 {} +
101+
find . -name '*.ipynb' -exec pytest --nbmake --overwrite --nbmake-timeout=900 {} +
101102
rm template.ipynb
102103
103104
- name: Create Notebook Artifact
@@ -107,6 +108,15 @@ jobs:
107108
path: |
108109
notebooks/*.ipynb
109110
notebooks/**/*.ipynb
111+
112+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
113+
with:
114+
use-quiet-mode: 'yes'
115+
folder-path: tutorials-v${{ matrix.qutip-version }}
116+
#use config file to define 403 and 405 errors as valid links
117+
#(APS blocks this link check)
118+
config-file: mlc_config.json
119+
110120
publish:
111121
needs: pytests
112122
runs-on: ubuntu-latest
@@ -133,20 +143,21 @@ jobs:
133143
# Download resources from qutip.github.io repository
134144
mkdir css
135145
cd css
136-
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/css/bootstrap.css
137146
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/css/site.css
138147
cd ..
139148
140149
mkdir _includes
141150
cd _includes
142-
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/footer.html
143-
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/header.html
151+
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/head.html
144152
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/navbar.html
153+
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/footer.html
154+
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/_includes/scripts.html
145155
cd ..
146156
147157
mkdir images
148158
cd images
149159
wget https://raw.githubusercontent.com/qutip/qutip.github.io/master/images/favicon.ico
160+
wget https://raw.githubusercontent.com/langhaarzombie/langhaarzombie.github.io/develop/images/logo_small.png
150161
cd ..
151162
152163
# build the website

mlc_external_config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"projectBaseUrl":"${workspaceFolder}",
3+
"timeout": "20s",
4+
"retryOn429": true,
5+
"retryCount": 5,
6+
"fallbackRetryDelay": "30s",
7+
"aliveStatusCodes": [200, 206, 403, 405],
8+
"ignorePatterns": [
9+
{
10+
"pattern": "^(/|\\.\\/|\\.\\./)"
11+
}
12+
]
13+
}
14+

tutorials-v5/heom/heom-2-fmo-example.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ def timer(label):
6666
options = {
6767
"nsteps": 15000,
6868
"store_states": True,
69-
"rtol": 1e-12,
70-
"atol": 1e-12,
71-
"min_step": 1e-18,
7269
"method": "vern9",
7370
"progress_bar": "enhanced",
7471
}
@@ -83,9 +80,9 @@ And let us set up the system Hamiltonian and bath parameters:
8380
#
8481
# We use the Hamiltonian employed in
8582
# https://www.pnas.org/content/106/41/17255 and operate
86-
# in units of Hz:
83+
# in units of GHz:
8784
88-
Hsys = 3e10 * 2 * np.pi * Qobj([
85+
Hsys = 30 * 2 * np.pi * Qobj([
8986
[200, -87.7, 5.5, -5.9, 6.7, -13.7, -9.9],
9087
[-87.7, 320, 30.8, 8.2, 0.7, 11.8, 4.3],
9188
[5.5, 30.8, 0, -53.5, -2.2, -9.6, 6.0],
@@ -99,9 +96,9 @@ Hsys = 3e10 * 2 * np.pi * Qobj([
9996
```{code-cell} ipython3
10097
# Bath parameters
10198
102-
lam = 35 * 3e10 * 2 * np.pi
103-
gamma = 1 / 166e-15
104-
T = 300 * 0.6949 * 3e10 * 2 * np.pi
99+
lam = 35 * 30 * 2 * np.pi
100+
gamma = 1 / 166e-6
101+
T = 300 * 0.6949 * 30 * 2 * np.pi
105102
beta = 1 / T
106103
```
107104

@@ -114,18 +111,18 @@ env = DrudeLorentzEnvironment(T=T, lam=lam, gamma=gamma)
114111
```
115112

116113
```{code-cell} ipython3
117-
wlist = np.linspace(0, 200 * 3e10 * 2 * np.pi, 100)
118-
tlist = np.linspace(0, 1e-12, 1000)
114+
wlist = np.linspace(0, 200 * 30 * 2 * np.pi, 100)
115+
tlist = np.linspace(0, 1e-3, 1000)
119116
120-
J = env.spectral_density(wlist) / (3e10 * 2 * np.pi)
117+
J = env.spectral_density(wlist) / (30 * 2 * np.pi)
121118
122119
fig, axes = plt.subplots(1, 2, sharex=False, figsize=(10, 3))
123120
124121
fig.subplots_adjust(hspace=0.1) # reduce space between plots
125122
126123
# Spectral density plot:
127124
128-
axes[0].plot(wlist / (3e10 * 2 * np.pi), J, color='r', ls='--', label="J(w)")
125+
axes[0].plot(wlist / (30 * 2 * np.pi), J, color='r', ls='--', label="J(w)")
129126
axes[0].set_xlabel(r'$\omega$ (cm$^{-1}$)', fontsize=20)
130127
axes[0].set_ylabel(r"$J(\omega)$ (cm$^{-1}$)", fontsize=16)
131128
axes[0].legend()
@@ -193,7 +190,7 @@ linestyles = [
193190
for m in range(7):
194191
Q = basis(7, m) * basis(7, m).dag()
195192
axes.plot(
196-
np.array(tlist) * 1e15,
193+
np.array(tlist) * 1e6,
197194
np.real(expect(outputFMO_HEOM.states, Q)),
198195
label=m + 1,
199196
color=colors[m % len(colors)],
@@ -232,7 +229,7 @@ And now let's plot the Bloch-Redfield solver results:
232229
fig, axes = plt.subplots(1, 1, figsize=(12, 8))
233230
234231
for m, Q in enumerate(Q_list):
235-
axes.plot(tlist * 1e15, expect(outputFMO_BR.states, Q), label=m + 1)
232+
axes.plot(tlist * 1e6, expect(outputFMO_BR.states, Q), label=m + 1)
236233
237234
axes.set_xlabel(r'$t$ (fs)', fontsize=30)
238235
axes.set_ylabel(r"Population", fontsize=30)
@@ -334,7 +331,7 @@ with timer("ME ODE solver"):
334331
fig, axes = plt.subplots(1, 1, figsize=(12, 8))
335332
336333
for m, Q in enumerate(Q_list):
337-
axes.plot(tlist * 1e15, expect(outputFMO_ME.states, Q), label=m + 1)
334+
axes.plot(tlist * 1e6, expect(outputFMO_ME.states, Q), label=m + 1)
338335
339336
axes.set_xlabel(r'$t$', fontsize=20)
340337
axes.set_ylabel(r"Population", fontsize=16)
@@ -363,7 +360,7 @@ with timer("ME ODE solver"):
363360
fig, axes = plt.subplots(1, 1, figsize=(12, 8))
364361
for m, Q in enumerate(Q_list):
365362
axes.plot(
366-
tlist * 1e15,
363+
tlist * 1e6,
367364
expect(outputFMO_ME_nodephase.states, Q),
368365
label=m + 1,
369366
)

0 commit comments

Comments
 (0)