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
- added tests relying on proximity of the solutions
- rewrote instructions so they are less like the paper and more clear
- fixed typos and improved code structure
so that $\rho'(t) = \mathcal{E} \{\ket{\psi(t)} \bra{\psi(t)}\}$ for the generated trajecotries $\ket{\psi (t)}$.
54
-
55
-
56
-
53
+
so that $\rho'(t) = \mathbb{E} \{\ket{\psi(t)} \bra{\psi(t)}\}$ for the generated trajecotries $\ket{\psi (t)}$, where $\mathbb{E}$ is the ensemble average over the trajectories.
54
+
This can furthermore be used to finally reconstruct the original states via $\rho(t) = \mathbb{E}\{\mu(t) \ket{\psi(t)} \bra{\psi(t)}\}$.
57
55
58
56
```python
59
57
import matplotlib.pyplot as plt
@@ -152,7 +150,6 @@ A = CubicSpline(tlist, np.complex128(_A))
First, the result from the Bloch-Redfield equation deviates greatly from the others, showing us that non-Markovian effects are strongly influencing the dynamics.
345
+
Second, in the grey areas - when $\gamma(t)$ is negative - the atom state restores coherence.
346
+
In the last plot especially we see that during these times, the average influence martingale fluctuates, but is constant otherwise.
347
+
Its deviation from unity tells us how well the simulation has converged.
348
+
349
+
350
+
336
351
## References
337
352
338
353
\[1\][Donvil and Muratore-Ginanneschi. Nat Commun (2022).](https://www.nature.com/articles/s41467-022-31533-8)
@@ -354,5 +369,19 @@ about()
354
369
## Testing
355
370
356
371
```python
357
-
#TODO
372
+
assert np.allclose(
373
+
rho11_me, rho11_heom, atol=1e-3
374
+
), "rho11 of mesolve and heomsolve do not agree."
375
+
assert np.allclose(
376
+
rho11_me, rho11_mc, atol=1e-2
377
+
), "rho11 of nm_mcsolve deviates from mesolve too much."
378
+
assert np.allclose(
379
+
rho01_me[5:-5], rho01_heom, atol=1e-3
380
+
), "|rho01|^2 of mesolve and heomsolve do not agree."
381
+
assert np.allclose(
382
+
rho01_me, rho01_mc, atol=1e-1
383
+
), "|rho01|^2 of nm_mcsolve deviates from mesolve too much."
384
+
assert (
385
+
np.max(mart_dev) <1e-1
386
+
), "MC Simulation has not converged well enough. Average infl. mart. > 1e-1"
0 commit comments