👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
摘要:
📚2 运行结果
部分代码:
t=zeros(1,Nsim+1);
Xbar=zeros(n,n,Nsim+1);
Xbar(:,:,1)=Id;
W0=Id;
for ii=1:Nsim
t(ii+1)=t(ii)+dt;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Runge-Kutta 4th order (open loop) Xbar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tau=0; % t=t0
%W0=0
%%%% Compute k1 = dt*f(t0,W0)
Stil=-1j*H0;
for k=1:m
uk=1/dt*(tau*U(k,ii+1)+ (dt-tau)*U(k,ii));
Stil=Stil+uk*S(:,:,k);
end
k1=dt*f_W2(W0,Stil);
%%%% end of Computation of k1
tau=dt/2;
W1=W0+k1/2;
%%%% Compute k2 = dt*f(t0+dt/2,W1)
if piecewise_constant == 0
Stil=-1j*H0;
for k=1:m
uk=1/dt*(tau*U(k,ii+1)+ (dt-tau)*U(k,ii));
Stil=Stil+uk*S(:,:,k);
end
end
k2=dt*f_W2(W1,Stil);
%%%% end of Computation of k2
tau=dt/2;
W2=W0+k2/2;
%%%% Compute k3 = dt*f(t0+dt/2,W2)
% Stil=-1j*H0; already done before
% for k=1:m
% uk=1/dt*(tau*U(k,ii+1)+ (dt-tau)*U(k,ii));
% Stil=Stil+uk*S(:,:,k);
% end
k3=dt*f_W2(W2,Stil);
%%%% end of computation of k3
tau=dt;
W3=W0+k3;
%%%% Compute k3 = dt*f(t0+dt,W3)
if piecewise_constant == 0
Stil=-1j*H0;
for k=1:m
uk=1/dt*(tau*U(k,ii+1)+ (dt-tau)*U(k,ii));
Stil=Stil+uk*S(:,:,k);
end
end
k4=dt*f_W2(W3,Stil);
%%%% end of Computation of k4
W0=W0+1/6*(k1+2*k2+2*k3+k4);
if svd_corr == 1
[UU1,SS1,VV1]=svd(W0);
W0=UU1*VV1';
end
Xbar(:,:,ii+1)=W0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% end of Runge-Kutta for Xbar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]Paulo Sergio Pereira da Silva, Hector Bessa Silveira, Pierre Rouchon. "Fast and virtually exact quantum gate generation in U(n) via iterative Lyapunov methods." International Journal of Control (2019): 1-15.Fast and virtually exact quantum gate generation in U(n) via iterative Lyapunov methods: International Journal of Control: Vol 94, No 4 (tandfonline.com)