1 Introduction

We develop a new fast Huygens sweeping method to compute the highly oscillatory solution of the following nonlinear Schrödinger equation for interactions governed by a nonlocal potential,

$$\begin{aligned} \left( i\hbar \frac{\partial }{\partial t}-H\right) U\equiv i\hbar U_t+\frac{\hbar ^2}{2m}\varDelta U-V(x)U-g\left( \int K(x-x')|U(x',t)|^2dx'\right) U=0,\nonumber \\ \end{aligned}$$
(1)

for \(x\in {\mathbb {R}}^d\) with the initial condition \(U(x,t_0)=U_{0}(x)\), where g is a constant controlling the strength of the self-interaction from the wavefunction, \(K(x-x')\) is the kernel function governing the nonlocal mutual interactions, V(x) is the real external potential, and

$$\begin{aligned} H=\left( \frac{\hbar ^2}{2m}\varDelta -V(x)-g\int K(x-x')|U(x',t)|^2dx'\right) \end{aligned}$$

is the many-body Hamiltonian. This model can describe many phenomena, such as the thermal self-interaction of beams inside a plasma [37] and the Bose–Einstein condensation (BEC) with magnetic dipole–dipole forces [12], in which the nonlocal interactions are the dipole–dipole interactions between the dilute atoms; consequently, it has been studied in various articles [5, 13, 26, 31, 33, 36].

If the interactions between the atoms are of short range (small particle density) and only binary collisions [27] are considered, then the two-body interacting potential \(K(x-x')\) can then be described by a singular response; in this case, we may use a Dirac delta function to model such a response so that the nonlocal effect becomes negligible [6], i.e. \(K(x-x')=\delta (x-x')\). Consequently, Eq. (1) is reduced to the usual cubic nonlinear Schrödinger equation (or the Gross–Pitaevskii equation)

$$\begin{aligned} i\hbar U_t+\frac{\hbar ^2}{2m}\varDelta U-V(x)U-g|U|^2U=0, \end{aligned}$$
(2)

which has a wide range of applications including plasma physics [7], integrated optics [28], and hydrodynamics [17].

It is known that for BECs modeled by Eq. (2) in high dimensions, collapse occurs so that after a finite time the solution becomes singular when the total number of particles is above a critical threshold [3]. This phenomenon has been studied in details in [27] using Eq. (1). Various analysis has concluded that the nonlocality in Eq. (1) stabilizes the system and suppresses the collapse for certain choices of nonlocal response interaction potential K(x) [1, 3, 37]. There are a number of choices for the form of K as discussed in [1, 3, 12, 27, 28, 37]. In this work, however, we will simply consider the Gaussian kernel function

$$\begin{aligned} K(x)=\left( \frac{1}{2\pi \epsilon ^2}\right) ^{d/2}\exp {\left( -\frac{x^2}{2\epsilon ^2}\right) }, \end{aligned}$$
(3)

such that its width depends on the parameter \(\epsilon \) [27], where d is the spatial dimension of the problem. The extent of nonlocality varies with the value of \(\epsilon \). The smaller the magnitude of \(\epsilon \) is, the lower the extent of nonlocality. In the limiting case, when \(\epsilon \rightarrow 0\), we will then have \(\lim _{\epsilon \rightarrow 0}K_{\epsilon }(x)=\delta (x)\) so that the nonlocal Schrödinger equation (1) will be reduced to the Gross–Pitaevskii equation (2).

In the semi-classical limit, because of the small value of \(\hbar \), the solutions of Eqs. (1) and (2) are highly oscillatory so that only a rough numerical solution profile can be obtained given limited storage and computational resources. Thus it is numerically challenging to compute the solution of the nonlinear Schrödinger equation with nonlocal potentials. Although there are many theoretical studies concerning the Gross–Pitaevskii equation in different situations, numerical algorithms for solving the nonlocal Eq. (1) are not well developed yet. Most of existing numerical approaches, such as [4, 38], require a very small time step such that \(\varDelta t=O(\varDelta x)=O(\hbar )\), which creates major difficulties in carrying out long-time simulations of the system. In addition, high dimensional simulations might also be difficult.

Many high-frequency asymptotic methods have been developed for capturing highly oscillatory phenomena. A popular approach is the Gaussian beam summation method [2, 14,15,16, 18, 35], and many efforts have been made to develop both efficient Lagrangian and Eulerian Gaussian beam methods [20,21,22, 24, 25, 29, 30, 34]. The first Eulerian Gaussian beam method has been proposed in [22], which was further developed in [20, 21, 24]. Efficient Lagrangian Gaussian beam methods based on fast wavepacket transforms have been proposed in [29] for Schrödinger equations and in [30] for wave equations.

In this work, we will extend the fast Huygens sweeping method (FHSM) developed in [19, 23] to compute the numerical solution of the nonlinear, nonlocal Schrödinger equation (1). Since the method is based on the Huygens secondary-source principle in terms of asymptotic Green’s functions, we will first decompose the initial condition for the Green’s function into a superposition of plane waves. Therefore, in order to obtain needed ingredients in the asymptotic form of Green’s functions, we will solve the following eikonal and transport equations:

$$\begin{aligned}&\tau _t + V (x) + \frac{1}{2} |\nabla \tau |^2 = 0, \,\, t>t_0, \nonumber \\&\tau (x,t_0;\xi ) = x\cdot \xi , \end{aligned}$$
(4)
$$\begin{aligned}&A_t + \nabla \tau \cdot \nabla A + \frac{1}{2}\varDelta {\tau } A = 0, \;\; t>t_0, \nonumber \\&A(x,t_0;\xi ) = 1, \end{aligned}$$
(5)

where \(\xi \in {\mathcal {R}}^d\) is a parameter, which can be viewed as a momentum variable as corresponding to x viewed as a position variable. According to the PDE theory of the Hamilton–Jacobi equation, the eikonal equation (4) has a unique smooth solution for a short period of time; we denote this short period of time as \([t_0, t_0+T]\), where \(T>0\) is a constant. The FHSM incorporates short-time Wentzel–Kramers–Brillouin–Jeffreys (WKBJ) propagators into the Huygens principle. Even though the WKBJ solution is valid only for a short time period due to the occurrence of caustics, the Huygens secondary-source principle allows us to construct the global-in-time semi-classical solution. The method for the linear Schrödinger equation has a computational complexity of \(O(N \log N )\) for each time step, where N is the total number of sampling points in the d-dimensional position space. In this paper, we propose an operator splitting approach to separate the nonlinear potential term from the linear part so that each split component can be handled efficiently. The linear part from the splitting will be taken care of by the FHSM. The nonlocal potential term will be computed by the fast Fourier transform (FFT), while the corresponding evolution subproblem has a closed-form solution. Therefore, the overall algorithm is computationally extremely efficient since the FHSM allows a large time-marching step given by \(\varDelta t=O(\varDelta x/\hbar )\), and each update in the time direction takes an overall computational complexity \(O(N \log N)\).

The rest of the paper is organized as follows. In Sect. 2, we will first give a brief summary of the fast Huygens sweeping method developed in [23]. Our proposed modification for the nonlocal equation is given in Sect. 3. We are going to discuss two algorithms based on the Lie’s splitting and the Strang’s splitting, respectively. We will also discuss several limiting cases of the model and properties of the numerical schemes. In Sect. 4, we demonstrate efficiency and effectiveness of the overall algorithm using one-, two- and three-dimensional examples. A conclusion and some discussions on the future work will be given in Sect. 5.

2 Fast Huygens Sweeping Method for the Linear Schrödinger Equations in the Semi-classical Regime

In this section, we will summarize the fast Huygens sweeping method as developed in [23]. We compute the highly oscillatory solution of the Schrödinger equation for a particle with unity mass given by \( \left( i\hbar \frac{\partial }{\partial t}-H\right) U \equiv i\hbar U_t-V(x) U +\frac{\hbar ^2}{2}\varDelta U = 0 \) with the initial condition \(U(x,t_0)=U_0(x)\). For the details of the numerical algorithm, we refer interested readers to [23].

The Green’s function \(G(x,t;x_0,t_0)\) of the partial differential equation [23, 32] solves the following homogeneous initial value problem:

$$\begin{aligned}&\left( i\hbar \frac{\partial }{\partial {t}}-H\right) G(x,t;x_0,t_0)=0,\;\; x \in {\mathbb {R}}^d, \;\; t> t_0, \\&\lim _{t\rightarrow t_0^+} G(x,t;x_0,t_0) = \delta (x-x_0), x \in {\mathbb {R}}^d, \\&G(x,t;x_0,t_0) = 0,\;\; x \in {\mathbb {R}}^d, \;\; t<t_0, \end{aligned}$$

where \((x_0,t_0)\) are parameters, and the Hamiltonian H takes the form of kinetic-plus-potential form: \(H=-\frac{\hbar ^2}{2}\frac{\partial ^2}{\partial x^2}+V(x)\). Therefore, \(G(x,t;x_0,t_0)\) can be seen as the response at position x and time t due to a point source at position \(x_0\) and time \(t_0\). According to the Huygens’ principle, the wavefunction U(xt) for \(t>t_0\) for the Schrödinger equation can be written as \(U(x,t) = \int _{{\mathbb {R}}^d}\;G(x,t;x_0,t_0)U(x_0,t_0)dx_0\) for \(t> t_0\), which formalizes the fact that the superposition of waves radiating from each point of an old wave creates a new wave at a later time, and the Green’s function provides appropriate weighting factors for the superposition. The above facts are well known in quantum mechanics; see [32].

For the asymptotic Green’s function G (without confusion still denoted as G), we assemble these computed ingredients into the following formula,

$$\begin{aligned} G(x,t;x_0,t_0)= & {} \left( \frac{1}{2\pi \hbar }\right) ^d\int _{{\mathbb {R}}^d}A(x,t;\xi )e^{\frac{i(\tau (x,t;\xi )-x_0\cdot \xi )}{\hbar }}d\xi . \end{aligned}$$

This \(G(x,t;x_0,t_0)\) satisfies the Schrödinger equation asymptotically in the time period \(t_0\le t\le t_0+T\) and satisfies the corresponding point-source initial condition. With the asymptotic Green’s function at our disposal, we can propagate an arbitrary initial wavefunction \(U(x,t_0)\) for a short period of time,

$$\begin{aligned} U(x,t) = \int _{{\mathbb {R}}^d}\;G(x,t;x_0,t_0)U(x_0,t_0)dx_0, \;\;\; t_0<t\le t_0+T. \end{aligned}$$
(6)

Now since the Hamiltonian is time independent, the Green’s function satisfies the following property, \(G(x,t;x_0,t_0) = G(x,t_1;x_0, t_2)\) if \(t-t_0=t_1-t_2> 0\). This implies that the short-time-valid Green’s function can be repeatedly used to propagate the wavefunction for long time,

$$\begin{aligned} U(x,t) = \int _{{\mathbb {R}}^d}\;G(x,t;x_0,t_n)U(x_0,t_n)dx_0 \end{aligned}$$

for \(t_n<t\le t_n+T\), where \(t_n=t_0+(n-1)T\) for \(n=1,2,\ldots \). This way we may sweep through a long period of time so that we may obtain global-in-time asymptotic solutions for the Schrödinger equation. For small time \(\varDelta t\), we can approximate the eikonals and amplitudes using the Taylor expansion in time:

$$\begin{aligned} A(x,\varDelta t;\xi )= & {} 1+A_1(x,\xi )\varDelta t+A_2(x,\xi )\varDelta t^2+{\mathcal {O}}(\varDelta t^3), \nonumber \\ \tau (x,\varDelta t;\xi )= & {} x\cdot \xi +\tau _1(x,\xi )\varDelta t+\tau _2(x,\xi )\varDelta t^2+{\mathcal {O}}(\varDelta t^3). \end{aligned}$$
(7)

See Appendix for a recursive derivation of these terms. Theoretically, we can incorporate more terms into our algorithm to obtain higher-order approximations. However, for our purpose, we concentrate on the lower-order case.

Keeping the leading order terms in the expansion, we approximate the asymptotic Green’s function by

$$\begin{aligned} G(x,\varDelta t;x',0)\simeq & {} \left( \frac{1}{2\pi \hbar } \right) ^d \int _{{\mathbb {R}}^d} e^{\frac{i}{\hbar } \left[ x\cdot \xi - \left( V(x)+\frac{1}{2}|\xi |^2 \right) \varDelta t-x'\cdot \xi \right] }d\xi \\= & {} \frac{1}{\left( i 2\pi \hbar \varDelta t \right) ^{d/2}} \exp \left[ \frac{-i}{\hbar } V(x) \varDelta t \right] \exp \left[ \frac{i}{2\hbar \varDelta t} |x-x'|^2 \right] . \end{aligned}$$

As a result, the integral (6) can be approximated by

$$\begin{aligned} U(x,\varDelta t)= & {} \int _{{\mathbb {R}}^d}\;G(x,\varDelta t;x',0)U(x',0)dx' \\\simeq & {} \frac{1}{\left( i 2\pi \hbar \varDelta t \right) ^{d/2}} \exp \left[ \frac{-i}{\hbar } V(x) \varDelta t \right] \int _{{\mathbb {R}}^d} \exp \left[ \frac{i}{2\hbar \varDelta t} |x-x'|^2 \right] U(x',0) dx'. \end{aligned}$$

We can take advantage of the special structure to compute the convolution efficiently using FFT. For simplicity, we only discuss the numerical procedure in 1D so that it is straight forward to extend the approach to higher dimensions. We first approximate the integral on a uniform mesh \(x_i\) using the Trapezoidal rule, i.e.

$$\begin{aligned} U(x_i,\varDelta t) = \frac{1}{\left( i 2\pi \hbar \varDelta t \right) ^{1/2}} \exp \left[ \frac{-i}{\hbar } V_i \varDelta t \right] \varDelta x \sum _j \exp \left[ \frac{i}{2\hbar \varDelta t} |x_i-x_j|^2 \right] U(x_j,0). \end{aligned}$$
(8)

To write the above summation in the form of matrix-vector multiplication, we introduce a symmetric Toeplitz matrix \({\mathbf {W}}\) with each entry given by \(W_{i,j}=\exp \left[ \frac{i}{2\hbar \varDelta t} |x_i-x_j|^2 \right] \).

Numerically, \(\varDelta t\) in this approximation cannot be chosen arbitrarily. To resolve the oscillations in the coefficients of \(W_{i,j}\), we require that the phase difference between \(W_{1,N-1}\) and \(W_{1,N}\) should be less than \(2\pi \); i.e. we require \({[(N-1)^2-(N-2)^2] \varDelta x^2}/(2\hbar \varDelta t) = \alpha 2\pi \) for some \(0<\alpha <1\), which implies the following bound on \(\varDelta t\),

$$\begin{aligned} \varDelta t > \varDelta t^*= \frac{(2N-3) \varDelta x^2}{4 \pi \hbar } = O \left( \frac{\varDelta x}{\hbar } \right) . \end{aligned}$$
(9)

Note that this constraint imposes a lower bound on the marching step size \(\varDelta t\). For a given \(\hbar \) and \(\varDelta x\), the method requires one to pick a large enough \(\varDelta t\) in order to resolve the oscillations in \(W_{i,j}\). Indeed the larger the value of \(\varDelta t\), the faster we reach the final solution. However, we have to control the error introduced in the Taylor approximation at the same time. Therefore, we pick \(\alpha \) close to, but smaller than, 1. To relax this lower bound on the time marching step, we have recently proposed a simple forward-backward step marching approach in [19]. We refer interested reader to this reference for a more detailed description.

3 Our Proposed Operator Splitting Approach

3.1 Lie’s Splitting Method

To solve the nonlocal Schrödinger equation (1), we first discuss the Lie’s scheme [8, 10, 11]. Let \(\varDelta t>0\), \(t_k=k\varDelta t\), and we obtain for \(k\ge 0\): \(U^k \rightarrow U^{k+1/2} \rightarrow U^{k+1}\) by solving the first subproblem,

$$\begin{aligned} \left\{ \begin{array}{l} i\hbar U_t-V(x) U +\frac{\hbar ^2}{2}\varDelta U = 0 \, \text{ in } \, {\mathbb {R}}^d \times (t_k,t_{k+1}), \\ U(t_k)=U^k, \end{array} \right. \end{aligned}$$
(10)

and then we set \(U^{k+1/2}=U(t_{k+1})\) to solve the second subproblem,

$$\begin{aligned} \left\{ \begin{array}{l} i\hbar U_t-g\left( \int K(x-x')|U(x',t)|^2dx'\right) U =0 \, \text{ in } \, {\mathbb {R}}^d \times (t_k,t_{k+1}), \\ U(t_k)=U^{k+1/2}. \end{array} \right. \end{aligned}$$
(11)

The first subproblem (10) is the same as the linear Schrödinger equation which can be efficiently solved by the FHSM as developed in [23]. The second subproblem (11) is a nonlinear nonlocal equation in U. To solve this nonlinear problem, we linearize the nonlinear potential and replace the term \(U(x',t)\) by \(U^{k+1/2}(x')\). Letting

$$\begin{aligned} J(x,t_{k+1/2})=\int _{{\mathbb {R}}^d} K(x-x') \left| U^{k+1/2}(x')\right| ^2dx', \end{aligned}$$
(12)

we can obtain the analytical solution to the evolution equation which is given by

$$\begin{aligned} U^{k+1} = \exp \left[ - \frac{ig}{\hbar } J(x,t_{k+1/2}) \varDelta t \right] U^{k+1/2}. \end{aligned}$$
(13)

Numerically, the nonlocal interaction potential in the formula of \(J(x,t_{k+1/2})\) is a convolution process such that, at each x, we need to integrate over the whole computational domain. It is well known that implementing a direct sum is numerically very expensive. Instead, we use the fast Huygens sweeping method, which uses FFT to reduce the complexity of the computational procedure. To extending the fast Huygens sweeping method for solving equation (1), we modify the algorithm to numerically compute the convolution of the kernel function K(x) at each iteration step. Analogous to the fast Huygens sweeping method, here we assume that the wavefunction is of compact support and our computational domain is large enough to capture all the nontrivial solution profiles. Prior to each step in the iteration of the fast Huygens sweeping algorithm, we need to calculate the convolution integral in the whole computational domain. We approximate the integral (12) by the Trapezoidal rule

$$\begin{aligned} J(x_i,t_{k+1/2})\approx & {} (\varDelta x)^d \sum _j K(x_i-x_j) \left| U^{k+1/2}(x_j)\right| ^2, \end{aligned}$$
(14)

where d is the spatial dimension of the problem and \(U^{k+1/2}\) is the intermediate solution between k and \(k+1\) which is approximated by the solution of the linear Schrödinger equation. In particular, we use the Gaussian kernel assumption (3) for our implementation such that Eq. (14) becomes

$$\begin{aligned} J(x_i,t_{k+1/2})\approx & {} \beta (\varDelta x)^d \sum _j \exp {\left( \frac{|x_i-x_j|^2}{2\epsilon ^2}\right) }\left| U^{k+1/2}(x_j)\right| ^2, \end{aligned}$$
(15)

where \(\beta =\left( 1/2\pi \epsilon ^2\right) ^{d/2}\) is the normalization constant of K(x); this summation can be written as a matrix-vector product \({\mathbf {J}}=\beta (\varDelta x)^d{\mathbf {K}} {{{\mathbf {P}}}}\), where \({\mathbf {J}}=(J_{i,k+1/2})\equiv J(x_i,t_{k+1/2})\), the matrix \({\mathbf {K}}=(K_{i,j})\) with each element \(K_{i,j}=\exp {\left[ \frac{1}{2\epsilon ^2}|x_i-x_j|^2\right] }\), and

$$\begin{aligned} {{{\mathbf {P}}=\left[ \left| U_1^{k+1/2}\right| ^2 \,\, \left| U_2^{k+1/2}\right| ^2 \,\, \ldots \,\, \left| U_N^{k+1/2}\right| ^2 \right] ^T}}. \end{aligned}$$

Since the matrix \({\mathbf {K}}\) is Toeplitz and symmetric of size \(N\times N\), we may apply a similar technique as applying the fast Huygens sweeping method to the linear Schrödinger equation. We extend the \(N\times N\) symmetric Toeplitz matrix \({\mathbf {K}}\) into a \(2N\times 2N\) circulant Toeplitz matrix \({\tilde{{\mathbf {K}}}}\), which can be decomposed into Fourier matrices, where \({\tilde{{\mathbf {K}}}}\) is

$$\begin{aligned} \left( \begin{array}{cccccccccccc} K_{1,1}&{}K_{1,2}&{}\cdots &{}\cdots &{}K_{1,N}&{}0&{}K_{1,N}&{}K_{1,N-1}&{}\cdots &{}\cdots &{}\cdots &{} {{K_{1,2}}} \\ K_{1,2}&{}K_{1,1}&{}K_{1,2}&{}\cdots &{}K_{1,N-1}&{}K_{1,N}&{}0&{}K_{1,N}&{}K_{1,N-1}&{}\cdots &{}\cdots &{} {{K_{1,3}}} \\ K_{1,3}&{}K_{1,2}&{}K_{1,1}&{}K_{1,2}&{}\cdots &{}K_{1,N-1}&{}K_{1,N}&{}0&{}K_{1,N}&{}K_{1,N-1}&{}\cdots &{} {{K_{1,4}}} \\ \vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots &{}\vdots \end{array} \right) \end{aligned}$$

with the first row given by \({{\tilde{{\mathbf {K}}}}_{\mathbf{1}}}\). Accordingly, we also extend the vector \({{{\mathbf {P}}}}\) to

$$\begin{aligned} {{{\tilde{{\mathbf {P}}}}=\left[ \left| U_1^{k+1/2}\right| ^2 \,\, \left| U_2^{k+1/2}\right| ^2 \,\, \ldots \,\, \left| U_N^{k+1/2}\right| ^2 \,\, 0 \,\, \ldots \,\, 0 \right] ^T \in {\mathbb {R}}^{2N}}}. \end{aligned}$$

Then the product \({\mathbf {J}}=\beta (\varDelta x)^d{\mathbf {K}} {{{\mathbf {P}}}}\) is the first N elements of

$$\begin{aligned} \beta (\varDelta x)^d{\mathcal {F}}^{-1}\left[ {\mathcal {F}}({{\tilde{{\mathbf {K}}}}_{\mathbf{1}}}){\mathcal {F}}({{{\tilde{{\mathbf {P}}}}}})\right] , \end{aligned}$$

where \({\mathcal {F}}\) is the Fourier transform operator and \({\mathcal {F}}^{-1}\) denotes the inverse Fourier transform operator. Finally, the wave function \({\mathbf {U}}\) can be computed using the nonlocal interacting potential \({\mathbf {J}}\) and

$$\begin{aligned} U(x_i,t_{k+1})=\alpha _d (\varDelta x)^d \exp {\left[ -\frac{i}{\hbar } gJ_{i,k+1/2} \varDelta t\right] } {{U_i^{k+1/2}}}, \end{aligned}$$
(16)

where \(\alpha _d=(i2\pi \hbar \varDelta t)^{-d/2}\). Notice that all the operations in (16) are pointwise such that the computational complexity will not be increased significantly.

To end this section, we discuss a stability constraint on the choice of \(\epsilon \) for the width of the Gaussian kernel (3). In order to resolve the kernel for the discrete convolution, the width parameter \(\epsilon \) cannot be arbitrarily chosen. We require that the width parameter be of \(O(\varDelta x)\) in order to allocate enough points for each variance of K(x). Numerically, we require that \(\epsilon \) be of size at least \(2.5\varDelta x\) so that there are at least approximately 5 points to resolve the Gaussian kernel.

3.2 Strang’s Splitting Method

It is possible to obtain high-order accurate solutions using higher-order splitting methods. In this section, we consider the following first form of the Strang’s splitting scheme [9] given by \(U^k \rightarrow U^{k+1/2} \rightarrow U^* \rightarrow U^{k+1}\):

  • Step 1: Solve

    $$\begin{aligned} \left\{ \begin{array}{l} i\hbar U_t-g\left( \int K(x-x')|U(x',t)|^2dx'\right) U =0 \, \text{ in } \, {\mathbb {R}}^d \times (t_k,t_{k+1/2}), \\ U(t_k)=U^{k}. \end{array} \right. \end{aligned}$$
    (17)

    In terms of the numerical implementation, we linearize the equation as in the second subproblem (11) in the Lie’s splitting algorithm, with the only difference in the time step size.

  • Step 2: Then we set \(U^{k+1/2}=U(t_{k+1/2})\) and solve

    $$\begin{aligned} \left\{ \begin{array}{l} i\hbar U_t-V(x) U +\frac{\hbar ^2}{2}\varDelta U = 0 \, \text{ in } \, {\mathbb {R}}^d \times (t_k,t_{k+1}), \\ U(t_k)=U^{k+1/2}. \end{array} \right. \end{aligned}$$
    (18)

    This is the same as the first subproblem (10) in the Lie’s splitting.

  • Step 3: We set \(U^*=U(t_{k+1})\) and repeat the first step for another half time interval from \((t_{k+1/2},t_{k+1})\) with the initial condition \(U(t_{k+1/2})=U^*\). This implies that

    $$\begin{aligned} J^*(x)= & {} \int _{{\mathbb {R}}^d} K(x-x') \left| U^*(x')\right| ^2dx', \\ U^{k+1}= & {} \exp \left[ - \frac{ig}{2\hbar } J^* \varDelta t \right] U^*. \end{aligned}$$

There is another version of the Strang’s symmetrized splitting method by switching these two operations so that one solves the linear Schrödinger equation twice with a smaller timestep \(\varDelta t/2\) and determines the nonlocal interaction of the wavefunction once with a large timestep \(\varDelta t\). Numerically, since both approaches involve only several calls of FFT and IFFT, the overall computational complexity of this algorithm is still \({\mathcal {O}}(N\log N)\), which is the same as the version we presented at the beginning of this section. However, due to the lower bound (9) restricting the time step in solving the linear Schrödinger equation using the FHSM, this Strang’s splitting approach has an even larger lower bound given by

$$\begin{aligned} \varDelta t > 2 \varDelta t^*= \frac{(2N-3) \varDelta x^2}{2 \pi \hbar }. \end{aligned}$$

Because the error in the operator splitting method depends on the size of \(\varDelta t\), this second form of the Strang’s splitting is not recommended in the current application. There could be applications that, on the other hand, we might prefer this form of the Strang’s splitting; for example, if the nonlocal potential involves more complicated interactions of the position density, one might want to reduce the number of evaluations associated with the nonlinear term. We will not explore these applications here but will leave them as a future work.

3.3 Limiting Cases

For the limiting case as \(\epsilon \rightarrow 0\), the choice of the Gaussian kernel leads to the standard delta function, i.e. \(K(x)=\delta (x)\). Therefore, we obtain \(J(x,t)=|U(x,t)|^2\) so that the nonlinear nonlocal Schrödinger equation (1) is reduced to the Gross–Pitaevskii equation (2). Numerically, one obtains a simple method for Eq. (2) based on the Lie’s splitting method,

figure a

and another one is based on the Strang’s splitting method,

figure b

On the other hand, as \(\epsilon \rightarrow \infty \) so that \(K(x)\sim C\) for some constant C, the convolution integral (12) is reduced to

$$\begin{aligned} J(x,t)\sim C\int |U|^2dx\approx C' \end{aligned}$$

for some constant \(C'\). Thus the nonlocal potential can be absorbed into the external time-independent potential V(x) and the solution behavior of (1) is close to the solution of the linear Schrödinger equation. Numerically, the algorithm reduces back to the original FHSM as developed in [23].

3.4 The Mass Conservation

Mass conservation is important in physical applications. In this section, we are going to show that the Lie’s splitting scheme can preserve the mass in the evolution. Similarly, the Strang’s splitting scheme can be shown to have the same property, and the discussion is omitted here.

To see why mass is conserved by the Lie’s splitting scheme, we notice that both steps preserve the total mass in the system. The first step of the scheme is one iteration for solving the linear Schrödinger equation using the FHSM as developed in [23]. We consider one dimensional cases. Let \(\alpha =(i2\pi \hbar \varDelta t)^{-1/2}\) so that \(|\alpha |^2=\alpha {\bar{\alpha }}=(2\pi \hbar \varDelta t)^{-1}\). As shown in the article, the solution in the first iteration satisfies

$$\begin{aligned} M= & {} \int _x \left| U^{k+1/2}(x)\right| ^2 dx = \int _x U^{k+1/2}(x) \overline{U^{k+1/2}(x)} dx \\= & {} \int _x |\alpha |^2 \left\{ \exp \left[ \frac{-i}{\hbar } V(x) \varDelta t \right] \int _{x'} \exp \left[ \frac{i}{2\hbar \varDelta t} |x-x'|^2 \right] U(x',t_{k}) dx' \right\} \\&\left\{ \exp \left[ \frac{i}{\hbar } V(x) \varDelta t \right] \int _{y'} \exp \left[ -\frac{i}{2\hbar \varDelta t} |x-y'|^2 \right] \overline{U(y',t_{k})} dy' \right\} dx \\= & {} \iint _{x' \times y'} \exp \left[ \frac{i}{2\hbar \varDelta t} (|x'|^2-|y'|^2) \right] \delta (x'-y') U(x',t_{k}) \overline{U(y',t_{k})} dx'dy' \\= & {} \int _x \left| U(x,t_{k})\right| ^2 dx =1. \end{aligned}$$

The second step in the Lie’s splitting (13) involves only a temporal integral of the wave function, and it preserves the total mass in the system. To see this, we first multiply the differential equation by \(U^*\) and integrate the resulting equation over the whole domain. This gives

$$\begin{aligned} i\hbar \frac{d}{dt} \left( \int | U |^2 dx \right) = \int g\left( \int K(x-x')|U(x',t)|^2dx'\right) |U|^2 dx. \end{aligned}$$

Since the left-hand side of this equation is complex while the right-hand side is real-valued, the only solution is to have \(\frac{d}{dt} \int |U|^2dx\) equals 0. We linearize the differential equation, numerically compute the convolution, and then analytically integrate the solution in a pointwise fashion. The resulting algorithm requires only an update in the complex phase of \(U^{k+1/2}\), leaving the magnitude of the wave function unchanged. Therefore, our numerical solution to the second subproblem will also preserve the total mass in the system. Other numerical schemes, however, might not be able to preserve the total mass in this subproblem. For example, the backward Euler scheme (which does not linearize the evolution) requires solving

$$\begin{aligned} \left[ 1 + \frac{i\varDelta t}{\hbar } G\left( \left| U^{n+1}\right| \right) \right] U^{n+1} = U^n \end{aligned}$$

for \(U^{n+1}\), where the function G is related to the nonlocal convolution of the position density. Multiplying this equation by the conjugate of the equation itself, we obtain

$$\begin{aligned} \left[ 1 - \frac{\varDelta t^2}{\hbar ^2} G^2 \left( \left| U^{n+1}\right| \right) \right] \left| U^{n+1}\right| ^2 = \left| U^n \right| ^2. \end{aligned}$$

This implies that the pointwise value of \(|U^{n+1}|\) is increasing and the total mass cannot be preserved.

4 Numerical Examples

In this section, we are going to test both the Lie’s and the Strang’s algorithms on different one-, two-, and three-dimensional cases to demonstrate efficiency and accuracy of the approaches. Even though the computational time involved in the Strang’s splitting method is slightly longer compared to that by the Lie’s splitting, we are going to show that we can gain significantly more accurate solutions in various cases.

Fig. 1
figure 1

(Section 4.1 with the zero potential) Position density at a \(t=0.25\), b 0.5, c \(t=2\) and d \(t=2.25\) with \(\epsilon =0.1, 0.01, 0.001\) and 0 (i.e. the nonlinear Schrödinger equation). Solutions computed using \(N=2^{20}+1\) points

4.1 One-Dimensional Examples

In this one dimensional example, we consider the Gaussian kernel for the nonlocal interaction given by Eq. (3). The initial wave function is set to be a Gaussian pulse with the zero initial momentum given by

$$\begin{aligned} U(x,0)= \frac{1}{\sqrt{\sigma \sqrt{2 \pi }}} \exp \left( {\frac{-x^2}{4\sigma ^2}} \right) \end{aligned}$$

with the standard deviation \(\sigma =0.15\), with constant \(g=-1\). We compute the solutions up to the final time \(T=2.25\) on the computational domain \([-6,6]\) which is discretized using four different uniform meshes given by \(N=2^{17}+1\), \(2^{18}+1\), \(2^{19}+1\), and \(2^{20}+1\) points. In this example, we set \(\hbar =0.1\) and vary \(\epsilon \) from \(10^{-1}\), \(10^{-2}\) to \(10^{-3}\). On the coarsest mesh given by \(N=2^{17}+1\), we note that \(2.5\varDelta x=2.2888\times 10^{-4}\), which is smaller than the smallest value of \(\epsilon \) in all numerical experiments. This guarantees that the underlying mesh can well-resolve the Gaussian kernel in the nonlocal potential.

4.1.1 The Zero Potential

We first use the zero potential \(V=0\) in the simulation. Figure 1 shows the numerical solutions at different times computed using the Strang’s splitting scheme on different meshes. We have compared our solutions with the solution to the nonlinear Schrödinger equation (corresponding to the case when \(\epsilon \) approaches 0). We can see from these figures, as we reduce the size of the Gaussian kernel in the nonlocal potential, the numerical solutions converge to the one obtained by solving the nonlinear Schrödinger equation.

Fig. 2
figure 2

(Section 4.1.1) Errors in our proposal schemes with \(\hbar =0.1\) and \(\epsilon =0.01\). The least-squares fitting lines from the Lie’s and the Strang’s splitting schemes are plotted in blue and green solid lines, respectively. Their slopes are given by 0.987 and 2.093, respectively (Color figure online)

To demonstrate that the Strang’s splitting scheme gives more accurate solutions, we plot in Fig. 2 the numerical error in the solutions using different sets of mesh points. Here we compare the solution at the final time \(T=0.25\) with the reference solution, \(U_{ \text{ ref }}\), computed using the Lie’s splitting scheme on a fine mesh given by \(N=2^{20}\). The numerical error is then defined using \(E_2^2=\int _{\varOmega } \left| U-U_{ \text{ ref }}\right| ^2 dx\). As expected, the Strang’s splitting gives more accurate solutions compared to the Lie’s splitting. The slopes of these regression lines are approximately 1 (given by 0.987) and 2 (given by 2.093) for the Lie’s and the Strang’s splitting, respectively.

It is also interesting to compare the accuracy of solutions computed by the two versions of the Strang’s splitting scheme. We implement both versions and compute the errors of both solutions at \(t=0.25\). The error from the first version is given by \(1.41\times 10^{-5}\), while that from the second version is \(5.823\times 10^{-5}\). As discussed earlier, since the second version of the Strang’s splitting scheme requires a larger time step due to the lower bound in the time step from the FHSM, the corresponding errors from the Taylor expansion and also the overall scheme will be larger. Therefore, we do not recommend the second version of the Strang’s splitting, i.e. with the linear Schrödinger equation solved twice in each time marching.

Table 1 (Section 4.1.1) Error in the conservation of mass at different times by our proposed Lie’s and Strang’s splitting schemes on the mesh given by \(N=2^{20}+1\)

As discussed earlier in Sect. 3.4, both our proposed Lie’s and Strang’s splitting schemes preserve the mass of the particle in this nonlocal Schrödinger equation. Here, we compute also numerically the quantity \(\int _{\varOmega } \left| U \right| ^2 dx\) and check whether it is a constant. The deviation from unity at different times is shown in Table 1. The first observation is that both schemes do preserve mass in general. The error at various times is roughly of \(O(10^{-9})\) throughout the simulations. Indeed, although the error does increase in time, we argue that this comes from the numerical error in the Trapezoidal approximation in various integrals from the numerical scheme. Nevertheless, the growth in the error is only approximately linear in time.

Finally, we comment on the computational efficiency. To compute the solution at the final time \(T=0.25\) on the mesh given by \(N=2^{17}+1\), our proposed Strang’s method takes approximately 31 seconds on a typical desktop computer with Intel Core i3-4130. For the mesh given by \(N=2^{18}+1\), \(2^{19}+1\), and \(2^{20}+1\), the computational times are 71.047s, 496.921s, 1323.723s, respectively. Taking the Strang’s splitting scheme on the mesh \(N=2^{20}+1\) as an example, we need a total of 1133 iterations to reach the final time T. This implies that the CPU time per iteration per mesh point is given by roughly \(1.11421\times 10^{-6}\). For the Lie’s splitting scheme, using the same setting as the mesh given by \(N=2^{18}+1\), \(2^{19}+1\), and \(2^{20}+1\), the computational times are slightly faster and are given by 47.977s, 345.986s, 1004.560s, respectively.

Fig. 3
figure 3

(Section 4.1 with the parabolic potential) Position density at a \(t=0.25\), b0.25, c \(t=2\) and d \(t=2.25\) with \(\epsilon =0.1, 0.01, 0.001\) and 0 (i.e. the nonlinear Schrödinger equation). Solutions computed using \(N=2^{20}+1\) points

4.1.2 The Parabolic Potential

To have a slightly more challenging case, we replace the zero potential with a parabolic potential given by \(V=\frac{1}{2}x^2\). Figure 3 shows our solutions at different times obtained by the Strang’s splitting on a mesh given by \(N=2^{17}+1\). In all these examples, we consider several parameters in the Gaussian kernel in the nonlocal potential, ranging from \(10^{-1}\) to \(10^{-3}\). As such parameter approaches zero, we recover the nonlinear Schrödinger equation. This observation is well supported by our numerical solutions. The numerical solution corresponding to \(\epsilon =10^{-3}\) (plotted using the red dotted line) is the closest to that of \(\epsilon =0\) (plotted using the blue dashed line) obtained by solving the nonlinear Schödinger equation directly.

4.2 Two-Dimensional Cases

In this section, we consider several two-dimensional cases. We consider only the Strang’s splitting since it provides more accurate numerical solutions.

Fig. 4
figure 4

(Section 4.2.1) Comparison of cross sections of the position density of the wave function at \(t=0.5\) with \(\hbar =0.1\) and different \(\epsilon \)’s. The smaller graph refers to the difference between solutions with different \(\epsilon \)’s and the non-linear solution in the natural log scale

4.2.1 The Parabolic Potential

In the first case, we consider the evolution of an initial Gaussian profile

$$\begin{aligned} U(x,y,0)=\frac{1}{\sqrt{2\pi \sigma ^{2}}} \exp \left( - \frac{x^{2}+y^2}{4\sigma ^2} \right) \end{aligned}$$

under the parabolic potential \(V=x^{2}+y^{2}\) in the computational domain \([-6,6]^2\), with the constant \(g=-1\). The parameter \(\sigma \) in the initial Gaussian profile is chosen to be 0.2, while the parameter \(\epsilon \) in the nonlocal Gaussian kernel is chosen to vary from 1 to 0.05. Our proposed Strang’s splitting scheme on the mesh with \(N=2^{10}+1\) (i.e. \(\varDelta x=0.01171875\)) so that our mesh can well-resolve both the initial Gaussian profile and also the nonlocal kernel for different \(\epsilon \)’s. Figure 4 shows the cross-section of the solution along \(y=0\) with different \(\epsilon \)’s. As we can see from these figures, as one reduces the support of the Gaussian kernel, the solution from the nonlocal Schrödinger equation converges to that from the nonlinear Schrödinger equation (plotted using the red dashed line). To demonstrate the computational efficiency of the numerical approach, we have recorded the CPU times to obtain these solutions. For the Lie’s splitting scheme and the Strang’s splitting scheme, with the same setting as the mesh given by \(N=2^{10}+1\), the computational time is given by 13.057s and 18.94s, respectively, for 11 iterations in total to reach the final time T. Taking the Strang’s splitting scheme as an example, the CPU time per iteration per mesh point is given by \(1.638851\times 10^{-6}\). This is comparable with the one dimensional case that we studied above.

Fig. 5
figure 5

(Section 4.2.1) Solutions computed with \(\hbar =1/32\) and \(\epsilon =0.5\). The position density at a \(t=0\), b \(t=100\), and c \(t=1000\) with the random initial momentum. The corresponding solution of the linear Schrödinger equation at d \(t=100\) and e \(t=1000\) with the same initial random momentum

Fig. 6
figure 6

(Section 4.2.1) The total mass of the system computed with different meshes (\(N=2^{10}\) and \(N=2^{11}\)). We take \(\hbar =1/32\), \(t_F=100\), \(\epsilon =0.5\) and \(g=-1\). The smaller graph shows the total mass computed on a mesh with \(N=2^{11}\) for time up to \(t_F=1000\)

To further test the effectiveness of our numerical approach, we consider the following example to demonstrate the nonlinear interaction of multiple particles under the parabolic external potential \(V=\frac{1}{2}(x^2+y^2)\). Here we take 36 particles initially location on a 6-by-6 array mesh, as shown in Fig. 5a. We assign random initial momenta to these particles. We assume that \(g=-1\) and \(\epsilon =0.5\). Figure 5b, c shows our numerical solutions at \(t=100\) and a relatively large final time \(t=1000\). As we can see, wavefunctions interact with each other in a nonlinear fashion. For large time evolution, we can see the effect more clearly. To demonstrate the nonlinear effect, we compare the numerical solutions with those obtained by the linear Schrödinger equation with the same initial condition. For this linear case, the evolution of each particle is periodic and is independent of other particles. The corresponding solutions are plotted in Fig. 5d, e.

One main concern in performing long time simulation is about the conservation of mass. Figure 6 shows the change in the total mass of the system in time. We test the code using a coarser mesh with \(N=2^{10}\), and a finer mesh with \(N=2^{11}\). For the time interval up to \(t=100\), both meshes give good conservation. The coarse mesh can already preserve 99.95% of the total mass in the system. For the more challenging case where the final time is given by \(t=1000\), however, the mass loss is slightly more obvious even for the finer mesh. Having said that, the mass loss is still less than 3% which is reasonable and well under control.

Fig. 7
figure 7

(Section 4.2.2) The position density of the wavefunction with \(\hbar =0.5\) and \(\epsilon =0.1\). The position density at time a \(t=0.5\), b \(t=1\) and c \(t=1.5\). The cross session of the position density along the x-axis at d \(t=0.5\), e \(t=1\) and f \(t=1.5\)

4.2.2 The Cosine Potential

This example considers a radially symmetric potential given by \(V=\cos (x^{2}+y^{2})\). Both the initial condition and the computational mesh are the same as in the previous case. Since the potential is not strictly increasing as we move away from the origin but is oscillatory, we expect that there will be more non-trivial self-interaction in the wavefunction. Figure 7 shows the numerical solutions at different times computed using the proposed Strang’s splitting scheme. Since the potential is oscillatory, we observe that the position density of the wavefunction behaves similarly and it tends to create a peak near regions when the potential attends its minimum. Figure 8 shows the cross-section of the intensities for various \(\epsilon \)’s. Similar to all the examples above, we observe that the solutions converge to the one obtained by the nonlinear Schrödinger equation as we reduce the parameter in the nonlocal kernel.

4.2.3 The Gaussian Potential

To have a more non-trivial interaction between the wavefunction and the external potential, we consider a moving Gaussian heading to a Gaussian potential. The initial condition is a Gaussian profile centered at \((-1.5,-1.5)\) and is moving in the (1, 1) direction with the magnitude of the momentum given by 1. The Gaussian potential is given by

$$\begin{aligned} V(x,y)=\exp \left( - \frac{x^{2}+y^2}{2\sigma _v^2} \right) . \end{aligned}$$

Figure 9 shows both the position density and the real part of the computed wavefunction at different times using our proposed Strang’s splitting method. The interaction between the wavefunction and the Gaussian hump can be clearly observed.

Fig. 8
figure 8

(Section 4.2.2) Comparison of the cross section of the position density of the wavefunction at \(t=1.5\) with \(\hbar =0.5\) and different \(\epsilon \)’s. The smaller graph refers to the difference between solution with different \(\epsilon \)’s and the non-linear solution in the natural log-scale

Fig. 9
figure 9

(Section 4.2.3) The position density of the wavefunction with \(\hbar =1/64\) and \(\epsilon =1\). The position density at time a \(t=1.6\), b \(t=2\) and c \(t=2.4\). The real part of the wavefunction at d \(t=1.6\), e \(t=2\) and f \(t=2.4\)

Fig. 10
figure 10

(Section 4.2.4 with \((x_+,y_+)=(1.5,1.8)\) and \(\epsilon =0.3\)) The position density at time a \(t=2\), b \(t=2.5\) and c \(t=3\). As a comparison, we show also the position density of linear Schrödinger equation at time d \(t=2\), e \(t=2.5\) and f \(t=3\). The blue solid lines and the red solid lines denote the trajectory of the particle with the initial condition \(U_+\) and \(U_-\), respectively, in the linear case (Color figure online)

4.2.4 Scattering Effects

In this example, we consider nonlocal interactions of multiple wavefunctions. We consider the evolution of the summation of two initial Gaussians given by \(U(x,y,{{0}})=U_+(x,y)+U_-(x,y)\) under the zero potential \(V=0\), where

$$\begin{aligned} U_{\pm }(x,y) \frac{1}{\sqrt{2\pi \sigma ^{2}}} \exp \left( -\frac{(x - x_{\pm })^2+(y - y_{\pm })^2}{4\sigma ^2} \right) \exp \left( \frac{ip_{\pm } \cdot {\mathbf {x}}}{\hbar } \right) \end{aligned}$$

with \(\hbar =1/64\), \(\sigma =0.15\), and \(g=-1\). The wavefunction \(U_+\), for example, corresponds to a Gaussian profile centered at \((x_+,y_+)\) moving with an initial momentum given by \(p_+\). In this setup, we assign \(p_{\pm }=(\mp 1, \mp 1)\) and the centers \((x_{\pm },y_{\pm })\) are not simultaneously located along the diagonal line \(x=y\). Therefore, the initial profiles are moving towards each other but will not have a head-on collision. For simplicity, we consider \((x_+,y_+)=-(x_-,y_-)\) and \(y_+>x_+>0\). In the case when we have the linear Schrödinger equation, these two Gaussian wavefunctions will move along a straight line without any interaction and interference. The perpendicular distance of the two straight trajectories is given by \(\delta =\sqrt{2}\, (y_+-x_+)\). In the section, all computations are done on the domain \([-2.5,2.5]^2\) discretized using a mesh of \(N=2^{10}+1\). We are going to investigate the scattering effect as we vary different parameters in the model.

First, we compare the solutions with different \(\delta \)’s, governing the distance between two Gaussians. As we increase the magnitude of \(\delta \), the interaction between two Gaussian wavefunctions is reduced, and therefore the evolution is more like a standard two-dimensional Gaussian with an initial momentum traveling under the zero external potential. Figures 10 and 11 show the position density at different times with the initial configurations given by \((x_+,y_+)=(1.5,1.8)\) and (1.5, 2.0), respectively, corresponding to \(\delta =0.3\sqrt{2}\) and \(0.5\sqrt{2}\), respectively. Since the nonlocal kernel has a support of roughly \(5\epsilon \), the nonlocal potential has no effect on the particle trajectory if \(\delta \) is greater than approximately \(2.5\epsilon \approx 0.53\sqrt{2}\). Therefore, we expect that the effect of the nonlocal kernel due to a different Gaussian is quite small in the second case.

Fig. 11
figure 11

(Section 4.2.4 with \((x_+,y_+)=(1.5,2.0)\) and \(\epsilon =0.3\)) The position density at time a \(t=2\), b \(t=2.5\) and c \(t=3\). We show also the position density of linear Schrödinger equation at time d \(t=2\), e \(t=2.5\) and f \(t=3\). The blue solid lines and the red solid lines denote the trajectory of the particle with the initial condition \(U_+\) and \(U_-\), respectively, in the linear case (Color figure online)

In all figures, we added two solid lines denoting the trajectories of the center of mass of a single particle traveling under the linear Schrödinger equation. The blue solid line represents the trajectory of the particle corresponding to the initial condition \(U_+\) traveling towards the bottom left corner, while the red solid line represents the corresponding initial condition given by \(U_-\) traveling to the upper right corner of the computational domain, as shown in (d)–(f) in these two figures. As we can see, the two Gaussian profiles in both figures have significantly scattered off from the solid lines, indicating that the nonlocal potential has induced an attractive force to pull the wavefunction together. As we increase the value of \(\delta \) (from \(0.3\sqrt{2}\) in Fig. 10 to \(0.5\sqrt{2}\) in Fig. 11), the strength of the scattering is reduced, and therefore the final center of mass is located closer toward their corresponding trajectory as in the linear evolution. To better demonstrate the effect of how the scattering distance depends on the parameter \(\delta \), we have shown in Fig. 12 the scattering distance at the time \(t=2.5\) as we vary \(\delta \). If the closest distance between the two wave packets is too far (comparing to the support of the nonlocal convolution kernel), there is no scattering and the wave packets will move along a straight trajectory as in the case of the linear Schrödinger equation.

Next, we consider the influence of \(\epsilon \) (the support of the Gaussian kernel in the nonlocal potential) on the scattering effect. In Fig. 13, we have shown the computed position density at time \(t=1.75\) with different values of \(\epsilon \)’s. The parameter \(\delta \) is chosen to be \(\delta =1/\sqrt{2}\). For \(\epsilon \) roughly greater than \(\delta /5\approx 0.141\) so that the support of two Gaussian kernels overlaps, the two wavepackets will start to interact with each other through the nonlocal convolution. For \(\epsilon \) greater than \(\delta /5\approx 0.141\), we see that the interaction becomes more significant at the beginning, as demonstrated in Fig. 14. For \(\epsilon \) getting bigger and bigger, on the other hand, the effect of the nonlinearity drops. As discussed in Sect. 3.3, the nonlocal Schrödinger equation reduces back to the linear Schrödinger equation. Therefore, the scattering effect will be gradually reduced as shown in Fig. 13 for \(\epsilon \) larger than roughly 0.4.

Fig. 12
figure 12

(Section 4.2.4) The scattering distance computed with different value of \(\delta \)’s. We take \(\hbar =1/64\), \(T=2.5\), \(\epsilon =0.3\) and \(g=-1\)

Fig. 13
figure 13

(Section 4.2.4 with \((x_+,y_+)= (1.5,1.9)\) and under the zero potential) The position density at the time \(t=3\) computed with \(\hbar =1/64\) and a \(\epsilon =0.3\), b \(\epsilon =0.35\), c \(\epsilon =0.4\), d \(\epsilon =0.75\), e \(\epsilon =1\) and f the linear Schrödinger equation (i.e. \(\epsilon \rightarrow \infty \))

Fig. 14
figure 14

(Section 4.2.4) The scattering distance computed with different value of \(\epsilon \)’s. We take \(\hbar =1/32\), \(t=1.75\), \(\delta =1/\sqrt{2}\) and \(g=-1\)

4.2.5 Repulsive Interactions

In the above examples, we consider the cases for \(g<0\) representing attractive interactions between Bosons. It is straightforward to simulate the repulsive case. We consider the evolution of the summation of the two initial Gaussians given by \(U(x,y,{{0}})=U_+(x,y)+U_-(x,y)\) under the zero potential \(V=0\), where

$$\begin{aligned} U_{\pm }(x,y) \frac{1}{\sqrt{2\pi \sigma ^{2}}} \exp \left( -\frac{(x - x_{\pm })^2+(y - y_{\pm })^2}{4\sigma ^2} \right) \exp \left( \frac{ip_{\pm } \cdot {\mathbf {x}}}{\hbar } \right) \end{aligned}$$

with \((x_{\pm },y_{\pm })=\pm (1.3,1.5)\), \(\hbar =1/256\), and \(\sigma =0.15\). Once again, we assign \(p_{\pm }=\mp (1,1)\). In this simulation, we consider various positive values of g and measure the corresponding change in the scattering distance at the time \(t=2\). Figure 15 shows that the scattering distance is roughly linear in the magnitude of g.

Fig. 15
figure 15

(Section 4.2.5 Scattering distance against g) The scattering distance computed with different value of g’s. We take \(\hbar =1/256\), \(T=2\) and \(\epsilon =0.3\)

Fig. 16
figure 16

(Section 4.3 with the parabolic potential) Solutions computed with \(\hbar =1\) and \(\epsilon =1\). The position density at time a \(t=0.3\), b \(t=0.6\) and c \(t=0.9\). The real part of the wavefunction at time d \(t=0.3\), e \(t=0.6\) and f \(t=0.9\)

4.3 Three-Dimensional Examples

In this section, we consider some three-dimensional examples. Extending those corresponding examples in the one- and two-dimensional cases, we consider the evolution of the initial Gaussian

$$\begin{aligned} U(x,y,z,{{0}})=\frac{1}{(2\pi )^{3/4}\sigma ^{3/2}} \exp \left( -\frac{x^2+y^2+z^2}{4\sigma ^2} \right) \end{aligned}$$

with \(\sigma =0.1\) under the parabolic potential \(V=\frac{1}{2} \left( x^2+y^2+z^2 \right) \), where the constant \(g=-1\). We discretize the computational domain \([-1.5,1.5]^3\) using the mesh with \(N=2^7+1\). The support of the Gaussian kernel in the nonlocal potential is chosen so that \(\epsilon =1\). Since \(2.5\varDelta x\) is approximately 0.0585, our mesh can well-resolve the kernel in the computation. The numerical solution at the final time \(T=0.3\) is given in Fig. 16. Our proposed Strang’s operator splitting method has marched 27 iterations to reach the final time T and it has taken approximately 222.01s. For each time iteration, the approach needs 8.22259s. Since the total number of grid points is different from the one- and two-dimensional cases, it is difficult to have a direct comparison with respect to the computational time. Instead, we repeated the test with \(N=2^6+1\). This test now took 14 iterations to reach the final time. The total computational time is reduced to 9.422 s which amounts to 0.673 s per iteration. This matches roughly with the complexity \(O(N^3\log N)\) per iteration.

We have also considered a moving Gaussian, where the potential is given by the Gaussian \(V=\exp \left[ -{r^2}/{(2\sigma _{v}^2)} \right] ,\) where \(r=\sqrt{x^2+y^2+z^2}\) and \(\sigma _{v}=0.1\). The initial condition is given by a moving Gaussian packet along the (1, 1, 1) direction with the magnitude of the momentum given by 0.5. Our numerical solutions up to the final time \(T=1.3\) are given in Fig. 17. The complex nonlocal self-interaction of the packet with the Gaussian hump is clearly observed.

Fig. 17
figure 17

(Section 4.3 moving Gaussian with the Gaussian potential) Solutions computed with \(\hbar =1/64\) and \(\epsilon =0.6\). The position density at time a \(t=0.7\), b \(t=1\) and c \(t=1.3\). The real part of the wavefunctions at time d \(t=0.7\), e \(t=1\) and f \(t=1.3\)

5 Conclusion

In this paper, we have developed an efficient numerical method for solving a class of nonlinear Schrödinger equation involving nonlocal interactions of wave functions. The idea is to apply the operator splitting step to construct the nonlocal potential using the FFT and then integrate the numerical potential with the FHSM developed in [23]. The resulting numerical algorithm can take a large time step in the simulation and, therefore, is ideal for long time simulations of a nonlinear system.

The datasets generated during and/or analysed during the current study are available from the corresponding author upon a reasonable request.