%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from qutip import *
delta = 0.0 * 2 * np.pi
epsilon = 0.5 * 2 * np.pi
gamma = 0.25
times = np.linspace(0, 10, 100)
H = delta/2 * sigmax() + epsilon/2 * sigmaz()
H
psi0 = (2 * basis(2, 0) + basis(2, 1)).unit()
c_ops = [np.sqrt(gamma) * sigmam()]
a_ops = [sigmax()]
e_ops = [sigmax(), sigmay(), sigmaz()]
result_me = mesolve(H, psi0, times, c_ops, e_ops)
result_brme = brmesolve(H, psi0, times, a_ops, e_ops, spectra_cb=[lambda w : gamma * (w > 0)])
plot_expectation_values([result_me, result_brme]);
b = Bloch()
b.add_points(result_me.expect, meth='l')
b.add_points(result_brme.expect, meth='l')
b.make_sphere()
N = 10
w0 = 1.0 * 2 * np.pi
g = 0.05 * w0
kappa = 0.15
times = np.linspace(0, 25, 1000)
a = destroy(N)
H = w0 * a.dag() * a + g * (a + a.dag())
# start in a superposition state
psi0 = ket2dm((basis(N, 4) + basis(N, 2) + basis(N,0)).unit())
c_ops = [np.sqrt(kappa) * a]
a_ops = [[a + a.dag(),lambda w : kappa * (w > 0)]]
e_ops = [a.dag() * a, a + a.dag()]
result_me = mesolve(H, psi0, times, c_ops, e_ops)
result_brme = brmesolve(H, psi0, times, a_ops, e_ops)
plot_expectation_values([result_me, result_brme]);
times = np.linspace(0, 25, 250)
n_th = 1.5
c_ops = [np.sqrt(kappa * (n_th + 1)) * a, np.sqrt(kappa * n_th) * a.dag()]
result_me = mesolve(H, psi0, times, c_ops, e_ops)
w_th = w0/np.log(1 + 1/n_th)
def S_w(w):
if w >= 0:
return (n_th + 1) * kappa
else:
return (n_th + 1) * kappa * np.exp(w / w_th)
a_ops = [[a + a.dag(),S_w]]
result_brme = brmesolve(H, psi0, times, a_ops, e_ops)
plot_expectation_values([result_me, result_brme]);
result_me = mesolve(H, psi0, times, c_ops, [])
result_brme = brmesolve(H, psi0, times, a_ops, [])
n_me = expect(a.dag() * a, result_me.states)
n_brme = expect(a.dag() * a, result_brme.states)
fig, ax = plt.subplots()
ax.plot(times, n_me, label='me')
ax.plot(times, n_brme, label='brme')
ax.legend()
ax.set_xlabel("t");
N = 10
a = tensor(destroy(N), identity(2))
sm = tensor(identity(N), destroy(2))
psi0 = ket2dm(tensor(basis(N, 1), basis(2, 0)))
e_ops = [a.dag() * a, sm.dag() * sm]
w0 = 1.0 * 2 * np.pi
g = 0.05 * 2 * np.pi
kappa = 0.05
times = np.linspace(0, 5 * 2 * np.pi / g, 1000)
a_ops = [[(a + a.dag()),lambda w : kappa*(w > 0)]]
c_ops = [np.sqrt(kappa) * a]
H = w0 * a.dag() * a + w0 * sm.dag() * sm + g * (a + a.dag()) * (sm + sm.dag())
result_me = mesolve(H, psi0, times, c_ops, e_ops)
result_brme = brmesolve(H, psi0, times, a_ops, e_ops)
plot_expectation_values([result_me, result_brme]);
In the weak coupling regime there is no significant difference between the Lindblad master equation and the Bloch-Redfield master equation.
w0 = 1.0 * 2 * np.pi
g = 0.75 * 2 * np.pi
kappa = 0.05
times = np.linspace(0, 5 * 2 * np.pi / g, 1000)
c_ops = [np.sqrt(kappa) * a]
H = w0 * a.dag() * a + w0 * sm.dag() * sm + g * (a + a.dag()) * (sm + sm.dag())
result_me = mesolve(H, psi0, times, c_ops, e_ops)
result_brme = brmesolve(H, psi0, times, a_ops, e_ops)
plot_expectation_values([result_me, result_brme]);
In the strong coupling regime there are some corrections to the Lindblad master equation that is due to the fact system eigenstates are hybridized states with both atomic and cavity contributions.
from qutip.ipynbtools import version_table
version_table()
Software | Version |
---|---|
QuTiP | 4.2.0 |
Numpy | 1.13.1 |
SciPy | 0.19.1 |
matplotlib | 2.0.2 |
Cython | 0.25.2 |
Number of CPUs | 2 |
BLAS Info | INTEL MKL |
IPython | 6.1.0 |
Python | 3.6.1 |Anaconda custom (x86_64)| (default, May 11 2017, 13:04:09) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] |
OS | posix [darwin] |
Wed Jul 19 22:10:15 2017 MDT |