Skip to content

Commit b1569e2

Browse files
committed
Replace parameter dkmax with tcut
update examples to use tcut update tutorials to use tcut update tests to use tcut update tutorials to use tcut (revision) raise Type errors where appropiate update docs with revised tutorials fix .ipynb to .rst conversion error in bath_dynamics
1 parent 8293812 commit b1569e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3287
-517
lines changed

docs/pages/tutorials/bath_dynamics.ipynb

+433
Large diffs are not rendered by default.

docs/pages/tutorials/bath_dynamics.rst

+10-48
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ qualitative result is not really changed though.
102102
alpha = 0.05
103103
w_cutoff = 10 * Omega
104104
epsilon = 2 * Omega
105-
dkmax = 10
105+
tcut = 2.0
106106
epsrel = 1e-5
107107
final_t = 20
108108
delta_t = 0.2
109109
initial_state = spin_down
110110
corr = oqupy.PowerLawSD(alpha, 1, w_cutoff, temperature = 1)
111-
pars = oqupy.TempoParameters(delta_t, dkmax, epsrel)
111+
pars = oqupy.TempoParameters(delta_t, tcut, epsrel)
112112
system = oqupy.System(Omega*s_x + epsilon*s_z)
113113
bath = oqupy.Bath(s_z, corr)
114114
pt = oqupy.PtTempo(bath, 0.0, final_t, pars)
@@ -118,8 +118,8 @@ qualitative result is not really changed though.
118118
.. parsed-literal::
119119
120120
--> PT-TEMPO computation:
121-
100.0% 100 of 100 [########################################] 00:00:03
122-
Elapsed time: 3.1s
121+
100.0% 100 of 100 [########################################] 00:00:00
122+
Elapsed time: 0.8s
123123
124124
125125
Now as we saw previously the process tensor can readily be used to
@@ -145,14 +145,14 @@ matrix elements evolve.
145145
146146
--> Compute dynamics:
147147
100.0% 100 of 100 [########################################] 00:00:00
148-
Elapsed time: 0.4s
148+
Elapsed time: 0.1s
149149
150150
151151
152152
153153
.. parsed-literal::
154154
155-
<matplotlib.legend.Legend at 0x7ff2e5df9da0>
155+
<matplotlib.legend.Legend at 0x7fd9cf197fd0>
156156
157157
158158
@@ -241,8 +241,8 @@ frequency, in this case let’s look at ``w = Omega`` and a bandwidth of
241241
.. parsed-literal::
242242
243243
--> Compute correlations:
244-
100.0% 100 of 100 [########################################] 00:00:14
245-
Elapsed time: 14.4s
244+
100.0% 100 of 100 [########################################] 00:00:07
245+
Elapsed time: 7.7s
246246
247247
248248
@@ -277,23 +277,10 @@ see what happens if we want the energy of another mode now, let’s say
277277
plt.xlabel(r'$\Omega t$')
278278
plt.ylabel(r'$\Delta Q (2 \Omega, t)$')
279279
280-
281-
282-
283-
.. parsed-literal::
284-
285-
Text(0, 0.5, '$\\Delta Q (2 \\Omega, t)$')
286-
287-
288-
289-
290-
.. image:: bath_dynamics_files/bath_dynamics_16_1.png
291-
292-
293280
Much quicker! This is because the same set of system correlation
294281
functions can be used to compute any bath correlation function
295282
:math:`\langle \alpha_2(t_2)\alpha_1(t_1)\rangle` where
296-
:math:`\alpha_2, \alpha_1 \in \{a_k^\dagger,a_k\}` and
283+
:math:`\alpha\_2, \alpha_1 \in {a_k^\dagger ,a_k}` and
297284
:math:`t_1,t_2 < t_N`. So now we see the logic of having a bath_dynamics
298285
object, it allows us to conveniently store the calculated system
299286
correlation functions and re-use them as we like :)
@@ -320,19 +307,6 @@ exchanged over the process so simply look at the final value of
320307
plt.xlabel(r"Mode Frequency$/\Omega$")
321308
plt.ylabel(r"Heat Exchanged$/\Omega$")
322309
323-
324-
325-
326-
.. parsed-literal::
327-
328-
Text(0, 0.5, 'Heat Exchanged$/\\Omega$')
329-
330-
331-
332-
333-
.. image:: bath_dynamics_files/bath_dynamics_18_1.png
334-
335-
336310
This is highly oscillatory, perhaps unsurprising from the dynamics we
337311
generated but still it would be nice to smooth this out. We expect the
338312
result to eventually equilibrate but with such a small bandwidth this
@@ -355,22 +329,10 @@ we average over the last :math:`n` timesteps where
355329
plt.xlabel(r"Mode Frequency$/\Omega$")
356330
plt.ylabel(r"Heat Exchanged$/\Omega$")
357331
358-
359-
360-
361-
.. parsed-literal::
362-
363-
Text(0, 0.5, 'Heat Exchanged$/\\Omega$')
364-
365-
366-
367-
368-
.. image:: bath_dynamics_files/bath_dynamics_20_1.png
369-
370-
371332
Here, as in the paper, we see heat is absorbed by the system from the
372333
band of the modes in the vicinity of
373334
:math:`\tilde{\Omega}=\sqrt{\Omega^2+\epsilon^2}`. This seems sensible
374335
as in a Markovian theory the system would sample the environment purely
375336
at its eigensplitting :math:`\tilde{\Omega}`.
376337

338+
--------------
Loading
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)