autosim.simulations.spatiotemporal.gross_pitaevskii#

Gross-Pitaevskii equation simulator.

generate_complex_potential(X, Y, config, t=0.0, static_disorder=None, rng=None)[source]#

Generate a highly controllable 2D potential landscape.

Parameters:
  • X (Tensor) – X-coordinate grid for evaluating the potential.

  • Y (Tensor) – Y-coordinate grid for evaluating the potential.

  • config (dict[str, Any]) – Potential configuration values controlling traps, lattices, and disorder.

  • t (float) – Current simulation time used for rotating or time-varying terms.

  • static_disorder (Tensor | None) – Precomputed disorder field to add to the potential.

  • rng (Generator | None) – Random number generator used when sampling disorder terms.

Return type:

Tensor

generate_static_disorder(X, Y, config, rng=None)[source]#

Create a stationary speckle-like potential for one trajectory.

Parameters:
Return type:

Tensor

class GPESimulator2D(N=128, L=10.0, dt=0.005, device=None)[source]#

Bases: object

Internal Simulator class for the Gross-Pitaevskii Equation.

initialize_state(x0=0.0, y0=0.0, width=1.0, kx0=0.0, ky0=0.0)[source]#

Create a meaningful initial condition: a moving Gaussian wavepacket.

step(psi, V, g, Omega=0.0, imaginary_time=False)[source]#

Evolve the system forward by one time step using Strang splitting.

Sequence: [V-half] [rot-half] [K-full] [rot-half] [V-half] [renorm]

Real-time uses half_dt = dt/2 (phase evolution). Imaginary-time uses half_dt = -i*dt/2 (amplitude decay toward ground state). In both cases the rotation is the same real coordinate rotation exp(i*angle*Lz).

simulate_gpe_2d(config, *, return_timeseries=False, n=128, L=10.0, T=5.0, dt=0.005, snapshot_dt=None, random_seed=None, device=None)[source]#

Simulate the Gross-Pitaevskii Equation in 2D.

Parameters:
Return type:

Tensor

class GrossPitaevskiiEquation2D(parameters_range=None, output_names=None, return_timeseries=False, log_level='progress_bar', n=128, L=10.0, T=5.0, dt=0.005, snapshot_dt=None, skip_nt=0, random_seed=None, box_type='woods_saxon', spoon_type='orbit', artifact_validation_enabled=False, artifact_validation_threshold=0.0005, artifact_validation_warmup_frames=8, artifact_validation_tail_frames=12)[source]#

Bases: SpatioTemporalSimulator

Gross-Pitaevskii equation simulator for quantum fluids.

The simulator evolves a complex wavefunction \(\psi\) under:

\[i\partial_t \psi = \left[-\frac{1}{2}\nabla^2 + V(x, y, t) + g|\psi|^2 - \Omega L_z\right]\psi.\]

The returned channels are density, real part, and imaginary part: \([|\psi|^2, \operatorname{Re}(\psi), \operatorname{Im}(\psi)]\).

Parameters:
forward_samples_spatiotemporal(n, random_seed=None, ensure_exact_n=False)[source]#

Run sampled trajectories and return [batch,time,x,y,channels] data.

Parameters:
  • n (int)

  • random_seed (int | None)

  • ensure_exact_n (bool)

Return type:

dict