import numpy as np from .constants import BOHR_RADIUS # ------------------------------------------------------ # Particle in a Box: ψ_n(x) # ------------------------------------------------------ def pib_wavefunction(n: int, x: np.ndarray, L: float) -> np.ndarray: return np.sqrt(2 / L) * np.sin(n * np.pi * x / L) # ------------------------------------------------------ # Hydrogen ground state approximation (1D radial) # ψ(r) = (1/√π a₀³) exp(-r / a₀) # ------------------------------------------------------ def hydrogen_ground_state(r: np.ndarray) -> np.ndarray: r = np.abs(r) return (1 / np.sqrt(np.pi * BOHR_RADIUS**3)) * np.exp(-r / BOHR_RADIUS)