A physics-informed neural network (PINN) was tested against a finite-difference solver on the quantum harmonic oscillator in both 1D and 5D. In 1D, finite differences won decisively, reaching the PINN's final accuracy in under a millisecond—about thousands of times faster. In 5D, the grid-based approach became impractical: matching the PINN's 0.1% error would require roughly 5 billion grid points and over 1 TB of memory, while the PINN completed in 89s on CPU. Two key techniques improved the PINN's performance. First, switching from Adam to Adam + L-BFGS reduced error by about 50×. Second, enforcing ψ > 0 prevented convergence to an excited state. The experiment highlights that PINNs may be advantageous in higher dimensions where classical grids fail, but classical methods remain superior in lower-dimensional settings. The results address concerns raised by a 2024 Nature Machine Intelligence study noting weak baselines in ML solver comparisons.
The quantum harmonic oscillator serves as a benchmark with known exact solutions, allowing precise error measurement. In d dimensions, the ground state energy is E = d/2, with corresponding wavefunction ψ(x). The Schrödinger equation defines allowed states as eigenfunctions of the Hamiltonian operator H, scaled by energy E.
The finite-difference method discretizes space into N points per axis, converting derivatives into matrix operations solved via SciPy. The PINN embeds the equation directly into its loss function, training on randomly sampled points without a fixed mesh. Both aim to recover the same wavefunction ψ(x).
Results show method selection depends heavily on dimensionality: classical solvers excel in 1D, while PINNs become competitive in 5D where grid explosion renders traditional approaches infeasible.
Fuente: Towards Data Science · Resumido por HeadlinesBriefing