1 Program summary

Program title: NuHamil Licensing provisions: GPLv3 Programming language: Modern Fortran Repository and DOI: https://github.com/Takayuki-Miyagi/NuHamil-public DOI:https://doi.org/10.5281/zenodo.7529481

Description of problem: Nucleon-nucleon (NN) and three-nucleon (3N) matrix elements are essential inputs in nuclear ab initio calculations. However, developing a numerical code to generate the matrix elements is a demanding task. Preparing the input matrix elements is one of the main barriers to begin studies.

Method of solution: The NuHamil code has the capa- bility to generate both NN and 3N matrix elements expressed in a single-particle harmonic-oscillator (HO) basis, which can be used as inputs for most of the ab initio calculation methods. The jobs can be managed by a simple Python script.

Additional comments: For other open-source software, one can use the computational environment for nuclear structure (CENS) [1] and recently published NuclearToolkit code [2].

2 Introduction

The dynamics of the atomic nucleus are governed by the strong interaction, whose fundamental theory is described by quantum chromodynamics (QCD). Since the quarks are tightly confined in a nucleon, it is well established that nuclear Hamiltonians associated with the interactions between nucleons are a good starting point to understand nuclear structure and reactions. The study of nuclear interaction models has a long story starting from the pion-exchange theory [3]. The quantitative understanding of nuclear interactions is an open problem. In the past decade, interactions based on chiral effective-field theory (EFT) [4, 5] have become the standard starting point of ab initio many-body calculations. Chiral EFT-based interactions have several advantages over other interactions such as AV18 [6] and CD-Bonn potentials [7]. For example, a systematic expansion is possible by ordering the diagrams according to the power counting, suggesting the possibility of an uncertainty quantification due to the truncation in the expansion [8,9,10,11]. Further, many-nucleon interactions naturally appear at higher order, explaining the hierarchy of many-body terms. In nuclear physics, it is well known that 3N interactions play an important role (see for example Ref. [12] as a recent review). With the progress in nuclear interactions and methodological developments in many-body problems, nuclear ab initio studies are well motivated. Nowadays, the applicability extends over the nuclear chart [13] and recently reached to the heaviest known doubly-magic system \(^{208}\)Pb [14], and further applications are expected.

To perform ab initio calculations, the matrix elements of nuclear Hamiltonians (and relevant operators) are essential. However, developing a numerically efficient code for the matrix-element generation requires expert knowledge and can be a barrier for those entering the field. The goal of the NuHamil code is to provide a simple way to generate NN and 3N matrix elements expressed in a spherical HO basis, applicable for basis-expansion methods, such as the no-core shell model (NCSM) [15], coupled-cluster method [16], self-consistent Green’s function method [17], in-medium similarity renormalization group [18] approach, and man-body perturbation theory [19]. The code currently supports the input formats of the open-source BIGSTICK [20] and imsrg++ [21] codes for the NCSM and IMSRG calculations, respectively.

This paper is organized as follows. In Sect. 2, we clarify the input NN and 3N matrix elements for the many-body calculations and briefly show how to compute them with the single-particle product state in the HO basis. Also, we discuss the free-space similarity renormalization group (SRG) prescription to soften the nuclear interactions in Sect. 3. We show some benchmark many-body calculation results with NCSM and IMSRG calculations in Sect. 4. The usage of the code and the conclusion are given in Sect. 5 and Sect. 6, respectively.

3 Matrix elements of Hamiltonian

Here, we review how the NN and 3N matrix elements enter in the many-body problem. Our numerical goal is to solve the non-relativistic many-body Schrödinger equation \(H \vert \Psi _{n} \rangle = E_{n} \vert \Psi _{n} \rangle \), with the intrinsic Hamiltonian with up to 3N terms

$$\begin{aligned} H = \frac{A-1}{A} \sum _{i} \frac{{\varvec{p}}^{2}_{i}}{2m} + \sum _{i<j} (V^{\textrm{NN}}_{ij} - T^{\textrm{NN}}_{ij}) + \sum _{i<j<k} V^{3N}_{ijk}.\nonumber \\ \end{aligned}$$
(1)

Here, \({\varvec{p}}_{i}\) is the momentum vector of ith nucleon, and m is the nucleon mass. The factor \((A-1)/A\) in the first term and \(T^{\textrm{NN}}_{ij}\) is from the subtraction of the center-of-mass (cm) kinetic term. A is the nucleon number of the system. The terms \(V^{\textrm{NN}}_{ij}\) and \(V^{{\textrm{3N}}}_{ijk}\) are the NN and 3N interactions, respectively.

3.1 Second-quantized representation

To proceed with many-body calculations with basis-expansion methods, we begin with the expression by the second quantization. To this end, we first define creation and annihilation operators for a nucleon in an HO orbit \(\tilde{p}\): \(c^{\dag }_{\tilde{p}}\) and \(c_{\tilde{p}}\). The subscript \(\tilde{p}\) is a collective index specifying the HO orbit and defined as \(\tilde{p} = \{n_{p}, l_{p}, j_{p}, m_{p}, t_{z,p}\}\). Here, \(n_{p}\), \(l_{p}\), \(j_{p}\), \(m_{p}\), and \(t_{z,p}\) are the nodal quantum number, orbital angular momentum, total angular momentum, z-component of \(j_{p}\), and the z-component of the isospin distinguishing protons and neutrons, respectively. Note that proton (neutron) states are labeled as \(t_{z}=-1/2\) (1/2). In nuclear physics, the use of an HO basis is particularly useful since the coordinate transformation coefficient is well known [22,23,24], as will be shown in later. The creation and annihilation operators satisfy the anticommutation relations

$$\begin{aligned} \{c_{\tilde{p}}, c_{\tilde{q}}\} = 0, \, \{c^{\dag }_{\tilde{p}}, c^{\dag }_{\tilde{q}} \} = 0, \, \{c_{\tilde{p}}, c^{\dag }_{\tilde{q}} \} = \delta _{\tilde{p}\tilde{q}}. \end{aligned}$$
(2)

The object \(\delta _{\tilde{p}\tilde{q}}\) is defined by products of Kronecker’s delta and is written as

$$\begin{aligned} \delta _{\tilde{p}\tilde{q}} = \delta _{n_{p}n_{q}} \delta _{l_{p}l_{q}} \delta _{j_{p}j_{q}} \delta _{m_{p}m_{q}} \delta _{t_{z,p}t_{z,q}}. \end{aligned}$$
(3)

Applying the creation operators to the nucleon vacuum state \(|0\rangle \), one can define antisymmetrized states. For example, one-, two-, and three-nucleon states can be written as

$$\begin{aligned} |\tilde{p} \rangle&= c^{\dag }_{\tilde{p}} | 0 \rangle , \end{aligned}$$
(4)
$$\begin{aligned} |\tilde{p}\tilde{q} \rangle&= c^{\dag }_{\tilde{p}} c^{\dag }_{\tilde{q}} | 0 \rangle , \end{aligned}$$
(5)
$$\begin{aligned} |\tilde{p}\tilde{q}\tilde{r} \rangle&= c^{\dag }_{\tilde{p}} c^{\dag }_{\tilde{q}}c^{\dag }_{\tilde{r}} | 0 \rangle . \end{aligned}$$
(6)

Using the creation and annihilation operators, an arbitrary n-body operator \(O^{[n]}\) can be expressed as

$$\begin{aligned} O^{[n]} = \left( \frac{1}{n!}\right) ^{2} \sum _{\tilde{p}'_{1} \cdots \tilde{p}'_{n}} \sum _{\tilde{p}_{1}\cdots \tilde{p}_{n}} O_{\tilde{p}'_{1}\cdots \tilde{p}'_{n} \tilde{p}_{1}\cdots \tilde{p}_{n}} c^{\dag }_{\tilde{p}'_{1}} \cdots c^{\dag }_{\tilde{p}'_{n}} c_{\tilde{p}_{n}} \cdots c_{\tilde{p}_{1}}.\nonumber \\ \end{aligned}$$
(7)

The object \(O_{\tilde{p}'_{1}\cdots \tilde{p}'_{n} \tilde{p}_{1}\cdots \tilde{p}_{n}}\) is a shorthand notation for the operator matrix element \(\langle \tilde{p}'_{1}\cdots \tilde{p}'_{n} | O^{[n]} | \tilde{p}_{1}\cdots \tilde{p}_{n} \rangle \). In the same way, the Hamiltonian in Eq. (1) can be quantized as

$$\begin{aligned} H= & {} \sum _{\tilde{p}'\tilde{p}} T_{\tilde{p}'\tilde{p}}c^{\dag }_{\tilde{p}'}c_{\tilde{p}}\nonumber \\{} & {} +\left( \frac{1}{2!}\right) ^{2}\sum _{\tilde{p}'\tilde{q}'\tilde{p}\tilde{q}} (V^{\textrm{NN}}_{\tilde{p}'\tilde{q}'\tilde{p}\tilde{q}} - T^{\textrm{NN}}_{\tilde{p}'\tilde{q}'\tilde{p}\tilde{q}}) c^{\dag }_{\tilde{p}'}c^{\dag }_{\tilde{q}'}c_{\tilde{q}}c_{\tilde{p}}\nonumber \\{} & {} +\left( \frac{1}{3!}\right) ^{2}\sum _{\tilde{p}'\tilde{q}'\tilde{r}'\tilde{p} \tilde{q}\tilde{r}}V^{{\textrm{3N}}}_{\tilde{p}'\tilde{q}'\tilde{r}'\tilde{p}\tilde{q}\tilde{r}} c^{\dag }_{\tilde{p}'}c^{\dag }_{\tilde{q}'}c^{\dag }_{\tilde{r}'} c_{\tilde{r}}c_{\tilde{q}}c_{\tilde{p}}, \end{aligned}$$
(8)

using the matrix elements of one-body kinetic term \(T_{\tilde{p}'\tilde{p}}\), two-body kinetic term \(T^{\textrm{NN}}_{\tilde{p}'\tilde{q}'\tilde{p}\tilde{q}}\), NN interaction \(V^{\textrm{NN}}_{\tilde{p}'\tilde{q}'\tilde{p}\tilde{q}}\), and 3N interaction \(V^{{\textrm{3N}}}_{\tilde{p}'\tilde{q}'\tilde{r}'\tilde{p}\tilde{q}\tilde{r}}\).

3.2 J-coupled scheme

The number of matrix elements defined in Eq. (8) is greatly reduced by exploiting the rotational symmetry of the Hamiltonian. To introduce a smaller set of matrix elements, we define the J-coupled two- and three-body states using the Clebsch–Gordan coefficient \(\mathcal {C}^{j_{1}j_{2}J}_{m_{1}m_{2}m_{1}+m_{2}}\):

$$\begin{aligned} |pq: JM \rangle&= \sqrt{\frac{1}{1+\delta _{pq}}}\sum _{m_{p}m_{q}} \mathcal {C}^{j_{p}j_{q}J}_{m_{p}m_{q}M} |\tilde{p}\tilde{q} \rangle , \end{aligned}$$
(9)
$$\begin{aligned} |pqr: J_{pq}JM\rangle&= \sum _{m_{p}m_{q}m_{r}} \mathcal {C}^{j_{p}j_{q}J_{pq}}_{m_{p}m_{q}m_{p}+m_{q}} \mathcal {C}^{J_{pq}j_{r}J}_{m_{p}+m_{q}m_{r}M} | \tilde{p}\tilde{q}\tilde{r} \rangle . \end{aligned}$$
(10)

Here, p, q, and r are the quantum number set without m, i.e. \(p = \{n_{p}, l_{p}, j_{p}, t_{z,p}\}\), and an additional Kronecker’s delta product is introduced as

$$\begin{aligned} \delta _{pq} = \delta _{n_{p}n_{q}} \delta _{l_{p}l_{q}} \delta _{j_{p}j_{q}} \delta _{t_{z,p}t_{z,q}}. \end{aligned}$$
(11)

Note that the factor \(\sqrt{1/(1+\delta _{pq})}\) in the two-body state is for the normalization so that we have \(\langle pq: J'M' | pq:JM \rangle = \delta _{J'J} \delta _{M'M}\). On the other hand, such normalization factor is not usually included in the three-body state. For the three-body state, one can define another state by a different angular momentum coupling order, which should be related with the Wigner’s 6j-symbol. In this paper, the first and second indices are always coupled first, and then the third index is coupled. In practical applications, we need permutations of the indices of the states to further reduce the storage requirement. For the two-body state, it is given by

$$\begin{aligned} |qp:JM \rangle = -(-1)^{j_{p}+j_{q}-J} |pq:JM\rangle . \end{aligned}$$
(12)

Likewise, permutations of the indices in the three-body state are given by

$$\begin{aligned} |qrp:J_{qr}JM\rangle&= -\sum _{J_{pq}} (-1)^{j_{q}+j_{r}+J_{qr}} \sqrt{[J_{pq}][J_{qr}]} \nonumber \\&\quad \times \left\{ \begin{array}{ccc} j_{p} &{} j_{q} &{} J_{pq} \\ j_{r} &{} J &{} J_{qr} \end{array} \right\} |pqr:J_{pq}JM\rangle , \end{aligned}$$
(13)
$$\begin{aligned} |rpq:J_{pr}JM\rangle&= -\sum _{J_{pq}} (-1)^{j_{p}+j_{q}+J_{pq}} \sqrt{[J_{pq}][J_{pr}]}\nonumber \\&\quad \times \left\{ \begin{array}{ccc} j_{p} &{} j_{q} &{} J_{pq} \\ J &{} j_{r} &{} J_{pr} \end{array} \right\} |pqr:J_{pq}JM\rangle , \end{aligned}$$
(14)
$$\begin{aligned} |qpr:J_{pq}JM\rangle&= -(-1)^{j_{p}+j_{q}-J_{pq}} |pqr:J_{pq}JM\rangle , \end{aligned}$$
(15)
$$\begin{aligned} |rqp:J_{qr}JM\rangle&=\sum _{J_{pq}}\sqrt{[J_{pq}][J_{qr}]} \nonumber \\&\quad \times \left\{ \begin{array}{ccc} j_{p} &{} j_{q} &{} J_{pq} \\ j_{r} &{} J &{} J_{qr} \end{array} \right\} |pqr:J_{pq}JM\rangle , \end{aligned}$$
(16)
$$\begin{aligned} |prq:J_{pr}JM\rangle&= -\sum _{J_{pq}} (-1)^{j_{q}+j_{r}+J_{pr}+J_{pq}} \sqrt{[J_{pq}][J_{pr}]} \nonumber \\&\quad \times \left\{ \begin{array}{ccc} j_{p} &{} j_{q} &{} J_{pq} \\ J &{} j_{r} &{} J_{pr} \end{array} \right\} |pqr:J_{pq}JM\rangle . \end{aligned}$$
(17)

Here, Wigner’s 6j-symbol with the standard notation [25] and \([x]=2x+1\) are introduced. With the J-coupled states, the two- and three-body matrix elements can be introduced as \(\langle p'q':J'M' | O^{[2]}| pq:JM \rangle \) and \(\langle p'q'r':J_{p'q'}J'M' | O^{[3]}| pqr:J_{pq}JM \rangle \), respectively. Because of the rotational invariance of the Hamiltonian, the Hamiltonian matrix is M-independent and diagonal with respect to J and M. Therefore, we introduce a shorthand notation for the matrix elements.

$$\begin{aligned} T_{p'p}&= \langle p | T | q \rangle , \end{aligned}$$
(18)
$$\begin{aligned} T^{\textrm{NN},J}_{p'q'pq}&= \langle p'q':JM | T^{\textrm{NN}} | pq:JM \rangle , \end{aligned}$$
(19)
$$\begin{aligned} V^{\textrm{NN},J}_{p'q'pq}&= \langle p'q':J'M' | V^{\textrm{NN}}| pq:JM \rangle , \end{aligned}$$
(20)
$$\begin{aligned} V^{{\textrm{3N}},J_{p'q'}J_{pq}J}_{p'q'r'pqr}&= \langle p'q'r':J_{p'q'}J'M' | V^{\textrm{3N}} | pqr:J_{pq}JM \rangle . \end{aligned}$$
(21)

Since the uncoupled matrix elements with tilde indices can be computed from the J-coupled matrix elements, only calculating the J-coupled matrix elements is sufficient for many-body calculations. The relation between the uncoupled and J-coupled matrix elements are the following.

$$\begin{aligned} T_{\tilde{p}'\tilde{p}}&= T_{p'p} \delta _{m_{p'}m_{p}}, \end{aligned}$$
(22)
$$\begin{aligned} T^{\textrm{NN}}_{\tilde{p}'\tilde{q}'\tilde{p}\tilde{q}}&= \sum _{J} \mathcal {C}^{j_{p'}j_{q'}J}_{m_{p'}m_{q'}M} \mathcal {C}^{j_{p}j_{q}J}_{m_{p}m_{q}M} T^{\textrm{NN}, J}_{p'q'pq}, \end{aligned}$$
(23)
$$\begin{aligned} V^{\textrm{NN}}_{\tilde{p}'\tilde{q}'\tilde{p}\tilde{q}}&= \sum _{J} \mathcal {C}^{j_{p'}j_{q'}J}_{m_{p'}m_{q'}M} \mathcal {C}^{j_{p}j_{q}J}_{m_{p}m_{q}M} V^{\textrm{NN}, J}_{p'q'pq}, \end{aligned}$$
(24)
$$\begin{aligned} V^{{\textrm{3N}}}_{\tilde{p}'\tilde{q}'\tilde{r}'\tilde{p}\tilde{q}\tilde{r}}&= \sum _{JJ_{p'q'}J_{pq}} \mathcal {C}^{j_{p'}j_{q'}J_{p'q'}}_{m_{p'}m_{q'}M_{p'q'}} \mathcal {C}^{j_{p}j_{q}J_{pq}}_{m_{p}m_{q}M_{pq}} \nonumber \\&\quad \times \mathcal {C}^{J_{p'q'}j_{r'}J}_{M_{p'q'}m_{r'}M} \mathcal {C}^{J_{pq}j_{r}J}_{M_{pq}m_{r}M} V^{{\textrm{3N}}, J_{p'q'}J_{pq}J}_{p'q'r'pqr}. \end{aligned}$$
(25)

3.3 Matrix elements of kinetic terms

The one-body kinetic matrix element \(T_{p'p}\) is given by

$$\begin{aligned} T_{p'p}= & {} \frac{A-1}{A} \delta _{l_{p'}l_{p}}\delta _{j_{p'}j_{p}} \delta _{t_{z,p'}t_{z,p}} \frac{\hbar \omega }{2}\nonumber \\{} & {} \times \left[ \left( 2n_{p} + l_{p} + \frac{3}{2}\right) \delta _{n_{p'}n_{p}} \right. \nonumber \\{} & {} \left. + \sqrt{n_{p}\left( n_{p} + l_{p} + \frac{1}{2}\right) } \delta _{n_{p'}n_{p}-1} \right. \nonumber \\{} & {} \left. + \sqrt{\left( n_{p}+1\right) \left( n_{p} + l_{p} + \frac{3}{2}\right) } \delta _{n_{p'}n_{p}+1} \right] . \end{aligned}$$
(26)

Note that the one-body kinetic operator takes the tridiagonal form. Also, the two-body kinetic matrix element can be computed through the non-antisymmetrized J-coupled matrix element \(\bar{T}^{\textrm{NN}, J}_{p'q'pq}\)

$$\begin{aligned} {\bar{T}}^{\textrm{NN}, J}_{p'q'pq}= & {} (-1)^{j_{q'}+j_{p}+J} \frac{\hbar ^{2}}{Am} \nonumber \\{} & {} \times \left\{ \begin{array}{ccc} j_{p'} &{} j_{q'} &{} J \\ j_{q} &{} j_{p} &{} 1 \end{array} \right\} \langle p' \Vert \nabla \Vert p \rangle \langle q' \Vert \nabla \Vert q \rangle , \end{aligned}$$
(27)

with the reduced matrix element of the gradient operator, which is given by

$$\begin{aligned}{} & {} \langle p' \Vert \nabla \Vert p \rangle = (-1)^{l_{p}' + j_{p} + 1/2} \frac{1}{b} \sqrt{[j_{p'}][j_{p}]} \left\{ \begin{array}{ccc} j_{p'} &{} j_{p} &{} 1 \\ l_{p} &{} l_{p'} &{} 1/2 \end{array} \right\} \nonumber \\{} & {} \quad \times \left[ \sqrt{(l_{p}+1)(n_{p}+l_{p}+3/2)} \delta _{n_{p'}n_{p}}\delta _{l_{p'}l_{p}+1} \right. \nonumber \\{} & {} \left. \quad + \sqrt{(l_{p}+1)n_{p}} \delta _{n_{p'}n_{p}-1} \delta _{l_{p'}l_{p}+1} \right. \nonumber \\{} & {} \left. \quad + \sqrt{l_{p}(n_{p}+l_{p}+1/2)} \delta _{n_{p'}n_{p}} \delta _{l_{p'}l_{p}-1} \right. \nonumber \\{} & {} \left. \quad + \sqrt{l_{p}(n_{p}+1)} \delta _{n_{p'}n_{p}+1} \delta _{l_{p'}l_{p}-1} \right] . \end{aligned}$$
(28)

Here, the HO length parameter \(b^{2} \equiv \hbar / m\omega \) is introduced with the HO frequency \(\omega \). The antisymmetrized matrix element is obtained as

$$\begin{aligned} T^{\textrm{NN}, J}_{p'q'pq} = \sqrt{\frac{1}{(1+\delta _{p'q'})(1+\delta _{pq})}} \left[ \bar{T}^{\textrm{NN}, J}_{p'q'pq} - (-1)^{j_{p}+j_{q}-J}\bar{T}^{\textrm{NN}, J}_{p'q'qp}\right] , \nonumber \\ \end{aligned}$$
(29)

with

$$\begin{aligned} \delta _{pq} = \delta _{n_{p}n_{q}} \delta _{l_{p}l_{q}} \delta _{j_{p}j_{q}} \delta _{t_{z,p}t_{z,q}}. \end{aligned}$$
(30)

The main tasks remaining are to compute the matrix elements \(V^{\textrm{NN}, J}_{p'q'pq}\) and \(V^{{\textrm{3N}},J_{p'q'}J_{pq}J}_{p'q'r'pqr}\).

3.4 Nucleon–nucleon matrix elements

We begin with the NN matrix element. One might think that the matrix element can be calculated directly from the integral using the single-particle HO wave function. It is actually done in quantum chemistry. However, this would be a computationally expensive task since functional forms of NN interactions are complicated. Instead, the Talmi–Moshinsky transformation is widely used in nuclear physics:

$$\begin{aligned} V^{\textrm{NN}, J}_{p'q'pq}= & {} \sum _{N^{\textrm{NN}}_{\textrm{cm}} L^{\textrm{NN}}_{\textrm{cm}}J^{\textrm{NN}}_{\textrm{rel}}S} \sum _{n'l'nl} T^{p'q'J}_{N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}}n'l'SJ^{\textrm{NN}}_{\textrm{rel}}}\nonumber \\{} & {} \times V^{SJ^{\textrm{NN}}_{\textrm{rel}}}_{n'l'nl} \ T^{pqJ}_{N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}}nlSJ^{\textrm{NN}}_{\textrm{rel}}}. \end{aligned}$$
(31)

The quantum numbers introduced for the transformation \(N^{\textrm{NN}}_{\textrm{cm}}\), \(L^{\textrm{NN}}_{\textrm{cm}}\), n, l, S, and \(J^{\textrm{NN}}_{\textrm{rel}}\) are the NN cm radial quantum number, NN cm orbital angular momentum, relative radial quantum number, relative orbital angular momentum, total spin, and total angular momentum of the relative motion, respectively. The transformation coefficient \(T^{pqJ}_{N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}}nlSJ^{\textrm{NN}}_{\textrm{rel}}}\) is

$$\begin{aligned} T^{pqJ}_{N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}}nlSJ^{\textrm{NN}}_{\textrm{rel}}}= & {} (-1)^{L^{\textrm{NN}}_{\textrm{cm}}+l+S+J} \sqrt{[j_{p}][j_{q}][S][J^{\textrm{NN}}_{\textrm{rel}}]}\nonumber \\{} & {} \times \sum _{\Lambda } [\Lambda ] \left\{ \begin{array}{ccc} l_{p} &{} 1/2 &{} j_{p} \\ l_{q} &{} 1/2 &{} j_{q} \\ \Lambda &{} S &{} J \end{array} \right\} \left\{ \begin{array}{ccc} L^{\textrm{NN}}_{\textrm{cm}} &{} l &{} \Lambda \\ S &{} J &{} J^{\textrm{NN}}_{\textrm{rel}} \end{array} \right\} \nonumber \\{} & {} \times \langle N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}} nl: \Lambda \vert n_{p}l_{p}n_{q}l_{q} : \Lambda \rangle _{1}.\nonumber \\ \end{aligned}$$
(32)

In the above equation, 9j-symbol is used with the standard notation [25]. The symbol \(\langle NLnl:\Lambda \vert n_{1}l_{1}n_{2}l_{2}: \Lambda \rangle _{d}\) is the HO bracket defined with the notation in Ref. [24]. The inner summations in Eq. (31) can be performed with an efficient matrix multiplication. Note that the antisymmetrization is not taken into account here. However, it is trivial and can be done by multiplying the factor \(f_{pq}\) to Eq. (32):

$$\begin{aligned} f_{pq} = \left\{ \begin{array}{cc} 1, &{}\quad t_{z,p} \ne t_{z,q} \\ \sqrt{\frac{1}{2(1+\delta _{pq})}} [1 + (-1)^{l + S}], &{}\quad t_{z,p} = t_{z,q} \end{array} \right. . \end{aligned}$$
(33)

The NN matrix element in the relative HO basis \(V^{SJ^{\textrm{NN}}_{\textrm{rel}}}_{n'l'nl}\) can be obtained through the integral:

$$\begin{aligned} V^{SJ^{\textrm{NN}}_{\textrm{rel}}}_{n'l'nl}= & {} \int d\pi '_{1} d\pi _{1} \ \pi '^{2}_{1} \pi ^{2}_{1} R_{n'l'}(\pi '_{1}) R_{nl}(\pi _{1})\nonumber \\{} & {} \times V^{SJ^{\textrm{NN}}_{\textrm{rel}}}_{l'l} (\pi '_{1},\pi _{1}), \end{aligned}$$
(34)

with the radial HO wave function:

$$\begin{aligned} R_{nl}(\pi _{1})= & {} (-1)^{n} b \sqrt{\frac{2b\Gamma (n+1)}{\Gamma (n+l+3/2)}}\nonumber \\{} & {} \times (\pi _{1}b)^{l} e^{-\pi ^{2}_{1}b^{2}/2} L^{(l+1/2)}_{n}(\pi ^{2}_{1}b^{2}). \end{aligned}$$
(35)

The gamma function \(\Gamma (x)\) and associated Laguerre polynomial \(L^{(\alpha )}_{n}(x)\) are introduced. The momentum \(\pi _{1}\) is \(\pi _{1} = \vert ({\varvec{p}}_{1}-{\varvec{p}}_{2})\vert /\sqrt{2}\), consistent with the definition of the HO bracket. Note that \(\pi _{1}\) is different from the usual relative momentum definition \(p = \vert {\varvec{p}}_{1} - {\varvec{p}}_{2}\vert /2\).

The NuHamil code requires the input file for \(V^{SJ^{\textrm{NN}}_{\textrm{rel}}}_{l'l} (p',p)\) stored as a function of \(p'\) and p. Some selected interactions are given in the input_nn_files directory. The available NN interactions are LO – N\(^{4}\)LO with 500 MeV regulator cutoff by Entem–Machleidt–Nosyk [26], N\(^{3}\)LO with 500 MeV regulator cutoff by Entem–Machleidt [27], N\(^{2}\)LO\(_{\textrm{opt}}\) [28], N\(^{2}\)LO\(_{\textrm{sat}}\) [29], and \(\Delta \)-full EFT series by the Gothenburg–Oak Ridge collaboration [30].

3.5 Three-nucleon matrix elements

For computational reasons, the 3N matrix elements are calculated within the isospin formalism. The matrix elements with the proton-neutron basis can be obtained through the JT-coupled matrix element \(V^{{\textrm{3N}}, J_{p'q'}J_{pq}J, T_{p'q'}T_{pq}T}_{p'q'r'pqr}\):

$$\begin{aligned} V^{{\textrm{3N}}, J_\mathrm{p'q'}J_{pq}J}_{p'q'r'pqr}= & {} \sum _{T_{p'q'}T_{pq}T} \mathcal {C}^{t_{p'}t_{q'}T_{p'q'}}_{t_{z,p'}t_{z,q'}T_{z,p'q'}} \mathcal {C}^{t_{p}t_{q}T_{pq}}_{t_{z,p}t_{z,q}T_{z,pq}}\nonumber \\{} & {} \times \, \mathcal {C}^{T_{p'q'}t_{r'}T}_{T_{z,p'q'}t_{z,r'}T_{z}} \mathcal {C}^{T_{pq}t_{r}T}_{T_{z,pq}t_{z,r}T_{z}} V^{{\textrm{3N}}, J_{p'q'}J_{pq}J, T_{p'q'}T_{pq}T}_{p'q'r'pqr}.\nonumber \\ \end{aligned}$$
(36)

The recoupling should be done in many-body calculations, and the goal here is to obtain the JT-coupled matrix element. Note that recoupling coefficients from isospin structure have to be considered for the permutation of indices, similar to Eqs. (13)–(17).

Since the antisymmetrization of the 3N basis is more complicated than that of the NN basis, the 3N matrix element is cumbersome. The antisymmetrized basis is expressed as the linear combination of the non-antisymmetrized basis:

$$\begin{aligned} \vert EiJ^{3N}_{\textrm{rel}}T \rangle = \sum _{\beta } c_{i\beta } \vert E\beta J^{3N}_{\textrm{rel}}T \rangle , \end{aligned}$$
(37)

where E, i, and \(J^{3N}_{\textrm{rel}}\) are the HO principle quantum number, label distinguishing the states, and total Jacobi angular momentum, respectively. The collective index \(\beta \),

$$\begin{aligned} \beta = \{n_{12}, l_{12}, s_{12}, j_{12}, t_{12}, n_{3}, l_{3}, j_{3}\}, \end{aligned}$$
(38)

specifies the non-antisymmetrized basis. The quantum numbers with the subscript ‘12’, \(n_{12}\), \(l_{12}\), \(s_{12}\), \(j_{12}\), and \(t_{12}\) are for the relative motion of nucleons 1 and 2, i.e., the nodal, orbital angular momentum, spin, total angular momentum, and total isospin quantum numbers, respectively. Likewise, \(n_{3}\), \(l_{3}\), and \(j_{3}\) are the quantum numbers for the nucleon 3 with respect to the cm of the nucleons 1 and 2. Note that the principle quantum number is defined as \(E=2n_{12}+l_{12}+2n_{3}+l_{3}\). The coefficient in the linear combination \(c_{i\beta }\) can be obtained by the diagonalization of the antisymmetrizer [31, 32]:

$$\begin{aligned} {{\mathcal {A}}} \vert EiJ^{3N}_{\textrm{rel}}T \rangle = A_{i} \vert EiJ^{3N}_{\textrm{rel}}T \rangle , \end{aligned}$$
(39)

with \({\mathcal {A}} = (1 + {\mathcal {T}}_{13}{\mathcal {T}}_{12} + {\mathcal {T}}_{12}{\mathcal {T}}_{23}-{\mathcal {T}}_{12}- {\mathcal {T}}_{13}-{\mathcal {T}}_{23})/6\) defined with the exchange operator \({\mathcal {T}}_{ij}\) and the eigenvalue \(A_{i}\). The matrix element of the antisymmetrizer is [31, 32]

$$\begin{aligned}{} & {} \langle E'\beta ' J^{{\textrm{3N}}'}_{\textrm{rel}}T' \vert {\mathcal {A}} \vert E\beta J^{{\textrm{3N}}}_{\textrm{rel}}T \rangle \nonumber \\{} & {} \quad =\Bigg [ \frac{\delta _{\beta '\beta }}{3} - \frac{2}{3} (-1)^{s'_{12}+t'_{12}+s_{12}+t_{12}} \sum _{\Lambda S} [\Lambda ][S] \nonumber \\{} & {} \qquad \times \sqrt{[s'_{12}][j'_{12}][j'_{3}][t'_{12}]} \sqrt{[s_{12}][j_{12}][j_{3}][t_{12}]} \nonumber \\{} & {} \qquad \times \left\{ \begin{array}{ccc} l'_{12} &{} s'_{12} &{} j'_{12} \\ l'_{3} &{} 1/2 &{} j'_{3} \\ \Lambda &{} S &{} J \end{array} \right\} \left\{ \begin{array}{ccc} l_{12} &{} s_{12} &{} j_{12} \\ l_{3} &{} 1/2 &{} j_{3} \\ \Lambda &{} S &{} J \end{array} \right\} \nonumber \\{} & {} \qquad \times \left\{ \begin{array}{ccc} 1/2 &{} 1/2 &{} s'_{12} \\ 1/2 &{} S &{} s_{12} \end{array} \right\} \left\{ \begin{array}{ccc} 1/2 &{} 1/2 &{} t'_{12} \\ 1/2 &{} T &{} t_{12} \end{array} \right\} \nonumber \\{} & {} \qquad \times \langle n'_{12}l'_{12}n'_{3}l'_{3}: \Lambda \vert n_{12}l_{12}n_{3}l_{3} \Lambda \rangle _{1/3} \Bigg ]\nonumber \\{} & {} \qquad \times \delta _{E'E}\delta _{J^{{\textrm{3N}}'}_{\textrm{rel}}J^{{\textrm{3N}}}_{\textrm{rel}}} \delta _{T'T}. \end{aligned}$$
(40)

The eigenvalue problem can be separated into \(\{E, J^{{\textrm{3N}}}_{\textrm{rel}}, T\}\) blocks. Due to the overcompleteness of the non-antisymmetrized basis, the eigenvalue \(A_{i}\) is either 0 or 1, and \(A_{i}\) for the physical state has to be 1. Therefore, we always see \(N_{\textrm{A}} \le N_{\textrm{NA}}\) where \(N_{\textrm{A}}\) and \(N_{\textrm{NA}}\) are the basis numbers in the antisymmetrized and non-antisymmetrized bases within the \(\{E, J^{{\textrm{3N}}}_{\textrm{rel}}, T\}\) block, respectively. In the code, all the 3N operators are stored with the antisymmetrized basis rather than the non-antisymmetrized basis, as it is computationally easier to handle. As another option for the 3N antisymmetrization, one may apply the permutator operator to the 3N momentum state as introduced in Ref. [33].

Similarly to the NN case, the 3N matrix elements can be obtained through the three-body Talmi–Moshinsky transformation:

$$\begin{aligned}{} & {} V^{{\textrm{3N}}, J_{ p'q'}J_{pq}J, T_{p'q'}T_{pq}T}_{p'q'r'pqr} = 6 \sum _{N^{\textrm{3N}}_{\textrm{cm}}L^{\textrm{3N}}_{\textrm{cm}}J^{\textrm{3N}}_{\textrm{rel}}} \sum _{E'i'Ei}\nonumber \\{} & {} \quad \times T^{p'q'r'J_{p'q'}J T_{p'q'}T}_{N^{\textrm{3N}}_{\textrm{cm}}L^{\textrm{3N}}_{\textrm{cm}} E'i'J^{\textrm{3N}}_{\textrm{rel}}} \ V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{E'i'Ei} T^{pqrJ_{pq}JT_{pq}T}_{N^{\textrm{3N}}_{\textrm{cm}}L^{\textrm{3N}}_{\textrm{cm}}Ei J^{\textrm{3N}}_{\textrm{rel}}}, \end{aligned}$$
(41)

where \(N^{\textrm{3N}}_{\textrm{cm}}\) and \(L^{\textrm{3N}}_{\textrm{cm}}\) denote the 3N cm radial quantum number and 3N cm orbital angular momentum, respectively. The matrix element \(V^{J^{\textrm{3N}}_{\textrm{rel}}}_{E'i'Ei}\) is a shorthand notation of \(\langle E'i'J^{\textrm{3N}}_{\textrm{rel}}T \vert V \vert EiJ^{\textrm{3N}}_{\textrm{rel}}T\rangle \). The transformation coefficient is given by

$$\begin{aligned} T^{pqr J_{pq}J T_{pq}T}_{N^{\textrm{3N}}_{\textrm{cm}}L^{\textrm{3N}}_{\textrm{cm}}Ei J^{\textrm{3N}}_{\textrm{rel}}} = \sum _{\beta } c_{i\beta } T^{pqr J_{pq}J T_{pq}T}_{N^{\textrm{3N}}_{\textrm{cm}}L^{\textrm{3N}}_{\textrm{cm}} E\beta J^{\textrm{3N}}_{\textrm{rel}}}, \end{aligned}$$
(42)

with

$$\begin{aligned}{} & {} T^{pqrJ_{pq}JT_{pq}T}_{N^{\textrm{3N}}_{\textrm{cm}}L^{\textrm{3N}}_{\textrm{cm}}E\beta J^{\textrm{3N}}_{\textrm{rel}}} = \delta _{T_{pq}t_{12}} (-1)^{L^{\textrm{3N}}_{\textrm{cm}}+j_{3}+3/2} \sqrt{[J_{pq}][j_{r}][J^{\textrm{3N}}_{\textrm{rel}}][j_{3}]}\nonumber \\{} & {} \quad \times \sum _{N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}}} T^{pqJ_{pq}}_{N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}}n_{12}l_{12}s_{12}j_{12}} \sum _{\Lambda } (-1)^{\Lambda } [\Lambda ]\nonumber \\{} & {} \quad \times \langle N^{\textrm{3N}}_{\textrm{cm}}L^{\textrm{3N}}_{\textrm{cm}} n_{3}l_{3}: \Lambda \vert N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}} n_{r}l_{r} : \Lambda \rangle _{2}\nonumber \\{} & {} \quad \times \left\{ \begin{array}{cccccccc} j_{12} &{} &{} L^{\textrm{NN}}_{\textrm{cm}} &{} &{} \Lambda &{} &{} L^{\textrm{3N}}_{\textrm{cm}} &{} \\ &{} J_{pq} &{} &{} l_{r} &{} &{} l_{3} &{} &{} J^{\textrm{3N}}_{\textrm{rel}} \\ J &{} &{} j_{r} &{} &{} 1/2 &{} &{} j_{3} &{} \end{array} \right\} . \end{aligned}$$
(43)

The 12j-symbol of the first kind [25] is used. Note that \(T^{pqJ_{pq}}_{N^{\textrm{NN}}_{\textrm{cm}}L^{\textrm{NN}}_{\textrm{cm}}n_{12}l_{12}s_{12}j_{12}}\) is defined in Eq. (32), and one can find a recursive relation for the N-body Talmi–Moshinsky transformation with the 12j-symbol and HO bracket.

A typical limit of the three-body Talmi–Moshinsky transformation is \(E_{\textrm{3max}}=16\), where \(E_{\textrm{3max}}\) is defined as \(\max (2n_{p}+l_{p}+2n_{q}+l_{q}+2n_{r}+l_{r})\). This limit does not allow us to obtain converged results for heavier systems with \(A > rsim 100\). Recently, the limit was extended to \(E_{\textrm{3max}}=28\) [34], by only computing the matrix elements relevant to the normal-ordered two-body (NO2B) approximation, which is widely used in basis expansion methods. For further details about the NO2B matrix elements, see Ref. [34]. The code supports this format as well.

The 3N matrix element in the Jacobi HO basis \(V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{E'i'Ei}\) can be obtained from the matrix element expressed with the non-antisymmetrized basis:

$$\begin{aligned} V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{E'i'Ei} = \sum _{\beta '\beta } c_{i'\beta '} c_{i\beta } V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{\beta '\beta }, \end{aligned}$$
(44)

with

$$\begin{aligned} V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{\beta '\beta }= & {} \int d\pi _{1}' d\pi _{2}' d\pi _{1} d\pi _{2} \ \pi '^{2}_{1} \pi '^{2}_{2} \pi ^{2}_{1} \pi ^{2}_{2}\nonumber \\{} & {} \times R_{n'_{12}l'_{12}}(\pi '_{1}) R_{n_{12}l_{12}}(\pi _{1}) R_{n'_{3}l'_{3}}(\pi '_{2}) R_{n_{3}l_{3}}(\pi _{2})\nonumber \\{} & {} \times V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{\alpha '\alpha }(\pi '_{1},\pi '_{2},\pi _{1},\pi _{2}). \end{aligned}$$
(45)

Here, the collective index \(\alpha \) is introduced as

$$\begin{aligned} \alpha = \{l_{12},s_{12}, j_{12}, t_{12}, l_{3}, j_{3}\}. \end{aligned}$$
(46)

The momentum \(\pi _{2}\) is defined as \(\pi _{2} = \sqrt{2/3} | ({\varvec{p}}_{1}+{\varvec{p}}_{2})/2 - {\varvec{p}}_{3} |\). The momentum-space matrix element includes a regulator function:

$$\begin{aligned} V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{\alpha '\alpha }(\pi '_{1},\pi '_{2},\pi _{1},\pi _{2}) = f_{\Lambda } V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{\chi \textrm{EFT}, \alpha '\alpha }(\pi '_{1},\pi '_{2},\pi _{1},\pi _{2}).\nonumber \\ \end{aligned}$$
(47)

The regulator function takes either a non-local form

$$\begin{aligned} f_{\Lambda _{\textrm{nonlocal}}} = \exp \left[ -\left( \frac{\pi '^{2}_{1} + \pi '^{2}_{2}}{2\Lambda ^{2}_{\textrm{nonlocal}}}\right) ^{n}\right] \exp \left[ -\left( \frac{\pi ^{2}_{1} + \pi ^{2}_{2}}{2\Lambda ^{2}_{\textrm{nonlocal}}}\right) ^{n}\right] ,\nonumber \\ \end{aligned}$$
(48)

a local form

$$\begin{aligned} f_{\Lambda _{\textrm{local}}} = \exp \left[ -\left( \frac{|{\varvec{p}}'_{1} - {\varvec{p}}_{1}|^{2}}{\Lambda ^{2}_{\textrm{local}}}\right) ^{n}\right] \exp \left[ -\left( \frac{|{\varvec{p}}'_{2} - {\varvec{p}}_{2}|^{2}}{\Lambda ^{2}_{\textrm{local}}}\right) ^{n}\right] ,\nonumber \\ \end{aligned}$$
(49)

or a semilocal form [35] that is not supported in the code. The code fully supports the locally regulated matrix elements at N\(^{2}\)LO in chiral EFT based on Ref. [36]. Also, a newly introduced local-non-local regularized form, \(f_{\Lambda }=f_{\Lambda _{\textrm{local}}}f_{\Lambda _{\textrm{nonlocal}}}\) [37], is supported.

For non-local matrix elements, we have tried to implement along Ref. [38]. However, we found a numerical instability in the higher angular momentum partial waves, which would be related to the discussion made in Ref. [39]. For this reason, non-local matrix elements are not fully supported, and external input files are required. The code has the capability to read the momentum-space matrix element \(V^{J^{\textrm{3N}}_{\textrm{rel}}T}_{\chi \textrm{EFT},\alpha '\alpha }(p',q',p,q)\)Footnote 1 from the HDF files by Hebeler et al. [12, 40]. In the integral (45), the cubic b-spline interpolation is used to capture the oscillating nature of the HO wave functions.

Table 1 The ground-state energies of selected doubly magic nuclei computed with the NCSM and IMSRG(2). The resolution scale \(\lambda \) is related with the end point of the SRG evolution: \(\lambda = \alpha ^{-1/4}\) in units of fm\(^{-1}\). The \(N_{\textrm{max}}\) and \(e_{\textrm{max}}\) truncations are employed in the NCSM and IMSRG(2), respectively. The truncation defined by \(E_{\textrm{3max}} = \max (e_{1}+e_{2}+e_{3})\) is applied for the input 3N matrix elements. The \(E_{\textrm{3max}}\) values with asterisk indicates that the 3N matrix elements are computed within the half-precision floating-point numbers. Also, \(E_{\textrm{3max}}\) = “none” indicates that there are no input 3N matrix elements. The entry \(\hbar \omega \) is the basis frequency used in the many-body calculations, and the numbers in the parentheses are the parent frequency adopted in the frequency conversion for the 3N matrix elements [41]. For \(^{4}\)He, \(^{16}\)O, and \(^{40}\)Ca, the 3N SRG evolution was done in the ramp A space defined in Ref. [41]. For \(^{132}\)Sn, the evolution was done in the \(N_{\textrm{max}}=48\) space only for \(J^{3N}_{\textrm{rel}} \le 13/2\) channels. The star symbol in the \(E_{\textrm{3max}}\) column indicates that the 3N matrix elements are in half-precision floating point numbers

4 Similarity renormalization group

The momentum scales of chiral EFT interactions are significantly lower than those of the other potential models such as AV18 [6] and CD-Bonn [7]. However, the momentum scale is not sufficiently low to obtain converged results in the many-body calculations. To accelerate convergence, one sometimes softens nuclear interactions. Softening procedures are well summarized for example in Ref. [43]. Here, we briefly review the widely used similarity renormalization group (SRG) approach.

In the SRG, we consider a unitary transformation depending on a continuous parameter \(\alpha \):

$$\begin{aligned} H(\alpha ) = U^{\dag }(\alpha )HU(\alpha ). \end{aligned}$$
(50)

The SRG flow equation can be obtained by differentiating both sides:

$$\begin{aligned} \frac{dH(\alpha )}{d\alpha } = [\eta (\alpha ), H(\alpha )], \quad \eta (\alpha ) = \frac{dU^{\dag }(\alpha )}{d\alpha } U(\alpha ). \end{aligned}$$
(51)

The antihermitian operator \(\eta (\alpha )\) is known as the generator of the flow equation and can be chosen flexibly [44]. The most widely used choice is \(\eta (\alpha ) = [T_\textrm{kin}, H(\alpha )]\) with the kinetic operator \(T_\textrm{kin}\), which guarantees the suppression of the coupling between low and high momenta. The flow equation (51) is integrated until the coupling is sufficiently suppressed. Since the unitary transformation does not change the eigenvalues, the SRG can be regarded as a reshuffling of the NN, 3N, and many-body sectors. In other words, the many-body interactions are induced by the SRG evolution even if the original interaction includes only NN interactions.

In practical applications, we extract the SRG-evolved interactions with the subtraction method (see Ref. [41] for example). For NN, the Hamiltonian \(H_{\textrm{NN}} = T_{\textrm{NN}} + V_{\textrm{NN}}\) is evolved, and the evolved NN interaction is given as \(V_{\textrm{NN}}(\alpha ) = H_{\textrm{NN}}(\alpha ) - T_\textrm{kin}\). Note that \(T_\textrm{kin}\) and \(V_{\textrm{NN}}\) are the NN kinetic and interaction operators, respectively. From the definition of the flow equation, \(V_{\textrm{NN}}(\alpha )\) reproduces the two-body observables obtained through the original interaction \(V_{\textrm{NN}}\). However, this is not true for three- and many-body observables due to missing induced many-body forces, and the many-body observables have an artificial \(\alpha \) dependence, showing how much the unitarity of the transformation is broken in the many-body space. To obtain more \(\alpha \)-independent result, one has to include induced 3N interaction extracted from the 3N evolution.

For 3N, the starting Hamiltonian is \(H_{\textrm{3N}} = T_{\textrm{3N}} + V^{[3]}_{\textrm{NN}}\), where \(T_{\textrm{3N}}\) is the 3N kinetic operator, and \(V_{\textrm{NN}}^{[3]}\) is the NN interaction embedded into the 3N space. Note that one can add an initial 3N term if required. The induced 3N term can be obtained as \(V_{{\textrm{3N}}, {\textrm{ind}}}(\alpha ) = H_{\textrm{3N}}(\alpha ) - T_{\textrm{3N}} - V_{\textrm{NN}}^{[3]}(\alpha )\). Here, \(V_{\textrm{NN}}^{[3]}(\alpha )\) is \(V_{\textrm{NN}}(\alpha )\) obtained from the NN evolution and embedded into 3N space. As seen in the NN evolution, the 3N evolution preserves three-body observables. The same procedure can be applied for many-body terms, and the many-body evolution is needed until the \(\alpha \)-dependence of the many-body observables becomes weak enough. However, in practice, even the four-body SRG evolution is too expensive to do due to the resulting basis dimension and the cost of antisymmetrizing the basis. In the NuHamil code, the SRG evolution can be performed in the NN and 3N sectors, the current state-of-the-art.

The unitary transformation can be obtained from the flow equation for the transformation operator:

$$\begin{aligned} \frac{dU(\alpha )}{d\alpha } = - U(\alpha ) \eta (\alpha ). \end{aligned}$$
(52)

However, a computationally more moderate way is used in practice, and the unitary transformation is obtained as

$$\begin{aligned} U(\alpha ) = \sum _{k} \vert \psi _{k} \rangle \langle \psi _{k}(\alpha ) \vert , \end{aligned}$$
(53)

with the eigenstates of the original and evolved Hamiltonians:

$$\begin{aligned} H\vert \psi _{k} \rangle = E_{k} \vert \psi _{k} \rangle , \quad H(\alpha )\vert \psi _{k}(\alpha ) \rangle = E_{k} \vert \psi _{k}(\alpha ) \rangle . \end{aligned}$$
(54)

Note that the relative phase of \(\vert \psi _{k}\rangle \) and \(\vert \psi _{k}(\alpha )\rangle \) cannot be determined in general, which affect the sign of the matrix element of the transformation operator. Since the SRG transformation does not change the wave function drastically, the relative phase is fixed such that \(\langle \psi _{k} \vert \psi _{k}(\alpha ) \rangle \ge 0\). In the same way as for the Hamiltonian, the induced three-body term of an operator can be computed in the NuHamil code as done in Ref. [45]. The end point of the flow equation is usually parametrized by the momentum scale \(\lambda = \alpha ^{-1/4}\) instead of \(\alpha \), and we follow this convention.

In the code, the SRG evolution is done in a relative-coordinate HO space because the consistent evolution of the other operators is straightforward. This means that the evolution is done in the truncated HO space, and the \(N_{\textrm{max}}\) truncation is employed in the code. The \(N_{\textrm{max}}\) is defined as

$$\begin{aligned} N_{\textrm{max}} = \left\{ \begin{array}{ll} \max (2n+l), &{} \quad \text {NN system} \\ \max (2n_{12}+l_{12}+2n_{3}+l_{3}), &{} \quad 3\text {N system} \end{array} \right. .\nonumber \\ \end{aligned}$$
(55)

The UV momentum scale in the employed \(N_{\textrm{max}}\) space is roughly estimated as \(p_{\textrm{UV}} \sim \sqrt{2 N_{\textrm{max}}m\omega }\) [46], and we expect that the \(N_{\textrm{max}}\) should be increased until \(p_{\textrm{UV}}\) is sufficiently larger than the cutoff scale of the interaction, typically 500 MeV. Although we can take sufficiently large \(N_{\textrm{max}}\) for the NN evolution,Footnote 2 the 3N \(N_{\textrm{max}}\) can be an issue especially in heavy nuclei calculations [34] even if the frequency conversion technique [41] is used.

5 Many-body results

Here, we show the ground-state energies for the selected doubly magic nuclei computed with the NCSM and two-body approximated IMSRG [IMSRG(2)] as a benchmark. We do not introduce the theoretical details of the many-body calculation methods. The details can be found in Refs. [15, 18, 47] and references therein. The numerical codes used here are open source; the NCSM and IMSRG are done with the BIGSTICK [20] and imsrg++ [21] codes, respectively.

In Table 1, the ground-state energies are shown, using the SRG-softened N\(^{3}\)LO NN interaction [27], labeled by “EM500”, with and without induced 3N interaction, N\(^{3}\)LO\(_{\textrm{lnl}}\) [37], 1.8/2.0 (EM) [42], and \(\Delta \)N\(^{2}\)LO\(_\textrm{GO}\)(394) [30].

6 Program summary and specifications

The NuHamil code is written in modern Fortran. It requires a set of libraries, BLAS, LAPACK, GNU scientific library (gsl), zlib, and hdf5.

6.1 Installation

The source code can downloaded from GitHub:

figure a

Note that downloading the code in the home directory is not mandatory, but it is recommended. One needs to download the submodules, linear algebra wrapper and b-spline interpolation:

figure b

The compilation can be done with the make command. The default compiler is GCC Fortran. If a user needs to use another compiler, the Makefile has to be edited appropriately. The symbolic link will be created by the make install command.Footnote 3 Once the directory is added to PATH, the code is ready to run.

figure c

6.2 How to run

A job submission can be controlled by a Python script, and some sample scripts are prepared in the exe directory. For example, the NN and 3N matrix elements can be generated with NuHamil_2BME.py and NuHamil_3BME.py, respectively. A Python script generates the corresponding input file for NuHamil.exe and submits the job. If an user needs to run a job manually, it can be done with

figure d

The “input.txt” is the input file based on the Fortran namelist functionality, and the file format is given the following.

figure e

6.3 Major parameters

In the NuHamil code, there are a number of input parameters. Here, we list some of the basic input parameters that the users might need to change depending on their requirements.Footnote 4

  • rank: integer, particle number of the system.

  • hw: frequency of the HO basis in the unit of MeV. The typical range is \(10 \lesssim \texttt {hw} \lesssim 40\).

  • hw_target: target frequency for the frequency conversion technique [41]. The parameter is valid if \(\texttt {rank} > 2\). To turn off the frequency conversion, set \(\texttt {hw\_target}=-1\).

  • emax: \(e_{\textrm{max}}=\max (2n+l)\) truncation for the output lab-frame HO matrix element file.

  • e2max: \(e_\textrm{2max}=\max (2n_{p}+l_{p}+2n_{q}+l_{q})\) truncation for the output lab-frame HO matrix element file. It is recommended to use \(\texttt {e2max} = 2 \times \texttt {emax}\).

  • e3max: \(E_{\textrm{3max}}=\max (2n_{p}+l_{p}+2n_{q}+l_{q}+2n_{r}+l_{r})\) truncation for the output 3N lab-frame HO matrix element file. A typical limit is \(\texttt {e3max} = 16\), and it will not work for the larger \(\texttt {e3max}\) because of the memory requirements. If only the matrix elements relevant for the NO2B approximation are needed [34], \(\texttt {e3max}=24\) would be a typical choice without MPI parallelization.

  • file_name_nn: file name of the output lab-frame NN HO matrix elements.

  • file_name_3n: file name of the output lab-frame 3N HO matrix elements.

  • renorm: renormalization method; “bare”, “srg”, and “Vlowk” are available. Note that the code does not support the 3N evolution for “Vlowk” option.

  • renorm_space2: NN interaction renormalization space; “ho” and “mom” are available. The NN renormalization procedure is done in HO-(“ho”) or momentum-(“mom”)space. The default is “ho”.

  • input_nn_file: file name of the NN interaction represented in the relative momentum space. The files are in the input_nn_files directory.

  • NNInt: name of the NN interaction.

  • N2max: \(N_{\textrm{max}}\) truncation for the NN system.

  • only_no2b_element: If it is set True, only the matrix elements relevant for the NO2B approximation will be computed [34].

  • jmax3: maximum value of the 3N Jacobi angular momentum taken into account. This has to be an integer and twice the actual angular momentum.

  • genuine_3bf: set True if the bare 3N interaction needs to be included. If it is set False and renorm\(=\)“srg”, the SRG induced 3N interaction will be computed.

  • Regulator: 3N regulator functional form. One can choose “Local” (49), “NonLocal” (48), or “LNL” [37].

  • RegulatorPower: power of the regulator function, i.e., n in Eqs. (48) and (49).

  • LECs: 5 dimensional array providing the low-energy constants appear in N\(^{2}\)LO 3N interaction in the chiral EFT, \(\{c_{1}, c_{3}, c_{4}, c_{D}, c_{E}\}\). Note that \(c_{1}\), \(c_{3}\), and \(c_{4}\) are in units of GeV\(^{-1}\), while \(c_{D}\) and \(c_{E}\) are dimensionless. For more details, see Ref. [48].

  • lambda_3nf_nonlocal: cutoff of the 3N non-local regulator, \(\Lambda _\textrm{nonlocal}\) in Eq. (48), in the unit of MeV.

  • lambda_3nf_local: cutoff of the 3N local regulator, \(\Lambda _\textrm{local}\) in Eq. (49), in units of MeV.

6.4 File format of input NN interactions in relative momentum space

As mentioned in Sect. 2.4, some selected NN interaction files are prepared in the input_nn_files directory. Furthermore, one can use their own momentum-space NN interaction. The file needs to be written with the binary.Footnote 5 The file should begin with listing the following variables:

figure f

where the 32-bit integers Number_of_mesh_points, J_max, and Number_of_relative_coordinate_channels are the size of momentum mesh points, maximum total angular momentum in the relative coordinate, i.e., \({\textrm{max}}(J^{\textrm{NN}}_{\textrm{rel}})\), and the number of \([J^{\textrm{NN}}_{\textrm{rel}}, (-1)^{l}, S, t_{z,p}+t_{z,q}]\) combinations written in the file, respectively. Then, one needs to write the momentum mesh points and corresponding weights for a quadrature method, which are number_of_mesh_points-dimensional arrays with the 64-bit float:

figure g

Finally, the momentum-space matrix for each \([J^{\textrm{NN}}_{\textrm{rel}}, (-1)^{l}, S, t_{z,p}+t_{z,q}]\) block should be written in the following way:

figure h

Here, the 32-bit integers Angular_momentum, Parity, Spin, Isospin_z_component, and Matrix_dimension correspond to \(J^{\textrm{NN}}_{\textrm{rel}}\), \((-1)^{l}\), S, \(t_{z,p}+t_{z,q}\), and the size of momentum-space matrix, respectively. Note that \(t_{z,p}+t_{z,q}\) can take either of \(-1\) (proton-proton), 0 (proton-neutron), or 1 (neutron-neutron). The Momentum_space_matrix is the flattened (“Matrix_dimension”)\(^{2}\)-dimensional array with the 64-bit float, corresponding to \(V^{SJ^{\textrm{NN}}_{\textrm{rel}}}_{l'l} (p',p)\).Footnote 6 Notice that Number_of_mesh_points and Matrix_dimension are not always the same because Matrix_dimension is twice of Number_of_mesh_points for spin-triplet coupled channels.

6.5 File format of non-local 3N matrix elements in Jacobi momentum space

As mentioned in Sect. 2.5, external input HDF5 files are needed for the non-local 3N matrix elements. The HDF5 files need to be prepared for each \([J^{\textrm{3N}}_{\textrm{rel}}, (-1)^{l_{12}+l_{3}}, T]\) partial waves and placed in the directory (directory path)/T3_2T/J3_\(2J^{\textrm{3N}}_{\textrm{rel}}\)/PAR_\((-1)^{l_{12}+l_{3}}\), e.g., HOME/3NF_matrix_elements_nonlocal_V/T3_1/J3_1/PAR_1 for the \(^{3}\)H and \(^{3}\)He ground-state channel. Each HDF5 file must include the entries Nalpha, Np, Nq, p mesh, q mesh, pw channels, and matrix elements, written as the dataset type supported in the HDF5 format. The Nalpha is the 32-bit integer corresponding to the number of \(\alpha \) channels. The objects Np and Nq are also 32-bit integers and the number of momentum mesh points for p and q, respectively. Note that \(\alpha \) is defined in Eq. (46). The dataset p mesh should at least have mesh point and mesh weight entries, corresponding to the p-momentum mesh points and associated weights for a quadrature method, respectively. The objects mesh point and mesh weight should be Np-dimensional array with the 64-bit float. The dataset q mesh is the same as p mesh except that it is for q. Regarding the dataset pw channels, it should at least include L_12, S_12, J_12, T_12, l_3, and 2*j_3 entries, which are \(l_{12}\), \(s_{12}\), \(j_{12}\), \(t_{12}\), \(l_{3}\), and \(2j_{3}\), respectively. Each entry has to be “Nalpha”-dimensional array with the 32-bit integer. Finally, the “matrix elements” corresponds to the 3N matrix stored as [Nalpha, Nq, Np, Nalpha, Nq, Np]-dimensional array with the 32-bit float.Footnote 7

7 Summary and future perspective

We introduce the NuHamil code to generate NN and 3N matrix elements. The jobs can be managed with a simple Python script. The available NN interactions are LO – N\(^{4}\)LO with 500 MeV regulator cutoff by Entem–Machleidt–Nosyk [26], N\(^{3}\)LO with 500 MeV regulator cutoff by Entem–Machleidt [27], N\(^{2}\)LO\(_{\textrm{opt}}\) [28], \(N^{2}\)LO\(_{\textrm{sat}}\) [29], and \(\Delta \)-full EFT series by Gothenburg–Oak Ridge collaboration [30]. The code can generate locally regulated 3N interactions [36]. Additional input files are needed for non-locally regulated 3N interactions. The code also supports the free-space NN and 3N SRG evolution, and the consistent evolution of the other operators is implemented. The output files can be used for the NCSM calculations with the BIGSTICK code [20] and IMSRG calculations with the imsrg++ code [21].

For a comprehensive understanding of nuclear structure, interactions between a nucleus and external field should be addressed. For example the electromagnetic observables are results of the nucleus-photon interaction and are related with the multipole components of the electromagnetic current operators. Although we know that higher-order contributions are essential, see Refs. [49, 50] for example, the LO current is used in most calculations due to the complexity of the matrix element calculations. As a future development, we plan to implement the higher-order current operators, including the two-body contributions.