Issue in getting correct probabilities for Landau Zener Problem
I am trying to solve the Landau Zener problem where i have the equations
I have written a code using Finite Difference as given below. The result is wrong. The correct result is
Can anybody help find the error?
clc;
close all;
%———————————————————————–%
v = 0.1; % sweep velocity
delta =4; % coupling parameter between the ground and excited states
t_max = 1000;
dt = 0.1; % time step
t = -t_max:dt:t_max; % defining time range with step size dt
N = length(t);
b=delta/2;
hbar=1;
%—- initial conditions————-
cg(1:N+1)=1; % initial ground state
ce(1:N+1)=0; % initial excited state
for i=1:N % finite difference loop for advancing in time
a=v*t(i)/2;
cg(i+1)=(dt*a*t(i)/1i*hbar)*cg(i)+cg(i)+ dt*b*ce(i)/1i*hbar;
ce(i+1)=-(dt*a*t(i)/1i*hbar)*ce(i)+ce(i) + dt*b*cg(i)/1i*hbar;
end
% plotting the probabilities in ground and excited states
plot(t,abs(cg(1:N).*cg(1:N)),’linewidth’,2)
hold on
plot(t,abs(ce(1:N).*ce(1:N)),’r’,’linewidth’,2)
xlabel(‘Time’);
ylabel(‘Probability’);
legend(‘|c1|^2’, ‘|c2|^2’)I am trying to solve the Landau Zener problem where i have the equations
I have written a code using Finite Difference as given below. The result is wrong. The correct result is
Can anybody help find the error?
clc;
close all;
%———————————————————————–%
v = 0.1; % sweep velocity
delta =4; % coupling parameter between the ground and excited states
t_max = 1000;
dt = 0.1; % time step
t = -t_max:dt:t_max; % defining time range with step size dt
N = length(t);
b=delta/2;
hbar=1;
%—- initial conditions————-
cg(1:N+1)=1; % initial ground state
ce(1:N+1)=0; % initial excited state
for i=1:N % finite difference loop for advancing in time
a=v*t(i)/2;
cg(i+1)=(dt*a*t(i)/1i*hbar)*cg(i)+cg(i)+ dt*b*ce(i)/1i*hbar;
ce(i+1)=-(dt*a*t(i)/1i*hbar)*ce(i)+ce(i) + dt*b*cg(i)/1i*hbar;
end
% plotting the probabilities in ground and excited states
plot(t,abs(cg(1:N).*cg(1:N)),’linewidth’,2)
hold on
plot(t,abs(ce(1:N).*ce(1:N)),’r’,’linewidth’,2)
xlabel(‘Time’);
ylabel(‘Probability’);
legend(‘|c1|^2’, ‘|c2|^2’) I am trying to solve the Landau Zener problem where i have the equations
I have written a code using Finite Difference as given below. The result is wrong. The correct result is
Can anybody help find the error?
clc;
close all;
%———————————————————————–%
v = 0.1; % sweep velocity
delta =4; % coupling parameter between the ground and excited states
t_max = 1000;
dt = 0.1; % time step
t = -t_max:dt:t_max; % defining time range with step size dt
N = length(t);
b=delta/2;
hbar=1;
%—- initial conditions————-
cg(1:N+1)=1; % initial ground state
ce(1:N+1)=0; % initial excited state
for i=1:N % finite difference loop for advancing in time
a=v*t(i)/2;
cg(i+1)=(dt*a*t(i)/1i*hbar)*cg(i)+cg(i)+ dt*b*ce(i)/1i*hbar;
ce(i+1)=-(dt*a*t(i)/1i*hbar)*ce(i)+ce(i) + dt*b*cg(i)/1i*hbar;
end
% plotting the probabilities in ground and excited states
plot(t,abs(cg(1:N).*cg(1:N)),’linewidth’,2)
hold on
plot(t,abs(ce(1:N).*ce(1:N)),’r’,’linewidth’,2)
xlabel(‘Time’);
ylabel(‘Probability’);
legend(‘|c1|^2’, ‘|c2|^2’) numerical integration, finite difference, schrodinger equation, differential equations MATLAB Answers — New Questions