Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

//ANGULAR MOMENTUM QUANTUM MECHANICS

diary("angular_momentum_quantum")
Mx = 1/(sqrt(2))*[0,1,0;1,0,1;0,1,0]
disp("Mx Matrix")
disp(Mx)

My = 1/(sqrt(2))*[0,-%i,0;%i,0,-%i;0,%i,0]
disp("My Matrix")
disp(My)

Mz = [1,0,0;0,0,0;0,0,-1]
disp("Mz matrix")
disp(Mz)

disp("========================================================
===")
disp("PROPERTY 1 - CHECK FOR HERMITIAN ")
disp("Dager of Mx matrix")
disp(Mx')
disp("Mx is Hermitian")

disp("--------------------------------------------------------
---")
disp("Dager of My matrix")
disp(My')
disp("My is Hermitian")

disp("--------------------------------------------------------
---")
disp("Dager of Mz matrix")
disp(Mz')
disp("Mz is Hermitian")

disp("========================================================
===")
disp("PROPERTY 2 - CHECK FOR COMMUTATOR ")
disp("Commutator of Mx and My")
cMxy = Mx*My - My*Mx
disp(cMxy)
disp("Commutator of Mx and My = i*Mz")

disp("--------------------------------------------------------
---")
disp("Commutator of My and Mz")
cMyz = My*Mz - Mz*Mx
disp(cMzy)
disp("Commutator of Mz and My = i*Mx")

disp("--------------------------------------------------------
---")
disp("Commutator of Mz and Mx")
cMzx = Mz*Mx - Mx*My
disp(cMzy)
disp("Commutator of Mz and Mx = i*My")

disp("========================================================
===")
disp("PROPERTY 3 - M^2 = Mx^2 + My^2 + Mz^2 = 2*I")
M2 = Mx*Mx + My*My + Mz*Mz
disp(M2)

disp("========================================================
===")
disp("PROPERTY 4 - COMMUTATOR OF M^2 and Mx ")
M2x = M2*Mx - Mx*M2
M2y = M2*My - My*M2
M2z = M2*Mz - Mz*M2

disp("Commutator of M^2 and Mx is ")


disp(M2x)
disp(" [M^2,Mx] = 0 ")

disp("--------------------------------------------------------
---")
disp("Commutator of M^2 and My is ")
disp(M2y)
disp(" [M^2,My] = 0 ")

disp("--------------------------------------------------------
---")
disp("Commutator of M^2 and Mz is ")
disp(M2z)
disp(" [M^2,Mz] = 0 ")

disp("========================================================
===")
Lp = Mx + %i*My
Ln = Mx - %i*My

disp("L+ Maatrix = Mx + %i*My")


disp(Lp)

disp("L- Maatrix = Mx - %i*My")


disp(Ln)

disp("========================================================
===")
disp("PROPERTY 5 - ")
disp("Commutator of L+ and L- is ")
LpLn = Lp*Ln - Ln*Lp
disp(LpLn)
disp("[L+,L-] = 2*Mz")

disp("========================================================
===")
disp("PROPERTY 6 -")
disp("Commutator of Mz and L+")
MzLp = Mz*Lp - Lp*Mz
disp(MzLp)
disp("[Mz,L+] = L+ ")

disp("Commutator of Mz and L-")


MzLn = Mz*Ln - Ln*Mz
disp(MzLn)
disp("[Mz,L-] = L- ")

diary([],'close')

You might also like