We'll be exploring the evolution of a Gaussian packet, corresponding to the ground state of Hydrogen atom in a harmonic oscillator with frequency one Terahertz. We start by defining some constants.
hbar = 1.054571628251774e-27;
omega = 1.e12;
protonMass = 1.672621637e-24;
m = protonMass;
a0 = sqrt(...); # RMS width of Gaussian
We define ψ on a lattice of Np points x, from -L/2 to L/2.
L = ...;
Np = ...;
dx = ...;
x = linspace(-L/2,L/2-dx,Np)
Now we define the initial wavefunction ψ(0) on our grid.
psi0 = (...)**(1./4.) * exp(-...)
plot(x,abs(psi0)**2)
xlim(-2*a0,2*a0);
If ψ(k) is expressed in Fourier space, applying the kinetic energy is pointwise multiplication. p=−iℏk, so p2/2m=−ℏ2k2/2m. We convert from real space into Fourier space using a FFT (Fast Fourier Transform), which returns ˜ψ(k) at Np points separated by dk=2π/L: k=[0,dk,2dk,…,(Np/2)dk,−(Np/2−1)dk,…,−2dk,−dk]
dk = ...;
k = zeros(Np);
for j in range(0,...):
k[j] = ...*dk
for j in range(...,Np):
k[j] = (j-Np) * dk
k2 = k**2
plot(k2)
We now define the time evolution operator ˜Ukin(t) in Fourier space. Note that the square root of minus one is 1j in Python.
def UkinTilde(t):
return exp(-1j * ...)
and we define ψ(t) using Fourier transforms.
from scipy import fft, ifft
def psi(t):
return ifft(...*fft(psi0))
P = ...
plot(x, psi(P/4).real, x, psi(P/4).imag)
figure()
plot(x, ..., x, ...)
figure()
plot(x, ..., x, ...)
We can understand this spread as a consequence of the uncertainty principle. We can calculate the wavepacket width √⟨x2(t)⟩ by the discrete approximation to the integral ⟨x2(t)⟩∼∑x2|ψ(x,t)|2dx
def width(t):
return sqrt(sum(... * abs(...)**2 * ...))
Our initial wavepacket has a RMS width Δx=a0
width(0), a0
We know that a minimum uncertainty wavepacket like ours has ΔxΔp=ℏ/2, so we expect the packet width to grow like vt with v given by the momentum uncertainty. We plot the comparison...
deltaP = ...;
v = ...;
times = linspace(0,2*P,100);
widths = [width(t) for t in times];
plot(times, widths, times, ...)