"Spin part 1" Sx = 1/2 hbar ((0,1),(1,0)) Sy = 1/2 hbar ((0,-i),(i,0)) Sz = 1/2 hbar ((1,0),(0,-1)) xp = (1,1) / sqrt(2) xm = (1,-1) / sqrt(2) yp = (1,i) / sqrt(2) ym = (1,-i) / sqrt(2) zp = (1,0) zm = (0,1) "Verify eigenvectors" check(Sx == hbar/2 outer(xp,conj(xp)) - hbar/2 outer(xm,conj(xm))) check(Sy == hbar/2 outer(yp,conj(yp)) - hbar/2 outer(ym,conj(ym))) check(Sz == hbar/2 outer(zp,conj(zp)) - hbar/2 outer(zm,conj(zm))) "ok"
Run