@@ -5,16 +5,16 @@ jupyter:
55 extension : .md
66 format_name : markdown
77 format_version : ' 1.3'
8- jupytext_version : 1.13.8
8+ jupytext_version : 1.16.4
99 kernelspec :
10- display_name : Python 3
10+ display_name : Python 3 (ipykernel)
1111 language : python
1212 name : python3
1313---
1414
1515# QuTiPv5 Paper Example: Monte Carlo Solver for non-Markovian Baths
1616
17- Authors: Maximilian Meyer-Mölleringhof (
[email protected] ), Neill Lambert (
[email protected] )
17+ Authors: Maximilian Meyer-Mölleringhof (
[email protected] ),
Paul Menczel ( [email protected] ), Neill Lambert (
[email protected] )
1818
1919## Introduction
2020
@@ -30,29 +30,29 @@ $\mathcal{D}_n[\rho(t)] = A_n \rho(t) A^\dagger_n - \dfrac{1}{2} [A^\dagger_n A_
3030These equations include the system Hamiltonian $H(t)$ and jump operators $A_n$.
3131Contrary to a Lindblad equation, the coupling rates $\gamma_n(t)$ may be negative here.
3232
33- In QuTiPv5 , the non-Markovian Monte Carlo solver is introduced.
33+ In QuTiP v5 , the non-Markovian Monte Carlo solver is introduced.
3434It enables the mapping of the general master equation given above, to a Lindblad equation on the same Hilbert space.
35- This is achieved by the introduction of so called "influence martingale" which act as trajectory weighting [ \[ 1, 2, 3\] ] ( #References ) :
35+ This is achieved by the introduction of the so called "influence martingale" which acts as trajectory weighting [ \[ 1, 2, 3\] ] ( #References ) :
3636
3737$\mu (t) = \exp \left[ \alpha \int_0^t s(\tau) d \tau \right] \Pi_k \dfrac{\gamma_ {n_k} (t_k)}{\Gamma_ {n_k} (t_k)}$.
3838
3939Here, the product runs over all jump operators on the trajectory with jump channels $n_k$ and jump times $t_k < t$.
40-
41- The jump operators are required to fulfill the completeness relation $\sum_n A_n^\dagger A_n = \alpha \mathbb{1}$ for $\alpha > 0$.
42- This condition is automatically taken care off by QuTiP's ` nm_mcsolve() ` function.
43-
4440To finally arrive at the Lindblad form, the shift function
4541
46- $s(t) = 2 | \min \{ 0, \gamma_1(t), \gamma_2(t), ... \} |$,
42+ $s(t) = 2 \left | \min \{ 0, \gamma_1(t), \gamma_2(t), ... \} \right|$
4743
48- such that the shifted rates $\Gamma_n (t) = \gamma_n(t) + s(t)$ are non-negative.
49- Using the regular MCWF method, we obtain the completely positive Lindblad equation
44+ is applied, such that the shifted rates $\Gamma_n (t) = \gamma_n(t) + s(t)$ are non-negative.
45+ We obtain the completely positive Lindblad equation
5046
5147$\dot{\rho}'(t) = - \dfrac{i}{\hbar} [ H(t), \rho'(t) ] + \sum_n \Gamma(t) \mathcal{D}_ n[ \rho'(t)] $,
5248
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.
49+ and $\rho'(t) = \mathbb{E} \{ \ket{\psi(t)} \bra{\psi(t)}\} $ using the regular MCWF method.
50+ Here, $\ket{\psi (t)}$ are the generated trajectories and $\mathbb{E}$ is the ensemble average over the trajectories.
5451This can furthermore be used to finally reconstruct the original states via $\rho(t) = \mathbb{E}\{ \mu(t) \ket{\psi(t)} \bra{\psi(t)}\} $.
5552
53+ Note that, for this technique, the jump operators are required to fulfill the completeness relation $\sum_n A_n^\dagger A_n = \alpha \mathbb{1}$ for $\alpha > 0$.
54+ This condition is automatically taken care of by QuTiP's ` nm_mcsolve() ` function.
55+
5656``` python
5757import matplotlib.pyplot as plt
5858import numpy as np
@@ -106,18 +106,14 @@ deltaSq = deltaR**2 + deltaI**2
106106# calculate gamma and A
107107def prefac (t ):
108108 return (
109- 2
110- * gamma0
111- * lamb
112- / (
109+ 2 * gamma0 * lamb / (
113110 (lamb** 2 + Delta** 2 - deltaSq) * np.cos(deltaI * t)
114111 - (lamb** 2 + Delta** 2 + deltaSq) * np.cosh(deltaR * t)
115112 - 2 * (Delta * deltaR + lamb * deltaI) * np.sin(deltaI * t)
116113 + 2 * (Delta * deltaI - lamb * deltaR) * np.sinh(deltaR * t)
117114 )
118115 )
119116
120-
121117def cgamma (t ):
122118 return prefac(t) * (
123119 lamb * np.cos(deltaI * t)
@@ -126,7 +122,6 @@ def cgamma(t):
126122 - deltaR * np.sinh(deltaR * t)
127123 )
128124
129-
130125def cA (t ):
131126 return prefac(t) * (
132127 Delta * np.cos(deltaI * t)
@@ -175,9 +170,9 @@ me_sol = mesolve([[unitary_gen, A], [dissipator, gamma]], initial_state, tlist)
175170
176171For the other methods we directly apply a spin-boson model and the free reservoir auto-correlation function
177172
178- $C(t) = \dfrac{\lambda \Gamma}{2} e^{-i (\omega - \Delta) t - \lambda |t|}$
173+ $C(t) = \dfrac{\lambda \Gamma}{2} e^{-i (\omega - \Delta) t - \lambda |t|}$,
179174
180- as well as the same power specturm as we used above.
175+ which corresponds to the power spectrum defined above.
181176We use the Hamiltonian $H = \omega_0 \sigma_ + \sigma_ -$ in the Schrödinger picture and the coupling operator $Q = \sigma_ + + \sigma_ -$.
182177Here, we chose $\omega_0 \gg \Delta$ to ensure validity of the rotating wave approximation.
183178
@@ -188,7 +183,6 @@ omega_0 = omega_c + Delta
188183H = omega_0 * qt.sigmap() * qt.sigmam()
189184Q = qt.sigmap() + qt.sigmam()
190185
191-
192186def power_spectrum (w ):
193187 return gamma0 * lamb** 2 / ((omega_c - w) ** 2 + lamb** 2 )
194188```
@@ -203,8 +197,8 @@ vk_imag = vk_real
203197```
204198
205199``` python
206- heom_bath = qt.heom.BosonicBath(Q, ck_real, vk_real, ck_imag, vk_imag)
207- heom_sol = qt.heom.heomsolve(H, heom_bath , 10 , qt.ket2dm(initial_state), tlist)
200+ heom_env = qt.ExponentialBosonicEnvironment( ck_real, vk_real, ck_imag, vk_imag)
201+ heom_sol = qt.heom.heomsolve(H, (heom_env, Q) , 10 , qt.ket2dm(initial_state), tlist)
208202```
209203
210204Secondly, for the Bloch-Redfield solver we can directly use the power spectrum as input:
0 commit comments