Clear[Axs]
Clear[Ixs]
Clear[AIx]
Clear[Ro1]
Clear[Ro]
Clear[R1]
Clear[R2]
Clear[R3]
Clear[FF]
Clear[y]
Clear[H]
Clear[ge]
Clear[mb]
Clear[Bz]
Clear[Apar]
Clear[Aperp]
Clear[DNV]
Clear[H]
Clear[Detuning]
Clear[t]
(*NV papameters*)
ge:=2;
Bz=50;
mb=1.4;
Apar:=100;
Aperp:=50
DNV:=2870;

(*microwave*)
Detuning:=1

(*spin matrices*)

Ro:=(({{0.4, 0}, {0, 0.6}}))

sx:=PauliMatrix[1];
sy:=PauliMatrix[2];
sz:=PauliMatrix[3];
ix:=PauliMatrix[1];
iy:=PauliMatrix[2];
iz:=PauliMatrix[3];
plus:=(({{0, 1}, {0, 0}}))
minus:=(({{0, 0}, {1, 0}}))
un:=(({{1, 0}, {0, 1}}))
R1:=MatrixExp[-t*I*(ix)].Ro.MatrixExp[t*I*(ix)]
Res1:=R1
Pop=Part[Res1,1,1];
Corr:=Function[(t),Pop][t]
Print[Corr]
Plot[Corr, {t,0,9}]