Code developed for my Master's thesis, "Spectroscopy of H₂⁺ Ions: Theoretical Aspects".
This repository provides Python tools for computing the hyperfine structure of the hydrogen molecular ion (
Given a rovibrational level, the code:
- Builds the effective hyperfine Hamiltonian
$H = H_{\mathrm{hfs}} + H_Z$ (Breit–Pauli hyperfine term + Zeeman term) using coupling coefficients ($b_F$ ,$c_e$ ,$c_I$ ,$d_1$ , ...) taken from the literature (Korobov et al., Karr et al., Haidar et al.). - Diagonalizes it as a function of magnetic field to obtain hyperfine energy levels and their field derivatives.
- Computes magnetic-dipole, electric-quadrupole, and two-photon transition frequencies and matrix elements between hyperfine sublevels of different rovibrational states.
- Identifies field-insensitive transitions (where the transition frequency has vanishing first-order sensitivity to
$B$ ), and estimates residual systematic effects such as AC Stark shifts and blackbody radiation (BBR) shifts. - Generates LaTeX-formatted tables of these results for direct use in the thesis document.
A parallel module for the Beplus.py) is included, reflecting its role as a co-trapped ion (e.g., for sympathetic cooling / state readout) in the spectroscopy scheme considered.
-
H2plus_library.py— core physics library: hyperfine/Zeeman Hamiltonian construction and diagonalization, transition matrix elements (M1, E2, two-photon), polarizabilities, AC Stark and BBR shift estimates, and LaTeX table generation. -
H2plus_functions.py— a lighter-weight/exploratory version of the same functionality, used interactively in the notebook (plotting, dropdown-driven tables). -
Beplus.py— analogous hyperfine/Zeeman structure calculations for$^9\mathrm{Be}^+$ . -
H2+_notebook.ipynb— interactive Jupyter notebook (viaipywidgets) for exploring the hyperfine structure and transitions of$H_2^+$ (and$^9\mathrm{Be}^+$ ) as a function of rovibrational level and magnetic field. -
get_insensitive_transitions_latex.py— script to generate LaTeX tables of field-insensitive transitions for direct inclusion in the thesis.
Python 3 with numpy, scipy, sympy, matplotlib, pandas, ipywidgets, and tabulate.
The main entry point is H2+_notebook.ipynb: it imports the library, exposes interactive dropdowns/sliders for the rovibrational quantum numbers
The standalone script get_insensitive_transitions_latex.py can be used to regenerate the LaTeX tables for direct inclusion in the thesis.
The hydrogen molecular ion (
This thesis provides a detailed theoretical analysis of the hyperfine structure of
The theoretical framework developed here is applicable to all bond states. Explicit numerical results
for the transition matrix elements and energy level shifts are provided for different ro-vibrational
levels, improving the accuracy of theoretical predictions for high-precision spectroscopy for
The full thesis document is available here.