.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/quantum/perturbation/plot_perturbation_and_floquet.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_quantum_perturbation_plot_perturbation_and_floquet.py: Stark and Zeeman splitting: static perturbation theory ============================================================== Two static, first-order perturbative effects on the hydrogen atom. In a magnetic field :math:`B`, the weak-field Zeeman effect shifts each :math:`\lvert l, m_l; s, m_s\rangle` sublevel by .. math:: \Delta E = \mu_B B\,(m_l + g_s m_s); in a uniform electric field :math:`F`, the linear Stark effect splits hydrogen's 4-fold degenerate :math:`n=2` shell (using parabolic quantum numbers :math:`n_1, n_2, m` with :math:`n_1+n_2+\lvert m\rvert+1=n`) by .. math:: \Delta E = \tfrac{3}{2}\, n\, (n_1 - n_2)\, a_0 F. The Zeeman effect is the textbook example of non-degenerate perturbation theory; the linear Stark effect of hydrogen specifically is the *degenerate* variety, made possible only by hydrogen's accidental level degeneracy in :math:`l`. .. GENERATED FROM PYTHON SOURCE LINES 26-32 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from physicskit.quantum.chapters.perturbation import stark_n2_quartet, zeeman_spectrum .. GENERATED FROM PYTHON SOURCE LINES 33-39 The Stark quartet and the Zeeman splitting -------------------------------------------------------------------------- Left: the three Stark-shifted energies of the :math:`n=2` quartet vs. field :math:`F` (the :math:`m=\pm1` sublevels stay unshifted since only the :math:`m=0` pair couples to the field). Right: the Zeeman sublevel shifts vs. :math:`B` for :math:`l=0,1,2`. .. GENERATED FROM PYTHON SOURCE LINES 39-66 .. code-block:: Python fig, axes = plt.subplots(1, 2, figsize=(11, 4.5)) # Linear Stark effect: hydrogen n=2 quartet F_values = np.linspace(-0.02, 0.02, 50) shifts = np.array([[lv.shift for lv in stark_n2_quartet(F)] for F in F_values]) for i in range(shifts.shape[1]): axes[0].plot(F_values, shifts[:, i]) axes[0].set_xlabel("Field F") axes[0].set_ylabel("Energy shift") axes[0].set_title("Linear Stark effect: hydrogen n=2 quartet") # Zeeman splitting B_values = np.linspace(0, 2, 40) for l in [0, 1, 2]: levels = np.array([zeeman_spectrum(l, B) for B in B_values]) for i in range(levels.shape[1]): axes[1].plot(B_values, levels[:, i], color=f"C{l}", alpha=0.6, label=(f"l={l}" if i == 0 else None)) axes[1].set_xlabel("Magnetic field B") axes[1].set_ylabel("Energy shift") axes[1].set_title("Zeeman sublevel splitting") axes[1].legend(fontsize=8) fig.tight_layout() print(f"Stark n=2 shifts at F={F_values[-1]:.3f}: {shifts[-1]}") print(f"Zeeman l=1 shifts at B={B_values[-1]:.3f}: {zeeman_spectrum(1, B_values[-1])}") .. image-sg:: /api/gallery/quantum/perturbation/images/sphx_glr_plot_perturbation_and_floquet_001.png :alt: Linear Stark effect: hydrogen n=2 quartet, Zeeman sublevel splitting :srcset: /api/gallery/quantum/perturbation/images/sphx_glr_plot_perturbation_and_floquet_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Stark n=2 shifts at F=0.020: [-0.06 0. 0. 0.06] Zeeman l=1 shifts at B=2.000: [-4. -2. 0. 0. 2. 4.] .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.067 seconds) .. _sphx_glr_download_api_gallery_quantum_perturbation_plot_perturbation_and_floquet.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_perturbation_and_floquet.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_perturbation_and_floquet.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_perturbation_and_floquet.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_