1 Introduction

The experimental realization of one-dimensional (1D) cold atomic systems [1,2,3,4,5,6,7] has sparked an intense theoretical interest in 1D few particle systems [8,9,10,11,12,13,14]. High accuracy calculations of energies and wave functions of few-body systems have been continuously developed [15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32] for three dimensional system and many of these approaches can be used in 1D as well.

Two- and three-electron atomic systems can be very accurately calculated using Hylleraas-type functions [33, 34], but the extension of the Hylleraas basis approach beyond three electrons is very tedious due to the difficulty of the analytical calculation of their matrix elements [35]. Explicitly Correlated Gaussian (ECG) basis functions have no such restrictions, and have become very popular tools in high accuracy calculations [36,37,38,39,40,41,42,43,44,45,46,47,48,49, 49, 50, 50,51,52,53,54,55,56]. There are several recent reviews illustrating the wide range of applications of ECGs [30, 57, 58].

ECGs as basis functions were first employed in 1960 by Boys [15] and Singer [16]. The simple quadratic form involving inter-particle distances in ECGs permits the reduction of the matrix elements to simple analytic expressions, and the algebraic complexity does not change with the number of particles. These matrix elements depend on the parameters of the ECGs, which should be carefully optimized [41, 59, 60] to get highly accurate variational upper bounds.

In this paper we present detailed derivations of matrix elements of one-dimensional generalized ECGs: ECGs multiplied with a polynomial prefactor formed by the powers of the coordinates of the particles. The polynomial prefactor not only helps the accuracy, but allows for the treatment of spin-orbit interaction or calculation of matrix elements of the dipole operator of a laser field. While the matrix elements presented in this work are in 1D, they can be simply generalized to 2D or 3D by using their tensor products. These tensor products can be used in calculations of systems in nonspherical potentials (e.g. electric or magnetic fields) and can also be used to derive general 3D ECG basis functions with arbitrary angular momentum after suitable angular momentum coupling. In our earlier work [61], we have derived matrix elements of ECGs in 3D for arbitrary angular momentum; the present work extends this to nonspherical potentials and gives a general form for 1D systems.

The outline of the paper is as follows: After the introduction we will introduce our notation and formalism, and will give calculations for different operators, such as overlap, kinetic energy, one-particle and two-particle potentials in later sections.

2 Formalism

We consider a system of N particles in 1D space, with positions in a lab-frame Cartesian coordinate system given by \(x_i, i=1,{\ldots } ,N\). To simplify the notation we introduce

$$\begin{aligned} \mathbf {x}=(x_1,{\ldots },x_N). \end{aligned}$$
(1)

The ECG basis functions are defined as

$$\begin{aligned} \varPhi _\mathbf {m}^A(\mathbf {x}) = \left[ \prod _{k=1}^N x_k^{m_k} \right] \exp \left( -\frac{1}{2} {\mathbf {x}}^TA\mathbf {x}\right) , \end{aligned}$$
(2)

where the quadratic form in the exponent is defined as

$$\begin{aligned} {\mathbf {x}}^TA\mathbf {x}{:=} \sum _{i,j=1}^{N} A_{ij}{x}_i\cdot {x}_j . \end{aligned}$$
(3)

Recall that \(\mathbf {x}\in \mathbb {R}^N\) is a vector in the configuration space of N particles, each moving in one dimension, \(A \in \mathbb {R}^{N \times N}\) is a matrix of variational parameters, and \(\mathbf {m}\in \mathbb {Z}_{\ge 0}^N\) is a vector of polynomial exponents. To ensure that these functions are normalizable, we require that A be positive-definite. Without loss of generality we can take A to be symmetric.

We will consider a Hamiltonian in the lab frame defined as

$$\begin{aligned} \begin{aligned} H =~&T+U_{\text {One-Body}}+V_{\text {Two-Body}}\\ =&\sum _{i=1}^{N}{\frac{{p}_{i}^2}{2m_{i}}} + \sum _{i=1}^{N} U(x_i) + \sum _{i<j}^{N} V(x_i-x_j), \end{aligned} \end{aligned}$$

where \(p_{k}=-i\hbar {d / d_{x_k}}\) is the momentum operator for the ith particle.

3 Overlap Matrix Elements

In this section we compute the matrix elements of the one-dimensional ECG basis functions.

To evaluate these matrix elements, we introduce the generating function

$$\begin{aligned} G^A_\mathbf {t}(\mathbf {x}) = \exp (-\frac{1}{2}{\mathbf {x}}^TA\mathbf {x}+ {\mathbf {t}}^T\mathbf {x}) \end{aligned}$$
(4)

where \(\mathbf {t}\in \mathbb {R}^N\) is a vector of parameters. Observe that the basis functions \(\varPhi _\mathbf {m}^A(\mathbf {x})\) can be expressed as derivatives of \(G^A_\mathbf {t}(\mathbf {x})\):

(5)

Thus, our strategy will be to first evaluate the matrix elements \(\left\langle {G^A_\mathbf {t}}{\hat{\mathcal {O}}}{G^{A'}_{\mathbf {t}'}}\right\rangle \) of the generating functions, and then take derivatives with respect to the parameters \(t_k\) to obtain the matrix elements \(\left\langle {\varPhi _\mathbf {m}^A}{\hat{\mathcal {O}}}{\varPhi _{\mathbf {m}'}^{A'}}\right\rangle \) of the ECG basis functions.

We first calculate the overlap matrix element. The overlap of two generating functions is simply a multidimensional Gaussian integral:

(6)

Here we have defined \(B = A + A'\). (Note that the invertibility of B is guaranteed by A and \(A'\) being positive-definite.) This can be written in a more concise form by introducing the 2N-dimensional vector

(7)

and the \(2N \times 2N\) block matrix

(8)

(Henceforth we will use underlined symbols to denote 2N-dimensional vectors or matrices obtained in this fashion, by concatenating the N variables in the bra and the N variables in the ket.) By using these notations, we have

(9)

The overlap of the basis functions then can be calculated from

(10)

To evaluate these derivatives, we begin by Taylor-expanding the exponential function in equation (9). This allows us to write

(11)

Now, we expand out the product \(\prod _{i,j = 1}^{2N}\) and push all the summation operators to the front, obtaining

(12)

In the preceding equation there are a total of \((2N)^2\) summation operators, one for each variable \(k_{ij}\), \(i,j = 1, \dots , 2N\). Equivalently, if we let \(\mathbb {Z}_{\ge 0}^{2N \times 2N}\) denote the set of \(2N \times 2N\) matrices with nonnegative integer entries, we can write this as

(13)

Thus we have:

(14)

This can be evaluated by observing that

$$\begin{aligned} \prod _{i,j=1}^{2N} (\underline{t}_i \underline{t}_j)^{k_{ij}} = \prod _{p=1}^{2N} \underline{t}_p^{\sum _{q=1}^{2N}\left( k_{qp} + k_{pq}\right) } = \prod _{p=1}^{2N} \underline{t}_p^{u_p} \end{aligned}$$
(15)

where we have defined the abbreviation \(u_p = \sum _{q=1}^{2N}\left( k_{qp} + k_{pq}\right) \). It follows that

(16)

Now consider what happens when we set \(\underline{\mathbf {t}}= \mathbf {0}\). The expression (16) is nonzero only when \(u_p = \underline{m}_p\) for all \(p = 1, \dots , 2N\), since in this case \(\underline{t}_p^{u_p - m_p} = 0^0 = 1\). This means that the infinite sum (14) reduces to a finite sum, since the only terms that contribute are those in which the numbers \(\{k_{ij}\}_{i,j=1}^{2N}\) are arranged in such a way that

$$\begin{aligned} \sum _{q=1}^{2N} \left( k_{qp} + k_{pq}\right) = \underline{m}_p \qquad \text {for all } p = 1, \dots , 2N. \end{aligned}$$
(17)

This leads us naturally to the following combinatorial problem:

Definition

Given a vector \(\mathbf {m}\in \mathbb {Z}_{\ge 0}^n\) of n nonnegative integers, let \(\varOmega (\mathbf {m})\) be the set of \(n \times n\) matrices \(k \in \mathbb {Z}_{\ge 0}^{n \times n}\) having nonnegative integer entries such that \(\sum _{q=1}^{2N} \left( k_{qp} + k_{pq}\right) = m_p\) for all \(p = 1, \dots , 2N\).

We will return to this combinatorial problem later in “Appendix A”. For now, let us assume that we know how to compute \(\varOmega (\underline{\mathbf {m}})\), and use this to simplify the infinite sum (13). We obtain the formula

(18)

completing the derivation of the overlap matrix element.

4 Kinetic Energy Matrix Elements

The kinetic energy matrix elements can be evaluated using the generating function:

$$\begin{aligned} \langle G^A_t \vert T \vert G^{A'}_{t'}\rangle = {-\sum _{i=1}^N} {\hbar ^2\over 2m} \langle G^A_{{ t}}\vert \frac{\partial ^2}{\partial x_i^2}\vert G^{A'}_{{ t}'} \rangle . \end{aligned}$$
(19)

This can be calculated in two equivalent ways, either taking the second derivative on one side or taking first derivative on both sides.

The first, direct evaluation, gives:

$$\begin{aligned} \frac{\partial ^2 G_t^A}{\partial x_i ^2} = (t_i^2 + (Ax)_i^2 - 2t_i(Ax)_i - A_{ii})G_t^A, \end{aligned}$$
(20)

and

$$\begin{aligned} \langle G_t^A \vert T \vert G_{t'}^{A'} \rangle = -\frac{\hbar ^2}{2m} \langle G_t^A \vert t'^T t' + x^T A'^2 x - 2 t'^T A' x - \hbox {Tr}(A')) \vert G_{t'}^{A'} \rangle \end{aligned}$$
(21)

This can be calculated using the integral given in “Appendix B”, and the final result is:

$$\begin{aligned} -\frac{\hbar ^2}{2m} \langle G_t^A \vert G_{t'}^{A'} \rangle (\mathbf t '^T\mathbf t ' - \hbox {Tr}(A') - 2 \mathbf t '^T A' B^{-1} (\mathbf t + \mathbf t ') + \hbox {Tr}(A'^2 B^{-1}) + (\mathbf t +\mathbf t ')^T B^{-1} A'^2 B^{-1}(\mathbf t + \mathbf t ')). \end{aligned}$$
(22)

Using the second approach, by integration by parts (neglecting the boundary term as \(G \rightarrow 0\) as \(\mathbf x \rightarrow \infty \)), we have

(23)

Using

(24)

we have

$$\begin{aligned} \langle G^A_t \vert T \vert G^{A'}_{t'}\rangle= & {} \frac{\hbar ^2}{2m} \langle {G_t^A} \vert (\mathbf t - A \mathbf x ) \cdot (\mathbf t ' - A' \mathbf x ) \vert G_{t'}^{A'} \rangle \nonumber \\= & {} \frac{\hbar ^2}{2m} \langle {G_t^A} \vert \mathbf t \cdot \mathbf t ' + \mathbf x ^T A A' \mathbf x - (\mathbf t ^T A ' + \mathbf t '^T A)x \vert G^{A'}_{t'}\rangle . \end{aligned}$$
(25)

For the the quadratic term we can use the integral presented in “Appendix B”, for the linear terms we note

(26)

Then, similarly to above, Eq. (25) evaluates to:

$$\begin{aligned}&\frac{\hbar ^2}{2m} \langle G_t^A \vert G_{t'}^{A'} \rangle [\mathbf t \cdot \mathbf t ' \nonumber \\&\quad + \hbox {Tr}(AA'B^{-1}) + (\mathbf t +\mathbf t ')^T B^{-1} A A' B^{-1} (\mathbf t + \mathbf t ') \nonumber \\&\quad - (\mathbf{t}^T A' + \mathbf{t}'^T A) B^{-1} (\mathbf{t} + \mathbf{t'})]. \end{aligned}$$
(27)

Both Eqs. (27) and (22) are valid derivations for the kinetic energy for the generator functions. We have included both because they can be useful in calculations, for example for checking computer codes.

Now, to find the matrix elements of the basis, we apply derivatives to the matrix elements of the generating function:

$$\begin{aligned} \langle \varPhi _{m}^A\vert T \vert \varPhi _{m'}^{A'} \rangle = \left. \prod _{k=1}^{2N} {\partial ^{{\underline{m}}_k}\over \partial {\underline{t}}_k^{{\underline{m}}_k}} \langle G^A_{{ t}}\vert T \vert G^{A'}_{{ t}'} \rangle \right| _{{ t}=0,{ t}'=0}, \end{aligned}$$
(28)

We will use the expression in (27) to find the kinetic matrix elements because it gives a manifestly symmetric result. Expanding Eq. (27) in terms of sums and derivatives:

$$\begin{aligned}&\frac{\hbar ^2}{2m} \langle G_t^A \vert G_{t'}^{A'} \rangle \left( \sum _{i=1}^N (AA'B^{-1})_{ii} + \sum _{i=1}^N t_it'_i -\sum _{i,j=1}^{2N} C_{ij}\underline{t}_i\underline{t}_j + \sum _{i,j=1}^{2N} D_{ij}\underline{t}_i\underline{t}_j\right) \nonumber \\&\quad =\frac{\hbar ^2}{2m}\sqrt{\frac{(2\pi )^N}{\det B}}\Bigg (\sum _{i=1}^N (AA'B^{-1})_{ii} +\sum _{j=1}^{N} {\partial \over \partial {\underline{B}}_{j,j+N}} \nonumber \\&\qquad - \sum _{i,j=1}^{2N} C_{ij} {\partial \over \partial {\underline{B}}_{ij}} + \sum _{i,j=1}^{2N} D_{ij} {\partial \over \partial {\underline{B}}_{ij}}\Bigg )\mathrm{exp}\left\{ {1\over 2} \sum _{i,j=1}^{2N} \underline{B}_{ij} \underline{t}_i \underline{t}_j \right\} \end{aligned}$$
(29)

Where

$$\begin{aligned} C= \left( \begin{array}{cc} A'B^{-1} &{} A'B^{-1} \\ AB^{-1} &{} AB^{-1} \\ \end{array} \right) ,\quad D = \left( \begin{array}{cc} B^{-1}AA'B^{-1} &{} B^{-1}AA'B^{-1} \\ B^{-1}AA'B^{-1} &{} B^{-1}AA'B^{-1} \\ \end{array} \right) \end{aligned}$$
(30)

Pulling the sum out of the exponent and Taylor expanding, (29) takes on the form:

$$\begin{aligned}&={\hbar ^2\over 2m} \sqrt{\frac{(2\pi )^N}{\det B}} \Bigg (\sum _{i=1}^N (AA'B^{-1})_{ii} +\sum _{j=1}^{N} {\partial \over \partial {\underline{B}}_{j,j+N}} \nonumber \\&\quad - \sum _{i,j=1}^{2N} C_{ij} {\partial \over \partial {\underline{B}}_{ij}} + \sum _{i,j=1}^{2N} D_{ij} {\partial \over \partial {\underline{B}}_{ij}}\Bigg ) \prod _{i,j = 1}^{2N} \sum _{k_{ij} = 0}^{\infty } \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij} \underline{t}_i \underline{t}_j\right) ^{k_{ij}}. \end{aligned}$$
(31)

Expanding the product and pushing all the summations to the front,

$$\begin{aligned}&= {\hbar ^2\over 2m} \sqrt{\frac{(2\pi )^N}{\det B}} \Bigg (\sum _{i=1}^N (AA'B^{-1})_{ii} +\sum _{j=1}^{N} {\partial \over \partial {\underline{B}}_{j,j+N}} \nonumber \\&\quad - \sum _{i,j=1}^{2N} C_{ij} {\partial \over \partial {\underline{B}}_{ij}} + \sum _{i,j=1}^{2N} D_{ij} {\partial \over \partial {\underline{B}}_{ij}}\Bigg ) \sum _{k_{11} = 0}^{\infty } \sum _{k_{12} = 0}^{\infty } \cdots \sum _{k_{2N,2N} = 0}^{\infty } \prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij} \underline{t}_i \underline{t}_j\right) ^{k_{ij}}. \end{aligned}$$
(32)

This can be written, using the shorthand notation from the overlap evaluation as

$$\begin{aligned}&= {\hbar ^2\over 2m} \sqrt{\frac{(2\pi )^N}{\det B}} \Bigg (\sum _{i=1}^N (AA'B^{-1})_{ii} +\sum _{j=1}^{N} {\partial \over \partial {\underline{B}}_{j,j+N}} \nonumber \\&\quad - \sum _{i,j=1}^{2N} C_{ij} {\partial \over \partial {\underline{B}}_{ij}} + \sum _{i,j=1}^{2N} D_{ij} {\partial \over \partial {\underline{B}}_{ij}}\Bigg ) \sum _{k \in \mathbb {Z}_{\ge 0}^{2N \times 2N}} \prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij} \underline{t}_i \underline{t}_j\right) ^{k_{ij}}. \end{aligned}$$
(33)

To find the matrix elements of the basis, we apply derivatives to matrix elements of the generating function

(34)

which, similar to the overlap case, becomes:

$$\begin{aligned}&={\hbar ^2\over 2m} \sqrt{\frac{(2\pi )^N}{\det B}} \Bigg (\sum _{i=1}^N (AA'B^{-1})_{ii} +\sum _{j=1}^{N} {\partial \over \partial {\underline{B}}_{j,j+N}} \nonumber \\&\quad - \sum _{i,j=1}^{2N} C_{ij} {\partial \over \partial {\underline{B}}_{ij}} + \sum _{i,j=1}^{2N} D_{ij} {\partial \over \partial {\underline{B}}_{ij}}\Bigg ) \left( \prod _{p=1}^{2N} \underline{m}_p!\right) \sum _{k \in \varOmega (\underline{\mathbf {m}})} \prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij}\right) ^{k_{ij}}. \end{aligned}$$
(35)

After distributing the terms, we have

$$\begin{aligned}&={\hbar ^2\over 2m} \sqrt{\frac{(2\pi )^N}{\det B}} \left( \sum _{i=1}^N \hbox {Tr}(AA'B^{-1})\left[ \left( \prod _{p=1}^{2N} \underline{m}_p!\right) \sum _{k \in \varOmega (\underline{\mathbf {m}})} \prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij}\right) ^{k_{ij}}\right] \right. \nonumber \\&\qquad +\sum _{j=1}^{N} {\partial \over \partial {\underline{B}}_{j,j+N}}\left[ \left( \prod _{p=1}^{2N} \underline{m}_p!\right) \sum _{k \in \varOmega (\underline{\mathbf {m}})} \prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij}\right) ^{k_{ij}}\right] \nonumber \\&\qquad - \sum _{i,j=1}^{2N} C_{ij} {\partial \over \partial {\underline{B}}_{ij}}\left[ \left( \prod _{p=1}^{2N} \underline{m}_p!\right) \sum _{k \in \varOmega (\underline{\mathbf {m}})} \prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij}\right) ^{k_{ij}}\right] \nonumber \\&\qquad \left. + \sum _{i,j=1}^{2N} D_{ij} {\partial \over \partial {\underline{B}}_{ij}}\left[ \left( \prod _{p=1}^{2N} \underline{m}_p!\right) \sum _{k \in \varOmega (\underline{\mathbf {m}})} \prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij}\right) ^{k_{ij}}\right] \right) \end{aligned}$$
(36)

Finally, differentiating, we arrive at our final result:

$$\begin{aligned}&\langle \varPhi _{m}^A\vert T \vert \varPhi _{m'}^{A'} \rangle = {\hbar ^2\over 2m} \sqrt{\frac{(2\pi )^N}{\det B}} \left( \hbox {Tr}(AA'B^{-1})\left( \prod _{p=1}^{2N} \underline{m}_p!\right) \sum _{k \in \varOmega (\underline{\mathbf {m}})} \prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij}\right) ^{k_{ij}} \right. \nonumber \\&\quad +\left( \prod _{p=1}^{2N} \underline{m}_p!\right) \sum _{k \in \varOmega (\underline{\mathbf {m}})} \frac{\prod _{i,j=1}^{2N} \frac{1}{k_{ij}!} \left( \frac{1}{2} \underline{B}_{ij}\right) ^{k_{ij}}}{\prod _{j=1}^N \frac{1}{k_{j,j+N}!} \left( \frac{1}{2}\underline{B}_{j,j+N}^{k_{j,j+N}}\right) }(\prod _{j=1}^N \frac{1}{(k_{j,j+N}-1)!}(\frac{1}{2})^{k_{j,j+N}}(\underline{B}_{j,j+N})^{k_{j,j+N}-1}) \nonumber \\&\quad \left. +\left( \sum _{i,j=1}^{2N} D_{ij} - \sum _{i,j=1}^{2N} C_{ij} \right) \left( \prod _{p=1}^{2N} \underline{m}_p!\right) \sum _{k \in \varOmega (\underline{\mathbf {m}})} \prod _{i,j=1}^{2N} \frac{1}{(k_{ij}-1)!} \left( \frac{1}{2}\right) ^{k_{ij}} (\underline{B}_{ij})^{k_{ij}-1} \right) \end{aligned}$$
(37)

5 Potential Energy Matrix Elements

To calculate the matrix elements of the one-body U and two-body potential V we will use the following expressions

$$\begin{aligned} \sum _{k=1}^N U(x_{k})=\sum _{k=1}^N \int U({ x}) \delta (x_k-{ x})d{ x}= \sum _{k=1}^N \int U({ x}) \delta (w^{(k)}x-{ x}) d { x} \end{aligned}$$
(38)

where

$$\begin{aligned} w^{(k)}x=\sum _{i=1}^N w^{(k)}_i x_i \ \ \ \ \ \ \ \ \ \ \ w^{(k)}_i =\delta _{ki} \end{aligned}$$
(39)

and

$$\begin{aligned} \sum _{k<l}^N V(x_{kl})=\sum _{k<l}^N \int V({ x}) \delta (x_k-x_l-{ x})d{ x}= \sum _{k<l}^N \int V({ x}) \delta (w^{(kl)}x-{ x}) d { x} \end{aligned}$$
(40)

where

$$\begin{aligned} w^{(kl)}x=\sum _{i=1}^N w^{(kl)}_i x_i \ \ \ \ \ \ \ \ \ \ \ w^{(kl)}_i =\delta _{ki}-\delta _{li}. \end{aligned}$$
(41)

These equations show that by calculating the matrix elements of

$$\begin{aligned} \delta (w x-{ x}) \end{aligned}$$
(42)

one can evaluate both the one-body and two-body integrals. The matrix element of \(\delta (w x-{ x})\) :

$$\begin{aligned} \langle G^A_{{ t}}\vert \delta (w x-{ x}) \vert G^{A'}_{{ t}'} \rangle = \sqrt{c \over 2\pi } \mathrm{exp}\left\{ -{c \over 2}(x-w B^{-1} ({ t}+{ t'}))^2 \right\} \langle G^A_{{ t}}\vert G^{A'}_{{ t}'} \rangle \end{aligned}$$
(43)

where

$$\begin{aligned} c={1 \over {w}^T B^{-1} w}. \end{aligned}$$
(44)

This matrix element can be written as

$$\begin{aligned}&\langle G^A_{{ t}}\vert \delta (w x-{ x}) \vert G^{A'}_{{ t}'} \rangle = \sqrt{c \over 2\pi } \mathrm{exp} \left\{ -{c\over 2} x^2 \right\} \sqrt{\frac{(2\pi )^N}{\det B}} \times \nonumber \\&\quad \mathrm{exp} \left\{ {1\over 2} \sum _{i,j=1}^{2N} {{\underline{B}}'}_{ij} {\underline{t}}_i {\underline{t}}_j+ \sum _{j=1}^{2N}x c e_j {\underline{t}}_j \right\} , \end{aligned}$$
(45)

where

(46)

and

$$\begin{aligned} {{\underline{B}}'}_{ij}={\underline{B}}_{ij}-c e_i e_j. \end{aligned}$$
(47)

The potential matrix element can be calculated from

$$\begin{aligned} \langle \varPhi _{m}^A\vert \delta (w x-{ x}) \vert \varPhi _{m'}^{A'} \rangle = \left. \prod _{k=1}^{2N} {\partial ^{{\underline{m}}_k}\over \partial {\underline{t}}_k^{{\underline{m}}_k}} \langle G^A_{{ t}}\vert \delta (w x-{ x}) \vert G^{A'}_{{ t}'} \rangle \right| _{{ t}=0,{ t}'=0}, \end{aligned}$$
(48)

which using the general Leibniz rule, can be written as

$$\begin{aligned}&\langle \varPhi _{m}^A\vert \delta (w x-{ x}) \vert \varPhi _{m'}^{A'} \rangle = \nonumber \\&\quad = \sqrt{c \over 2\pi } \mathrm{exp} \left\{ -{c\over 2} x^2 \right\} \sqrt{\frac{(2\pi )^N}{\det B}} \prod _{k=1}^{2N} \sum _{n_k=0}^{m_k} \left( {m_k \atop n_k}\right) \nonumber \\&\qquad \times {\partial ^{{\underline{n}}_k} \over \partial {\underline{t}}_k^{{\underline{n}}_k}} \mathrm{exp} \left\{ {1\over 2} \sum _{i,j=1}^{2N} {{\underline{B}}'}_{ij} {\underline{t}}_i {\underline{t}}_j \right\} \nonumber \\&\qquad {\partial ^{{\underline{m}}_k-{\underline{n}}_k}\over \partial {\underline{t}}_k^{{\underline{m}}_k-{\underline{n}}_k}} \mathrm{exp} \left\{ \sum _{j=1}^{2N}x c e_j {\underline{t}}_j \right\} . \end{aligned}$$
(49)

The derivatives of the first exponent are already calculated in Eq. (18). The derivatives of the second exponent can be calculated in a similar way, which eventually produces the following expression

(50)

where \(\mathbf {m},\mathbf n \) are vectors \(\in \mathbb {Z}_{\ge 0}^n\) of n nonnegative integers. Now let \(\varDelta (\underline{\mathbf {m}}-\underline{\mathbf{n }})\) be the set of n-dimensional vectors k \(\in \mathbb {Z}_{\ge 0}^{n}\) having nonnegative integer entries such that \(k_p= m_p-n_p\) for all \(p = 1, \dots , 2N\), and \(\varOmega (\underline{\mathbf {m}})\) is defined as it is in the previous section. This completes the derivation of the potential matrix elements.

To calculate the potential matrix elements one has to integrate

$$\begin{aligned} \int V(x) x^{2n} \mathrm{exp}\left\{ {-\frac{c}{2} x^2}\right\} dx. \end{aligned}$$
(51)

This can easily be calculated analytically or numerically for many potentials of interest.

6 Numerical Example

To show the usefulness of the matrix elements calculated in this work, we present a simple illustrative example: the calculation of the energy of few electron atoms in 1D. As the Coulomb potential is singular in 1D, we use a soft Coulomb potential

$$\begin{aligned} U(x_i)=-{Z\over (a^2+x_i^2)^{1/2}},\ \ \ \ \ \ V(x_i-x_j)={1\over (a^1+(x_i-x_j)^2)^{1/2}} \end{aligned}$$
(52)

for the one and two-body potentials, respectively (\(a=1\) a.u.).

The wave function of the system is approximated as linear combination of ECGs,

$$\begin{aligned} \varPsi =\sum _i c_i \mathcal{A}\lbrace \varPhi _\mathbf {m}^{A_i}(\mathbf {x}) \rbrace , \end{aligned}$$
(53)

where \(\mathcal{A}\) is an antisymmetrizer. The nonlinear parameters, \(A_i\), are optimized with the stochastic variational method [41]. The energy of the 1D atoms are listed in Table 1. These can serve as reference numbers for test calculations in 1D.

We have also calculated the electron density

$$\begin{aligned} d(x)={1\over N}\sum _{i=1}^N \langle \varPsi \vert \delta (x_i-x)\vert \varPsi \rangle , \end{aligned}$$
(54)

and the electron correlation function

$$\begin{aligned} c(x)={2\over N(N-1)}\sum _{i<j}^N \langle \varPsi \vert \delta (x_i-x_j-x)\vert \varPsi \rangle . \end{aligned}$$
(55)

These functions are symmetric with respect to the origin and shown in Figs. 1 and 2.

Table 1 Ground state energies (in a.u.) of 1D atoms. The spins of the electrons arranged in such a way that (N−1)/2 electrons are spin up, the rest is spin down

The densities are very similar for different atoms, except in the \(N=3\) case, where it seems that two electrons remains close to the center and the third electron is pushed outside. The \(N>3\) correlation functions each have their maxima nearly the same distance from the center, which can be easily explained with electron repulsion. The correlation function of the \(N=2\) and \(N=3\) atoms have their maxima at the origin (two electrons with spin up and spin down are distinguishable and can stay close to the center). The \(N=3\) correlation function has a second maximum, around the same position as the \(N=3\) density, showing that the third electron is pushed away from the center.

Fig. 1
figure 1

Electron density of 1D atoms (in a.u.)

Fig. 2
figure 2

Electron correlation of 1D atoms (in a.u.)

7 Summary

We have presented the matrix elements of general one dimensional ECGs. These analytical matrix elements can be used in various calculations, for example in 1D cold atom systems. Using these matrix elements, one can also construct matrix elements of 2D or 3D systems by simple tensor products. These matrix elements can be especially useful in calculations where the potential is not spherical, for example in systems in magnetic or electric field. The matrix elements can also be used for spherical system with appropriate angular momentum couplings.