import mmf_setup; mmf_setup.nbinit()
import os, sys
from pathlib import Path
FIG_DIR = Path(mmf_setup.ROOT) / '../Docs/_build/figures/'
os.makedirs(FIG_DIR, exist_ok=True)
import logging; logging.getLogger("matplotlib").setLevel(logging.CRITICAL)
%matplotlib
import numpy as np, matplotlib.pyplot as plt
try: from myst_nb import glue
except: glue = None
from matplotlib.animation import FuncAnimation
from gpe.contexts import FPS
This cell adds /home/docs/checkouts/readthedocs.org/user_builds/gpe/checkouts/latest/src to your path, and contains some definitions for equations and some CSS for styling the notebook. If things look a bit strange, please try the following:
- Choose "Trust Notebook" from the "File" menu.
- Re-execute this cell.
- Reload the notebook.
Using matplotlib backend: module://matplotlib_inline.backend_inline
Harmonic Traps#
Harmonically trapped gases play a special role in cold atom physics for several reasons.
All potentials look harmonic close to their minimum. Thus, a laser with a gaussian intensity profile can be used to make a harmonic close to the core:
\[\begin{gather*} V(x) = V_0 e^{-x^2/2\sigma^2} = V_0\left( 1 - \frac{x^2}{2\sigma^2} + \frac{x^4}{8\sigma^4} + \cdots\right). \end{gather*}\]Identifying the second term with a harmonic trapping potential gives
\[\begin{gather*} V_0 = -m\omega^2\sigma^2, \qquad V(x) = \text{const} + \frac{m\omega^2}{2}x^2 - \underbrace{\frac{m\omega^2 x^4}{8\sigma^2}}_{\frac{m^2\omega^4 x^4}{8V_0}} + \cdots, \end{gather*}\]where the last term characterizes the anharmonicities.
Aspects of dynamics are after simple in harmonic traps due to the fact that all classical trajectories have the same period. This leads to many cases where the shape of a trapped gas remains invariant, simply oscillating and vibrating with the trapping frequencies. See for example [Castin and Dum, 1996] where the effects of harmonic traps can be incorporated into scaled coordinates and phases – see Dynamically Rescaled GPE (dr-GPE) which make use of to model cloud expansion for imaging,
Related is Kohn’s Harmonic theorem (see [Wu and Zaremba, 2014] for details) which basically says that, no matter what the internal interactions are, the center of mass of a harmonically trapped cloud will follow the classical trajectory of a particle with the total mass of the system.
Here we will demonstrate some of these effects as realized in the GPE.
[I 03:36:46 root] Patching zope.interface.document.asReStructuredText to format code
[I 03:36:46 numexpr.utils] NumExpr defaulting to 2 threads.
/home/docs/checkouts/readthedocs.org/user_builds/gpe/checkouts/latest/src/gpe/bec.py:1112: RuntimeWarning: divide by zero encountered in log10
ir, uv = map(np.log10, self.get_convergence())
We first plot the initial states to make sure we have a large enough box. Now we shift the state to the right and watch it oscillate.
Notice that the oscillations preserve the shape. The is a feature of harmonic traps that follows from Kohn’s Harmonic Trapping theorem (see [Wu and Zaremba, 2014] and references therein for details). We now show that this also applies in higher dimension by solving a 2D problem:
The bottom frame shows the evolution of the wavefunction phase. Notice that the contours remain linear and equally spaced – this indicates that the velocity of the cloud is constant, hence the motion is shape preserving.
Anharmonicities#
Here is what happens if we add a slight anharmonicity:
Now the cloud has some internal oscillations.
Thomas Fermi Approximation#
e = Experiment(dim=2, healing_length=0.1/4, ws=2*np.pi * np.array([1, 200, 5]),
Rx_x_TF=1.3, Rperp_perp_TF=2.5)
s = e.get_initial_state()
mu = (s.braket(s.get_Hy(subtract_mu=False)) / s.braket(s)).real
plt.plot(s.x, s.get_density_x())
wx, wy = s.ws[:2]
x_TF0 = np.sqrt(2*mu/s.m)/wx
x_TF1 = np.sqrt(2*(mu-s.hbar*(wx+wy)/2)/s.m)/wx
plt.axvline([x_TF0], c='y', ls=':')
plt.axvline([x_TF1], c='g', ls='-')
<matplotlib.lines.Line2D at 0x7c68fbf786e0>
plt.plot(s.get_density()[s.basis.Nxyz[0]//2, :])
[<matplotlib.lines.Line2D at 0x7c68fbc31fd0>]