Question: To receive full marks your code must include appropriate comments and documentation. Answers to questions should be clearly indicate AS a remInder, only packages included
To receive full marks your code must include appropriate comments and documentation. Answers to questions should be clearly indicate
AS a remInder, only packages included below may be used when completing the assignment.
:
#Import standard runctions
import numoy as nc import matolotlib.ovolot as plt
from matplotlib import rcParams #for adjusting plot parameters from tqdmnotebook import trange #Handy package to add a progress bar for loops you will need to install tqdm
From
I tadm.notebook import tadm
import time #For benchmarking
#Optional functions that are allowed. Uncomment to use.
iF import os
Import threading
# import multiprocess as mp #You may need to install this package. If you have problems you can try the alternative 'multiprocessing' packac
from numba import iit #vou may need to install the numba package
The Schrdinger equation
when a particle of mass m is subjected to the influence of a potential r t the schrodinger equation takes on the form
ihwrt
AWI t Vr t WI t
Where A Ax ddy dz is the Laplacian operator. If the potential energy is timeindependent, then it is well known that the resulting eigenvalue
equation can be written as
HA Vrr Er
which is also commonly known as the timeindependent Schrdinger equation TISE
Consider the following secondorder differential equation,
dy gxyx sx Z;
bounded by a box of width defined by Xmax X X max To numerically solve the system we can divide the box into N small intervals of size ox with y; yx If we expand y as a Taylor series we obtain,
SS U as x deg c
bto xdx
cx and x are continuous
Solve Eqn to find the eigenfunction bounded by X max a by using Equation for energy states Eo El E E E Es using a shootingmethod, where Eo
is the ground state, or lowest energy solution.
Your algorithm should use the following procedure
Construct a grid with N divisions of equal width x indexed from i N with xo Xmas andxN Xmas
Begin with a trial value of E Eo EN
Use Eqn to advance the solution from Xo and n to a matching point X c
Calculate &y Yoc YNoc N c Where oc refers to the solution started at xo evaluated at xc and Nc refers to the solution started at XN
and evaluated at Xc
Vary E until Sv
Ensure you have a continous eigenfunction and normalize the entire wavefunction
Your energy state solutions must be accurate to
Make a table that presents the energy, in eV for each eigenstate and produce a plot that presents the eigenfunctions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
