简单两能级系统动力学
1
相互作用绘景下的系统
2
适当选取绘景后的系统
import qutip as qt
# parameters of the Hamiltonian
Omega = 1.0 #Rabi freq
delta0 = 0 #detuning
delta1 = Omega
#the time−indepdendent hamiltonians
H0 = (delta0/2)*qt.sigmaz() - (Omega/2)*qt.sigmax()
H1 = (delta1/2)*qt.sigmaz() - (Omega/2)*qt.sigmax()
t0 = 0
t1 = 20
N=1.0E4
tlist = np.linspace(t0, t1, N)
#expectation values to compute over evolution
proj1 = qt.basis(2,0)*qt.basis(2,0).dag()
e_ops = [ proj1]
## Start from ground state:
psi0 = qt.basis(2,0)
result0 = qt.mesolve(H0, psi0 , tlist , c_ops=[], e_ops=e_ops)
result1 = qt.mesolve(H1, psi0 , tlist , c_ops=[], e_ops=e_ops)
plt.plot(tlist, result0.expect[0],'-',lw=3)
plt.plot( tlist , result1.expect[0],'--',lw=3)
plt.xlabel(r'Time ($1/\Omega$)')
plt.ylabel(r'$P(1)$')
plt.legend([ r'$ \delta = 0$', 'delta = Omega'])
plt.title('Ground−state probability in RWA')
plt.savefig('RWA_qutip.png',format='png',dpi=300)
plt.show()
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
import qutip as qt
Omega = 1.0
H0 = 0*qt.identity(2)
def delta_linear(t, d0, t0):
return d0*(t/t0)
def sigmaPlusCoeff(t, d0, t0):
return -(Omega/2)*np.exp(1j*delta_linear(t, d0, t0)*t)
def sigmaMinusCoeff(t,d0, t0):
return np.conj(sigmaPlusCoeff(t, d0, t0))
sPlus = qt.basis(2,0)*qt.basis(2,1).dag()
sMinus= qt.basis(2,1)*qt.basis(2,0).dag()
d0 = 100*Omega
t0 = 10*Omega
spFast = lambda t, args: sigmaPlusCoeff(t, d0, t0)
smFast = lambda t, args: np.conj(spFast(t, args))
hlist = [H0, [sPlus, spFast],[sMinus, smFast]]
tstart = -t0
tstop = t0
N = 1.0E4
tlist = np.linspace(tstart, tstop, N)
proj1 = qt.basis(2,0)*qt.basis(2,0).dag()
e_ops = [proj1]
psi0 = qt.basis(2,0)
result = qt.mesolve(hlist, psi0, tlist, c_ops=[], e_ops = e_ops)
plt.plot(tlist, result.expect[0],'-',lw=3)
plt.show()
联系客服