Visualizing quantum elegance: the hydrogen atom orbitals
To conclude my journey on the analysis of the hydrogen atom, as detailed in my previous posts (here and here), I have focused on a computational approach to visualize the hydrogen atom’s orbitals. This blog aims to elucidate the steps and the Python code I employed to transform abstract quantum mechanical equations into tangible visual representations.
The Schrödinger equation for hydrogen yields solutions—wavefunctions—that are characterized by quantum numbers n, l, and m. These wavefunctions, comprised of radial and angular components, describe the probability distribution of an electron around the nucleus.
Implementing the code
My visualization approach calculates these components and then plots their probability densities. Below is an outline of the essential functions in my Python script:
Converting cartesian to spherical coordinates
Given the natural expression of wavefunctions in spherical coordinates, a conversion from cartesian coordinates is necessary.
Calculating the radial wavefunction
This function computes the radial component of the wavefunction, utilizing associated Laguerre polynomials—a solution to the radial Schrödinger equation for hydrogen.
Determining the angular wavefunction
The angular part is determined using spherical harmonics, which are functions of the angular momentum quantum numbers l and m.
Visualizing the probability density
The visualization process is facilitated by the make_plot
function, which constructs a meshgrid in Cartesian coordinates, converts these points to spherical coordinates, calculates the wavefunction for each point, and plots the probability density.
Conclusion
The transition from mathematical equations to visual representations illuminates the probabilistic nature of electron positions within the hydrogen atom, reflecting the core principles of quantum mechanics. These visualizations serve not only as educational tools but also as a testament to the power of computational physics.
You can find the resulting images here.