不知道为什么代码总显示内存不足,明明循环次数也不是很多,但就是跑不出结果,然后卡死,代码如下,请吧内大佬帮忙看一下
SigmaL1minus=(000
000
010
);SigmaL1plus=(000
001
000
);SigmaL2minus=(000
000
100
);SigmaL2plus=(001
000
000
);
SigmaBminus=(00
10
);SigmaBplus=(01
00
);
DL=IdentityMatrix[3];
DB=IdentityMatrix[2];
VL=KroneckerProduct[SigmaL1plus,SigmaBminus]+KroneckerProduct[SigmaL1minus,SigmaBplus]+KroneckerProduct[SigmaL2plus,SigmaBminus]+KroneckerProduct[SigmaL2minus,SigmaBplus];
Utot=MatrixExp[-I VL];
UtotDigger=MatrixExp[I VL];
T=1;
\[Beta]=1/T;\[Beta]=0;
\[Alpha]=1;
\[Phi]=0;
Za=1+2Exp[-\[Beta]];
A11=1/Za;A22=Exp[-\[Beta]]/Za;A33=A22;
A12=\[Alpha] Exp[-I \[Phi]]Sqrt[A22 A11];A21=A12;
HB=(10
00
);
Zb=Tr[MatrixExp[-\[Beta] HB]];
B11=1/Zb;B22=Exp[-\[Beta]]/Zb;
\[Rho]L0=(A3300
0A22A21
0A12A11
);
\[Rho]B0=(B220
0B11
);
NestWhile[(\[Rho]ini0=KroneckerProduct[\[Rho]L0,\[Rho]B0];
\[Rho]tot1= Utot.\[Rho]ini0.UtotDigger;
\[Rho]B0=(\[Rho]tot1[[1,1]]+\[Rho]tot1[[3,3]]+\[Rho]tot1[[5,5]]\[Rho]tot1[[1,2]]+\[Rho]tot1[[3,4]]+\[Rho]tot1[[5,6]]
\[Rho]tot1[[2,1]]+\[Rho]tot1[[4,3]]+\[Rho]tot1[[6,5]]\[Rho]tot1[[2,2]]+\[Rho]tot1[[4,4]]+\[Rho]tot1[[6,6]]
);
i++
)&,i=1,i<=10&];
\[Rho]B0//MatrixForm
SigmaL1minus=(000
000
010
);SigmaL1plus=(000
001
000
);SigmaL2minus=(000
000
100
);SigmaL2plus=(001
000
000
);
SigmaBminus=(00
10
);SigmaBplus=(01
00
);
DL=IdentityMatrix[3];
DB=IdentityMatrix[2];
VL=KroneckerProduct[SigmaL1plus,SigmaBminus]+KroneckerProduct[SigmaL1minus,SigmaBplus]+KroneckerProduct[SigmaL2plus,SigmaBminus]+KroneckerProduct[SigmaL2minus,SigmaBplus];
Utot=MatrixExp[-I VL];
UtotDigger=MatrixExp[I VL];
T=1;
\[Beta]=1/T;\[Beta]=0;
\[Alpha]=1;
\[Phi]=0;
Za=1+2Exp[-\[Beta]];
A11=1/Za;A22=Exp[-\[Beta]]/Za;A33=A22;
A12=\[Alpha] Exp[-I \[Phi]]Sqrt[A22 A11];A21=A12;
HB=(10
00
);
Zb=Tr[MatrixExp[-\[Beta] HB]];
B11=1/Zb;B22=Exp[-\[Beta]]/Zb;
\[Rho]L0=(A3300
0A22A21
0A12A11
);
\[Rho]B0=(B220
0B11
);
NestWhile[(\[Rho]ini0=KroneckerProduct[\[Rho]L0,\[Rho]B0];
\[Rho]tot1= Utot.\[Rho]ini0.UtotDigger;
\[Rho]B0=(\[Rho]tot1[[1,1]]+\[Rho]tot1[[3,3]]+\[Rho]tot1[[5,5]]\[Rho]tot1[[1,2]]+\[Rho]tot1[[3,4]]+\[Rho]tot1[[5,6]]
\[Rho]tot1[[2,1]]+\[Rho]tot1[[4,3]]+\[Rho]tot1[[6,5]]\[Rho]tot1[[2,2]]+\[Rho]tot1[[4,4]]+\[Rho]tot1[[6,6]]
);
i++
)&,i=1,i<=10&];
\[Rho]B0//MatrixForm