Time evolution of eigenvale

21 views
Skip to first unread message

mehrosadate...@gmail.com

unread,
May 1, 2017, 3:13:15 PM5/1/17
to QuTiP: Quantum Toolbox in Python
Hello,

I have a problem. I have a time dependent Hamiltonian (H(t) = H_0 + s(t)*H_1).
I want to plot the time evolution of eigenvalues according to time. But I do not know how!!!
Can you please help me?

Regards
Mehrosadat

mehrosadate...@gmail.com

unread,
May 2, 2017, 12:55:44 AM5/2/17
to QuTiP: Quantum Toolbox in Python
Hello,

Related to my previous question, my code is in this way:

import time
from pylab import*
import numpy as np
from qutip import *
from math import sqrt
import matplotlib.pyplot as plt
times= np.linspace(0,0.168,200)
I=tensor(qeye(2),qeye(2),qeye(2))
psi1=(fock(2,0)-fock(2,1)).unit()
psii=tensor(psi1,psi1,psi1)
sz1=tensor(sigmaz(),qeye(2),qeye(2))
sz2=tensor(qeye(2),sigmaz(),qeye(2))
sz3=tensor(qeye(2),qeye(2),sigmaz())
sx1=tensor(sigmax(),qeye(2),qeye(2))
sx2=tensor(qeye(2),sigmax(),qeye(2))
sx3=tensor(qeye(2),qeye(2),sigmax())
H0=30*(sx1+sx2+sx3)
H1=-210*I+84*sz1+88*sz2+44*sz3-20*sz1*sz2-10*sz1*sz3+20*sz2*sz3-16*sz1*sz2*sz3-30*(sx1+sx2+sx3)
def H1_coeff(t,args):return -(times/0.168)**2
H=[H0, [H1,H1_coeff]]
result=mesolve(H,psii,times,[],[H])

but in the last line, I receive AttributeError: 'list' object has no attribute 'isherm' !!!
I do not know what is my problem and what should I do.

Can you please help me?

Regards
Mehrosadat




Paul Nation

unread,
May 2, 2017, 1:16:22 AM5/2/17
to QuTiP Group
You need to update to the latest development version on GitHub.

-P

--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mehrosadate...@gmail.com

unread,
May 2, 2017, 1:31:53 AM5/2/17
to QuTiP: Quantum Toolbox in Python
Does not it need that I change last line to:
result=mesolve(H,psii,times,[],[],progress_bar=None,options=None,None,[sz1]) ??
although, in this way I receive
SyntaxError: non-keyword arg after keyword arg !!!

Is there any problem?

Thanks
Mehrosadat
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages