3.2.- S=1 - Heisenberg

GM0={{1,0,0},{0,1,0},{0,0,1}} ; (*IDENTIDAD*)
GM1={{0,1,0},{1,0,0},{0,0,0}} ;
GM2={{0,-I,0},{I,0,0},{0,0,0}} ;
GM3={{1,0,0},{0,-1,0},{0,0,0}} ;
GM4={{0,0,1},{0,0,0},{1,0,0}} ;
GM5={{0,0,-I},{0,0,0},{I,0,0}} ;
GM6={{0,0,0},{0,0,1},{0,1,0}} ;
GM7={{0,0,0},{0,0,-I},{0,I,0}} ;
GM8={{3^(-1/2),0,0},{0,3^(-1/2),0},{0,0,-2 3^(-1/2)}} ;

H3={{(Subscript[w, 1]),0,0},{0,(Subscript[w, 2]),0},{0,0,(Subscript[w, 3])}};

U3={{Exp[-I (Subscript[w, 1])t], 0,0},{0, Exp[-I (Subscript[w, 2])t],0},{0,0,Exp[-I (Subscript[w, 3])t]}};
U3dg= {{Exp[I (Subscript[w, 1])t], 0,0},{0, Exp[I (Subscript[w, 2])t],0},{0,0,Exp[I (Subscript[w, 3])t]}};
Ro3 = 1/Z {{Exp[-b (Subscript[w, 1])], 0,0},{0, Exp[-b (Subscript[w, 2])],0},{0,0,Exp[-b (Subscript[w, 3])]}};

GM={GM0, GM1, GM2, GM3, GM4, GM5, GM6, GM7, GM8} ;

Do[{Print[ Subscript["A",n],"(t)=" , Simplify[MatrixForm[ExpToTrig[U3dg.GM[[n+1]].U3]]]]},{n, 0,8}](* los índices de un vector en mathematica van del 1 al 9, de ahí el n+1 *)

Do[Do[Print["<",Subscript["A",n],"(0)",Subscript["A",m],"(t)", "> = ",Tr[Ro3.U3dg.GM[[n+1]].U3.GM[[m+1]]]],{n, 0,8}],{m,0,8}] (* los índices de un vector en mathematica van del 1 al 9, de ahí el n+1 y el m+1 *)