2.3 Find the eigenvalues and vectors of J_\theta for \theta=45
2.3 Find the eigenvalues and vectors of J for =45¶
from qutip import *
from numpy import cos, sin, pi, deg2radqm = Qobj([[cos(pi/4)**2,cos(pi/4)*sin(pi/4)],[cos(pi/4)*sin(pi/4),sin(pi/4)**2]])qmLoading...
qm.eigenstates()(array([0., 1.]),
array([Quantum object: dims=[[2], [1]], shape=(2, 1), type='ket', dtype=Dense
Qobj data =
[[ 0.70710678]
[-0.70710678]] ,
Quantum object: dims=[[2], [1]], shape=(2, 1), type='ket', dtype=Dense
Qobj data =
[[-0.70710678]
[-0.70710678]] ],
dtype=object))from numpy import sqrt, exp
1/sqrt(2)np.float64(0.7071067811865475)phi = 1.5
Jphi = Qobj([[exp(1j)*phi,0],[0,1]])
JphiLoading...
hvec = Qobj([[1],[0]])
hvecLoading...
vvec = Qobj([[0],[1]])
vvecLoading...
Jphi*hvecLoading...
Jphi*vvecLoading...