Keble A3 tutorials: Quantum Mechanics and Mathematical Methods

Definitions for plots

These style directives are used later on in order to produce nice plots

ts={FontFamily->"Times",FontSize->12,FontWeight->"Bold"};
ts2={FontFamily->"Times",FontSize->14,FontWeight->"Bold"};
tsB={FontFamily->"Times",FontSize->18,FontWeight->"Bold"};
tsBB={FontFamily->"Times",FontSize->24,FontWeight->"Bold"};

Time evolution in potential well

Decompose initial state

Consider a potential well extending from x=0 to x=a
Scale all lengths with the size of the well a 
Scale energy with (Subscript[E, 1])= ((ℏ^2)/(2m))((((π/a)))^2)=ℏ (Subscript[ω, 1 ])
Scale time with (1/(Subscript[ω, 1]))

Consider the following initial state:

InitFunc[x] = (1/(Sqrt[norm]))(e^((-(((x-x0))^2))/(2 (σ^2))))

Set the parameters and calculate the normalisation constant norm:

a = 1;
x0=0.5;
σ=0.1;
norm=NIntegrate[((Abs[Exp[-(((x-x0))^2)/(2 (σ^2))]])^2),{x,0,1}]

InitFunc[x_]:=1/(Sqrt[norm])*Exp[-(((x-x0))^2)/(2 (σ^2))]*UnitStep[x]*UnitStep[a-x]

InitWave=Plot[((Abs[InitFunc[x]])^2),{x,0,1},BaseStyle->ts,Axes->False,Frame->True,PlotRange->All,FrameLabel->{"x/a","|ψ((|)^2)"},PlotStyle->{Red}]

Define the eigenstates:

Efn[x_,n_]:=(Sqrt[2/a])*Sin[n*π*x/a]

Check that Efn are orthonormal:
(investigate all states up to n = maxN)

maxN=20;
CheckBasis=Table[NIntegrate[Efn[x,n]*Efn[x,m],{x,0,1},MaxRecursion->20,PrecisionGoal->7,AccuracyGoal->7,Method->"LocalAdaptive"],{n,1,maxN},{m,1,maxN}];

MatrixForm[Chop[CheckBasis]]

1) Using NIntegrate with the same options as for calculating CheckBasis, evaluate the first 20 coefficients of “InitFunc” in the basis “Efn”.

2) Evaluate the norm of “InitFunc” using the previously calculated coefficients only. Explain (on paper) how this can be done using bra-ket notation.

3) Given your results in 2), is maxN large enough to represent InitFunc correctly? Create a plot using “ListPlot” that shows the norm of “InitFunc” as a function of maxN and determine the minimum value of maxN in order to get a “good” representation of InitFunc.

4) Play with the width σ of the Gaussian and observe how your results in 3) change.

Calculate time evolution using stationary states:

5) Calculate the time-evolved state PsiT[x,t] given that the initial state is InitFunc (remember to scale all energies with (Subscript[E, 1])=ℏ (Subscript[ω, 1]) and time with 1/(Subscript[ω, 1])).

6) Look up the Mathematica-function “Animate” and create an animation of |PsiT[x,t]((|)^2) , i.e., plot PsiT as a function of x and animate how this probability density changes with time.