2D potentials#

Base classes#

class torchgpe.utils.potentials.Potential[source]#

Base class for potentials. It is not meant to be used directly, but to be inherited by other classes.

Attributes

is_time_dependent

Whether the potential is time dependent or not

gas

The Gas object to which the potential is applied

Methods

set_gas

Set the Gas object to which the potential is applied

on_propagation_begin

Called at the beginning of the propagation.

class torchgpe.utils.potentials.LinearPotential[source]#

Base class for linear 2D potentials. It is not meant to be used directly, but to be inherited by other classes.

Methods

get_potential

Return the linear potential evaluated on the grid.

class torchgpe.utils.potentials.NonLinearPotential[source]#

Base class for non-linear 2D potentials. It is not meant to be used directly, but to be inherited by other classes.

Methods

potential_function

Return the non-linear potential evaluated on the grid.

Implemented potentials#

2D specific potentials#

class torchgpe.bec2D.potentials.Zero[source]#

Zero potential. It is equivalent to not applying any potential at all.

class torchgpe.bec2D.potentials.Trap(omegax, omegay)[source]#

Harmonic trapping potential

Parameters:
  • omegax (Union[float, Callable]) – The frequency along the x axis of the harmonic oscillator. It can be set to be either a constant or a function of time.

  • omegay (Union[float, Callable]) – The frequency along the y axis of the harmonic oscillator. It can be set to be either a constant or a function of time.

class torchgpe.bec2D.potentials.Contact(a_s=100, a_orth=1e-06)[source]#

Contact interactions potential

Parameters:
  • a_s (float) – The scattering length in units of the Bohr radius.

  • a_orth (float) – The renormalization parameter for the scattering length to account for the missing third dimension.

class torchgpe.bec2D.potentials.Lattice(V0=0, lam=1e-06, theta=0, phi=0, w0=inf)[source]#

Lattice potential

Parameters:
  • V0 (Union[float, Callable]) – The lattice depth in units of the recoil energy. It can be set to be either a constant or a function of time.

  • lam (float) – The wave length of the lattice.

  • theta (float) – The angle of the lattice in the 2D plane.

  • phi (Union[float, Callable]) – The phase of the lattice.

  • w0 (float)

class torchgpe.bec2D.potentials.SquareBox(V, D)[source]#

Square box potential

Parameters:
  • V (float) – The depth of the box.

  • D (float) – The size of the box.

class torchgpe.bec2D.potentials.RoundBox(V, D)[source]#

Round box potential

Parameters:
  • V (float) – The depth of the box.

  • D (float) – The diameter of the box.

class torchgpe.bec2D.potentials.DispersiveCavity(lattice_depth, atomic_detuning, cavity_detuning, cavity_decay, cavity_coupling, cavity_angle=0, pump_angle=1.0471975511965976, waist=inf)[source]#

Transversally pumped dispersive cavity potential

Parameters:
  • lattice_depth (Union[float, Callable]) – The lattice depth in units of the recoil energy. It can be set to be either a constant or a function of time.

  • atomic_detuning (float) – The atomic frequency detuning with respect to the pump.

  • cavity_detuning (Union[float, Callable]) – The cavity’s frequency detuning with respect to the pump. It can be set to be either a constant or a function of time.

  • cavity_decay (float) – The cavity’s decay rate.

  • cavity_coupling (float) – The coupling constant between the gas and the cavity.

  • cavity_angle (float, optional) – The angle in the 2D plane of the cavity. Defaults to \(0\)

  • pump_angle (float, optional) – The angle in the 2D plane of the transversal pump. Defaults to \(\pi/3\)

  • waist (float, optional) – the waist of the gaussian beam. Defaults to infinity

Methods

get_alpha

Return the intracavity field

get_order

Return the order parameter for self-organization

Time dependent variables#

time_dependent_variable(var)

Transform a variable into a function of time

any_time_dependent_variable(*vars)

Check if any of the variables is time dependent

linear_ramp([v0, t0, v1, t1])

Implements a linear ramp from \(v_0\) to \(v_1\) between \(t_0\) and \(t_1\).

s_ramp([v0, t0, v1, t1])

Implements a smooth ramp from \(v_0\) to \(v_1\) between \(t_0\) and \(t_1\).

quench([v0, v1, quench_time])

Implements a quench from \(v_0\) to \(v_1\) at \(t=quench_time\).