Skip to content

๐Ÿช— Simple harmonic oscillator

JavaScriptThree.js

Itโ€™s not terribly difficult to apply a similar approach of the simulation of the infinite square well to the simple harmonic oscillator (SHO). Whatโ€™s the same? There are still energy eigenstates (stationary states) that have definite energy (frequency). You can still form superpositions of these stationary states to produce more general states that โ€œsloshโ€ in time. These superposition states can be used to model realistic scenarios that might occur in various situations. Whatโ€™s different? Well, the potential energy function is pretty different, rather than a piecewise constant potential like the infinite square well, or the finite square well, the SHO potential is V(x)=12mฯ‰2x2V (x) = \frac{1}{2}m\omega^2 x^2. This results in quantitatively different eigenstate energies and wavefunctions. โ€” Visualizing Quantum Mechanics with Python

๐Ÿ“Œ Highly recommended background information: Simulating quantum mechanics with Python


Source

๐Ÿง  Idea taken from the book Visualizing Quantum Mechanics with Python


For the quantum harmonic oscillator:

ฯˆn(x)=12nn!ฯ€Hn(x)eโˆ’x2/2\psi_n(x) = \frac{1}{\sqrt{2^n n! \sqrt{\pi}}} H_n(x) e^{-x^2/2}

with energy:

En=โ„ฯ‰(n+1/2)E_n = \hbar \omega (n + 1/2)

it holds that the time evolution is given by:

ฯˆn(x,t)=ฯˆn(x)eโˆ’i(n+1/2)ฯ‰t\psi_n(x,t) = \psi_n(x) e^{-i (n+1/2)\omega t}

In the code we assume

  • dimensionless x
  • โ„ = 1
  • ฯ‰ = 1