lista={a,b,c,d}

lista

lista[[5]]

lista={{1,2},{3,4}}

lista[[2,2]]

MatrixForm[lista]

lista=Table[Subscript[u,i,j],{i,1,4},{j,1,4}]

MatrixForm[lista]

Do[
a=i i;
Print[i, " ",a];
,{i,1,10}]

j=1/2;
Jx=Table[(ℏ/2)(Sqrt[j(j+1)-mp(mp+1)])KroneckerDelta[m,mp+1]+(ℏ/2)(Sqrt[j(j+1)-mp(mp-1)])KroneckerDelta[m,mp-1],{m,j,-j,-1},{mp,j,-j,-1}];
Jy=Table[(ℏ/(2I))(Sqrt[j(j+1)-mp(mp+1)])KroneckerDelta[m,mp+1]-(ℏ/(2I))(Sqrt[j(j+1)-mp(mp-1)])KroneckerDelta[m,mp-1],{m,j,-j,-1},{mp,j,-j,-1}];
Jz=Table[ℏ m KroneckerDelta[m,mp],{m,j,-j,-1},{mp,j,-j,-1}];

Jz//MatrixForm

Jx.Jy -Jy.Jx-I ℏ Jz

commu[A_,B_]:=A.B-B.A;

5==5

commu[Jx,Jy]-I ℏ Jz

Eigenvalues[Jy]

Jn=Jx Sin[θ]Cos[ϕ]+Jy Sin[θ]Sin[ϕ]+Jz Cos[θ]

Jn//MatrixForm

Eigenvalues[Jn]

ev=Eigenvectors[Jn]

n1=Simplify[(Sqrt[Conjugate[ev[[1]]].ev[[1]]]),Assumptions->{θ>0,ϕ>0}];
v1=Simplify[ev[[1]]/n1,Assumptions->{θ>0,ϕ>0}]

FullSimplify[Normalize[ev[[1]]],Assumptions->{θ>0,ϕ>0}]

FullSimplify[Normalize[ev[[2]]],Assumptions->{θ>0,ϕ>0}]

H=ω Jy
Eigenvalues[H]

U=MatrixExp[-I ((H t)/ℏ)]

ψy=(1/(Sqrt[2])){1,I}

ap=Simplify[Conjugate[ψy].U.ψy]
p=Simplify[ap Conjugate[ap],Assumptions->{t>0,ω>0}]

ψz={1,0}
ψmz={0,1}
ψx=(1/(Sqrt[2])){1,1}

ap=Simplify[Conjugate[ψz].U.ψz]
pz=Simplify[ap Conjugate[ap],Assumptions->{t>0,ω>0}]
ap=Simplify[Conjugate[ψmz].U.ψmz]
pmz=Simplify[ap Conjugate[ap],Assumptions->{t>0,ω>0}]
ap=Simplify[Conjugate[ψx].U.ψx]
px=Simplify[ap Conjugate[ap],Assumptions->{t>0,ω>0}]

ω=1;
Plot[p,{t,0,16}]

ψ=U.ψz;

sx=Simplify[Conjugate[ψ].Jx.ψ,Assumptions->{t>0,ω>0}]/.{ℏ->1}
sy=Simplify[Conjugate[ψ].Jy.ψ,Assumptions->{t>0,ω>0}]/.{ℏ->1}
sz=Simplify[Conjugate[ψ].Jz.ψ,Assumptions->{t>0,ω>0}]/.{ℏ->1}

Plot[{sx,sy,sz},{t,0,16}]

Show[{ParametricPlot[{sx,sz},{t,0,16}],Line[{{0,0},{1,1}}]}]

Manipulate[Line[{{0,0}]]

Line[{{0,0},{1,1}}]

Manipulate[ParametricPlot[{a Sin[θ],b Cos[θ]},{θ,0,2π},PlotRange->{{-2,2},{-2,2}}],{a,0,2},{b,0,2}]

ParametricPlot[{1 Sin[θ],2 Cos[θ]},{θ,0,2π}]

MatrixExp[-((I ϕ)/ℏ)Jx]-(Cos[(ϕ/2)]IdentityMatrix[2]-I ((2Jx)/ℏ)Sin[(ϕ/2)])