In [2]:
from numpy import sin,cos,pi,sqrt
from qutip import *
In [3]:
pz = Qobj([[1],[0]]) # +z
mz = Qobj([[0],[1]]) # -z
px = Qobj([[1/sqrt(2)],[1/sqrt(2)]]) # +x
mx = Qobj([[1/sqrt(2)],[-1/sqrt(2)]]) # -x
py = Qobj([[1/sqrt(2)],[1j/sqrt(2)]]) # +y
my = Qobj([[1/sqrt(2)],[-1j/sqrt(2)]]) # -y
Sx = 1/2.0*sigmax()
Sy = 1/2.0*sigmay()
Sz = 1/2.0*sigmaz()
In [4]:
((px.dag()*my).norm())**2
Out[4]:
In [5]:
Sx*Sz - Sz*Sx == -1j*Sy # remember, h = 1
Out[5]:
In [6]:
pz.dag()*Sx*pz
Out[6]:
This makes sense given that $S_x$ can be either $\frac{+\hbar}{2}$ or $\frac{-\hbar}{2}$ with equal probability. Similarly, if the state is $|\psi\rangle=|+x\rangle$.
In [7]:
px.dag()*Sx*px
Out[7]:
Again, in units of $\hbar$.
Calculate the expectation value $\langle S_z \rangle$ for the states $|+x\rangle, |+y\rangle, |+z\rangle$
Calculate the expectation value $\langle S_z \rangle$ for the state $|\psi\rangle = \frac{1}{\sqrt{2}}|+x\rangle + \frac{1}{\sqrt{2}}|-x\rangle$. Interpret this result, does it make sense? Is there a simpler way to write this state?
Represent the spin-squared operator $\hat S^2$ as a matrix.
Verify that the $\hat S^2$ commutes with each spin component: $\hat S_x, \hat S_y, \hat S_z$
Find the expectation value of $S^2$ for the three postive spins: $|+x\rangle, |+y\rangle, and |+z\rangle$. Interpret your results. Do the values differ? Should they?
Problem 6.9, 6.11, 6.12 from Chapter 6
In [ ]: