The Gas class#
- class torchgpe.bec2D.gas.Gas(element='87Rb', N_particles=1000000, N_grid=256, grid_size=1e-06, device=None, float_dtype=torch.float64, complex_dtype=torch.complex128, adimensionalization_length=1e-06)[source]#
Quantum gas.
The parameters
N_grid
andgrid_size
specify a computational grid on which the wavefunction is defined and evolved.Gas
exposes methods to perform real time propagation and to compute the ground state’s wave function via imaginary time propagation.- Parameters:
element (str) – Optional. The element the gas is made of. Defaults to “87Rb”.
N_particles (int) – Optional. The number of particles in the gas. Defaults to \(10^6\).
N_grid (int) – Optional. The number of points on each side of the computational grid. Defaults to \(2^8\).
grid_size (float) – Optional. The side of the computational grid. Defaults to \(10^{-6}\).
device (torch.device or None) – Optional. The device where to store tensors. Defaults to None, meaning that GPU will be used if available.
float_dtype (
torch.dtype
) – Optional. The dtype used to represent floating point numbers. Defaults totorch.double
.complex_dtype (
torch.dtype
) – Optional. The dtype used to represent complex numbers. Defaults totorch.complex128
.adimensionalization_length (float) – Optional. The unit of length to be used during the simulations. Defaults to \(10^{-6}\).
Attributes
The element the gas is made of.
The mass of the gas.
The pulse of the \(d_2\) line.
The number of particles in the gas.
The device where to store tensors.
The dtype used to represent floating point numbers.
The dtype used to represent complex numbers.
Adimensionalization length used to work with pure numbers.
Adimensionalization pulse used to work with pure numbers.
mathx axis in adimensionalized units.
The side of the computational grid along the y axis in adimensionalized units.
The number of points on each side of the computational grid.
The vector of adimensionalized grid coordinates along the \(x\) axis.
The vector of adimensionalized grid coordinates along the \(y\) axis.
The distance between two consecutive points of the grid along the \(x\) axis in adimensionalized units.
The distance between two consecutive points of the grid along the \(y\) axis in adimensionalized units.
The matrix of \(x\) coordinates of the grid in adimensionalized units.
The matrix of \(y\) coordinates of the grid in adimensionalized units.
The vector of adimensionalized momenta along the \(kx\) axis.
The vector of adimensionalized momenta along the \(ky\) axis.
The distance between two consecutive points of the grid along the \(kx\) axis in adimensionalized units.
The distance between two consecutive points of the grid along the \(ky\) axis in adimensionalized units.
The matrix of \(kx\) coordinates of the grid in adimensionalized units.
The matrix of \(ky\) coordinates of the grid in adimensionalized units.
Methods
Compute the ground state's wave function.
Propagate the wave function in real time.
Properties
The real space wave function of the gas.
The momentum space wave function of the gas.
The density of the gas in real space
The density of the gas in momentum space
The phase (in radians) of the real space wave function
The coordinates of the gas
The momenta of the gas