Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

2.3 Find the eigenvalues and vectors of J_\theta for \theta=45

2.3 Find the eigenvalues and vectors of Jθ_\theta for θ\theta=45

from qutip import *
from numpy import cos, sin, pi, deg2rad
qm = Qobj([[cos(pi/4)**2,cos(pi/4)*sin(pi/4)],[cos(pi/4)*sin(pi/4),sin(pi/4)**2]])
qm
Loading...
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]])
Jphi
Loading...
hvec = Qobj([[1],[0]])
hvec
Loading...
vvec = Qobj([[0],[1]])
vvec
Loading...
Jphi*hvec
Loading...
Jphi*vvec
Loading...