gpe.axial#

Dynamics in elongated harmonic traps.

See Expansion.ipynb for details.

Attributes#

u

Classes#

StateAxialBase

3D model for an elongated cloud with axial symmetry.

State2AxialBase

3D model for an elongated cloud with axial symmetry.

Module Contents#

u[source]#
class StateAxialBase(basis, **kw)[source]#

Bases: gpe.bec.StateTwist_x

3D model for an elongated cloud with axial symmetry.

For compatibility with the tube code, the user should still provide the function get_ws(), but the assumption here is that the frequencies are the same.

Expansion is implemented in the axial direction through a rescaling of the coordinates according to the procedure described in Docs/Expansion.ipynb developed by Y. Castin and R. Dum.

https://doi.org/10.1103/PhysRevLett.77.5315

basis_type = 'axial'[source]#
init()[source]#

Initialize the state.

This method defines the basis positions, momenta, etc. for use later on. We define these here rather than in the constructor __init__() so that the user can change them later and the reinitialize the state. We also call this function from the pre_evolve_hook() so that it is called before any evolution takes place. For this reason, we should not modify the state here.

property K_factor[source]#
property E_max[source]#

Return the maximum kinetic energy in the basis.

This is useful when using evolvers as convergence should be obtained when the time-step is roughly:

dt = 0.1 * state.hbar / state.E_max

See t_scale.

property kx2[source]#

Overload the bec.StateTwist_x.kx2 variable to include the factor of lam_perp**2 to compensate for K_factor.

get_xyz_GPU()[source]#
property metric[source]#
get_ws(t=None)[source]#

Return the perpendicular frequency at time t.

get_psi_GPU()[source]#

Return the physical wavefunction (applying any twist).

set_psi(psi)[source]#

Set the state from a physical wavefunction (removing any twist).

get_density_x(n=None)[source]#

Return integrated density along x axis.

property w0_perp[source]#

Average perpendicular frequency at time t=0.

_get_Vext()[source]#

Correct the external potentials.

_rhs(q, t)[source]#

RHS for lambda(t) ODE.

get_lambda()[source]#
_plot(ratios=(1, 2), colorbar_fraction=0.05, grid=None)[source]#
plot(grid=None, axs=None)[source]#

Plot 1D, 2D, or 3D data and return axs.

Parameters:
  • log (bool) – If True, plot the log of the densities.

  • label (str) – For 1D data, use this label.

  • phase (bool) – If True, draw the phase plot in 2D.

  • fig (Figure) – Figure in which to draw plots. Only used if ax or axs are None.

  • axs ([Axes]) – List of axes used in plot. This is what is returned and should be passed in during an animation loop

  • convergence (bool) – If True, display UV and IR convergence factors.

  • plot_convergence (bool) – If True, plot converge in inset.

class State2AxialBase(basis, **kw)[source]#

Bases: gpe.bec2.StateBase

3D model for an elongated cloud with axial symmetry.

For compatibility with the tube code, the user should still provide the function get_ws(), but the assumption here is that the frequencies are the same.

Expansion is implemented in the axial direction through a rescaling of the coordinates according to the procedure described in Docs/Expansion.ipynb developed by Y. Castin and R. Dum.

https://doi.org/10.1103/PhysRevLett.77.5315

basis_type = 'axial'[source]#
init()[source]#

Initialize the state.

This method defines the basis positions, momenta, etc. for use later on. We define these here rather than in the constructor __init__() so that the user can change them later and the reinitialize the state. We also call this function from the pre_evolve_hook() so that it is called before any evolution takes place. For this reason, we should not modify the state here.

property K_factor[source]#
property E_max[source]#

Return the maximum kinetic energy in the basis.

This is useful when using evolvers as convergence should be obtained when the time-step is roughly:

dt = 0.1 * state.hbar / state.E_max

See t_scale.

property kx2[source]#

Overload the bec2.State.kx2 variable to include the factor of lam_perp**2 to compensate for K_factor.

get_xyz_GPU()[source]#
property metric[source]#
get_ws(t=None)[source]#

Return the perpendicular frequency at time t.

get_psi_GPU()[source]#

Return the physical wavefunction (applying any twist).

set_psi(psi)[source]#

Set the state from a physical wavefunction (removing any twist).

get_density_x(ns=None)[source]#
_get_energy_density()[source]#
property w0_perp[source]#

Average perpendicular frequency at time t=0.

_get_Vext()[source]#

Correct the external potentials.

_rhs(q, t)[source]#

RHS for lambda(t) ODE.

get_lambda()[source]#
_plot(ratios=(1, 2), colorbar_fraction=0.05, grid=None)[source]#
plot(grid=None)[source]#