The mesolve results are different between 'ket' and 'dm'

21 views
Skip to first unread message

Ming Gong

unread,
Mar 6, 2017, 11:59:52 PM3/6/17
to QuTiP: Quantum Toolbox in Python
Hi,

I am trying to figure out the difference when use a 'ket' or 'dm' as the input initial state in running mesolve method. The sigma_x and sigma_y components are both different even when the 'ket' and 'dm' stands for the same state. I also tried in the rotating frame.

Please see the code followed.

from qutip import *

import numpy as np

import matplotlib.pyplot as plt 

from qutip import gates

import math

from time import clock

pi=np.pi

wd = 5.0  * 2 * pi  # drive frequency

wa = 5.0  * 2 * pi  # atom frequency

omega  = 0.05 * 2 * pi  # coupling 

tlist = np.linspace(0,5000,100001)

psi0 = (basis(2,0)+ basis(2,1)).unit()   # start with an excited atom

#psi0=psi0.ptrace(0)

print(psi0)

sm = destroy(2)

H0 = wa*sigmaz()/2

output2 = mesolve(H0, psi0, tlist, [], [])

plt.figure()

n_q=[]

subplot(3,1,1)

#for t in range(0,len(tlist)):

#    U=(np.exp(1j*wd*tlist[t])*sm.dag()*sm+sm*sm.dag())#.dag()

#    op=U*sigmax()*U.dag()

#    n_q.append(expect(op,output2.states[t]))

n_q=expect(sm.dag()+sm,output2.states)

plot(tlist,n_q,label='sigma_x')

title(psi0)

n_q=[]   

subplot(3,1,2)

#for t in range(0,len(tlist)):

#    U=(np.exp(1j*wd*tlist[t])*sm.dag()*sm+sm*sm.dag())#.dag()

#    op=U*sigmay()*U.dag()

#    n_q.append(expect(op,output2.states[t]))

n_q=expect(1j*(sm.dag()-sm),output2.states)

plot(tlist,n_q,label='sigma_y')

subplot(3,1,3)

plot(tlist,expect(sm.dag()*sm,output2.states),label='sigma_z')

The results are attached:
Initial state is a ket: up to down are sigma_x, sigma_y and sigma_z, respectively.

 
Initial state is a density matrix:


In the rotating frame:
Initial state is a ket: 


Initial state is a density matrix:


Reply all
Reply to author
Forward
0 new messages