Numerical method for the stochastic projected Gross-Pitaevskii equation

15
PHYSICAL REVIEW E 89, 013302 (2014) Numerical method for the stochastic projected Gross-Pitaevskii equation S. J. Rooney, P. B. Blakie, and A. S. Bradley Jack Dodd Centre for Quantum Technology, Department of Physics, University of Otago, Dunedin, New Zealand (Received 1 October 2013; revised manuscript received 19 November 2013; published 10 January 2014) We present a method for solving the stochastic projected Gross-Pitaevskii equation (SPGPE) for a three- dimensional weakly interacting Bose gas in a harmonic-oscillator trapping potential. The SPGPE contains the challenge of both accurately evolving all modes in the low-energy classical region of the system, and evaluating terms from the number-conserving scattering reservoir process. We give an accurate and efficient procedure for evaluating the scattering terms using a Hermite-polynomial based spectral-Galerkin representation, which allows us to precisely implement the low-energy mode restriction. Stochastic integration is performed using the weak semi-implicit Euler method. We extensively characterize the accuracy of our method, finding a faster-than-expected rate of stochastic convergence. Physical consistency of the algorithm is demonstrated by considering thermalization of initially random states. DOI: 10.1103/PhysRevE.89.013302 PACS number(s): 05.10.a, 03.75.b, 02.60.Cb, 02.70.c I. BACKGROUND A. Introduction Providing a quantitative description of nonequilibrium dynamics of Bose-Einstein condensates (BECs) at finite temperature is an ongoing challenge [1,2]. Classical field methods have been a popular tool to describe finite temperature weakly interacting BECs, utilizing the tractability of the Gross-Pitaevskii equation (GPE) to simulate the dynamics of many highly occupied modes of the system [3,4]. These highly occupied modes constituting a low-energy subspace are treated with a classical field approximation, enabling the dynamics of these modes to be treated nonperturbatively. These methods have been used to treat both equilibrium properties and nonequilibrium dynamics in a range of finite temperature systems [415]. Introducing coupling between the low-energy region and the remaining high-energy modes results in a stochastic GPE, which includes damping and noise terms from the reservoir interaction. Such a description has been derived microscopically [1619], allowing for these methods to pro- vide an ab initio description of nonequilibrium dynamics. There are now numerous examples in the literature of the application of stochastic GPEs to a range of systems, including vortex decay [2022], soliton decay [23,24], defect formation across phase transitions [2529], spinor condensates [3033], polariton condensates [34], equilibrium properties [35], and low dimensional systems [3645]. Currently, most applications of stochastic GPEs have only included growth processes, where collisions between two atoms within the high-energy reservoir lead to a change in population of the low-energy region. The damping term that arises from this process is similar to that of the damped GPE [4651], is closely connected to Ginzburg-Landau theory, and is relatively simple to implement numerically. In the stochastic projected GPE (SPGPE) formalism of Gardiner et al. [17], there are also scattering reservoir processes, where a collision between high- and low-energy region atoms results in energy change with no population transfer. These scattering terms have been recently implemented in Ref. [52], showing a dominant effect in dissipative evolution far from equilibrium. In this paper, we present a numerical method for evolving the SPGPE, including the scattering terms. Numerically solving the SPGPE involves two major technical challenges: (i) All moderately occupied low-energy modes play an important role in finite temperature nonequilibrium dynamics. Thus, all modes beneath a well-chosen cutoff must be propagated accurately. (ii) The deterministic term arising from the scat- tering reservoir interaction is nonlocal, while the noise is multiplicative and spatially correlated. Thus, accurately and efficiently implementing the scattering terms is a challenge. Previous work has shown how a spectral approach [53,54] can be used within the projected GPE (PGPE) formalism [6] to precisely implement the energy cutoff, and provide a means for accurate evolution of all low-energy modes for a Bose gas with both contact [55] and dipolar interactions [56]. In this work, we extend the spectral-Galerkin method developed for the growth terms in Ref. [25], providing a numerical method for evolving the full SPGPE that evaluates the scattering terms, while still propagating all low-energy modes accurately. We thus give a complete spectral-Galerkin method for the SPGPE. This paper is organized as follows: In the rest of this section, we briefly review the SPGPE formalism. In Sec. II, we outline our spectral approach, and outline the equations for the mode amplitudes we need to evaluate to solve the SPGPE. In Sec. III, we present our algorithm for evaluating the scattering terms using a Gauss-Hermite quadrature approach. In Sec. IV, we characterize the accuracy of our approach, with results demonstrating the convergence with quadrature grid size and evolution time step size. We present examples of the usage of the SPGPE, showing the evolution of random initial states to equilibrium. B. SPGPE theory We briefly outline the key formalism of the SPGPE relevant to our work (see Refs. [1,16,17,52] for full details). In our classical field approach, we divide the modes of our system into two subspaces according to their occupation. The low-energy region contains highly occupied and partially coherent modes, which we refer to as the C region. These modes are dominated by classical fluctuations, thus we may use a classical field (c field) approximation to treat these modes [1]. The remaining 1539-3755/2014/89(1)/013302(15) 013302-1 ©2014 American Physical Society

Transcript of Numerical method for the stochastic projected Gross-Pitaevskii equation

PHYSICAL REVIEW E 89, 013302 (2014)

Numerical method for the stochastic projected Gross-Pitaevskii equation

S. J. Rooney, P. B. Blakie, and A. S. BradleyJack Dodd Centre for Quantum Technology, Department of Physics, University of Otago, Dunedin, New Zealand

(Received 1 October 2013; revised manuscript received 19 November 2013; published 10 January 2014)

We present a method for solving the stochastic projected Gross-Pitaevskii equation (SPGPE) for a three-dimensional weakly interacting Bose gas in a harmonic-oscillator trapping potential. The SPGPE containsthe challenge of both accurately evolving all modes in the low-energy classical region of the system, andevaluating terms from the number-conserving scattering reservoir process. We give an accurate and efficientprocedure for evaluating the scattering terms using a Hermite-polynomial based spectral-Galerkin representation,which allows us to precisely implement the low-energy mode restriction. Stochastic integration is performedusing the weak semi-implicit Euler method. We extensively characterize the accuracy of our method, finding afaster-than-expected rate of stochastic convergence. Physical consistency of the algorithm is demonstrated byconsidering thermalization of initially random states.

DOI: 10.1103/PhysRevE.89.013302 PACS number(s): 05.10.−a, 03.75.−b, 02.60.Cb, 02.70.−c

I. BACKGROUND

A. Introduction

Providing a quantitative description of nonequilibriumdynamics of Bose-Einstein condensates (BECs) at finitetemperature is an ongoing challenge [1,2]. Classical fieldmethods have been a popular tool to describe finite temperatureweakly interacting BECs, utilizing the tractability of theGross-Pitaevskii equation (GPE) to simulate the dynamicsof many highly occupied modes of the system [3,4]. Thesehighly occupied modes constituting a low-energy subspaceare treated with a classical field approximation, enabling thedynamics of these modes to be treated nonperturbatively.These methods have been used to treat both equilibriumproperties and nonequilibrium dynamics in a range of finitetemperature systems [4–15].

Introducing coupling between the low-energy region andthe remaining high-energy modes results in a stochasticGPE, which includes damping and noise terms from thereservoir interaction. Such a description has been derivedmicroscopically [16–19], allowing for these methods to pro-vide an ab initio description of nonequilibrium dynamics.There are now numerous examples in the literature of theapplication of stochastic GPEs to a range of systems, includingvortex decay [20–22], soliton decay [23,24], defect formationacross phase transitions [25–29], spinor condensates [30–33],polariton condensates [34], equilibrium properties [35], andlow dimensional systems [36–45].

Currently, most applications of stochastic GPEs have onlyincluded growth processes, where collisions between twoatoms within the high-energy reservoir lead to a change inpopulation of the low-energy region. The damping term thatarises from this process is similar to that of the dampedGPE [46–51], is closely connected to Ginzburg-Landau theory,and is relatively simple to implement numerically. In thestochastic projected GPE (SPGPE) formalism of Gardineret al. [17], there are also scattering reservoir processes,where a collision between high- and low-energy region atomsresults in energy change with no population transfer. Thesescattering terms have been recently implemented in Ref. [52],showing a dominant effect in dissipative evolution far fromequilibrium.

In this paper, we present a numerical method for evolvingthe SPGPE, including the scattering terms. Numericallysolving the SPGPE involves two major technical challenges: (i)All moderately occupied low-energy modes play an importantrole in finite temperature nonequilibrium dynamics. Thus,all modes beneath a well-chosen cutoff must be propagatedaccurately. (ii) The deterministic term arising from the scat-tering reservoir interaction is nonlocal, while the noise ismultiplicative and spatially correlated. Thus, accurately andefficiently implementing the scattering terms is a challenge.Previous work has shown how a spectral approach [53,54] canbe used within the projected GPE (PGPE) formalism [6] toprecisely implement the energy cutoff, and provide a meansfor accurate evolution of all low-energy modes for a Bose gaswith both contact [55] and dipolar interactions [56]. In thiswork, we extend the spectral-Galerkin method developed forthe growth terms in Ref. [25], providing a numerical methodfor evolving the full SPGPE that evaluates the scattering terms,while still propagating all low-energy modes accurately. Wethus give a complete spectral-Galerkin method for the SPGPE.

This paper is organized as follows: In the rest of thissection, we briefly review the SPGPE formalism. In Sec. II, weoutline our spectral approach, and outline the equations for themode amplitudes we need to evaluate to solve the SPGPE. InSec. III, we present our algorithm for evaluating the scatteringterms using a Gauss-Hermite quadrature approach. In Sec. IV,we characterize the accuracy of our approach, with resultsdemonstrating the convergence with quadrature grid size andevolution time step size. We present examples of the usage ofthe SPGPE, showing the evolution of random initial states toequilibrium.

B. SPGPE theory

We briefly outline the key formalism of the SPGPE relevantto our work (see Refs. [1,16,17,52] for full details). In ourclassical field approach, we divide the modes of our system intotwo subspaces according to their occupation. The low-energyregion contains highly occupied and partially coherent modes,which we refer to as the C region. These modes are dominatedby classical fluctuations, thus we may use a classical field(c field) approximation to treat these modes [1]. The remaining

1539-3755/2014/89(1)/013302(15) 013302-1 ©2014 American Physical Society

S. J. ROONEY, P. B. BLAKIE, AND A. S. BRADLEY PHYSICAL REVIEW E 89, 013302 (2014)

incoherent (I) region contains sparsely occupied modes, andplays the role of a thermal reservoir, with temperature T andchemical potential μ. The SPGPE is a stochastic equation ofmotion for the c field, which arises from treating the reservoirinteractions with the I region using Markovian reservoirtheory [57].

Here, we consider a system of bosons confined in a three-dimensional trapping potential, described by the dimensionlesssingle-particle Hamiltonian

Hsp = H0 + δV (r,t), (1)

where any time dependent perturbation potential is includedin δV (r,t), r = (x,y,z), and

H0 = − 12∇2 + 1

2

(λ2

xx2 + λ2

yy2 + λ2

zz2)

(2)

is the dominant contribution to the single-particle Hamiltonianand defines our c-field basis, where λj = ωj/ω0 is the relativetrap frequency in each direction j = {x,y,z}. Note that wework in dimensionless units throughout this paper, usingharmonic-oscillator units of length x0 = √

�/mω0, energyE0 = �ω0, and time t0 = 1/ω0, where m is the particle mass,and ω0 is a chosen reference frequency. We write our c-fieldwave function ψ(r,t) ≡ ψ in terms of our basis states as

ψ =∑n∈C

cn(t)φn(r), (3)

where φn(r) are eigenstates of the single-particle Hamiltoniansatisfying H0φn(r) = εnφn(r), and the summation includes allmodes in the C region which is defined as

C = {n : εn � εcut} , (4)

where εcut is the single-particle energy cutoff defining the Cregion, and n is a shorthand index that runs over all quantumnumbers required to specify eigenmodes in three dimensions(3D) with energy εn.

Treating the I region semiclassically and assuming spa-tially constant reservoir interaction rates [25,52], the SPGPEevolution equation for ψ is given in Stratonovich (S) formby [52]

(S)dψ(r,t) = dψ |H + dψ |γ + (S)dψ |ε, (5)

with

dψ |H = P {−i(L − μ)ψ dt} , (6)

dψ |γ = P{−γ (L − μ)ψ dt + dWγ (r,t)}, (7)

(S)dψ |ε = P {−iVε(r,t)ψ dt + iψ dWε(r,t)} , (8)

where the evolution of the c field is formally restricted to theC region by the projector operator

Pf (r) ≡∑n∈C

φn(r)∫

d3r′φ∗n(r′)f (r′). (9)

The first term of the SPGPE (6) describes the Hamiltonianevolution, where

Lψ ≡ (Hsp + CNL|ψ |2)ψ (10)

is the Hamiltonian evolution operator for the C region, wherethe dimensionless nonlinearity constant is

CNL = 4πa/x0, (11)

with a being the s-wave scattering length. On its own, Eq. (6)is the PGPE, a nonlinear Schrodinger equation for the C fieldas an isolated microcanonical system [1].

The remaining terms in the SPGPE account for distinctreservoir interactions, growth (dψ |γ ), and scattering (dψ |ε),which we describe in the following.

1. Growth reservoir interaction

Equation (7) describes the growth reservoir interaction,where two I-region atoms collide leading to population growthof the C region. The rate of this process is set by γ [25], andthe Gaussian complex noise has the nonvanishing correlation

〈dW ∗γ (r,t)dWγ (r′,t)〉 = 2γ T δC(r,r′)dt, (12)

where

δC(r,r′) =∑n∈C

φn(r)φ∗n(r′) (13)

is a delta function in the C region.

2. Scattering reservoir interaction

Equation (8) describes the number-conserving scatteringreservoir interaction where energy and momentum are trans-ferred between the C and I regions, without populationtransfer. This process is described by the nonlocal effectivepotential

Vε(r,t) =∫

d3r′ M(r − r′)∇′ · j(r′), (14)

where the C-field current is

j(r,t) = i

2(ψ∇ψ∗ − ψ∗∇ψ), (15)

and the rate of the scattering process is given by

M(r) = M(2π )3

∫d3k

eik·r

|k| , (16)

where

M = 16πa2

x20

1

eβ(εcut−μ) − 1(17)

parametrizes the rate of the scattering process. IntegratingEq. (14) by parts, and using Eq. (16), the effective potentialtakes the form

Vε(r,t) = −M∫

d3keik·r

(2π )3/2ik ·

∫d3r′ eik·r′

(2π )3/2j(r′,t),

(18)

where k = k/|k|. In this form, the effective potential can beevaluated using Fourier transforms. We present our numericalalgorithm for evaluating this term in Sec. III C.

The real scattering noise dWε has the nonzero correlation

〈dWε(k,t)dWε(k′,t)〉 = 2MT

|k| δC(k, − k′)dt. (19)

013302-2

NUMERICAL METHOD FOR THE STOCHASTIC PROJECTED . . . PHYSICAL REVIEW E 89, 013302 (2014)

The correlation is antidiagonal in k space, which we use todevelop a numerical sampling algorithm in Sec. III D.

II. FORMAL ALGORITHM

A. Spectral-Galerkin formulation

We exploit that H0 is diagonal in the spectral basis and usea Galerkin approach [53], where we project the SPGPE (5)onto the spectral basis. This leads to a system of equations forthe evolution of the mode amplitudes, which takes the form

(S) dcn = −i[(εn − μ)cn + Gn]dt − γ [(εn − μ)cn + Gn]dt

+ dAn − i[Sndt + dBn], (20)

where the first line represents terms for dψ |H , the second linerepresents terms from the growth interaction dψ |γ , and thelast line represents terms from the scattering interaction dψ |ε.The nonlinear matrix elements and noises are given by

Gn ≡ CNL

∫d3r φ∗

n(r) |ψ(r,t)|2ψ(r,t), (21)

Sn ≡∫

d3r φ∗n(r)Vε(r,t)ψ(r,t), (22)

dAn =√

2γ T

(dun + idvn√

2

), (23)

dBn ≡∫

d3r

{φ∗

n(r)ψ(r,t)∑m

ζm(r)dwm

}, (24)

which correspond to the two-body interaction, scattering effec-tive potential, growth noise, and scattering noise, respectively.The perturbation potential δV (r,t) will not be consideredin this paper (see Ref. [55] for details on how this termis implemented within a spectral-Galerkin approach). Thefunctions ζm(r) are defined in Eq. (82). The independent noisesdun,dvn,dwm are standard real Wiener processes satisfying

〈dun〉 = 〈dvn〉 = 〈dwn〉 = 0, (25)

〈dumdun〉 = 〈dvmdvn〉 = 〈dwmdwn〉 = δmndt. (26)

B. Stochastic time evolution algorithm

The primary challenge in solving the SPGPE (20) is inevaluating the nonlinear matrix elements, which we describein Sec. III. Here, we briefly overview how we perform thetemporal integration for the family of SPGPE methods.

1. SPGPE

We first consider the SPGPE including all reservoir in-teractions. Because the noise associated with the scatteringreservoir interaction is multiplicative, we use the weak vectorsemi-implicit Euler algorithm [57–60] to evolve our stochasticequations forward in time. Here, we briefly describe how weapply this algorithm to our equation of motion. Equation (20)is of the general form

(S) dcn = an(t,c) dt + dAn(dun,dvn) + dBn(t,c,dw), (27)

where an = −(i + γ )[(εn − μ)cn + Gn] − iSn, we use thenotation c to represent the dependence of matrix elementson the full c field (ψ), with {c}n = cn(t). Both the growthand scattering noise matrix elements depend on different setsof Wiener processes, where the notation dw is used to showthe scattering noise dBn depends on a vector of n Wienerprocesses, with {dw}n = dwn(t). The solution is propagatedto a set of discrete times tj = j t , where t is the stepsize, and we denote the solution at time tj as c

(j )n . Using this

solution, the solution at the next time step is computed asc

(j+1)n = c(j ) + c(j ), where

c(j )n = an(tj ,c(j )) t + An

( u(j )

n , v(j )n

)+ Bn(tj ,c(j ), w(j )), (28)

with

c(j )n ≡ 1

2

(c(j )n + c(j+1)

n

), (29)

tj ≡ 12 (tj+1 + tj ), (30)

⟨ u(j )

m u(j )n

⟩ = t δmn, (31)

⟨ v(j )

m v(j )n

⟩ = t δmn. (32)

⟨ w(j )

m w(j )n

⟩ = t δmn. (33)

Formally, u(j )n ≡ ∫ tj+1

tjdun, and u

(j )n is sampled as a real

Gaussian distributed random variable of variance t and meanzero [leading to Eq. (31), and similarly for v

(j )n , w

(j )n ]. Note

that Eq. (28) must be iterated as it is implicit, but only a fewiterations are required to achieve convergence (typically fouriterations are sufficient).

2. Scattering SPGPE

Our main result in this paper is developing a method forevaluating the terms involved with the scattering processes[Eqs. (22)–(24)]. The scattering SPGPE is found by neglectingthe growth terms in the SPGPE (5), giving the equation ofmotion

(S)dψ = dψ |H + (S)dψ |ε (34)

= −iP {[L − μ + Vε(r,t)] ψ dt − ψ dWε(r,t)} . (35)

Following the Galerkin approach, we find the followingequation of motion for the mode amplitudes:

(S) dcn = −i[(εn − μ)cn + Gn + Sn]dt − i dBn. (36)

As with the full SPGPE, this equation of motion includesthe multiplicative scattering noise. Thus, we use the semi-implicit Euler algorithm described in Sec. II B 1, appropriatelymodified to neglect the growth terms.

While the growth terms are needed for a complete descrip-tion of the reservoir interactions, the numerical implemen-tation of these terms is relatively simple [25]. Thus, in thispaper we will consider the implementation and characterizethe accuracy of the scattering terms, by using the scatteringSPGPE.

013302-3

S. J. ROONEY, P. B. BLAKIE, AND A. S. BRADLEY PHYSICAL REVIEW E 89, 013302 (2014)

3. Simple-growth SPGPE

We end this section with a brief discussion of the implemen-tation of the simple-growth SPGPE using a spectral-Galerkinapproach (see Ref. [25] for further details). The simple-growthSPGPE is obtained by neglecting the scattering terms inthe SPGPE (5), and has been widely used in the literature1

since the scattering terms are weak in quasiequilibriumsituations [1,22,52]. The simple-growth SPGPE is given by

dψ = dψ |H + dψ |γ (37)

= P{− (i + γ ) (L − μ) ψ dt + dWγ (r,t)}. (38)

Projecting the simple-growth SPGPE onto the single-particlebasis leads to the equation of motion for the mode amplitudes

dcn = −(i + γ ) [(εn − μ)cn + Gn] dt + dAn. (39)

Since the noise (dAn) in the simple-growth SPGPE is additive,we are not restricted to the semi-implicit Euler algorithmto evaluate the temporal integration, and use the stochasticRunge-Kutta algorithm which has improved convergence andstability [58]. The only nonlinear term in Eq. (39) is Gn,hence the simple-growth SPGPE can be solved through minorextension of the PGPE solution methods [25,55,56].

III. EVALUATION OF THE SCATTERINGSPGPE MATRIX ELEMENTS

The main challenge in solving the scattering SPGPE (34)is evaluating the nonlinear matrix elements (21)–(24) at eachtime step. Here, we give a full description of our algorithmto efficiently and accurately evaluate the scattering SPGPEmatrix elements in the harmonic-oscillator basis. This expandson the brief overview of our method presented in Ref. [52].

A. Harmonic-oscillator state properties

We first discuss some important properties of our single-particle basis used in this work.

1. Separability

The eigenstates of the basis Hamiltonian (H0) are separableinto one-dimensional (1D) basis states, that is,

φn(r) ↔ φλx

α (x)φλy

β (y)φλz

γ (z), (40)

εn ↔ ελx

α + ελy

β + ελz

γ , (41)

cn ↔ cαβγ , (42)

where φλxα (x) are eigenstates of the dimensionless 1D

harmonic-oscillator Hamiltonian[−1

2

d2

dx2+ 1

2λ2

xx2

]φλx

α (x) = ελx

α φλx

α (x), (43)

where the harmonic-oscillator states take the form

φλx

α (x) = λ1/4x hαHα(

√λxx)e−λxx

2/2, (44)

1See Refs. [20–22,25,26,35,45,52] for examples of usage of thesimple-growth SPGPE with the projector implemented within aGalerkin approach for a harmonically trapped system.

where the normalization constant is hα = [2αα!√

π ]−1/2, andHα(x) is a Hermite polynomial of degree α, defined by therecurrence relation

Hα+1(x) = 2xHα(x) − 2αHα−1(x), α = 1,2, . . . (45)

with H0(x) = 1 and H1(x) = 2x. The eigenvalue is thesingle-particle energy given by ελx

α = λx(α + 12 ), where α is

a non-negative integer (we use Greek subscripts to denote 1Deigenstates). The C region is defined by the region containingall modes below the single-particle energy cutoff

C = {α,β,γ : ελx

α + ελy

β + ελz

γ � εcut}, (46)

so that within the C region there exist Mx(≈ εcut/λx) distinct1D eigenstates in the x direction, and MT ≈ MxMyMz/6 total3D basis states in the C region.

For this work, we will consider a spherically symmetricsystem (λx = λy = λz = 1) to avoid cumbersome notationinvolving λ. However, the work presented in this paper canbe easily generalized for any trap anisotropy, by retaining thegeneral form of Eq. (44). Thus, we drop any reference to λ,and consider a system with M modes in the C region in eachdirection.

2. Step operators

Step operators allow us to represent certain operatorsexactly in the spectral basis. The step operators are definedas

a+x = 1√

2

(− ∂

∂x+ x

), (47)

a−x = 1√

2

(∂

∂x+ x

). (48)

We then find that the matrix representation of the step operatorsin the spectral basis is

(a+x )αβ ≡

∫dx φ∗

α(x)a+x φβ(x) (49)

=√

β + 1δα,β+1 (50)

and, similarly,

(a−x )αβ =

√βδα,β−1. (51)

For our purposes, this allows us to differentiate in the spectralbasis exactly since

(∂x)αβ = 1√2

(a−x − a+

x )αβ (52)

=√

β

2δα,β−1 −

√β + 1

2δα,β+1. (53)

This 1D procedure is applied in the same manner to include y

and z. It is important that we can apply the derivative operatorexactly in the spectral basis since we need to evaluate the c-fieldcurrent (15) to evaluate the scattering effective potential term.

For a further discussion on the use of step operators tocalculate observables, see Ref. [55].

013302-4

NUMERICAL METHOD FOR THE STOCHASTIC PROJECTED . . . PHYSICAL REVIEW E 89, 013302 (2014)

B. Two-body interaction term

Here, we briefly review our scheme for numericallyintegrating the nonlinear contact interaction term (21) usingGauss-Hermite quadrature, which is described in completedetail in Ref. [55]. This algorithm calculates the nonlinearinteraction term exactly for a harmonically trapped system,and is required to integrate the scattering SPGPE (34).

First, using (3) and the form of the basis states (44), we canwrite the c field as

ψ = Q(r)e−(x2+y2+z2)/2, (54)

where

Q(r) ≡∑

{αβγ }∈C

cαβγ (t)hαHα(x)hβHβ(y)hγ Hγ (z) (55)

is a polynomial of maximum degree M − 1 in each indepen-dent coordinate due to the energy cutoff.

The interaction term (21) is fourth order in the field, so wecan write it in the form

Gαβγ =∫

d3r e−2(x2+y2+z2)Pαβγ (x,y,z), (56)

where

Pαβγ (x,y,z) ≡ CNLhαHα(x)hβHβ(y)hγ Hγ (z)

×|Q(x,y,z)|2Q(x,y,z) (57)

is a polynomial of maximum degree 4(M − 1) in eachcoordinate. We evaluate (56) using Gauss-Hermite quadrature.The general form of the NQ point quadrature rule is

∫ ∞

−∞dx W (x)f (x) ≈

NQ∑j=1

wjf (xj ), (58)

where W (x) is a Gaussian weight function, and wj and xj

are the quadrature weights and roots. The Gauss-Hermitequadrature is exact if f (x) is a polynomial of maximumdegree 2NQ − 1. Since the exponential in (56) takes theform of the appropriate weight function for Gauss-Hermitequadrature, we can evaluate the interaction matrix elementexactly by

Gαβγ =∑ijk

wiwjwkPαβγ (xi,xj ,xk), (59)

using a three-dimensional spatial grid with 2(M − 1) points ineach direction, where the {xi} and {wi} are the 2(M − 1) rootsand weights of the one-dimensional Gauss-Hermite quadraturewith weight function W (x) = e−2x2

.

C. Scattering effective potential term

To compute the effective potential matrix elements (22),we need to compute multiple Fourier transforms [see (18)].Here, we show how we use an auxiliary harmonic-oscillatorbasis to perform the Fourier transforms within our spectralrepresentation, adapting the scheme developed for evaluatingthe dipolar interaction term in the PGPE [56].

First, we calculate the c-field current density (15) by

j(r) = jx(r)ex + jy(r)ey + jz(r)ez, (60)

where ev is the unit vector in each direction v = {x,y,z}, and

jv(r) = i

2

(ψ∂vψ

∗ − ψ∗∂vψ), (61)

where Eq. (61) can be calculated exactly using step operators(see Sec. III A 2). Now, using similar arguments to Sec. III B,each component of the current can be written in the form

jv(r) = Rv(x,y,z)e−(x2+y2+z2), (62)

where Ri is polynomial of maximum degree 2(M − 1) in eachcoordinate (due to the projector).

Following Ref. [56], we introduce a set of auxiliaryharmonic-oscillator states

χα(x) = hαHα(x)e−x2, (63)

where the exponential argument is chosen to match Eq. (62).These states are eigenstates of the harmonic-oscillator Hamil-tonian, with a trapping potential twice as tight as that definingthe spectral basis (43). Noting this, the auxiliary states arerelated to the spectral basis modes by χα(x) = 21/4φα(

√2x).

Due to the same exponential factor, we can represent eachcomponent of the current [i.e., (61)] as

jv(r) =∑αβγ

dvαβγ χα(x)χβ(y)χγ (z), (64)

where dvαβγ is a set of 8M3 auxiliary basis coefficients for each

component of j(r). Since the auxiliary oscillator states form anorthonormal basis, we can evaluate these basis coefficients by

dvαβγ =

∫d3r χ∗

α (x)χ∗β (y)χ∗

γ (z)jv(r) (65)

=∫

d3r e−2(x2+y2+z2)Zvαβγ (x,y,z), (66)

where

Zvαβγ (x,y,z) = e2(x2+y2+z2)χ∗

α (x)χ∗β (y)χ∗

γ (z)jv(r) (67)

is a polynomial of maximum degree 4(M − 1) in each spatialdimension. We can use the same Gauss-Hermite quadratureto integrate (66) as we used for the nonlinear interactionterm (56), as the weight function and maximum polynomialdegree are both W (x) = e−2x2

. Thus, Eq. (66) can be calculatedexactly for each component of the current by

dvαβγ =

∑ijk

wiwjwkZvαβγ (xi,yj ,zk), (68)

where the quadrature roots {xi} and weights {wi} are the sameas used in (59).

To evaluate the effective potential (18), we must Fouriertransform each component of the current. Since the harmonic-oscillator states are eigenstates of the Fourier transformoperator

χα(kx) = (−i)−α 1

(2π )1/2

∫dx e−ikxxχα(x), (69)

we can efficiently evaluate the Fourier transform with knowl-edge of auxiliary basis amplitudes of the current (dv

αβγ ) by

jv(k) =∑αβγ

(−i)−(α+β+γ )dvαβγ χα(kx)χβ(ky)χγ (kz). (70)

013302-5

S. J. ROONEY, P. B. BLAKIE, AND A. S. BRADLEY PHYSICAL REVIEW E 89, 013302 (2014)

Thus, (70) will represent the Fourier transform of the current onthe quadrature grid exactly. We can now evaluate the scatteringeffective potential term (18) by evaluating

�(k) = k · j(k) = kxjx(k) + kyjy(k) + kzjz(k)

|k| , (71)

and computing the inverse Fourier transform of Eq. (71). Tocompute the inverse Fourier transform, we expand Vε(r) in theauxiliary basis

Vε(r) ≈∑αβγ

fαβγ χα(x)χβ(y)χγ (z), (72)

where

fαβγ = −iM∫

d3k (i)−(α+β+γ )χ∗α (kx)χ∗

β (ky)χ∗γ (kz)�(k).

(73)

We integrate (73) using a Gauss-Hermite quadrature via

fαβγ = −iM∑ijk

wiwj wkTαβγ (ki,kj ,kk), (74)

where

Tαβγ (ki,kj ,kk) = e2(k2i +k2

j +k2k )χ∗

α (ki)χ∗β (kj )χ∗

γ (kk)�(ki,kj ,kk).

(75)

Here, the quadrature roots {ki} and weights {wi} are foundfrom the weight function e−2k2

i . Since in general �(k) can notbe represented exactly in the oscillator basis, our quadraturerule (73), and thus Eq. (72), are approximations. Hence, thenumber of k-grid quadrature points becomes a parameterwhich controls the accuracy of our Gauss-Hermite quadratureapproach (see Sec. IV A). We investigate how the accuracyof the scattering matrix element depends on the number ofquadrature points in Sec. IV.

From the form of Eq. (72), we see that the effective potentialmatrix elements we require [Eq. (22)] are of the form

Sαβγ =∫

d3r e−2(x2+y2+z2)Yαβγ (x,y,z), (76)

where

Yαβγ (r) = hαHα(x)hβHβ(y)hγ Hγ (z)Vε(r)Q(r), (77)

where Q(r) represents the c field and is given by Eq. (55).Although our expression for Vε(r) is approximate, once inthis form, Yαβγ (r) takes the form of a polynomial of degree4(M − 1) in each coordinate. Thus, we can integrate Eq. (76)exactly using the same Gauss-Hermite quadrature sum asfor Eq. (59), i.e., using a three-dimensional spatial grid with2(M − 1) points in each direction, where the {xi} and {wi} arethe 2(M − 1) roots and weights corresponding to the weightfunction W (x) = e−2x2

.

D. Scattering noise term

1. Correlation function

A noise with the necessary correlations (19) can beconstructed as

dWε(k) =√

2MT dt

|k|∑αβγ

dwαβγ φαβγ (k). (78)

Here, we have made use of the Fourier transformed modesφαβγ (k) = (−i)(α+β+γ )φαβγ (k). The phase factors arising inFourier transforming the modes generate the antidiagonal deltafunction we require since∑αβγ

(−1)(α+β+γ )φαβγ (k)φαβγ (k′) =∑αβγ

φαβγ (k)φ∗αβγ (−k′)

= δC(k, − k′), (79)

where we have used Eq. (13).

2. Computing the matrix elements

To implement the noise in our Galerkin approach, we needto evaluate the matrix elements corresponding to Eq. (24).This means we need to project the noise in position spaceonto our spectral basis. Since numerically we form the correctscattering noise correlation in Fourier space [see Eq. (78)], weneed to compute

dWε(r,t) =∫

d3keik·r

(2π )3/2dWε(k) (80)

=∑αβγ

ζαβγ (r)dwαβγ , (81)

where the {dwαβγ } are real Gaussian distributed randomvariables [see Eqs. (25) and (26)], and

ζαβγ (r) ≡∫

d3keik·r

(2π )3/2�αβγ (k). (82)

Here, we have introduced

�αβγ (k) =√

2MT

|k| φα(kx)φβ(ky)φγ (kz), (83)

where the {φα(kx)} are the Fourier transformed basis states.Thus, to evaluate the scattering noise matrix elements (24), wemust apply ζαβγ to the Gaussian distributed random variables.We now outline how we evaluate the scattering noise matrixelements.

First, we can represent Eq. (83) in the form

�αβγ (k) = Xαβγ (k)e−(k2x+k2

y+k2z )/2, (84)

where

Xαβγ (k) = (i)−(α+β+γ )hαHα(kx)hβHβ(ky)

×hγ Hγ (kz)

√2MT

|k| . (85)

In order to compute the inverse Fourier transform of Eq. (84)to form ζ , we use a similar process as in Sec. III C. Here,we do not need to use the auxiliary basis states necessary for

013302-6

NUMERICAL METHOD FOR THE STOCHASTIC PROJECTED . . . PHYSICAL REVIEW E 89, 013302 (2014)

computing j(k) since the exponential term in Eq. (84) matchesthat of the standard basis states. Thus, we can calculate ζ (r)using the expansion of ζ (r) in the standard spectral basis

ζαβγ (r) ≈ Kαβγ (r)e−(x2+y2+z2)/2, (86)

where

Kαβγ (r) = nαβγ hαHα(x)hβHβ(y)hγ Hγ (z) (87)

is a polynomial of degree M − 1, and

nαβγ =∫

d3k (i)−(α+β+γ )φ∗α(kx)φ∗

β(ky)φ∗γ (kz)�αβγ (k).

(88)

Equation (86) is approximate [cf. Eq. (72)] since we can notrepresent Xαβγ (k) as a polynomial. We evaluate the integralusing a Gauss-Hermite quadrature, using the exponential fac-tor to choose the appropriate weight function. The quadraturesum becomes

nαβγ =∑ijk

wiwj wkUαβγ (ki ,kj ,kk), (89)

where

Uαβγ (ki ,kj ,kk) = e(k2i +k2

j +k2k )φ∗

α(ki)φ∗β(kj )φ∗

γ (kk)

×�αβγ (ki ,kj ,kk), (90)

with the quadrature roots {ki} and weights {wi} correspondingto the weight function W = e−k2

i . Since our Gauss-Hermitequadrature is approximate, the number of k points is again aparameter which determines the accuracy of our approach. SeeSec. IV for further discussion.

Finally, since the matrix elements we require [Eq. (24)] area third order product of mode functions (i.e., φ∗ψζ ), they canbe cast in the form

dBαβγ =∫

d3r e− 32 (x2+y2+z2)dNαβγ (r), (91)

where

dNαβγ (r) = hαHα(x)hβHβ(y)hγ Hγ (z)

×Q(r)∑κλμ

Kκλμ(r)dwκλμ, (92)

where Q(r) represents the c field and is given by Eq. (55).dNαβγ (r) is a polynomial of degree 3(M − 1) in each direction,thus we evaluate Eq. (91) using a Gauss-Hermite quadrature

dBαβγ =∑ijk

wiwj wkdNαβγ (xi ,xj ,xk). (93)

This quadrature is exact using a three-dimensional grid with3(M − 1)/2 quadrature points in each coordinate, where thegrid points {xi} and quadrature weights {wi} correspond to theweight function W (x) = e−3x2/2.

E. Summary of the algorithm

Here, we give a summary of our algorithm for calculatingthe scattering SPGPE matrix elements. We split our summaryinto two sections, first dealing with the deterministic termsfollowed by the noise term.

1. Matrix elements Gn and Sn

For each Euler step, the procedure for calculating thesematrix elements is as follows:

Step 1: We first transform the c field from the spectral tospatial representation via

ψ(rs) =∑

σ

Usσ cσ , (94)

where σ = {αβγ }, rs = (xi,xj ,xk) are the quadraturepoints associated with the weight function W (x) = e−2x2

and Usσ = UiαUjβUkγ are the precomputed transforma-tion matrices. These are the one-dimensional basis statesevaluated at the quadrature grid points

Uiα = φα(xi). (95)

Step 2: Differentiate the field

c′xσ =

∑κλμ

(∂x)ακ (Iy)βλ(Iz)γμcκλμ, (96a)

c′yσ =

∑κλμ

(Ix)ακ (∂y)βλ(Iz)γμcκλμ, (96b)

c′zσ =

∑κλμ

(Ix)ακ (Iy)βλ(∂z)γμcκλμ, (96c)

where the derivative operators are given by Eq. (53) andthe I are the identity operators.Step 3: Transform the differentiated fields to positionspace

ψ ′x(rs) =

∑σ

Usσ c′xσ , (97a)

ψ ′y(rs) =

∑σ

Usσ c′yσ , (97b)

ψ ′z(rs) =

∑σ

Usσ c′zσ , (97c)

so we can then form the position space current via Eq. (60),where we have

jv(rs) = i

2[ψ(rs)ψ

′v(rs)

∗ − ψ(rs)∗ψ ′

v(rs)]. (98)

Step 4: The weighted position space current is constructedfor each component of j(rs):

Jx(rs) ≡ wse2r2

s jx(rs), (99a)

Jy(rs) ≡ wse2r2

s jy(rs), (99b)

Jz(rs) ≡ wse2r2

s jz(rs), (99c)

where ws = (wi,wj ,wk) are the quadrature weights asso-ciated with the weight function W (x) = e−2x2

.

013302-7

S. J. ROONEY, P. B. BLAKIE, AND A. S. BRADLEY PHYSICAL REVIEW E 89, 013302 (2014)

Step 5: We compute the Fourier transform of eachcomponent of the current by

jkx(kt ) =

∑s

WstJx(rs), (100a)

jky(kt ) =

∑s

WstJy(rs), (100b)

jkz(kt ) =

∑s

WstJz(rs). (100c)

Here, the precomputed transformation matrix is

Wir =∑

α

(−i)αχα(kr )χα(xi), (101)

where the k-space quadrature grid is based on the weightfunction W (k) = e−2k2

. Equation (101) combines bothsteps of the Fourier transform into one operation [jx(r) →dαβγ and dαβγ → jkx(k)].Step 6: In Fourier space we form the projection of thecurrent onto k. We then premultiply with the quadratureweights to form

F(kt ) ≡ wte2k2

t kt · j(kt ). (102)

Step 7: Inverse transforming takes us back to positionspace and computes the effective potential Vε:

Vε(rs) = −iM∑

t

W ∗stF(kt ). (103)

Step 8: We combine the two-body interaction and scatter-ing effective potential terms into a single integrand (sincethe quadrature sum has the same weight function for bothcases)

g(rs) = wse2r2

s [CNL|ψ(rs)|2 + Vε(rs)]ψ(rs). (104)

Step 9: Inverse transforming g(rs) completes the inte-gration of Eqs. (21) and (22), giving the required matrixelements

Gσ + Sσ =∑

s

U ∗sσg(rs). (105)

2. Scattering noise d Bn

To implement the scattering noise, we generate dwσ at thestart of each Euler step. Then, for each iteration of Eq. (28),we perform the following steps:

Step 1: We transform the random variables to Fourierspace via

�(kt ) =∑

σ

Utσdwσ , (106)

where the precomputed transformation matrices are theFourier transformed basis states

Utσ = (−i)(α+β+γ )φα(ku)φβ(kv)φγ (kw), (107)

where the tilde notation implies the k-space quadraturegrid is based on the weight function W (k) = e−k2

.

Step 2: We form the appropriate correlation function in k

space, and then compute the inverse Fourier transform

f (rs) =∑

t

X∗st

√2TM|kt |

�(kt ), (108)

where

Xir =∑

α

(−i)αφα(kr )φα(xi), (109)

where the hat notation implies the position space quadra-ture grid and is based on the weight function W (x) =e−3x2/2.Step 3: We now need to transform the c field to positionspace onto the grid based on the three-field weightfunction:

ψ(rs) =∑

σ

Usσ cσ , (110)

where now the precomputed transformation matrices are

Usσ = φα(xi)φβ(xj )φγ (xk). (111)

Step 4: We form the appropriate integrand of dBn:

b(rs) = wse3r2

s/2ψ(rs)f (rs). (112)

Step 5: The inverse transform of b(rs) completes therequired integration

dBσ =∑

s

U ∗sσ b(rs). (113)

IV. ACCURACY OF ALGORITHM

In this section, we discuss how we can control the accuracyof our algorithm, and quantify the accuracy of our approach ofboth spatial and temporal integration using various measures.

A. k-space quadrature grid

Both the deterministic and noise terms involve k-spaceintegrals which are evaluated as approximate quadrature sums[evaluating Eqs. (103) and (108), respectively]. To control theaccuracy of these steps, we can vary the size of the appropriatek-space quadrature grid.

For the deterministic term, we require the Fourier transformof j(r) onto a k grid based on the weight function e−2k2

i [seeEq. (75)], while for the noise term we require the inverseFourier transform of �αβγ (k) from a k′ grid based on theweight function e−k2

i [see Eq. (90)]. Note that in this section,we will associate unprimed and primed notations with themomentum space quadrature grid for the deterministic andnoise terms, respectively.

To begin, we note that for a given εcut, each particularFourier transform is exactly invertible, i.e.,

j(r)W−→ j(k)

W †−→ j(r), (114)

�(k)X†−→ �(r)

X−→ �(k), (115)

if the quadrature grid sizes are chosen by Nx � N0x , Nk � N0

k ,and N ′

x � N0′x , N ′

k � N0′k , for the position and momentum

013302-8

NUMERICAL METHOD FOR THE STOCHASTIC PROJECTED . . . PHYSICAL REVIEW E 89, 013302 (2014)

space grids for the deterministic and noise terms, respectively,where the reference values are given by N0

x = N0k ≡ 2M − 1,

N0′x = N0′

k ≡ M − 1. The apparent singularity in Eq. (16) isremoved by the terms it acts on in the SPGPE. In practice, wechoose an even number of k-grid points to avoid a quadraturepoint at k = 0. To investigate the effect of the k grid on theaccuracy of our method for evaluating the nonexact Hermite-Gauss quadrature sums [see Eqs. (72) and (86)], we vary thenumber of k quadrature points used by

Nk = N0k + Nk, (116)

N ′k = N0′

k + N ′k, (117)

where Nk (N ′k) is the total number of quadrature grid points

and Nk ( N ′k) is the number of quadrature points added to

the reference value N0k (N0′

k ).In this work, we only consider using Gauss-Hermite

quadrature to compute the required Fourier transforms. Usinga uniform grid would allow us to utilize fast Fourier trans-formations to compute the required Fourier transforms moreefficiently. However, this would require a large increase inthe number of quadrature grid points required to accuratelyrepresent the classical field in a trapped system. Furtherto this, we would need to interpolate the new quadraturepoints back into a Hermite-Gauss quadrature grid to accuratelyevaluate steps 9 and 5 for the deterministic and noise terms,respectively. For further discussion on this, see Sec. IV Bin Ref. [56].

B. Effective potential term convergence for a breathing mode

A Gaussian wave function undergoing radial breathingprovides a rare example where we can analytically calculateVε(r) for a case where ∇ · j �= 0. Here, we consider theGaussian wave function

ψ(r) =√

N

(πσ 2)3/4e−r2/2σ 2+iκr2/2, (118)

which corresponds to a radial breathing oscillation. This wavefunction has a nonzero current density, given by

j(r) = κr|ψ |2, (119)

from which we find [using Eq. (18)] the radially symmetricpotential

V Aε (r) = − N2Mκσ√

2(πσ 2)3/4g(r/σ ), (120)

where

g(x) =[√

2

π+

(1√2x

−√

2x

)e−x2

erfi(x)

], (121)

with erfi(x) ≡ −ierf(ix). The potential is most significant atr = 0, where

V Aε (r = 0) = − N2Mκσ√

2(πσ 2)3/4

√8

π. (122)

0 8 16 24 32 40 48 56 6410

−8

10−7

10−6

10−5

10−4

ΔNk

δV

ε

cut = 20

cut = 30

cut = 40

FIG. 1. (Color online) Relative error in the potential Vε(r) withvarying Nk [see (123)] for a Gaussian wave function with N =1000, σ = 1, κ = 0.5. The curves correspond to εcut = 20 (redsquares), εcut = 30 (blue circles), and εcut = 40 (black diamonds).

To quantify the accuracy of our numerical evaluation of Vε(r),we use the relative error measure

δVε = 1 −∣∣∣∣ Vε(r = 0)

V Aε (r = 0)

∣∣∣∣ . (123)

In Fig. 1, we plot δVε as a function of Nk , for the Gaussianwave function [Eq. (118)], with N = 1000, σ = 1, and κ =0.5. We show the relative error for Vε evaluated with εcut = 20,εcut = 30, and εcut = 40, corresponding to M = 19, 29, and 39,respectively.

In general, we see good accuracy with δVε < 10−4 forall Nk . δVε decreases with increasing Nk up to a cutoff-dependent value of Nk , after which it increases for large Nk to a limit bounded by the initial value. As is thecase for all numerical methods with variable accuracy, Nk

must be varied until the desired accuracy is reached. For thebreathing mode considered here, at least an order of magnitudeimprovement in accuracy can be achieved for modest Nk .The accuracy in general increases with εcut, i.e., increasingspatial range and resolution.

C. Matrix elements convergence

Here, we test the accuracy of calculating the matrixelements [Eqs. (21)–(24)] for a randomized state cαβγ . Ahigh-energy randomized state will test the accuracy of bothlow-energy modes and modes near the cutoff, thus will bea useful test for the suitability of our algorithm to finitetemperature nonequilibrium dynamics.

We use a random state of the form

cσ = ησ + iξσ , (124)

where {ησ } and {ξσ }, are normally distributed Gaussianrandom variables with zero mean and unit variance. For theresults in this section, we use a cutoff of εcut = 20 so M = 19.We renormalize our initial field so that N = 1 × 104, and usescattering reservoir parameters of M = 0.005, T = 5.

1. Effective potential term matrix elements

We first consider Sσ , the scattering potential matrix ele-ments given by Eq. (22). To test the accuracy of our method,

013302-9

S. J. ROONEY, P. B. BLAKIE, AND A. S. BRADLEY PHYSICAL REVIEW E 89, 013302 (2014)

0 8 16 24 32 40 48 56 6410

−3

10−2

10−1

ΔNk = ΔNk

E

(α, β, γ) = (8, 2, 7)

ES

EB

10−6

10−4

10−2

E

(α, β, γ) = (5, 2, 7)

10−6

10−4

10−2

E

(α, β, γ) = (2, 2, 2)

10−6

10−4

10−2

E

(α, β, γ) = (0, 0, 0)

FIG. 2. (Color online) Relative error in individual matrix ele-ments as Nk (or N ′

k) is varied. The error in the scattering potentialmatrix elements ES( Nk) (red squares) and scattering noise matrixelements EB ( N ′

k) (blue circles) are shown for various single-particlebasis states. All cases correspond to εcut = 20.

we calculate the relative error of the matrix elements, given by

ES( Nk) =∣∣Sσ ( Nk) − SA

σ

∣∣∣∣SAσ

∣∣ , (125)

where Sσ ( Nk) is the scattering matrix element calculatedwith a k-space quadrature grid specified by Nk and SA

σ isa more accurate matrix element calculation. We calculate SA

σ

using a k-space quadrature grid with Nk = 128 quadraturepoints.

In Fig. 2, we show ES( Nk) for some representative casesof σ = (α,β,γ ). We see ES is smaller for lower-order matrixelements. In general, ES decreases with Nk for all basiscoefficients.

2. Noise matrix elements

We now test the accuracy of the scattering noise matrixelements dBσ [see Eq. (24)]. Here, we quantify the error withthe measure

EB( N ′k) =

∣∣dBσ ( N ′k) − dBA

σ

∣∣∣∣dBAσ

∣∣ , (126)

where dBσ ( N ′k) are the scattering noise matrix elements

calculated with a k-space quadrature grid specified by N ′k ,

where the quadrature weight function is that appropriate tothe noise term. Here, the reference dBA

σ is calculated using ak-space quadrature grid with N ′

k = 128 points.In Fig. 2, we plot EB ( N ′

k) for various σ = (α,β,γ ), findinga smaller error with increasing grid size. The noise term is

generally less accurate than the deterministic term, with EB

over an order of magnitude larger than ES for low-order matrixelements. For higher-order matrix elements, it becomes hard todistinguish between the accuracy of the noise and deterministicterms, with both having a similar error.

3. All nonlinear matrix elements

Finally, we consider the combination of all nonlinear matrixelements Fσ = Gσ + Sσ + dBσ . To evaluate Gσ , we choosea nonlinearity constant of CNL = 0.005. We use the relativeerror measure

δF ≡∥∥Fσ − FA

σ

∥∥∥∥FAσ

∥∥ , (127)

where

||�σ ||2 ≡∑

σ

|�σ |2, (128)

where Fσ are the approximate matrix elements calculated byour algorithm and FA

σ are more accurately calculated matrixelements. δF includes both the deterministic and noise termsfrom the scattering processes, so we can measure the combinedeffect of these terms on the accuracy of our algorithm.

Since both the deterministic and noise terms have indepen-dent quadrature grids which affect the accuracy, we use twodifferent measures of δF . We refer to δF when we determineFA

σ with a quadrature grid of Nk = 128 for the deterministicterm, and N ′

k = 0 for the noise term. Second, we refer to δF ′when we determine FA

σ with a quadrature grid of Nk = 0 forthe deterministic term and N ′

k = 128 for the noise term.These two different measures allow us to examine the effecteach k-space quadrature grid we employ has on the accuracyof the combined matrix elements.

In Fig. 3, we show results for δF with varying Nk and δF ′with varying N ′

k . We see excellent accuracy for all Nk inboth measures, with the relative error reducing with increasinggrid size in either case. Since δF is weighted by the size of eachmatrix element, a large relative error in small matrix elementshas only a small effect on δF . Thus, the larger error seen inhigh-energy matrix elements in Fig. 2 has a minimal effect onδF . For larger εcut we see a smaller error, with little change inthe rate of convergence.

D. Propagation convergence

In this section, we present evolution convergence results forour algorithm for the scattering SPGPE. To test the evolutionof our algorithm, we propagate an initial random state givenby Eq. (124), with an energy cutoff of εcut = 20, and wenormalize our c field to N (t = 0) = 1 × 104 87Rb atoms,with the nonlinearity constant of CNL = 0.02 found fromexplicitly evaluating Eq. (11). We choose reservoir parametersof T = 20, M = 0.005, and evolve our initial state with thescattering SPGPE using the semi-implicit Euler algorithm forone trap cycle with a final time of τ = 2π . For the results inthis section, we compute four iterations of the semi-implicitEuler algorithm at each time step.

In the following sections, we will test the accuracy of ourevolution by examining the dependence on time step size t ,and on both Nk and N ′

k . As the SPGPE is a stochastic

013302-10

NUMERICAL METHOD FOR THE STOCHASTIC PROJECTED . . . PHYSICAL REVIEW E 89, 013302 (2014)

0 8 16 24 32 40 48 56 6410

−5

10−4

10−3

10−2

ΔNk

δF

0 8 16 24 32 40 48 56 6410

−6

10−5

10−4

10−3

δF

ΔNk

cut = 20

cut = 30

FIG. 3. (Color online) Relative error in the combined matrixelements [see Eq. (127)] for εcut = 20 (red squares) and εcut = 30(blue circles). Top: δF ( Nk), showing the effect of the k-spacequadrature grid corresponding to the potential term, with N ′

k = 0.Bottom: δF ′( N ′

k), showing the effect of the k-space quadrature gridcorresponding to the noise term, with Nk = 0.

equation of motion, we look at ensemble averages of 500trajectories for each parameter { t, Nk, N ′

k} considered.We consider a unique initial condition for each trajectory.

1. Time step convergence

In this section, we consider the case Nk = N ′k = 0, and

examine the convergence with t . To quantify our accuracy,we use the following measures:

δN =⟨N (t = 0) − ∑

σ |cσ (τ )|2N (t = 0)

⟩, (129)

δE =⟨E(τ ) − EA(τ )

EA(τ )

⟩, (130)

δcσ =⟨∣∣cσ (τ ) − cA

σ (τ )∣∣2∣∣cA

σ (τ )∣∣2

⟩1/2

, (131)

δX =⟨∑

σ

∣∣cσ (τ ) − cAσ (τ )

∣∣2

∑σ

∣∣cAσ (τ )

∣∣2

⟩1/2

, (132)

where δN is the change in normalization, δE is the relativechange in energy, where the c-field energy is given by

E =∫

d3r ψ∗Hspψ + CNL

2

∫d3r |ψ |4. (133)

δcσ is the relative change in individual mode amplitudes andδX is the relative difference of all mode amplitudes. Quantitieswith a superscript “A” denote that quantity is calculated froma more accurate simulation, and angle brackets represent anensemble average. Since the scattering SPGPE is formally

10−8

10−6

10−4

10−2

|δN|

δN ∝ Δt4 .5

10−3

10−2

10−1

10−5

10−4

10−3

10−2

|δE|

Δt

δE ∝ Δt1 .8

FIG. 4. (Color online) Number (δN ) and energy (δE) conver-gence with step size t . The relative error is determined after t = 2π ,where t corresponds to 6400, 3200, 1600, 800, and 400 time stepsin order of increasing t . Simulation results (red squares) are fittedby the labeled power laws.

number conserving, δN provides an immediate indication ofaccuracy without needing a more accurate simulation.

To test the convergence with t , we perform 500 simula-tions with a time step of tA = τ/12 800, i.e., use 12 800steps in the evolution time of one trap period (τ = 2π ).Simulations with a step size tA are our accurate simulationsfor considering the convergence tests. Each simulation withstep size tA has a different random initial condition. Tounderstand the effects of t on convergence, we repeat theSPGPE simulation for each trajectory using an identical initialstate, while increasing the time step size to t = tA2p,for p = {1,2,3,4,5}. To test stochastic convergence for eachtrajectory of a simulation with a given step size, we use thesame Wiener process as for the accurate simulation. To do this,the Wiener-process samples used for each trajectory with stepsize t are formed from the sums of the corresponding 2p

consecutive Wiener-process samples used for the trajectorieswith step size tA.

The first two measures of numerical accuracy [(129)and (130)] represent measures of weak convergence [57].These two measures show for an ensemble of simulations at agiven time step t the difference between the average numberand energy, and their more accurate respective value. Figure 4shows δN and δE, where we observe good convergence with t . The relative errors are at the level of less than 1% for alltime steps considered.

The final two measures of error [(131) and (132)] show theroot mean squared difference of the mode amplitudes from oursimulations with an accurate value. As these are the solutionsto the scattering SPGPE, these measures determine stochasticconvergence in the strong sense [57]. δcσ shows the relativeerror in the individual mode amplitudes. In Fig. 5, we showδcσ for the basis states σ = (0,0,0),(2,4,6), and (4,10,3). Inall cases, we see convergence faster than t1.5, as we reduce t . The error increases for higher-order modes with quite largerelative error in the (4,10,3) state, which is near the cutoff. To

013302-11

S. J. ROONEY, P. B. BLAKIE, AND A. S. BRADLEY PHYSICAL REVIEW E 89, 013302 (2014)

10−3

10−2

10−1

100

δc σ

(α, β, γ) = (0, 0, 0)

δcσ ∝ Δt1 .5

10−2

10−1

100

101

δc σ

(α, β, γ) = (4, 10, 3)

δcσ ∝ Δt1 .8

10−3

10−2

10−1

100

δc σ

(α, β, γ) = (2, 4, 6)

δcσ ∝ Δt1 .7

10−3

10−2

10−1

10−3

10−2

10−1

100

Δt

δX

δX ∝ Δt1 .8

FIG. 5. (Color online) Mode amplitude convergence with t .δcσ represents the error in individual modes [see Eq. (131)]. δX

represents the error over all C-region modes [see Eq. (132)].Simulation results (red squares) are fitted by the labeled power laws.

give an idea of the effect all modes have on the accuracy ofa simulation, we calculate δX, which takes into account therelative error of each mode. In Fig. 5, we see δX ∝ t1.8, withaccuracy of greater than 1% for the smaller time steps. We seethat the larger error in δcσ for high-energy modes has littleeffect on δX since δX depends on the size of each element.

Figures 4 and 5 show that all measures of accuracy convergeat least as fast as the strong vector semi-implicit Euler methodof Ref. [57], which converges as t1 with decreasing t forboth strong and weak measures of convergence. In principle,it is possible to generate higher-order algorithms, but this taskbecomes rapidly complex with increasing desired accuracy,requiring the sampling of many additional auxiliary noiseterms [57]. Here, we find quite fast convergence using theweak semi-implicit Euler method, suggesting that the noise iscommutative, in which case the strong and weak methods areequivalent.

We note that the individual simulations reported in thissection took between 4 min (p = 5, Nk = 0, N ′

k = 0) and2.5 h (p = 1, Nk = 0, N ′

k = 0), using single CPU coderunning on a shared cluster with 2.66 GHz CPUs.

2. k-space grid convergence

In this section, we investigate the effect that the k-spacequadrature grid has on the convergence of our algorithm. Weconsider the measures δN, δE, and δX for fixed t = 0.001,

0 10 20 30 40ΔNk

0 10 20 30 4010

−5

10−4

10−3

δX

ΔNk

10−4

10−3

δN

10−8

10−7

10−6

δE

FIG. 6. (Color online) Measures of convergence with k-spacequadrature grid size, for simulations with fixed t = 0.001. Redsquares: accuracy with varying Nk for fixed N ′

k = 0, where theaccurate simulations have Nk = 50. Blue circles: accuracy withvarying N ′

k for fixed Nk = 0, where the accurate simulationshave N ′

k = 50.

i.e., 800 integration steps (p = 4). For each trajectory (asdescribed above), we evolve the scattering SPGPE with thesame initial conditions and same noise, while varying Nk

and N ′k independently.

First, we consider the case of varying Nk with fixed N ′

k = 0, where we plot δN, δE, and δX calculated afterτ = 2π in Fig. 6 (red squares). To calculate these measures ofaccuracy, we use an accurate value based on simulations with Nk = 50. Varying Nk has no effect on δN , while δE andδX both converge rapidly.

The case of varying N ′k with fixed Nk = 0 is shown in

Fig. 6 (blue circles), where we see δN, δE, and δX behave ina similar manner. In all cases for either varying Nk or N ′

k ,the accuracy is very good even for the cases Nk = 0 andδN ′

k = 0, consistent with Fig. 3.The good accuracy for all k-space quadrature grid sizes

shown in Fig. 6 means that increasing Nk or N ′k has only a

minor benefit on the accuracy of our algorithm for calculatingthe SPGPE matrix elements. The most significant gains arisefrom controlling the time step size t .

Here, the simulation time increased from 8 min (p =4, Nk = 0, N ′

k = 0), to 25 min for the largest k grid (p =4, Nk = 40, N ′

k = 0), and 15 min for the largest k′ grid(p = 4, Nk = 0, N ′

k = 40).

E. Random state evolution to equilibrium

Having characterized the accuracy of our algorithm, wenow look at a practical example of using the SPGPE. Here, weevolve a random initial state into thermal equilibrium with theSPGPE, and examine some thermodynamic quantities whichare commonly of interest in c-field calculations.

013302-12

NUMERICAL METHOD FOR THE STOCHASTIC PROJECTED . . . PHYSICAL REVIEW E 89, 013302 (2014)y

t = 0

−4

−2

0

2

4t/2π = 10

nc(x

,y)

0

300

600

900

x

y

−4 −2 0 2 4−4

−2

0

2

4

x

φ(x

,y,0)

π

−π−4 −2 0 2 4

0

FIG. 7. (Color online) Column densities and phase slices(through the z = 0 plane) for the SPGPE evolution of an initialrandom state with T = 20, M = 0.01. The initial random state att = 0 evolves into equilibrium, where we show the final state after10 trap cycles of evolution.

As in Sec. IV D, we use a randomized initial state for eachtrajectory given by Eq. (124), with normalization 1 × 104 87Rbatoms, CNL = 0.02, and use an energy cutoff of εcut = 20. Weevolve the scattering SPGPE for 10 trap cycles using 1600integration steps per trap cycle, four iterations of the semi-implicit Euler algorithm at each time step, and set Nk = N ′

k = 0. To visualize our simulations, we look at the columndensity given by

nc(x,y) =∫

dz|ψ(r)|2. (134)

In Fig. 7, we show the column density and phase (slicethrough z = 0) of our initial random state. At t/2π = 10 onceequilibrium has been reached, we see phase coherence hasdeveloped over regions of finite c-field density. Fluctuationsin the density are caused by both the scattering noise andfrom fluctuations arising from PGPE evolution, and arecharacteristic of a finite temperature equilibrium state.

The images in Fig. 7 highlight that individual trajectoriesof the SPGPE can be thought of as showing the correspondingdynamics of a single experimental run [1]. However, whencalculating thermodynamics quantities or correlation func-tions, we must calculate ensemble averages. Figure 8 showsthe c-field energy (E) and system width (〈x2〉), where wecalculate these quantities as an ensemble average over 100trajectories of scattering SPGPE evolution. Results are shownfor two different reservoir temperatures of T = 10 and 20. Foreach temperature, we consider reservoir interaction amplitudesof M = 0.005 and 0.01. We see the high energy of therandom initial state rapidly decreases as the system evolvestowards equilibrium. Note the decay time decreases with largerM, and the final equilibrium energy increases with T . Theevolution of the system width 〈x2〉 follows a similar trend tothe energy. The large spread of density in the initial state (see

0.5

1

1.5

x 105

E

T = 20, M = 0.005T = 20, M = 0.01T = 10, M = 0.005T = 10, M = 0.01

0 2 4 6 8 100

2

4

6

t/2π

x2

FIG. 8. Energy (E) and system width (〈x2〉) averaged over 100trajectories, showing the evolution of a random initial state to thermalequilibrium. (Gray curves) SPGPE simulations for T = 20, withM = 0.005 (dashed) and M = 0.01 (solid). (Black curves) SPGPEsimulations for T = 10, with M = 0.005 (dashed) and M = 0.01(solid).

Fig. 7) decreases as a well defined Bose-Einstein condensateemerges as equilibrium is attained. The equilibrium systemwidth increases with temperature, due to an increased thermaldensity contained in the c field. The results in Fig. 8 show thatfor a given temperature, the equilibrium reached is independentof M. This is an important result to verify, as it gives a goodtest of the implementation of the noise [52].

V. CONCLUSIONS

We have presented a method to numerically solve theSPGPE for a finite temperature weakly interacting Bose gasin a three-dimensional harmonic trap. Our algorithm allowsaccurate and efficient implementation of the terms from thescattering reservoir interaction, while maintaining a consistentimplementation of the projector via a spectral approach.

We have extensively tested the accuracy of our evaluationof matrix elements associated with the deterministic and noiseterms, steps which are not exact within our Gauss-Hermiteintegration scheme. We have shown how the accuracy ofthese terms can be controlled with increasing order of k-spacequadrature grid. While this leads to increased accuracy, forthe systems considered in this paper our procedure showedgood accuracy for all grid sizes considered. However, careshould be taken when implementing this algorithm in anynovel system to ensure similar convergence of matrix elementsis achieved.

We presented convergence rates with respect to time stepsize used in our weak semi-implicit Euler implementation.For all measures considered, the weak semi-implicit Eulermethod exhibits rapid convergence (faster than t1), in boththe strong and weak sense, although the precise rate dependson the observable in question. The algorithm converges morerapidly than the strong semi-implicit algorithm, indicatingthat the scattering noise may be commutative [57]. We

013302-13

S. J. ROONEY, P. B. BLAKIE, AND A. S. BRADLEY PHYSICAL REVIEW E 89, 013302 (2014)

found that the choice of time step is more important to theaccuracy of SPGPE evolution than the k-space quadraturegrid size.

Finally, we demonstrated typical usage of the SPGPEby examining the evolution of a random initial state tothermal equilibrium. The thermodynamic equilibrium re-sults are found to to be independent of M, as must holdfor a physically consistent implementation of the reservoirinteraction terms.

ACKNOWLEDGMENTS

We acknowledge the use of the University of Otago Vulcancluster, and the Victoria University of Wellington Sci-Fac HPCfacility. S.J.R. thanks Victoria University of Wellington wherethis work commenced for their hospitality. This work wassupported by the University of Otago (S.J..R), the MarsdenFund of New Zealand (P.B.B., A.S.B.), and a RutherfordDiscovery Fellowship, administered by the Royal Society ofNew Zealand (A.S.B.).

[1] P. B. Blakie, A. S. Bradley, M. J. Davis, R. J. Ballagh, andC. W. Gardiner, Adv. Phys. 57, 363 (2008).

[2] N. P. Proukakis and B. Jackson, J. Phys. B: At., Mol. Opt. Phys.41, 203002 (2008).

[3] M. J. Davis, S. A. Morgan, and K. Burnett, Phys. Rev. Lett. 87,160402 (2001).

[4] K. Goral, M. Gajda, and K. Rzazewski, Phys. Rev. A 66, 051602(2002).

[5] A. Sinatra, C. Lobo, and Y. Castin, Phys. Rev. Lett. 87, 210404(2001).

[6] P. B. Blakie and M. J. Davis, Phys. Rev. A 72, 063608 (2005).[7] M. J. Davis and P. B. Blakie, Phys. Rev. Lett. 96, 060404 (2006).[8] T. P. Simula and P. B. Blakie, Phys. Rev. Lett. 96, 020404

(2006).[9] T. M. Wright, R. J. Ballagh, A. S. Bradley, P. B. Blakie, and

C. W. Gardiner, Phys. Rev. A 78, 063601 (2008).[10] A. Bezett and P. B. Blakie, Phys. Rev. A 79, 023602 (2009).[11] A. Bezett and P. B. Blakie, Phys. Rev. A 79, 033611 (2009).[12] R. N. Bisset, M. J. Davis, T. P. Simula, and P. B. Blakie, Phys.

Rev. A 79, 033626 (2009).[13] T. M. Wright, A. S. Bradley, and R. J. Ballagh, Phys. Rev. A 80,

053624 (2009).[14] T. M. Wright, A. S. Bradley, and R. J. Ballagh, Phys. Rev. A 81,

013610 (2010).[15] T. M. Wright, N. P. Proukakis, and M. J. Davis, Phys. Rev. A

84, 023608 (2011).[16] C. W. Gardiner, J. R. Anglin, and T. I. A. Fudge, J. Phys. B: At.,

Mol. Opt. Phys. 35, 1555 (2002).[17] C. W. Gardiner and M. J. Davis, J. Phys. B: At., Mol. Opt. Phys.

36, 4731 (2003).[18] H. T. C. Stoof, Phys. Rev. Lett. 78, 768 (1997).[19] H. T. C. Stoof, J. Low Temp. Phys. 114, 11 (1999).[20] S. J. Rooney, A. S. Bradley, and P. B. Blakie, Phys. Rev. A 81,

023630 (2010).[21] S. J. Rooney, P. B. Blakie, B. P. Anderson, and A. S. Bradley,

Phys. Rev. A 84, 023637 (2011).[22] S. J. Rooney, T. W. Neely, B. P. Anderson, and A. S. Bradley,

Phys. Rev. A 88, 063620 (2013).[23] S. P. Cockburn, H. E. Nistazakis, T. P. Horikis, P. G. Kevrekidis,

N. P. Proukakis, and D. J. Frantzeskakis, Phys. Rev. Lett. 104,174101 (2010).

[24] S. P. Cockburn, H. E. Nistazakis, T. P. Horikis, P. G. Kevrekidis,N. P. Proukakis, and D. J. Frantzeskakis, Phys. Rev. A 84,043640 (2011).

[25] A. S. Bradley, C. W. Gardiner, and M. J. Davis, Phys. Rev. A77, 033616 (2008).

[26] C. N. Weiler, T. W. Neely, D. R. Scherer, A. S. Bradley,M. J. Davis, and B. P. Anderson, Nature (London) 455, 948(2008).

[27] B. Damski and W. H. Zurek, Phys. Rev. Lett. 104, 160404(2010).

[28] A. Das, J. Sabbatini, and W. H. Zurek, Sci. Rep. 2, 352 (2012).[29] S.-W. Su, S.-C. Gou, A. Bradley, O. Fialko, and J. Brand, Phys.

Rev. Lett. 110, 215302 (2013).[30] S.-W. Su, I.-K. Liu, Y.-C. Tsai, W. M. Liu, and S.-C. Gou, Phys.

Rev. A 86, 023601 (2012).[31] C.-F. Liu and W. M. Liu, Phys. Rev. A 86, 033602 (2012).[32] C.-F. Liu, H. Fan, Y.-C. Zhang, D.-S. Wang, and W.-M. Liu,

Phys. Rev. A 86, 053616 (2012).[33] S.-W. Song, L. Wen, C.-F. Liu, S.-C. Gou, and W.-M. Liu, Front.

Phys. 8, 302 (2013).[34] M. Wouters and V. Savona, Phys. Rev. B 79, 165302 (2009).[35] M. C. Garrett, T. M. Wright, and M. J. Davis, Phys. Rev. A 87,

063611 (2013).[36] H. T. C. Stoof and M. J. Bijlsma, J. Low Temp. Phys. 124, 431

(2001).[37] R. A. Duine and H. T. C. Stoof, Phys. Rev. A 65, 013603 (2001).[38] N. P. Proukakis, J. Schmiedmayer, and H. T. C. Stoof, Phys.

Rev. A 73, 053603 (2006).[39] N. P. Proukakis, Phys. Rev. A 74, 053617 (2006).[40] S. P. Cockburn and N. P. Proukakis, Laser Phys. 19, 558

(2009).[41] S. P. Cockburn, A. Negretti, N. P. Proukakis, and C. Henkel,

Phys. Rev. A 83, 043619 (2011).[42] S. P. Cockburn, D. Gallucci, and N. P. Proukakis, Phys. Rev. A

84, 023613 (2011).[43] D. Gallucci, S. P. Cockburn, and N. P. Proukakis, Phys. Rev. A

86, 013627 (2012).[44] S. P. Cockburn and N. P. Proukakis, Phys. Rev. A 86, 033610

(2012).[45] M. J. Davis, P. B. Blakie, A. H. van Amerongen, N. J. van Druten,

and K. V. Kheruntsyan, Phys. Rev. A 85, 031604 (2012).[46] S. Choi, S. A. Morgan, and K. Burnett, Phys. Rev. A 57, 4057

(1998).[47] A. A. Penckwitt, R. J. Ballagh, and C. W. Gardiner, Phys. Rev.

Lett. 89, 260402 (2002).[48] M. Tsubota, K. Kasamatsu, and M. Ueda, Phys. Rev. A 65,

023603 (2002).[49] K. Kasamatsu, M. Tsubota, and M. Ueda, Phys. Rev. A 67,

033610 (2003).[50] C.-F. Liu, Y.-M. Yu, S.-C. Gou, and W.-M. Liu, Phys. Rev. A

87, 063630 (2013).

013302-14

NUMERICAL METHOD FOR THE STOCHASTIC PROJECTED . . . PHYSICAL REVIEW E 89, 013302 (2014)

[51] T. W. Neely, A. S. Bradley, E. C. Samson, S. J. Rooney, E. M.Wright, K. J. H. Law, R. Carretero-Gonzalez, P. G. Kevrekidis,M. J. Davis, and B. P. Anderson, Phys. Rev. Lett. 111, 235301(2013).

[52] S. J. Rooney, P. B. Blakie, and A. S. Bradley, Phys. Rev. A 86,053634 (2012).

[53] C. M. Dion and E. Cances, Phys. Rev. E 67, 046706 (2003).[54] W. Bao and J. Shen, SIAM J. Sci. Comput. 26, 2010 (2005).[55] P. B. Blakie, Phys. Rev. E 78, 026704 (2008).

[56] P. B. Blakie, C. Ticknor, A. S. Bradley, A. M. Martin, M. J.Davis, and Y. Kawaguchi, Phys. Rev. E 80, 016703 (2009).

[57] C. W. Gardiner, Handbook of Stochastic Methods, 3rd ed.(Springer, Berlin, 2004).

[58] G. N. Milstein and M. V. Tretyakov, Stochastic Numerics forMathematical Physics, 1st ed. (Springer, Berlin, 2004).

[59] P. Drummond and I. Mortimer, J. Comp. Phys. 93, 144(1991).

[60] M. Werner and P. Drummond, J. Comp. Phys. 132, 312 (1997).

013302-15