In [1]:
from qutip import *
from numpy import cos, sin, pi, deg2rad
In [2]:
qm = Qobj([[cos(pi/4)**2,cos(pi/4)*sin(pi/4)],[cos(pi/4)*sin(pi/4),sin(pi/4)**2]])
In [3]:
qm
Out[3]:
In [4]:
qm.eigenstates()
Out[4]:
In [5]:
from numpy import sqrt, exp
1/sqrt(2)
Out[5]:
In [6]:
phi = 1.5
Jphi = Qobj([[exp(1j)*phi,0],[0,1]])
Jphi
Out[6]:
In [7]:
hvec = Qobj([[1],[0]])
hvec
Out[7]:
In [8]:
vvec = Qobj([[0],[1]])
vvec
Out[8]:
In [9]:
Jphi*hvec
Out[9]:
In [10]:
Jphi*vvec
Out[10]:
In [ ]: