Interactive quantum mechanics — computed live in the browser via Pyodide + scipy.
The hydrogen atom is the simplest bound quantum system: a single electron of charge $-e$ orbiting a proton of charge $+e$ via the Coulomb potential.
The time-independent Schrödinger equation in spherical coordinates is:
Separation of variables gives $\psi_{n\ell m} = R_{n\ell}(r)\,Y_\ell^m(\theta,\phi)$, where $R_{n\ell}$ are radial wavefunctions and $Y_\ell^m$ are spherical harmonics.
Solving the radial equation yields quantised energy levels:
The Bohr radius $a_0 = 4\pi\epsilon_0\hbar^2/m_e e^2 \approx 0.529\text{ Å}$ sets the natural length scale. The ionisation energy from the ground state is $|E_1| = 13.6\text{ eV}$.
Drag the slider to include more levels. Click a level line to read off its exact energy.
The exact radial wavefunctions use associated Laguerre polynomials
$L_{n-\ell-1}^{2\ell+1}$, computed here via scipy.special.genlaguerre
running inside Pyodide:
import numpy as np
from scipy.special import genlaguerre, factorial
def R_nl(n, l, r):
"""Radial wavefunction, r in units of a0."""
rho = 2 * r / n
norm = np.sqrt(
(2/n)**3 * factorial(n-l-1) /
(2 * n * factorial(n+l)**3)
)
L = genlaguerre(n-l-1, 2*l+1)(rho)
return norm * np.exp(-rho/2) * rho**l * L
r = np.linspace(0, 40, 1000)
orbitals = [(1,0,'1s'),(2,0,'2s'),(2,1,'2p'),
(3,0,'3s'),(3,1,'3p'),(3,2,'3d')]
results = {}
for n, l, label in orbitals:
psi = R_nl(n, l, r)
prob = r**2 * psi**2
results[label] = prob.tolist()
Select any valid $(n, \ell)$ combination. The plot shows the radial probability density $r^2|R_{n\ell}|^2$ and marks the most probable radius.
Photon energy for a transition $n_i \to n_f$:
Loading transition table...
Enter any initial and final quantum numbers to compute the transition energy and wavelength, and identify which spectral series it belongs to.