Issues with Hamiltonian in qutip

107 views
Skip to first unread message

latifeh iri

unread,
Feb 10, 2022, 9:30:37 AM2/10/22
to QuTiP: Quantum Toolbox in Python

Hi all,

Still new to QuTip and trying to use for three level systems but the problem is changing the value of H0, when I am trying to change the value and plot the expectation value based on time, there is nothing changed! and getting the same result for different H0 (this part is including cavity frequency and atomic frequency), in contrast, by changing the interaction part of Hamiltonian (including 'g' , 'adagger' and 'a'), here the figure can be changed. Could anyone please help me with this issue?
###################################################
wf = 2.7/ 27.211
delta = 0
wa = wf
g = 1
H0 = (wf*adagger*a) + (0.5*wa*smz)
H_int = g*(smplus*a+smminus*adagger)
H = ((wf*adagger*a) + (0.5*wa*smz) + g*(smplus*a+smminus*adagger))
####################################################
Thank you so much in advance,
Latifeh

Anna Naden

unread,
Feb 22, 2022, 2:57:02 AM2/22/22
to QuTiP: Quantum Toolbox in Python
What are you using for your initial state?

Anna Naden

unread,
Feb 24, 2022, 5:01:53 AM2/24/22
to QuTiP: Quantum Toolbox in Python
I am not sure about the way you have constructed your Hamiltonian.

Here is my Hamiltonian for a three-level atom in a cavity:
from qutip import tensor, Qobj, qeye, destroy
import numpy as np
def fluorescence_hamiltonian(N, g21, g10, wa0, wa1, wa2):
a10 = tensor(destroy(N), qeye(N),qeye(3))
a21 = tensor(qeye(N), destroy(N), qeye(3))
sm21 = tensor(qeye(N), qeye(N),Qobj([[0,0,0],[0,0,1],[0,0,0]])) #Transition from second to first excited state
sm10 = tensor(qeye(N), qeye(N),Qobj([[0,1,0],[0,0,0],[0,0,0]])) #Transition from first excited state to ground state
# Hamiltonian without light-matter interaction
H = (wa1-wa0) * a10.dag() * a10 + + (wa2-wa1)*a21.dag()*a21+tensor(qeye(N), qeye(N),Qobj([[0,0,0],[0,wa1,0],[0,0,wa2]]))
# Light-atom interaction
Hi = g21*(a21.dag()*sm21+sm21.dag()*a21) #Emission from second exited state, absorbsion from second exited state
Hi += g10*(a10.dag()*sm10+sm10.dag()*a10)
# Transform to interaction picture
h=[[1,0,0],[0,np.exp(1j*wa1),0],[0,0,np.exp(1j*wa2)]]
EH=tensor(qeye(N),qeye(N),Qobj(h))
H=EH*Hi*EH.dag()

# It has to be Hermitian
assert H.isherm
return H

Anna Naden

unread,
Feb 24, 2022, 5:04:42 AM2/24/22
to QuTiP: Quantum Toolbox in Python
Here is a simpler Hamiltonian, without the transformation to interaction picture. It is for a two-level system and treats the cavity semiclassically.
def hamiltonian(omega0,omega1):
def h12(t, args):
phaseME = args['phaseME']
omega_rf = args['omega_rf']
rabi=args['rabi']
phase_rf = args['phase_rf']
phase=np.exp(1j*phaseME)
return phase*rabi*np.cos(omega_rf*t+phase_rf)
def h21(t,args):
return np.conj(h12(t,args))

H0=Qobj([[omega0,0],[0,omega1]])
Hi = np.array([[0,1],[0,0]])
Hi1=Qobj(Hi)
Hi2=Qobj(np.transpose(Hi))
H = QobjEvo([H0,[Hi1,h12],[Hi2,h21]])
return H

Reply all
Reply to author
Forward
0 new messages