help

34 views
Skip to first unread message

mahmoud mohammadi

unread,
Nov 25, 2021, 11:16:28 AM11/25/21
to QuTiP: Quantum Toolbox in Python
Hello, dear members of the group
I want to get the Thermal density matrix for a cavity-atomic system whose Hamiltonian depends on space and time, and I need help. I have written the program code to get the Hamiltonian that I am sending. Thank you for your attention.
import numpy as np
from qutip import *
import matplotlib.pyplot as plt  
wc = 1.2 #avity frequency in 1000THZ
wa = 1.2 #  qubit/atom frenqency in 1000THZ
g = 0.3 # coupling strenght
etal = 1. # in range unit
etaT = 1. # in range unit
h= 1.054*10**-34 # constant plank
# poump frequency
wl = 1.2 # poump longitudinal frenqency in 1000THZ
wT = 0.001 # poump transverse frenqency in 1000THZ
# mass of atom in kg
m = 141.8765 *10**-27 
t = np.linspace(0,100,100)
x = np.linspace(0,100,100)
times = np.linspace(0,100,100)
#initial state for atom
gr=basis(2,0)
ex=basis(2,1)
psi0atom=(1/np.sqrt(2))*(gr+ex)
# definition state for cavity 
psi0cavity = (1/np.sqrt(2))*(basis(2,0)+ basis(2,1))
#definition states for atom_cavity system
psi0= tensor( psi0atom,psi0cavity)
# definition Hamiltonian H=H0+Hint
#term H0= kinetic energy atom + free term atom and cavity
ke=(1/h)*(tensor((momentum(2)**2)/(2.*m),qeye(2)))
a = destroy(2)
H0=ke+wc*(tensor(qeye(2),a.dag()*a)) +wa*tensor(sigmaz(),qeye(2))
# Hamiltoni interaction atom and field

Hint=g*(tensor(sigmap(),a)+tensor(sigmam(),a.dag()))

def f0(x,args):
    return np.cos(x)
hpl=1j*etal*(tensor(qeye(2),a.dag()))
hpll=-1j*etal*(tensor(qeye(2),a))
hpT=1j*etaT*(tensor(sigmap(),qeye(2)))
hpTT=-1j*etaT*(tensor(sigmam(),qeye(2)))

################################
def f1(t,args):
    return np.exp(-1j*wl*t)
     
def f2(t,args):
    return np.exp(1j*wl*t)

def f3(t,args):
    return np.exp(-1j*wT*t)

def f4(t,args):
    return np.exp(1j*wT*t)
##################################

# H is with random walk and HH is without random walk and print it 
h0=wc*(tensor(qeye(2),a.dag()*a))+wa*tensor(sigmaz(),qeye(2))
HH=[h0,Hint,[hpl,f1],[hpll,f2]]
H = [H0,[Hint,f0],[hpl,f1],[hpll,f2],[hpT,f3],[hpTT,f4]]
H
Reply all
Reply to author
Forward
0 new messages