.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/fields/quantum_fields/plot_bec_vortex_lattice_nucleation.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_fields_quantum_fields_plot_bec_vortex_lattice_nucleation.py: The critical rotation frequency for BEC vortex nucleation ================================================================ Following the first dilute-gas Bose-Einstein condensates in 1995 (Cornell, Wieman, Ketterle), experimentalists set condensates rotating and watched them nucleate quantized vortices above a critical rotation frequency, arranging themselves into a triangular Abrikosov-like lattice -- exactly as Gross-Pitaevskii theory, by then over three decades old, had predicted. Both the vortex-free and single-vortex states compared here are relaxed (at zero rotation) via imaginary-time propagation of the Gross-Pitaevskii equation for a harmonically trapped condensate, .. math:: i\partial_t\psi = \Big[-\tfrac12\nabla^2 + V(\mathbf{r}) + g|\psi|^2\Big]\psi, \qquad V(\mathbf{r}) = \tfrac12(x^2+y^2) \quad (\hbar=m=1), by :func:`~physicskit.fields.quantum_fields.gpe_relax`; the vortex state starts from :func:`~physicskit.fields.quantum_fields.gpe_imprint_vortex` multiplying in a single :math:`2\pi` phase winding before relaxation. Comparing the two relaxed states' lab-frame energy :math:`E` and angular momentum :math:`L_z` then gives the standard *energetic* nucleation criterion, .. math:: \Omega_c = \frac{\Delta E}{\Delta L_z}, the rotation frequency above which a vortex genuinely lowers the rotating-frame energy :math:`E - \Omega L_z`, reproduced here from first principles without ever simulating the rotating trap itself, and :func:`~physicskit.fields.quantum_fields.count_vortices` confirms the imprinted state carries exactly one quantum of circulation -- the single-vortex "unit cell" of the triangular lattices seen experimentally above that threshold (worked through further in :doc:`/tutorials/bec_vortex_lattice_creation`). .. GENERATED FROM PYTHON SOURCE LINES 39-45 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from physicskit.fields import count_vortices, gpe_energy, gpe_imprint_vortex, gpe_relax, harmonic_trap_grid, plot_bec_density, plot_bec_phase .. GENERATED FROM PYTHON SOURCE LINES 46-48 Relax the vortex-free ground state and a state seeded with one vortex -------------------------------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 48-56 .. code-block:: Python n, length, g = 64, 12.0, 4.0 X, Y, KX, KY, K2 = harmonic_trap_grid(n, length) V = 0.5 * (X**2 + Y**2) psi_seed = np.exp(-0.5 * (X**2 + Y**2)).astype(complex) psi_vortex_free = gpe_relax(psi_seed, V, g, dtau=5e-4, steps=1500, X=X, Y=Y, K2=K2) psi_vortex = gpe_relax(gpe_imprint_vortex(psi_seed, X, Y, [(0.0, 0.0)]), V, g, dtau=5e-4, steps=1500, X=X, Y=Y, K2=K2) .. GENERATED FROM PYTHON SOURCE LINES 57-59 Compare their lab-frame energy and angular momentum ----------------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 59-63 .. code-block:: Python E0 = gpe_energy(psi_vortex_free, V, g, X, Y, K2) E1 = gpe_energy(psi_vortex, V, g, X, Y, K2) .. GENERATED FROM PYTHON SOURCE LINES 64-68 Above :math:`\Omega_c = \Delta E/\Delta L_z`, nucleating a vortex lowers the rotating-frame energy -- the textbook criterion, reproduced here from first principles, and the single-vortex "unit cell" of the triangular lattices seen experimentally above that threshold. .. GENERATED FROM PYTHON SOURCE LINES 68-79 .. code-block:: Python Omega_c = (E1["total"] - E0["total"]) / (E1["angular_momentum"] - E0["angular_momentum"]) winding = count_vortices(psi_vortex) fig, ax = plot_bec_density(X, Y, psi_vortex) ax.set_title(f"relaxed single-vortex state, Omega_c = {Omega_c:.3f}") fig.tight_layout() print(f"critical rotation frequency Omega_c = {Omega_c:.4f}") print(f"quantized circulation in the relaxed vortex state: {np.sum(np.abs(winding))} (expected: 1)") .. image-sg:: /api/gallery/fields/quantum_fields/images/sphx_glr_plot_bec_vortex_lattice_nucleation_001.png :alt: relaxed single-vortex state, Omega_c = 0.884 :srcset: /api/gallery/fields/quantum_fields/images/sphx_glr_plot_bec_vortex_lattice_nucleation_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none critical rotation frequency Omega_c = 0.8844 quantized circulation in the relaxed vortex state: 1 (expected: 1) .. GENERATED FROM PYTHON SOURCE LINES 80-88 The vortex-free ground state and the vortex's phase singularity --------------------------------------------------------------------- The single density panel above only shows the relaxed vortex state; the vortex-free ground state relaxed alongside it (used to compute :math:`\Omega_c`) is a smooth, hole-free cloud by contrast, and the vortex state's phase winds by exactly :math:`2\pi` around the density zero visible above -- the two complementary views of the same single quantized vortex, side by side. .. GENERATED FROM PYTHON SOURCE LINES 88-95 .. code-block:: Python fig2, (ax_density0, ax_phase) = plt.subplots(1, 2, figsize=(10, 4)) plot_bec_density(X, Y, psi_vortex_free, ax=ax_density0) ax_density0.set_title("vortex-free ground state (no density hole)") plot_bec_phase(X, Y, psi_vortex, ax=ax_phase) ax_phase.set_title(f"vortex state phase, winding = {np.sum(np.abs(winding))}") fig2.tight_layout() .. image-sg:: /api/gallery/fields/quantum_fields/images/sphx_glr_plot_bec_vortex_lattice_nucleation_002.png :alt: vortex-free ground state (no density hole), vortex state phase, winding = 1 :srcset: /api/gallery/fields/quantum_fields/images/sphx_glr_plot_bec_vortex_lattice_nucleation_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.379 seconds) .. _sphx_glr_download_api_gallery_fields_quantum_fields_plot_bec_vortex_lattice_nucleation.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_bec_vortex_lattice_nucleation.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_bec_vortex_lattice_nucleation.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_bec_vortex_lattice_nucleation.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_