ZVODE-- At current T (=R1), MXSTEP (=I1) steps
taken on this call before reaching TOUT
In above message, I1 = 500
In above message, R1 = 0.9081075324918D+01
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/site-
packages/scipy/integrate/ode.py:689: UserWarning: zvode: Excess work
done on this call. (Perhaps wrong MF.)
self.messages.get(istate, 'Unexpected istate=%s'%istate))
[array([ 0.02175746, 0. , 0. , 0. ,
0. ,
0. , 0. , 0. , 0. ,
0. ])]
i read 'which solver should i use' part of the manual,
and it seems like setting tmax large shouldn't be a problem if I wait
long enough.
could you have a look at this?
thanks,
myung-joong
-------------------------------------------------------------------------------
from qutip import *
from pylab import *
wc = 1 # cavity frequency
wa = 10 # atom frequency
g=1 # coupling strength
kappa=0.01 # cavity decay rate
N = 40 # number of cavity fock states
tmax=80
tlist = linspace(0,tmax,10)
a = tensor(destroy(N), qeye(2))
sm = tensor(qeye(N), destroy(2))
c_op_list = [] # collapse operators
c_op_list.append(sqrt(kappa) * a)
H = wc * a.dag() * a + wa * sm.dag() * sm + g * (a.dag() + a) * (sm +
sm.dag())
ekets, evals = H.eigenstates()
groundstate = ekets[0]
wf_list=odesolve(H, groundstate, tlist, c_op_list,[a.dag()*a])
print wf_list
It looks like you are taking too big of a step in the ODE solver, dt=9 in your case. You can either change the tlist to
tlist = linspace(0,tmax,100)
or you can use the Odeoptions class to set the number of internal steps:
opts=Odeoptions()
opts.nsteps=1000
wf_list=odesolve(H, groundstate, tlist, c_op_list,[a.dag()*a],options=opts)
I guess the first option is easiest.
Paul