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.
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.
In this paper we present new versions of previously published numerical programs for solving the dipolar Gross–Pitaevskii (GP) equation including the contact interaction in two and three spatial dimensions in imaginary and in real time, yielding both stationary and non-stationary solutions. New versions of programs were developed using CUDA toolkit and can make use of Nvidia GPU devices. The algorithm used is the same split-step semi-implicit Crank–Nicolson method as in the previous version (Kishor Kumar et al., 2015), which is here implemented as a series of CUDA kernels that compute the solution on the GPU. In addition, the Fast Fourier Transform (FFT) library used in the previous version is replaced by cuFFT library, which works on CUDA-enabled GPUs. We present speedup test results obtained using new versions of programs and demonstrate an average speedup of 12–25, depending on the program and input size. The original version of this program (AEWL_v1_0) may be found at dx.doi.org/10.1016/j.cpc.2015.03.024
We extend the tensor-product direct solver from the Laplacian to the Schrödinger operator
−Δ+V. When the potential
V1 is separable, the operator
−Δ+V1 is inverted or exponentiated at cost
O(N1+1/d) in
d dimensions via per-axis eigendecomposition. On a single NVIDIA A100 GPU, this costs less than one second for
109 degrees of freedom in 3D. For non-separable potentials
V=V1+V2, the same solver provides a preconditioner
(−Δ+V1)−1 for the preconditioned conjugate gradient (PCG) method and a propagator for operator-splitting time integrators. For bounded
V2, we prove that the preconditioned operator has a bounded condition number and a clustered spectrum with at most finitely many outlier eigenvalues, independently of the mesh size, and also independently of the domain size when
V1 is a confining potential. This explains the mesh- and domain-independent PCG iteration counts observed in practice. We apply this method to ground state computation via inverse iteration for linear problems and via the
au gradient flow for Gross--Pitaevskii energy in 3D, and also Hamiltonian simulation via the approximated qHOP and Magnus-2 splitting methods from 3D to 9D on a single NVIDIA GH200 GPU.
The aim of this paper is to present the extension of the HPC pseudo-spectral solver BEC2HPC to compute the dynamics of 2D/3D rotating Bose-Einstein condensates modeled by the Gross-Pitaevskii equations with a rotation term. Numerical examples are provided to show the efficiency of the solver for large-scale simulations. NEW VERSION PROGRAM SUMMARY Program Title: BEC2HPC CPC Library link to program files: https://doi.org/10.17632/mdzpw4dr4t.2 Licensing provisions: GPLv2 Programming language: C++, Python Journal reference of previous version: Comput. Phys. Commun. 265 (2021) 108007, https://doi.org/10.1016/j.cpc.2021.108007 Does the new version supersede the previous version?: Yes Reasons for the new version: The first version of BEC2HPC provided a stationary-state solver, while this new version also enables the computation of the dynamics of rotating Gross–Pitaevskii equations. Summary of revisions: We have implemented ADI time-splitting and relaxation pseudo-spectral schemes in BEC2HPC, following the same parallel design and domain decomposition strategy as for the stationary-state solver. Nature of problem: This extension of the software BEC2HPC computes the dynamics of rotating Bose–Einstein condensates (BEC) modeled by the Gross–Pitaevskii equation (GPE). The available numerical methods are accurate and efficient for BEC with large rotation speeds and high nonlinearities. The parallel implementation allows performing large-scale simulations of 2D or 3D problems on parallel computing platforms. Solution method: Four time discretization methods are implemented for the dynamics of the GPE: a first-, second- and a fourth-order splitting schemes, and a second-order relaxation scheme. The spatial discretization is based on a Fourier pseudo-spectral method. This solver is implemented in distributed memory using MPI and a decomposition of the computational domain. Additional comments including restrictions and unusual features: The parallel algorithms are implemented in C++ and MPI, with a Python interface available for defining the physics of the problem. A pure Python version of sequential algorithms is also provided for rapid prototyping using the same interface. Results can be exported and visualized with external tools (HDF5 and VTK formats for ParaView or PyVista).
The Gross-Pitaevskii equation (GPE), that describes the wave function of a number of coherent Bose particles contained in a trap, contains the cube of the normalized wave function, times a factor proportional to the number of coherent atoms. The square of the wave function, times the above mentioned factor, is defined as the Hartree potential. A method implemented here for the numerical solution of the GPE consists in obtaining the Hartree potential iteratively, starting with the Thomas Fermi approximation to this potential. The energy eigenvalues and the corresponding wave functions for each successive potential are obtained by a spectral method described previously. After approximately 35 iterations a stability of eight significant figures for the energy eigenvalues is obtained. This method has the advantage of being physically intuitive, and could be extended to the calculation of a shell-model potential in nuclear physics, once the Pauli exclusion principle is allowed for.