3.1.- S=1/2 - Heisenberg

S0={{1,0},{0,1}} ; (*Identidad 2x2*)
Sx={{0,1},{1,0}} ; (*Sigma x*)
Sy={{0,-I},{I,0}} ;
Sz={{1,0},{0,-1}} ;

H2={{(Subscript[w, 1]),0},{0,(Subscript[w, 2])}}; (*Hamiltoniano 2x2*)

U2={{Exp[-I (Subscript[w, 1])t], 0},{0, Exp[-I (Subscript[w, 2])t]}};
U2dg= {{Exp[I (Subscript[w, 1])t],0},{0, Exp[I (Subscript[w, 2])t]}};
Ro2 = 1/Z {{Exp[-b (Subscript[w, 1])], 0},{0, Exp[-b (Subscript[w, 2])]}};

S={S0,Sx,Sy,Sz} ;

Do[{Print[ Subscript["A",n],"(t)=" , Simplify[MatrixForm[ExpToTrig[U2dg.S[[n+1]].U2]]]]},{n, 0,3}](* los índices del vector en mathematica van del 1 al 4, de ahí el n+1 *)

Do[Do[Print["<",Subscript["A",n],"(0)",Subscript["A",m],"(t)", "> = ", Tr[Ro2.U2dg.S[[n+1]].U2.S[[m+1]]]],{n, 0,3}],{m,0,3}] (* los índices del vector en mathematica van del 1 al 4, de ahí el n+1 y el m+1 *)

C2[t_]=(((E^(-3+3I t-I t))/((E^(-3))+(E^(-1))))+((E^(-1-3I t+I t ))/((E^(-3))+(E^(-1)))))+(1)(*Correlación (1/2)A1+(1/2)A3 para w1=3, w2=1, b=1*)
ParametricPlot[{Re[((C2[t])/(C2[0]))],Im[((C2[t])/(C2[0]))]},{t,0,Pi},AxesLabel->{Style["Re (OverTilde[C])(t)" ,Bold,16],Style["Im (OverTilde[C])(t)",Bold,16]}, FormatType->StandardForm]