时间相关哈密顿量的薛定谔方程是
我尝试在 ODE 45 中解决时间相关哈密顿量的薛定谔方程。但是,因为哈密顿量取决于时间,我不知道如何在 ode45 中进行插值。你能给我一些提示吗?
psi0 = [0 1];
H = [1 0;0 1]*cos(t); %this is wrong, I do not know how to implement this and pass it to ode45
hbar = 1;
t = [0:1:100];
[T, psi] = ode45(dpsi, t, psi);
function dpsi = f(t, psi, H, psi0)
dpsi = (1/i)*H*psi;