Skip to content

Solving the one-dimensional time-dependent Schrodinger Equation for different potentials using the Crank-Nicolson method and analyzing the wavefunctions.

Notifications You must be signed in to change notification settings

aychun/Crank-Nicolson-Method-for-Time-Dependent-Schrodinger-Equation

Repository files navigation

Crank-Nicolson-Method-for-Time-Dependent-Schrodinger-Equation

Crank-Nicolsan method is used for numerically solving partial differential equations. This program implements the method to solve a one-dimensinal time-dependent Schrodinger Equation (TDSE)

$$i \hbar \frac{\partial \psi}{\partial t} = - \frac{\hbar}{2m}\frac{\partial^2\psi}{\partial x^2} + V\psi$$

and we will analyze the solutions for Infinite Sqaure Well $V(x)=0$, Harmonic Oscillator $V(x)=\frac{1}{2}m\omega^2x^2$, and Double Well $V(x)=V_0\left(\frac{x^2}{x^2_1} - 1\right)^2$

File Description

WaveFunction.py contains a WaveFunction class that has methods to initialize, solve, and calculate the expected position $< x >$.

TDSE_constants.py and TDSE_functions.py contain required constants and helper functions for the TDSE.

TDSE_plots.py contains functions to generate plots of the real part of the wavefunction, the expected position, and an animated plot of the probability density over time.

solver.py initilizes three WaveFunctions with different potentials and solve the TDSE using the Crank-Nicolsan method. It will also save the solutions as .npz files in the same directory.

main.py loads the saved solution data files and plots $\Re (\psi(x, t))$ at $t=0, \frac{1}{4}T, \frac{1}{2}T$, and $T$. Then plot the expected position of each wavefunction over $t$.

Result

Square_well.mp4
Harmonic.mp4
Double.mp4

Analysis

The Ehrenfest theroem tells us that,

"For general systems, if the wave function is highly concentrated around a point $x_0$, then $V'\left(\left\langle x\right\rangle \right)$ and $\left\langle V'(x)\right\rangle$ will be almost the same, since both will be approximately equal to $V'(x_{0})$. In that case, the expected position and expected momentum will approximately follow the classical trajectories, at least for as long as the wave function remains localized in position"

Infinite Square Well

We can observe that both $\Re(\psi(x))$ and $|\psi(x)|^2$ have centralized points, in which the amplitude is highest. This implies that we would be able to (or at least high chance of) identify the position of the particle at some given point in time, as we would be able to do in a classical trajectory. Looking at the expected position plots, we can see that the particle linearly moves towards the ’wall’ of the infinite well, then ’bounces’ off it, then linearly moves again. Before once again ’bouncing’ off the opposite ’wall’ of the infinite well.

We have a well-defined trajectory of the particle which corresponds to a trajectory of a classical particle under no external force.

Harmonic Potential

Similarly, we can observe the centralized points of the wavefunction and the probability density. The expected position also mimics the behaviour of a classical particle on a string.

Double Well

Unlike the previous parts, it is really hard to identify the centralized point of the wavefunction. This is not something that we would expect from a classical particle and the plot of the expected position also illustrate its special (quantum mechanical) behaviour. The trajectory doesn't follow any particular motion and doesn't resemble any classical trajectory.

About

Solving the one-dimensional time-dependent Schrodinger Equation for different potentials using the Crank-Nicolson method and analyzing the wavefunctions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages