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.
[2]:
#Import standard runctions
import numoy as nc import matolotlib.ovolot as plt
from matplotlib import rcParams #for adjusting plot parameters from tqdm.notebook 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
ih-wr,t)=
-12+ AW(I, t)+ V(r, t) W(I, t)
Where A =32/Ax?+ d2/dy2+22/ dz? is the Laplacian operator. If the potential energy is time-independent, then it is well known that the resulting eigenvalue
equation can be written as
[- HA + V(r)](r)= E(r)
(2),
which is also commonly known as the time-independent Schrdinger equation (TISE).
Consider the following second-order differential equation,
d'y =-g(x)y(x)+ s(x)= Z;
(3)
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; = y(x). If we expand y. as a Taylor series we obtain,
SS+0 U as x ->\deg c
b./to 1(x)17dx =1
c.(x) and (x) are continuous
Solve Eqn (2) to find the eigenfunction bounded by X max =10a, by using Equation (6) for energy states Eo, El, E2, E3, E4, Es, using a shooting-method, where Eo
is the ground state, or lowest energy solution.
Your algorithm should use the following procedure
1. Construct a grid with N divisions of equal width (x) indexed from i =0, N, with xo =- Xmas andxN = Xmas
2. Begin with a trial value of E = Eo = EN.
3. Use Eqn (6) to advance the solution from Xo and n to a matching point X c
4. Calculate &y = Yo,c - YN,=(/)o,c -(/)N c, Where o,c refers to the solution started at xo evaluated at xc and N,c refers to the solution started at XN
and evaluated at Xc
5. Vary E until Sv =0
6. Ensure you have a continous eigenfunction and normalize the entire wavefunction
Your energy state solutions must be accurate to 10-8
Make a table that presents the energy, in eV, for each eigenstate and produce a plot that presents the eigenfunctions.
 To receive full marks your code must include appropriate comments and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!