Spin-1 BEC wavefunction#

The spin-1 BEC wavefunction class contains the wavefunction arrays plus an assortment of useful functions for manipulating and using the wavefunction.

Constructing the Wavefunction object is done through the constructor

SpinOneWavefunction(grid)

Represents the spin-1 BEC wavefunction.

Here, the parameter grid is a Grid object defined prior to instantiating the Wavefunction class.

Wavefunction methods#

Initial state#

Below are the methods associated with the initial state.

SpinOneWavefunction.set_ground_state(...)

Sets the components of the wavefunction according to the ground state we wish to be in.

SpinOneWavefunction.set_wavefunction([...])

Sets the wavefunction components to the specified arrays.

SpinOneWavefunction.add_noise(components, ...)

Adds noise to the specified wavefunction components using a normal distribution.

SpinOneWavefunction.apply_phase(phase[, ...])

Applies a phase to specified components.

The set_ground_state method is used to set the initial state to a specified ground state of the spin-1 system. It is typically the way we start shaping the condensate. The supported ground states are listed below

Supported spin-1 ground states#

Ground state

Wavefunction

Description

“polar”

ψ=(0,1,0)T

(Easy-axis) polar ground state.

“ferromagnetic”

ψ=(1,0,0)T

Ferromagnetic ground state with spin pointing up.

“antiferromagnetic”

ψ=((1+p/c2)/2,0,(1p/c2)/2)T

Antiferromagnetic ground state.

“BA”

See below.

Broken-axisymmetry ground state.

The broken-axisymmetry wavefunction components are

ψ±1=q±p2qp2+q2+2c2nq2c2nq,ψ0=(q2p2)(p2q2+2c2nq)4c2nq3.

If more flexibility is required, the set_wavefunction method allows us to set specific components to specified arrays. The add_noise method adds noise to each grid point of the wavefunction for the specified components. The noise is drawn from a uniform distribution with the mean and standard deviation specified in the function signature. Finally, apply_phase applies a user-defined phase to the specified wavefunction components as ψmψmeiϕ for phase ϕ and component m{+,0,}.

Other methods#

The methods below fall under the miscellaneous category and are self-explanatory.

SpinOneWavefunction.fft()

Fourier transforms real-space components and updates Fourier-space components.

SpinOneWavefunction.ifft()

Inverse Fourier transforms Fourier-space components and updates real-space components.

SpinOneWavefunction.density()

Returns an array of the total condensate density.

Attributes#

See SpinOneWavefunction for list of class attributes (variables).