betaFeedback

WorksPhysics and Astronomy

A Python GPU-accelerated solver for the Gross-Pitaevskii equation and applications to many-body cavity QED

Abstract

TorchGPE is a general-purpose Python package developed for solving the Gross-Pitaevskii equation (GPE). This solver is designed to integrate wave functions across a spectrum of linear and non-linear potentials. A distinctive aspect of TorchGPE is its modular approach, which allows the incorporation of arbitrary self-consistent and time-dependent potentials, e.g., those relevant in many-body cavity QED models. The package employs a symmetric split-step Fourier propagation method, effective in both real and imaginary time. In our work, we demonstrate a significant improvement in computational efficiency by leveraging GPU computing capabilities. With the integration of the latter technology, TorchGPE achieves a substantial speed-up with respect to conventional CPU-based methods, greatly expanding the scope and potential of research in this field.

Introduction

TorchGPE is a Python package specifically developed to numerically calculate the ground state and dynamical solutions of the Gross-Pitaevskii equation (GPE) in 2D. It provides extensive capabilities to handle advanced physical problems involving both linear potentials in the wave function ψ\psi and non-linear ones. The numerical methods employed in TorchGPE are based on the efficient split-step spectral algorithm, ensuring accurate and efficient computations. In comparison to various open-source packages solving the GPE, e.g GPELab [1, 2], GPUE [3], spinor-GPE [4], BEC2HPC [5], and others, the distinctive features of our work are:

  • A user-friendly Python package with a modular approach to defining arbitrary linear, non-linear, time-dependent, and self-consistent potentials;

  • A library of ready-to-use potentials of interest for the quantum gas community. This includes potentials modeling the dispersive matter-light interaction at the core of many-body cavity QED;

  • Support for GPU optimization through the PyTorch library [6, 7], specifically targeting computational bottlenecks like fast Fourier transforms and Hadamard products.

The paper is organized as follows: in the next section, we introduce the Gross-Pitaevskii equation. § 3 describes the algorithmic approach chosen. Following this, § 4 outlines the GPU implementation and examines its performance on various devices and compared to the CPU-based implementation. Finally, in § 5, we present benchmark results that provide a validation of our code. Despite our code being applicable to a vast class of problems, for the purpose of benchmarking we focus on Bose-Einstein condensates subject to optical potentials and possibly coupled to driven optical cavities.

Gross-Pitaevskii equation

The Gross-Pitaevskii equation is a nonlinear self-consistent partial differential equation that models the collective behavior of identical bosons in a condensate at effectively zero temperatures [8]. The time-dependent form of the GPE reads:

iℏ∂ψ∂t=H^GPE(t)ψ=[−ℏ2∇22m+Vext(r,t,ψ)+g∣ψ∣2]ψ,(1)i\hbar\frac{\partial\psi}{\partial t} = \hat{H}_{\mathrm{GPE}}(t)\psi= \left[-\frac{\hbar^2\nabla^2}{2m} + V_{\mathrm{ext}}(\mathbf{r},t,\psi) + g|\psi|^2\right]\psi, \tag*{(1)}

where ψ(r,t)\psi(\mathbf{r},t) represents the condensate’s wave function at position r\mathbf{r} and time tt, mm denotes the mass of the bosonic particles, and ℏ\hbar is the reduced Plank constant. This nonlinear equation incorporates a local potential Vext(r,t,ψ)V_{\mathrm{ext}}(\mathbf{r},t,\psi), which may vary in time and space and self-consistently depend on ψ\psi itself. The term g∣ψ∣2g|\psi|^2 describes the self-interaction among particles in a 3D condensate.

Solutions to the GPE are rarely analytical. Thus, efficiently obtained numerical solutions present a powerful tool to approximately compute many of the most relevant features of Bose-Einstein condensates such as density distributions, stability, dynamics, and collective behaviors. Several computational methods have been developed to solve the GPE. Notable among these are Runge-Kutta integrators [9], Suzuki-Trotter solvers [10], the Crank-Nicolson method [11], and the split-step Fourier method [12]. Given the self-consistent nature of the GPE, these methods typically involve an iterative process. This process starts with an initial guess for ψ\psi and employs a contractive minimization approach [13] until convergence to a stationary configuration is reached (cf. Figure 1). Among all methods, the split-step Fourier method is particularly efficient and compact, allowing both computation of the ground state and the real-time dynamics of the system [14].

Image not extracted

Figure 1. Visualization of working principle. The code starts with an initial wave function. Different types of potentials can be added in a modular fashion. The split-step Fourier method is implemented with PyTorch utilizing memory parallelization via GPUs. Callbacks allow the injection of custom code in the propagation, e.g., to read out observables during the evolution.

Computational algorithm

Split-step Fourier method

The split-step Fourier method is a straightforward approach for evaluating the state ψ(t)\psi(t) of a system at time tt by solving the evolution equation iℏ∂tψ(t)=H^GPEψ(t)i\hbar\partial_t\psi(t)=\hat{H}_{\mathrm{GPE}}\psi(t). The general solution to this non-linear Schrödinger equation can be written as

∣ψ(t+dt)⟩=U∣ψ(t)⟩=exp⁡(−iH^GPE(t)dtℏ)∣ψ(t)⟩,(2)\lvert\psi(t+\mathrm{d}t)\rangle= U\lvert\psi(t)\rangle= \exp\left(-\frac{i\hat{H}_{\mathrm{GPE}}(t)\mathrm{d}t}{\hbar}\right)\lvert\psi(t)\rangle, \tag*{(2)}

where UU is the time-ordered evolution operator. To facilitate the computation, the Hamiltonian operator H^GPE=T^+V^\hat{H}_{\mathrm{GPE}}=\hat{T}+\hat{V} is divided into its kinetic energy component T^=−ℏ2∇2/2m\hat{T}=-\hbar^2\nabla^2/2m, which is diagonal in reciprocal space, and the potential energy component V^=Vext(r,t,ψ)+g∣ψ∣2\hat{V}=V_{\mathrm{ext}}(\mathbf{r},t,\psi)+g\lvert\psi\rvert^2, which is diagonal in real space. By splitting the full evolution operator into NN steps corresponding to time intervals Δt=t/N\Delta t=t/N, the evolution operator for a single time step takes the form

e−iℏH^GPEΔt=eT~/2eV~eT~/2+O(Δt3),(3)e^{-\frac{i}{\hbar}\hat{H}_{\mathrm{GPE}}\Delta t}=e^{\widetilde{T}/2}e^{\widetilde{V}}e^{\widetilde{T}/2}+O(\Delta t^3), \tag*{(3)}

where T~=−iℏT^Δt\widetilde{T}=-\frac{i}{\hbar}\hat{T}\Delta t and V~=−iℏV^Δt\widetilde{V}=-\frac{i}{\hbar}\hat{V}\Delta t are dimensionless operators. The computation of the evolution operators exp⁡(V~)\exp(\widetilde{V}) and exp⁡(T~/2)\exp(\widetilde{T}/2) is performed in real and Fourier space, respectively. Denoting by ∣ψk⟩\lvert\psi_k\rangle the wave function in Fourier space, the evolution over a single time step can be expressed as

∣ψk(t+Δt)⟩≈eT~/2F[eV~F−1[eT~/2∣ψk(t)⟩]],(4)\lvert\psi_k(t+\Delta t)\rangle\approx e^{\widetilde{T}/2}\mathcal{F}\left[e^{\widetilde{V}}\mathcal{F}^{-1}\left[e^{\widetilde{T}/2}\lvert\psi_k(t)\rangle\right]\right], \tag*{(4)}

which is equivalent to the application of the full propagator up to third order in Δt\Delta t. The Fourier transform operation, denoted as F\mathcal{F}, is implemented using the Fast Fourier Transform (FFT) algorithm, applied to the wave function discretized over the computational grid. Notice that the Fourier transformation of the wave function automatically imposes periodic boundary conditions on the grid. The implementation of forward and backward Fourier transformations in the evaluation of the equation is associated with minimal computational expense compared to the direct calculation of the kinetic energy term by numerical differentiation. Note that due to its non-linearity, the potential has to be recalculated at each step, employing each time the most up-to-date wave function [15].

Adimensionalization of the GPE and contact interactions renormalization

In numerical computations, the challenge of handling operations on numbers with vastly different magnitudes is well-recognized. This issue, known as the loss of significance problem, arises due to the inherent limitations in floating-point precision of digital calculations. For example, when adding a very small number to a very large one, the contribution from the small number may be effectively lost due to the limited precision with which the numbers are stored.

This issue is most prominent when expressing the GPE in physical units [16]. To circumvent it, in TorchGPE, we reformulate the GPE using dimensionless variables, rescaled according to the system’s natural units of length and time. Specifically, we employ the natural units of a quantum harmonic oscillator, with the frequency ωℓ\omega_{\ell} serving as the fundamental reference. This choice establishes the reference time and length scales, denoted by

τℓ=1ωℓandℓ=ℏmωℓ(5)\tau_{\ell} = \frac{1}{\omega_{\ell}} \quad\text{and} \quad\ell= \sqrt{\frac{\hbar}{m\omega_{\ell}}} \tag*{(5)}

respectively. Consequently, in our dimensionless framework, we define the time and length units as:

t′=tτℓandr′=rℓ.(6)t^{\prime} = \frac{t}{\tau_{\ell}} \quad\text{and} \quad r^{\prime} = \frac{r}{\ell}. \tag*{(6)}

Additionally, we rescale the energies and the wave function as

E′=Eℏωℓandψ′=ℓd/2ψ,(7)E^{\prime} = \frac{E}{\hbar\omega_{\ell}} \quad\text{and} \quad\psi^{\prime} = \ell^{d/2}\psi, \tag*{(7)}

where dd is the dimension of the system. This rescaling ensures that our numerical computations are stable and accurate without altering the problem’s underlying physics.

A complete description of a physical system usually requires performing simulations in a tridimensional space. While our code is, in principle, able to perform such simulations, it is true that often the relevant physics can be extrapolated from effective descriptions in lower dimensional spaces where simulations are much less computationally challenging. This occurs, for instance, in several experimentally accessible devices with a strong harmonic confinement in one or two directions. If the dynamics unfolds primarily over the xyxy plane, equation (1) is virtually unchanged, except for the contact interaction strength which is rescaled as

g2D=g2πa⊥.(8)g_{2D} = \frac{g}{\sqrt{2\pi}a_{\perp}}. \tag*{(8)}

The renormalization length a⊥a_{\perp} allows to approximate the physics of the confined 3D gas through an effective 2D description [17, 18]. Note that in the weakly interacting limit, a⊥a_{\perp} is well approximated by the harmonic oscillator length along the transverse direction (cf. equation (5)).

Imaginary-time evolution

The imaginary-time evolution algorithm is a commonly used method to find the minimal energy solution ∣ψ0⟩|\psi_0\rangle of the GPE [11, 19, 20, 21, 22]. The method is based on a transformation to imaginary time (t→−iτt \to-i\tau), often referred to as Wick rotation, leading to the exponential decay of all states relative to the ground state. The underlying principle of this method parallels that of the power method and ensures that in the limit of τ→∞\tau\to\infty, the evolved wave function ultimately converges to the ground state of the system ∣ψ(τ→∞)⟩≈∣ψ0⟩|\psi(\tau\to\infty)\rangle\approx|\psi_0\rangle. This outcome holds independently of the initial wave function chosen, as long as this is not orthogonal to ∣ψ0⟩|\psi_0\rangle.

The problem of determining the ground state of the system can thus be addressed by evolving an arbitrary initial wave function for a sufficiently long imaginary duration. In TorchGPE, this evolution is achieved using the split-step Fourier propagation method discussed above, where the time step Δt\Delta t is replaced with −iΔτ-i\Delta\tau. Due to the diffusive nature of the resulting equation, the wave function must be normalized after each iteration to prevent it from decaying completely.

GPU-accelerated PyTorch implementation

Originally designed for 3D graphics rendering, Graphical Processing Units (GPUs) have become pivotal in computationally intensive domains like Deep Learning. In this study, we harness the GPU’s robust data parallelization capabilities to enhance the efficiency of the split-step spectral method. The FFT algorithm and Hadamard products are particularly well-suited for the exploitation of the parallel processing capabilities of GPUs. Drawing on the insights of Ref. [4], our approach utilizes the CUDA programming framework in conjunction with the PyTorch library. This combination enables efficient processing of large datasets, markedly surpassing CPU performance in tasks such as matrix-matrix multiplications and Fourier transformations. TorchGPE’s default behavior is to execute on GPUs when a compatible NVIDIA processor is present; otherwise, it resorts to using the CPU.

This section offers a comparative analysis of our code’s performance across various CPUs and GPUs. Our focus is to assess the effectiveness of GPU integration in boosting computational efficiency, highlighting the advantages of this approach in handling complex, data-intensive operations.

Computational performance

To accurately compare GPU and CPU performance, we adopt the methodology from Ref. [4] and, to minimize the impact of slow data transfers between CPU RAM and GPU memory, we pre-allocate the necessary tensors on the respective devices. The figure of merit of our benchmark is the execution time averaged over five independent runs, each involving 10310^3 steps of imaginary time propagation, across various two-dimensional grid sizes (N=Nx×NyN = N_x \times N_y). The results, depicted in Figure 2, highlight the performance differences and the significant speedup achieved with GPU acceleration.

Image not extracted

Figure 2. Benchmark. Performance comparison between the implementation of the imaginary time propagation algorithm for different grid sizes Nx=Ny=2nN_x = N_y = 2^n on a CPU (circles) and several NVIDIA GPU processors. The simulated system is a trapped, non-interacting BEC, with the only potential being a fixed harmonic confinement. The data represented via the dashed line have been obtained by storing numerical values in the single-precision floating-point format, as opposed to the double-precision format used for the other simulations. The data represented via the dash-dotted line have been obtained by using the GPELab package in MATLAB.

The data reveals a consistent and substantial speedup in GPU execution for all grid sizes and processors tested. Notably, the speed-up becomes significant for N≳26\sqrt{N} \gtrsim2^6 points per side, reaching up to a 40-fold increase for N≳29\sqrt{N} \gtrsim2^9. Note that the comparison is conducted on grids where the number of samples in each direction is an integer power of two, where the FFT algorithm is maximally efficient [23]. Nevertheless, we do not record qualitative deviations from the observed trend for non-optimal grid sizes. The GPU scaling behavior presents two distinct patterns. For smaller grids, the execution time appears constant and stable around a value which depends on the processor’s specifications, e.g. number of CUDA cores, clock speed and memory bandwidth, as well as its instantaneous workload. Conversely, for larger grids, the behavior mirrors that of CPUs, showing a power-law dependence on NN. This shift is interpreted as the GPU reaching its limit for simultaneous data operations, necessitating sequential batch processing for larger grids. This hypothesis is supported by the observation that the device reaching first the turning point is the GeForce RTX 3070 GPU, which is the one of the three with the least amount of memory. It is then followed by the GeForce RTX 4090, and finally the RTX A6000 which is the one with the largest memory. Additionally, using regular precision floats, which require half the memory, we can extend the range of values of NN where this efficient flat computation rate is observed.

Furthermore, in Figure 2 we present a performance comparison between our package and the GPELab library in MATLAB. Both the software packages demonstrate comparable execution time when run on the same CPU machine. However, it is worth noting that GPELab currently does not support GPU acceleration, whereas our package takes full advantage of this capability, leading to drastically better performance on GPU systems.

Benchmarking

A benchmark on a physical system is essential to assess the performance and accuracy of our code. It allows us to validate the computational model against known experimental or theoretical results, ensuring its reliability or identifying potential discrepancies.

Harmonically trapped Bose-Einstein condensate

The simplest model for comparing our numerical simulation with an analytical solution is the probability distribution of a harmonically trapped interacting Bose-Einstein Condensate (BEC). In this example, we consider an isotropic confining potential Vt=12mωt2(x2+y2)V_{\mathrm{t}} = \frac{1}{2}m\omega_{\mathrm{t}}^{2}(x^{2}+y^{2}) with trapping frequency ωt\omega_{\mathrm{t}}. We compare our numerical results to the analytical solution provided by the Thomas-Fermi approximation, as shown in Figure 3. The comparison shows excellent agreement, except at the edges of the density distribution, where the Thomas-Fermi approximation, which neglects the kinetic energy of the gas, predicts an unphysical sharp kink in the density.

Image not extracted

Figure 3. BEC in a harmonic trap. Linear probability density of the BEC along a cut through the centre of the cloud. The profile calculated analytically using the Thomas-Fermi approximation (orange dashed line) is compared to the results of an imaginary time evolution using TorchGPE (blue line). The inset highlights the smoothening effect of the kinetic energy term in the GPE equation.

Simulating Kapitza-Dirac diffraction of a BEC in an optical lattice

As a second example, we explore the diffraction of a BEC from an optical lattice switched on for a time τ\tau. We consider an optical lattice created by two counterpropagating lasers of wavelength λ\lambda along the yy-direction. They interfere and form a standing wave with electric field E(y)=E0Π(t/τ)cos⁡(ky)e−iωptE(y) = E_{0}\Pi(t/\tau)\cos(ky)e^{-i\omega_{\mathrm{p}}t}, of amplitude E0E_{0}, wavenumber k=2π/λk = 2\pi/\lambda and angular frequency ωp\omega_{\mathrm{p}} (cf. Figure 4a). Π\Pi is a unit pulse of duration τ\tau, corresponding to the time that the lasers are turned on. The corresponding potential energy in Eq. (1) is

Image not extracted

Figure 4. Kapitza-Dirac diffraction of a trapped BEC. (a) Experimental configuration. A trapped BEC is illuminated by two counterpropagating Gaussian beams described by quasi-plane waves with wavevector kk, inducing a standing-wave modulation along the yy-direction with period λ/2\lambda/2. (b) Representative momentum-space probability distributions for t=(18,34,55) μst=(18,34,55)\,\mu\mathrm{s}. (c) Time evolution of different momentum mode populations. The solid (dashed) curves are calculated for an ss-wave scattering length of as=300 aBa_s=300\,a_B (as=0 aBa_s=0\,a_B). The non-interacting case shows good agreement with the analytical approach of integrating the Schrödinger equation in momentum space. To ensure numerical convergence of the simulation, we used a grid size of Nx=Ny=29N_x=N_y=2^9 points, covering space of 30 μm30\,\mu\mathrm{m} and a time step of dt=0.1 μs\mathrm{d}t=0.1\,\mu\mathrm{s}.

V(x,y,t)=V0(t)cos⁡2(ky)+Vt(x,y),(9)V(x,y,t) = V_{0}(t)\cos^{2}(ky) + V_{\mathrm{t}}(x,y), \tag*{(9)}

where V0=−α(λ)∣E0∣2Π(t/τ)V_0=-\alpha(\lambda)|E_0|^2\Pi(t/\tau) is the light shift experienced by the atoms, and α(λ)\alpha(\lambda) the scalar atomic polarisability [24]. In the potential, we also consider an additional harmonic confinement in the isotropic form of the previous example Vt=12mωt2(x2+y2)V_t=\frac{1}{2}m\omega_t^2(x^2+y^2).

Diffraction from a lattice was one of the first applications of coherent atom optics [25, 26]. Nowadays, this method is commonly used to measure the depth of an optical lattice since it can be modeled by solving the Schrödinger equation of motion of the lowest few momentum states ∣2nℏk⟩|2n\hbar k\rangle, which is accurate at low interaction strengths gg and short times τ\tau. The experimental protocol consists of flashing the lattice for a duration τ\tau and recording the population in the different momentum states after ballistic expansion. By repeating the experiment for varying pulse durations τ\tau, the lattice depth can be determined. While in experiments, the momentum-space populations are typically retrieved from time-of-flight measurements, in our simulations, we can directly access them, at no additional cost, from the wave-function amplitude in reciprocal space (cf. Figure 4b). In Figure 4c, we plot the results of the simulation for both the interacting and the non-interacting cases, showcasing the coherent oscillations of the diffracted populations.

Numerical calculation of the self-organization phase diagram of a BEC in an optical cavity

Self-organization refers to the spontaneous formation of ordered patterns in the condensate, driven by the balance between kinetic energy and cavity-mediated atomic interactions [27]. These interactions give rise to spatial patterns characterized by symmetric density distributions. The emergence of such patterns in a BEC breaks two continuous symmetries: phase invariance for superfluidity and translational invariance for crystal formation. In this context, the lattice structure emerging from a self-organized BEC is also known as lattice supersolid, a quantum phase that intriguingly combines crystallization in a many-body system with the dissipationless flow typical of superfluids [27]. Given the self-consistent nature of this problem, our framework allows for an efficient simulation of the physics.

In this section, we use our code to numerically solve the GPE associated with this model, characterizing the physics observed in the experimental realizations of the latter [28]. In the mean-field limit, the potential energy is

V(r)=Vt(r)+Vp(r)+Vc(r)+Vi(r),(10)V(\mathbf{r}) = V_{\mathrm{t}}(\mathbf{r}) + V_{\mathrm{p}}(\mathbf{r}) + V_{\mathrm{c}}(\mathbf{r}) + V_{\mathrm{i}}(\mathbf{r}), \tag*{(10)}

where VtV_{\mathrm{t}} is the trapping potential and VpV_{\mathrm{p}}, VcV_{\mathrm{c}}, and ViV_{\mathrm{i}} denote the pump, cavity, and interference lattices, respectively. The trapping potential is harmonic and time-independent, while the others are defined as:

Vp=V0cos⁡2(ky),(11)V_{\mathrm{p}} = V_0 \cos^2(ky), \tag*{(11)}
Vc=U0∣α∣2cos⁡2(kx),(12)V_{\mathrm{c}} = U_0 |\alpha|^2 \cos^2(kx), \tag*{(12)}
Vi=2V0U0Re⁡(α)cos⁡(kx)cos⁡(ky),(13)V_{\mathrm{i}} = 2\sqrt{V_0 U_0}\operatorname{Re}(\alpha)\cos(kx)\cos(ky), \tag*{(13)}

where V0V_0 is the depth of the pump lattice, U0U_0 the depth of the single-photon lattice inside the cavity, and α\alpha the coherent field amplitude in the cavity. Notably,

α=NV0U0∫cos⁡(kx)cos⁡(ky)∣ψ∣2 dx dyΔ~c+iκ(14)\alpha= N\sqrt{V_0 U_0}\frac{\int\cos(kx)\cos(ky)|\psi|^2 \, \mathrm{d}x\,\mathrm{d}y}{\widetilde{\Delta}_{\mathrm{c}} + i\kappa} \tag*{(14)}

is explicitly dependent on the atomic wave function at time tt, introducing an additional element of self-consistency to the problem. Here, κ\kappa is the decay rate of the intra-cavity light field. As a result, α\alpha is calculated at each time step using the current value of the density ∣ψ(t)∣2|\psi(t)|^2. The term appearing at the denominator

Δ~c=Δc−U0∫cos⁡2(kx)∣ψ(x,y)∣2 dx dy(15)\widetilde{\Delta}_{\mathrm{c}} = \Delta_{\mathrm{c}} - U_0 \int\cos^2(kx)|\psi(x,y)|^2 \, \mathrm{d}x\,\mathrm{d}y \tag*{(15)}

is the dispersively shifted cavity detuning. A formal justification of the self-consistent potential is beyond the scope of this work. For further details, we refer the reader to Ref. [27].

In Figure 5, we present results that stem from the solution of the GPE in both imaginary- and real-time. Replicating the experimental setting shown in Figure 5a, where a BEC is illuminated by a laser orthogonal to the cavity mode, we observe the presence of two different phases. For values of V0V_0 smaller than a critical threshold, the density distribution is only modulated by the transverse lattice (cf. Figure 5c) and the cavity population is vanishing (cf. Figure 5b). Conversely, as V0V_0 is increased beyond its critical value, the system self-organizes into the chequerboard density modulated phase displayed in Figure 5d. Concurrently, the cavity acquires a non-vanishing population as seen in Figure 5b. We display simulations for both interacting and non-interacting gases, revealing that repulsive interatomic interactions in the BEC increase the critical pump power necessary for the system to self-organize. Not captured by low-energy theories, this behavior is well-reproduced in our GPE simulations and visible in Figure 5b.

Image not extracted

Figure 5. Self-organization of a trapped BEC in an optical cavity. (a) Experimental configuration. Two counter-propagating Gaussian beams illuminate a trapped BEC, forming a standing wave modulation along the yy direction. The BEC (N=2⋅105N = 2 \cdot10^{5} particles) is placed in the center of an optical cavity with its axis along xx. (b) (Left) Mean number of photons NphN_{\mathrm{ph}} in the cavity for different values of pump strength V0V_{0} and cavity detuning Δc\Delta_{\mathrm{c}}. The pump strength is expressed in units of the recoil energy Er=(ℏk)2/2mE_{\mathrm{r}} = (\hbar k)^{2}/2m. In blue (green) the phase boundary for an ss-wave scattering length of as=100 aBa_{\mathrm{s}} = 100\,a_{\mathrm{B}} (as=0 aBa_{\mathrm{s}} = 0\,a_{\mathrm{B}}) is shown. (Right) Corresponding values of α\alpha in a longitudinal cut through the phase diagram detailing the gradual development of a non-vanishing order parameter characteristic of a second-order phase transition. The pump power is linearly increased from 0 to 15 Er15\,E_{\mathrm{r}} in a total time of 15 ms. (c) Wave function in real (left) and momentum space (right) of the interacting BEC in the normal phase. The cavity detuning has been set to Δc=−2π⋅15\Delta_{\mathrm{c}} = -2\pi\cdot15 MHz and the pump strength to V0=2 ErV_{0} = 2\,E_{\mathrm{r}}. (d) Wave function in real (left) and momentum space (right) of the interacting BEC in the organized phase. The cavity detuning has been set to Δc=−2π⋅15\Delta_{\mathrm{c}} = -2\pi\cdot15 MHz and the pump strength to V0=6 ErV_{0} = 6\,E_{\mathrm{r}}. The spatial extent of the grid is set to 30 μm30\,\mu\mathrm{m} with a grid size of Nx=Ny=210N_{x} = N_{y} = 2^{10} points. This choice guarantees the numerical convergence of the results.

This implementation can also be generalized to explore previous experiments on multicavity systems or on setups with a running-wave component added to the transverse beam, where different symmetries appear [29, 30, 31]. Indeed, a preliminary version of this software package has already been employed to quantitatively reproduce a novel, dissipation-induced dynamical effect leading to spatial transport of the atoms [32].

Simulated roton spectroscopy at the self-organization phase transition

Fundamental insight into the underpinnings of emergent many-body effects in quantum fluids is provided by the investigation of the spectrum of their elementary excitations. Indeed, the self-organization phase transition can be understood as resulting from a virtual process where cavity photons mediate an effective long-range interaction between the atoms. Long-range interactions have long been predicted to give rise to a softening of the excitation spectrum at a finite momentum k=krot\mathbf{k} = \mathbf{k}_{\mathrm{rot}}, similar to that observed in superfluid helium [33] and, more recently, in dipolar BECs [34, 35]. Under simplifying assumptions, e.g. infinite uniform gas, the correction to the free-particle dispersion relation ϵk\epsilon_k can be derived in the framework of the Bogolyubov theory [36, 37]. This results in the dispersion relation

ϵ~k=ϵk1+2g2D∣ψ(r)∣2+4NVV~(k)ϵk(16)\tilde{\epsilon}_k = \epsilon_k \sqrt{1 + \frac{2g_{2D}|\psi(\mathbf{r})|^2 + 4N\mathcal{V}\tilde{V}(k)}{\epsilon_k}} \tag*{(16)}

where ϵk\epsilon_k is the free kinetic energy, V~(k)\tilde{V}(k) is the Fourier transform of the mode structure of the long-ranged potential V(r)=cos⁡(kc⋅r)cos⁡(kp⋅r)V(\mathbf{r}) = \cos(\mathbf{k}_c \cdot\mathbf{r})\cos(\mathbf{k}_p \cdot\mathbf{r}), and V=ℏV0U0Δ~c/(Δ~c2+κ2)\mathcal{V} = \hbar V_0 U_0 \tilde{\Delta}_c/(\tilde{\Delta}_c^2 + \kappa^2) is its effective strength. The presence of the cavity-mediated long-range interaction leads to a renormalization of the energy spectrum around the wavevector k\mathbf{k}, thus creating a minimum of energy at finite momentum, like illustrated in 6b.

Experimentally, the roton spectrum can be probed through a variant of Bragg spectroscopy [38]. After preparing the system at a given interaction strength, the cavity field is excited with a weak pulse along the cavity axis, with frequency detuned by Δp\Delta_p from the frequency of the driving laser. In the regime of adiabatic elimination of the light field dynamics, the on-cavity axis probe is modeled by modifying the cavity field in equation (14) to α′(t)=α+δα(t)\alpha'(t) = \alpha+ \delta\alpha(t) with

δα(t)=Ωcexp⁡[i(Δpt+ϕ)]Δc−U0∫cos⁡2(kpr)∣ψ(r)∣2d2r+iκ(17)\delta\alpha(t) = \frac{\Omega_c \exp[i(\Delta_p t + \phi)]}{\Delta_c - U_0 \int\cos^2(\mathbf{k}_p \mathbf{r})|\psi(\mathbf{r})|^2 \mathrm{d}^2r + i\kappa} \tag*{(17)}

Here, Ωc\Omega_c is the strength of the on-cavity axis driving field, and ϕ\phi is the phase of the probe beam. The interference between the cavity probe and the transverse pump results in an amplitude-modulated probing potential

V=2V0U0Re⁡(α)cos⁡(kpr)cos⁡(kcr),(18)V = 2\sqrt{V_0 U_0}\operatorname{Re}(\alpha)\cos(k_p r)\cos(k_c r), \tag*{(18)}

Such modulation acts on the BEC and results in photons being scattered from the pump to the cavity field, and hence in the oscillation of the latter. Therefore, the light leaking out of the cavity follows the oscillatory evolution of the density modulation, and the system’s response to the modulation can be observed in the intracavity photon number. The excitation energy can be extracted by monitoring the field leaking out of the cavity and analyzing the response of the system to different probing frequencies.

In Figure 6, we present the results of the cavity spectroscopy protocol performed with TorchGPE, showing the mode softening as the phase transition is approached. In Figure 6a we sketch the experimental apparatus, and in Figure 6b the qualitative behavior of rotonic excitations. Figure 6c shows numerical results of the excitation energy of the soft mode accompanied by the diverging response in the cavity light field. The results have been obtained by first computing the ground state of the gas via imaginary time propagation and subsequently evolving the system in real-time while probing for 4ms with an amplitude of Ωc=100Er\Omega_c = 100E_r. The mean photon number in the cavity has been computed for different values of the detuning between the probe and the pump Δp\Delta_p, and fitted with a Gaussian function [38]. The frequency of the soft mode and the strength of the response have been extracted from the fit results. Bragg spectroscopy also allows determining the dynamic structure factor of the system around the mode softening, providing information about the emergence of quasi-particle modes and their energy [39]. This can be computed with TorchGPE, as it provides direct access to both the cavity field and the condensate’s wave function.

Image not extracted

Figure 6. Bragg spectroscopy of Soft Mode in Lattice Supersolid. (a) Schematic of the simulated system. Atoms in the optical cavity with the applied transverse pump lattice (kp\mathbf{k}_p) and the applied Bragg probe beam (kc\mathbf{k}_c). (b) Sketch of the mode softening in the dispersion relation. The arrows indicate the role of the pump and probe beams, where the pump is detuned by Δa\Delta_a from the excited atomic state ∣e⟩|e\rangle. (c) Mode softening (blue, left axis) and cavity field (red, right axis) extracted from the GPE simulation as the transverse pump power V0V_0 approaches its critical value. The gas is made of N=2⋅105N = 2 \cdot10^5 87Rb^{87}\mathrm{Rb} atoms trapped in a harmonic potential with frequency ω=2π⋅100\omega= 2\pi\cdot100 Hz. The cavity detuning has been set to Δc=−2π⋅20\Delta_c = -2\pi\cdot20 MHz, and the atomic one to Δa=−2π⋅76.6\Delta_a = -2\pi\cdot76.6 GHz.

Outlook

The future prospects of the presented package include three main areas of development. First, extending the method to three dimensions would broaden its applicability to a wider range of physical systems. Second, the use of an unevenly spaced computational grid would allow the sampling to be adjusted to the characteristics of the potentials. Consequently, it would reduce the integration time without greatly affecting the quality of the results. Lastly, incorporating spinor wavefunctions would enable a description of systems involving spin degrees of freedom. These future directions aim to enhance the package’s versatility, accuracy, and usability.

Acknowledgement

We are grateful to Tilman Esslinger for fruitful discussions. We acknowledge funding from the Swiss National Science Foundation (Project No. IZBRZ2 186312) and from the Swiss State Secretariat for Education, Research and Innovation (SERI).

Author contributions LG extended and optimised the initial versions of the code and integrated the GPU’s capabilities. LF developed the current version of the package and the public documentation. JS expanded the scope of the code and supervised the final development. FF and AB provided input on the physical models and technical topics. DD conceived the project, TD and DD supervised its development. All authors contributed to the manuscript.

Code availability TorchGPE is openly available at the following repository: https://github.com/qo-eth/TorchGPE. Documentation and examples are also provided.

References

References

  1. [1]X. Antoine and R. Duboscq, GPELab, a Matlab toolbox to solve Gross–Pitaevskii equations I: Computation of stationary solutions, Computer Physics Communications 185(11), 2969 (2014), doi:10.1016/j.cpc.2014.06.026.DOI
  2. [2]X. Antoine and R. Duboscq, GPELab, a Matlab toolbox to solve Gross–Pitaevskii equations II: Dynamics and stochastic simulations, Computer Physics Communications 193, 95 (2015), doi:10.1016/j.cpc.2015.03.012.DOI
  3. [3]J. R. Schloss and L. J. O’Riordan, GPUE: Graphics Processing Unit Gross–Pitaevskii Equation solver, Journal of Open Source Software 3(32), 1037 (2018), doi:10.21105/joss.01037.DOI
  4. [4]B. D. Smith, L. W. Cooke and L. J. LeBlanc, GPU-accelerated solutions of the nonlinear Schrödinger equation for simulating 2D spinor BECs, Computer Physics Communications 275, 108314 (2022), doi:10.1016/j.cpc.2022.108314.DOI
  5. [5]J. Gaidamour, Q. Tang and X. Antoine, BEC2HPC: A HPC spectral solver for nonlinear Schrödinger and rotating Gross-Pitaevskii equations. Stationary states computation, Computer Physics Communications 265, 108007 (2021), doi:10.1016/j.cpc.2021.108007.DOI
  6. [6]S.-y. Gong and J.-y. Zhang, GPU-accelerated performance on numerically solving multimode Schrödinger equation, In Sixth Symposium on Novel Optoelectronic Detection Technology and Applications, vol. 11455, pp. 728–731. SPIE, doi:10.1117/12.2563988 (2020).DOI
  7. [7]E. Kazakov, J. Gao, P. Anisimov and V. Zemlyakov, Parallelization of the Generalized Multimode Nonlinear Schrödinger Equation Solver: A Performance Analysis, In L. Sokolinsky and M. Zymbler, eds., Parallel Computational Technologies, Communications in Computer and Information Science, pp. 137–151. Springer Nature Switzerland, ISBN 978-3-031-38864-4, doi:10.1007/978-3-031-38864-4_10 (2023).DOI
  8. [8]F. Dalfovo, S. Giorgini, L. P. Pitaevskii and S. Stringari, Theory of Bose-Einstein condensation in trapped gases, Reviews of Modern Physics 71(3), 463 (1999), doi:10.1103/RevModPhys.71.463.DOI
  9. [9]S. Balac and F. Mahé, Embedded Runge-Kutta scheme for step-size control in the interaction picture method, Computer Physics Communications 184(4), 1211 (2013), doi:10.1016/j.cpc.2012.12.020.DOI
  10. [10]P. Wittek and F. M. Cucchietti, A second-order distributed Trotter–Suzuki solver with a hybrid CPU–GPU kernel, Computer Physics Communications 184(4), 1165 (2013), doi:10.1016/j.cpc.2012.12.008.DOI
  11. [11]P. Muruganandam and S. K. Adhikari, Fortran programs for the time-dependent Gross–Pitaevskii equation in a fully anisotropic trap, Computer Physics Communications 180(10), 1888 (2009), doi:10.1016/j.cpc.2009.04.015.DOI
  12. [12]J. A. C. Weideman and B. M. Herbst, Split-Step Methods for the Solution of the Nonlinear Schrödinger Equation, SIAM Journal on Numerical Analysis 23(3), 485 (1986), doi:10.1137/0723033.DOI
  13. [13]B. Polyak, Introduction to Optimization, Optimization Software (2020).
  14. [14]C. Barenghi and N. G. Parker, A Primer on Quantum Fluids, SpringerBriefs in Physics. Springer International Publishing, ISBN 978-3-319-42474-3 978-3-319-42476-7 (2016).DOI
  15. [15]J. Javanainen and J. Ruostekoski, Symbolic calculation in development of algorithms: Split-step methods for the Gross–Pitaevskii equation, Journal of Physics A: Mathematical and General 39(12), L179 (2006), doi:10.1088/0305-4470/39/12/L02.
  16. [16]A. Oganesov, Modeling The Gross-Pitaevskii Equation using The Quantum Lattice Gas Method, Dissertations, Theses, and Masters Projects (2017), doi:http://dx.doi.org/10.21220/s2-2dcm-7v23.
  17. [17]L. Salasnich, A. Parola and L. Reatto, Effective wave equations for the dynamics of cigar-shaped and disk-shaped Bose condensates, Physical Review A 65(4), 043614 (2002), doi:10.1103/PhysRevA.65.043614.DOI
  18. [18]L. Salasnich and S. Adhikari, Dimensional Reduction and Localization of a Bose-Einstein Condensate in a Quasi-1D Bichromatic Optical Lattice, Acta Physica Polonica A 128(6), 979 (2015), doi:10.12693/APhysPolA.128.979.DOI
  19. [19]S. E. Koonin, Computational Physics: Fortran Version, CRC Press, ISBN 978-0-429-49402-4, doi:10.1201/9780429494024 (2019).
  20. [20]M. L. Chiofalo, S. Succi and M. P. Tosi, Ground state of trapped interacting Bose-Einstein condensates by an explicit imaginary-time algorithm, Physical Review E 62(5), 7438 (2000), doi:10.1103/PhysRevE.62.7438.DOI
  21. [21]X. Antoine, C. Besse, R. Duboscq and V. Rispoli, Acceleration of the imaginary time method for spectrally computing the stationary states of Gross–Pitaevskii equations, Computer Physics Communications 219, 70 (2017), doi:10.1016/j.cpc.2017.05.008.DOI
  22. [22]S. K. Adhikari, Vortex-lattice in a uniform Bose-Einstein condensate in a box trap, Journal of Physics: Condensed Matter 31(27), 275401 (2019), doi:10.1088/1361-648X/ab14c5.DOI
  23. [23]cuFFT Release 12.3, https://docs.nvidia.com/cuda/cufft/index.html.
  24. [24]R. Grimm, M. Weidemüller and Y. B. Ovchinnikov, Optical dipole traps for neutral atoms, doi:10.48550/arXiv.physics/9902072 (1999), physics/9902072.DOI
  25. [25]J. H. Denschlag, J. E. Simsarian, H. Häffner, C. McKenzie, A. Browaeys, D. Cho, K. Helmerson, S. L. Rolston and W. D. Phillips, A Bose-Einstein condensate in an optical lattice, Journal of Physics B: Atomic, Molecular and Optical Physics 35(14), 3095 (2002), doi:10.1088/0953-4075/35/14/307.DOI
  26. [26]Y. B. Ovchinnikov, J. H. Müller, M. R. Doery, E. J. D. Vredenbregt, K. Helmerson, S. L. Rolston and W. D. Phillips, Diffraction of a Released Bose-Einstein Condensate by a Pulsed Standing Light Wave, Physical Review Letters 83(2), 284 (1999), doi:10.1103/PhysRevLett.83.284.DOI
  27. [27]F. Mivehvar, F. Piazza, T. Donner and H. Ritsch, Cavity QED with quantum gases: New paradigms in many-body physics, Advances in Physics 70(1), 1 (2021), doi:10.1080/00018732.2021.1969727.DOI
  28. [28]K. Baumann, C. Guerlin, F. Brennecke and T. Esslinger, Dicke quantum phase transition with a superfluid gas in an optical cavity, Nature 464(7293), 1301 (2010), doi:10.1038/nature09009.DOI
  29. [29]J. Léonard, A. Morales, P. Zupancic, T. Esslinger and T. Donner, Supersolid formation in a quantum gas breaking a continuous translational symmetry, Nature 543(7643), 87 (2017), doi:10.1038/nature21067.DOI
  30. [30]J. Léonard, A. Morales, P. Zupancic, T. Donner and T. Esslinger, Monitoring and manipulating Higgs and Goldstone modes in a supersolid quantum gas, Science (New York, N.Y.) 358(6369), 1415 (2017), doi:10.1126/science.aan2608.DOI
  31. [31]X. Li, D. Dreon, P. Zupancic, A. Baumgärtner, A. Morales, W. Zheng, N. R. Cooper, T. Donner and T. Esslinger, First order phase transition between two centrosymmetric superradiant crystals, Physical Review Research 3(1), L012024 (2021), doi:10.1103/PhysRevResearch.3.L012024.DOI
  32. [32]D. Dreon, A. Baumgärtner, X. Li, S. Hertlein, T. Esslinger and T. Donner, Self-oscillating pump in a topological dissipative atom–cavity system, Nature 608(7923), 494 (2022), doi:10.1038/s41586-022-04970-0.DOI
  33. [33]L. Landau, Theory of the superfluidity of helium ii, Phys. Rev. 60, 356 (1941), doi:10.1103/PhysRev.60.356.DOI
  34. [34]J. Hertkorn, J.-N. Schmidt, F. Böttcher, M. Guo, M. Schmidt, K. S. H. Ng, S. D. Graham, H. P. Büchler, T. Langen, M. Zwierlein and T. Pfau, Density Fluctuations across the Superfluid-Supersolid Phase Transition in a Dipolar Quantum Gas, Physical Review X 11(1), 011037 (2021), doi:10.1103/PhysRevX.11.011037.DOI
  35. [35]L. Chomaz, R. M. W. van Bijnen, D. Petter, G. Faraoni, S. Baier, J. H. Becher, M. J. Mark, F. Wächtler, L. Santos and F. Ferlaino, Observation of Roton Mode Population in a Dipolar Quantum Gas, Nature Physics 14(5), 442 (2018), doi:10.1038/s41567-018-0054-7.DOI
  36. [36]L. Pitaevskii and S. Stringari, Bose-Einstein Condensation and Superfluidity, International Series of Monographs on Physics. OUP Oxford, ISBN 9780191076688 (2016).
  37. [37]L. Gravina, New perspectives with dynamically tunable optical lattices in the IMPACT experiment. A theoretical study of roton spectroscopy and many-body localization of a dissipative quantum system with cavity-mediated long-range interactions, Master thesis, ETH Zurich, Zurich (2021-09-30).
  38. [38]R. Mottl, F. Brennecke, K. Baumann, R. Landig, T. Donner and T. Esslinger, Roton-Type Mode Softening in a Quantum Gas with Cavity-Mediated Long-Range Interactions, Science 336(6088), 1570 (2012), doi:10.1126/science.1220314.DOI
  39. [39]R. Roth and K. Burnett, Dynamic structure factor of ultracold bose and fermi gases in optical lattices, Journal of Physics B: Atomic, Molecular and Optical Physics 37(19), 3893 (2004), doi:10.1088/0953-4075/37/19/009.DOI

Paper details

vlnc:W_j6rcv665
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents