1 PROGRAM SUMMARY

  • Program title: AMC

  • Licensing provisions: GNU General Public License Version 3 or later

  • Programming language: Python 3

  • Repository and DOI: http://www.github.com/radnut/amchttps://doi.org/10.5281/zenodo.3788328

  • Nature of problem: Numerical implementations of state-of-the-art many-body approaches require extensive use of angular-momentum algebra to derive the spherically reduced form of working equations. This derivation takes a lot of effort and is prone to errors.

  • Solution method: Angular-momentum objects are simplified via identification of subgraphs in a suitably defined network called Yutsis graph. With this, a spherical reduction of a tensor network is obtained and all quantities are expressed in terms of their m-independent, reduced analogues. The reduction process is fully automated, limiting the potential for human error.

  • Additional comments: The reduction is formulated as a transformation of abstract syntax trees that facilitates post-processing into different output formats, as well as automated code generation.

2 Introduction

In recent years, ab initio nuclear many-body theory has undergone a major renewal. In this process, expansion methods have become prominent in large-scale applications to mid-mass nuclei. The success obtained within the last two decades is leading to the design of more and more advanced approaches to continuously refine the accuracy of the calculations and extend them systematically to an even larger portion of the nuclear chart. This rise in the degree of sophistication of state-of-the-art many-body expansion schemes is leading to an increase of the formal complexity that is now at the edge of what is humanly processable.

When following the ab initio philosophy to solve the stationary Schrödinger equation, quasi-exact approaches based on Monte Carlo techniques [1,2,3,4] or configuration interaction (CI) [5, 6] are limited by their computational scaling to the lightest systems. Moving to the realm of medium- and heavy-mass nuclei involves the use of expansion many-body techniques building a wave-function parametrization on top of a conveniently chosen reference state. These methods display a polynomial scaling with system size, the degree of the polynomial increasing with the targeted accuracy, i.e., with the order at which the expansion is truncated. This computational advantage typically comes at the price of being restricted to working in a non-variational scheme. Examples of such approaches are many-body perturbation theory (MBPT) [7,8,9,10,11,12,13,14,15,16], coupled-cluster (CC) theory [17,18,19,20,21,22,23], self-consistent Green’s function (SCGF) theory [24,25,26,27,28] or the in-medium similarity renormalization group (IMSRG) method [29,30,31,32,33,34,35,36,37], all of which provide a consistent description of (at least) ground-state observables in nuclear many-body systems. In quantum chemistry in particular, MBPT and CC theories have a long tradition and both frameworks have been derived and implemented at very high truncation orders [8]. Although every member of the aforementioned approaches can be applied to much higher masses and larger system sizes than exact methods, the truncation levels needed for high-accuracy calculations require substantial effort in the derivation of the formalisms and for their numerical implementations.

While in earlier works the working equations were derived by hand, the rising computational power and the development of computer-aided algebraic manipulation tools have facilitated the derivation of more advanced truncation schemes in modern many-body approaches, many of which have undergone their pioneering studies in quantum chemistry [38,39,40,41,42]. A shining example is the tensor contraction engine that was developed in close collaboration with computer scientists and has been one of the most powerful tools to extend quantum-chemistry calculations to higher accuracy by generating working equations and source code for large-scale distributed implementations [43].

Even though large progress has been made in the development of software supporting the formal developments at play in quantum many-body research, only few are directly dedicated to the nuclear many-body problem [44]. While sharing many formal similarities with its electronic counterpart the nuclear many-body problem differs in two key points requiring a dedicated attention

  1. (1)

    At the mean-field level, single-nucleon states carry good total angular momentum \(\mathbf {j}=\mathbf {l}+\mathbf {s}\), i.e., one must employ the so-called j-coupling scheme to define appropriate one-nucleon states. Contrarily, electrons carry a well-defined projection \(s_z\) of the intrinsic spin and are, thus, best described on the basis of the so-called ls-coupling. The main consequence is that nucleons orbit in energy shells characterized by a greater degree of degeneracy, thus leading to the large dominance of open-shell ground-states, i.e., degenerate systems, over the nuclear chart.

  2. (2)

    The inclusion of three-body forces in a realistic nuclear Hamiltonian is mandatory to ensure a quantitatively correct description of nuclear observables, i.e. one is bound to use

    $$\begin{aligned} H = T + V + W + ... \, , \end{aligned}$$
    (1)

    where T is the kinetic energy operator whereas V and W are two- and three-body potentials, respectively.

While expansion many-body methods are first formulated in terms of a generic single-particle basis, their actual implementations typically exploit symmetry properties of the basis functions and of the targeted many-body state, e.g., with respect to angular-momentum or parity quantum numbers. The adaptation of the generic formalism to a specific symmetry group defines a symmetry reduction of the many-body formalism. The goal is to use reduced many-body tensors associated to irreducible representations (IRREPs) of the symmetry group to pre-process a subset of the summations at play in the tensor networks defining the working equations.

A simple, yet representative, example is the pre-processing of spin summations in spin-restricted quantum chemistry calculations. The counterpart in nuclear structure theory relates to the exploitation of rotational invariance associated with the conservation of total angular momentum and encoded in terms of the SU(2) nonabelian Lie group. In this particular case the reduction scheme will be referred as the angular-momentum reduction (AMR).

Eventually, it turns out that the AMR poses a nontrivial problem requiring the same amount of effort as the derivation of the initial working equations. However, there exists a highly systematic and elegant way to deal with this task that is close in spirit to the use of Feynman’s diagrams as a mnemonic device to represent physical processes.

Consequently, it is highly desirable to parallel the efforts done to automatize the generation of working equations by devising a framework that automatically performs the tedious symmetry reduction in an error-safe way. Currently, there is – to the best of our knowledge – no open-source library that can deal with the requirements imposed by nuclear structure many-body methods to perform symbolic manipulations of angular-momentum algebra. Typically, existing software is restricted to the numerical evaluation of coupling coefficients instead of performing symbolic manipulations including the simplification of complex tensor networks. There have been similar attempts for symbolic simplifications of angular-momentum expressions before without formally connecting it to many-body theory [45].

Therefore, the goal of the source code accompanying the present document is to support the implementation of advanced many-body frameworks in nuclear structure in an error-free way. Of course, this does not resolve the problem of writing an efficient and error-free numerical implementation of the symmetry-reduced formalism itself. While the generation of the source code is envisioned, it is, however, beyond the scope of the present work.

The document is organized as follows. In Sect. 2 the notion of symmetry in the context of many-body theory is introduced using a group theory formulation. Section 3 focuses on the angular-momentum algebra and its relation to states and operators. In Sect. 4 the diagrammatic allowing for the handling of the SU(2) algebra is laid out and the simplification rules for the graph theory reformulation of tensor networks are presented. Section 5 discusses several state-of-the-art many-body approaches that serve as pedagogical examples to demonstrate the generality of the approach. Ultimately, an outlook is provided in Sect. 6.

3 Symmetries and many-body theory

3.1 Symmetry group

Physical symmetries impact many-body formalisms at various stages of their elaboration. The existence of symmetries in finite systems is intimately connected to conservation laws, e.g., the existence of U(1) global gauge symmetry corresponds to particle-number conservation while SU(2) symmetry corresponds to angular momentum conservation. Mathematically, the invariance of a quantum system, characterized by its Hamiltonian H, is encoded in terms of transformation properties imposed by a symmetry group \(G_\text {Ham}\) whose action leaves the physical system invariant or, equivalently, the existence of a unitary linear representation U acting on the space of states such that

$$\begin{aligned} H = U(g) H U^\dagger (g) \quad (\forall g \in G) \, , \end{aligned}$$
(2)

which can be rewritten as

$$\begin{aligned}{}[ H , U(g) ] =0 \quad (\forall g \in G) \, . \end{aligned}$$
(3)

Given the eigenstates of the Hamiltonian

$$\begin{aligned} H | \varPsi _k \rangle = E_k | \varPsi _k \rangle , \end{aligned}$$
(4)

Eqs. (2, 3) stipulate that the transformed states

$$\begin{aligned} |\varPsi _k (g) \rangle \equiv U(g) |\varPsi _k \rangle \quad (\forall g \in G) \, , \end{aligned}$$
(5)

are also eigenstates with the same eigenvalues.

In the case of discrete symmetries such as parity or time reversal the corresponding symmetry group is finite, e.g. \({\mathbb {Z}}_2\). Contrarily, continuous symmetries correspond to Lie groups allowing for a continuous parametrization of the (infinite number of) group elements in terms of a finite set of parameters. The present focus is on the nonabelian SU(2) Lie group associated with rotational invariance of nuclear systems. Relevant details about this symmetry group are provided in Sect. 3.3.

Eventually, symmetries enter the formulation of (nuclear) quantum many-body methods at three different levels

  1. (1)

    the symmetry group of the Hamiltonian \(G_\text {Ham}\) specifying the invariance of the physical system under a given set of transformations along with the symmetry quantum numbers carried by its many-body eigenstates,

  2. (2)

    the symmetry group of the single-particle basis \(G_\text {bas}\) specifying the symmetry properties of the computational basis,

  3. (3)

    the symmetry group of the reference state \(G_\text {ref}\) employed in expansion methods specifying the symmetries of the auxiliary many-body problem that is solved to construct the reference state.

While the symmetry group of the Hamiltonian is fixed by the physical system under consideration, the symmetry properties of the single-particle basis and the reference state result from a choice such that various combinations of \(G_\text {bas}\) and \(G_\text {ref}\) can be employed.

3.2 Symmetries of the single-particle basis

Given H and its symmetry group \(G_\text {Ham} \), there is infinitely many different single-particle bases spanning the one-body Hilbert space \({\mathcal {H}}_1\) that can be used to represent the operator in second-quantized form. The single-particle basis functions are typically obtained as eigenstates of an auxiliary one-body Hamiltonian \(H_\text {bas}\) whose symmetries are characterized by

$$\begin{aligned}{}[H_\text {bas} , U(g)] = 0 \quad (\forall g \in G_\text {bas} ) . \end{aligned}$$
(6)

When choosing \(G_\text {bas} =SU(2)\), one-body basis states are eigenstates of the squared total angular-momentum operatorFootnote 1

$$\begin{aligned} \mathbf {J}^2 \equiv J_x^2 + J_y^2 + J_z^2\, , \end{aligned}$$
(7)

where \(J_x,J_y\) and \(J_z\) denote the Cartesian components of the total angular-momentum vector. In most ab initio nuclear structure applications such a one-body basis is indeed employed, e.g., the eigenbasis of the three-dimensional spherical harmonic oscillator (sHO) Hamiltonian

$$\begin{aligned} H_\text {sHO} \equiv \frac{\mathbf {p}^2}{2m} + \frac{1}{2} m \omega ^2 \mathbf {r}^2\, , \end{aligned}$$
(8)

where m denotes the average nucleon mass and \(\omega \) the HO frequency. It can be shown that

$$\begin{aligned} \,[H_{\text {sHO}}, \mathbf {J}^2] =0 \, , \end{aligned}$$
(9a)
$$\begin{aligned} \,[H_{\text {sHO}}, J_z] =0 \, , \end{aligned}$$
(9b)

such that the one-body eigenstates of \(H_{\text {sHO}}\) are proportional to spherical Harmonics. In other frameworks, e.g. nuclear energy density functional calculations, the single-particle basis is possibly taken as eigenfunctions of the axially deformed HO Hamiltonian that breaks rotational invariance and, thus, displays a smaller symmetry group \(G_\text {bas} \) than \(H_{\text {sHO}}\).

3.3 Symmetries of the reference state

The rationale of expansion methods relies on the definition of a conveniently chosen A-body reference state \(|\varPhi \rangle \) that serves as starting point for the correlation expansion. Acting on the vacuum, the wave operator W yields the exact, e.g., ground state

$$\begin{aligned} |\varPsi _0 \rangle = W | \varPhi \rangle \, . \end{aligned}$$
(10)

The wave operator is expanded and truncated according to a given many-body scheme, e.g., in MBPT, SCGF or CC theory. The resulting equations are symmetry-unrestricted and therefore make no use of symmetry properties of many-body operators.

In practice, the reference state is typically obtained as the ground state of an ’unperturbed’ Hamiltonian \(H_\text {ref}\) capturing the average behavior of the system’s dynamics and characterized by a symmetry group \(G_\text {ref} \)

$$\begin{aligned}{}[ H_\text {ref} , U(g) ] = 0 \quad (\forall g \in G_\text {ref} ) \, , \end{aligned}$$
(11)

such that \(|\varPhi \rangle \) typically belongs to the trivial IRREP of \(G_\text {ref} \). In the following, the reference state \(|\varPhi _{G_\text {ref} } \rangle \), thus, carries a subscript specifying the symmetry group of the Hamiltonian it is the ground state of.

In the simplest case, the vacuum is chosen to be a Slater determinant \(|\varPhi _{G_\text {Ham} } \rangle \) obtained from a symmetry-restricted Hartree-Fock mean-field calculation, i.e.

$$\begin{aligned} G_\text {ref} = G_\text {Ham} \, . \end{aligned}$$
(12)

In nuclear systems, \(|\varPhi _{G_\text {Ham} } \rangle \) typically belongs to the trivial IRREP of SU(2) and U(1), i.e., it carries good angular momentum \(J=0\) and a fixed number of particles. Dynamic correlations are introduced via the action of the wave operator that generates summations over elementary particle-hole excitations.

In open-shell systems, the above reference state is improper due to the partial filling of the last occupied shell. This leads to a degeneracy with respect to particle-hole excitations, thus, signalling the existence of a Goldstone mode and the ill-definition of the previously performed expansion of W. This problem can be circumvented by lowering the symmetry group of \(H_\text {ref}\), i.e. by taking a well-chosen subgroup \(G_\text {ref} \subset G_\text {Ham} \). This typically leads to breaking U(1) symmetry in singly open-shell nuclei and/or SU(2) in doubly open-shell nuclei. The lower symmetry of \(H_\text {ref}\) induces a lower reference energy due to the enlarged variational space

$$\begin{aligned} E[|\varPhi _{G_\text {ref} } \rangle ] \le E[ | \varPhi _{G_\text {Ham} }\rangle ] \, . \end{aligned}$$
(13)

More importantly, this lowering is accompanied by a lifting of the degeneracy of \(|\varPhi _{G_\text {Ham} } \rangle \) with respect to elementary excitations such that W can be expanded safely. In this case, however, the wave operator must not only capture dynamical correlations but also restore the symmetry \({G_\text {Ham} }\) associated with the exact eigenstates of H. Because of the necessary truncation, a standard expansion of W is not capable of restoring the symmetry such that the symmetry contamination needs to be retrieved by the explicit inclusion of a symmetry projector in the definition of W [21,22,23].

3.4 Reduction schemes and groups

While the symmetry group of the Hamiltonian is fixed from the outset, the choice of the single-particle basis and reference states leaves tremendous freedom to adapt \(G_\text {bas} \) and \(G_\text {ref} \) in order to deal with a specific situation.

A case of particular interest arises when the symmetry groups of the Hamiltonian, the single-particle basis and the reference state coincide, i.e.,

$$\begin{aligned} G_\text {sym} \equiv G_\text {Ham} = G_\text {bas} = G_\text {ref} \, . \end{aligned}$$
(14)

In this setting, the common algebraic structure can be exploited to simplify the many-body formalism by expressing all working equations in terms of \(G_\text {sym} \)-reduced tensors, thus, potentially providing a tremendous gain in the required runtime and memory resources. In the present paper, this situation is exploited relative to the SU(2) group (independently of the treatment of other symmetries such as U(1)).

3.5 Tensors and tensor networks

Due to the large variety of expansion schemes built to retrieve the solution of the many-body problem, it is desirable to introduce a unifying language for the various frameworks. This common ground is provided by the language of tensors and tensor networks.

A mode-k symmetry-unrestricted tensor (SU-T)

$$\begin{aligned} T_{i_1 ... i_k} \end{aligned}$$
(15)

is a multi-variate data array carrying k indices with (possibly different) index ranges \(I_1,...,I_k\). Tensors constitute the basic building blocks of many-body expansion methods. Given a set of SU-T’s ABC, ... a contraction is defined as a summation over a common index, e.g.,

$$\begin{aligned} \sum _{k} A_{...k...} B_{...k...} C_{...k...}\, , \end{aligned}$$

where the ellipses indicate indices that are not summed overFootnote 2.

A symmetry-unrestricted tensor network (SU-TN) denotes a set of SU-T’s combined according to a given contraction scheme specifying the way the tensors are contracted with each other. Furthermore, a SU-TN is said to be closed if all tensor indices are summed over and is said to be open otherwise.

In many-body applications tensors typically appear in two broad classes

  1. (1)

    input tensors that are known prior to addressing the actual solution of the Schrödinger equation in a given many-body framework,

  2. (2)

    output tensors that are specific to a given many-body approach and are typically the objects being solved for.

Examples for input tensors are matrix elements of many-body operators like the Hamiltonian whereas examples of output tensors are CC amplitudes or dressed propagators in SCGF theory. In most non-perturbative many-body frameworks, like CC, IMSRG or SCGF, open TN’s specify the working equations required to determine the unknown output tensors while the calculation of observables, e.g. the energy, relates to the evaluation of closed TNs.

3.6 Symmetry-reduced tensor networks

The goal of this work is to transform an initial SU-TN into a symmetry-reduced tensor network (SR-TN) encapsulating the symmetry reduction according to the associated symmetry group. To do so, the SU-T’s must be replaced by their symmetry-reduced counterparts. Given an initial SU-T, the corresponding symmetry-reduced tensor (SR-T) is obtained from a transformation \(f_{G_\text {sym} }\)

$$\begin{aligned} T_{k_1...k_n} \xrightarrow { f_{G_\text {sym} } } {\tilde{T}}^{\lambda }_{{\tilde{k}}_1 ... {\tilde{k}}_n} \, , \end{aligned}$$
(16)

mediating the symmetry reduction related to the group \(G_\text {sym} \). Here, the symbol \(\lambda \) denotes the relevant IRREP labels of the symmetry-reduced tensor. In the following, quantities with a tilde indicate symmetry-reduced objects. Note that the content of the indices themselves change, such that the set of quantum numbers labelling a SU-T and its SR-T counterpart are different. Thus, the SR-TN denotes the end product obtained via the replacement of the SU-T’s by their SR-T counterparts and via the adjustment of the contraction pattern

$$\begin{aligned} \sum _{k} A_{...k...} B_{...k...} C_{...k...} \xrightarrow { f_{G_\text {sym} } } \sum _{\lambda {\tilde{k}} } {\tilde{A}}^{\lambda }_{...{\tilde{k}}...} {\tilde{B}}^{\lambda }_{... \tilde{k}...} {\tilde{C}}^{\lambda }_{...{\tilde{k}}...} . \end{aligned}$$

4 Angular-momentum algebra

4.1 Rationale

While the discussion on symmetry-reduction and SR-TN’s has been generic so far, the present paper focus on the SU(2) group. The goal is, thus, to obtain angular-momentum-reduced tensor networks (AMR-TN’s) from SU-TN ones. The procedure requires to

  1. (1)

    replace all the SU-T’s by their AMR-T counterparts according to the transformation \(f_{SU(2)}\),

  2. (2)

    constrain the contraction pattern to only be left with summations over the reduced set of quantum numbers.

In practice, step (1) involves a set of substitution rules for every many-body tensor at play that specify how the symmetry reduction is performed. The resulting SR-TN—and its computational complexity—may strongly depend on the choice made to perform this initial stepFootnote 3. From this point of view at least a minimum level of human input (and experience) is necessary to come up with the most convenient choice. This does not pose a severe limitation in any of the examples discussed below.

4.2 Other symmetries

While presently focusing on rotational symmetry, other symmetries can be exploited in the same way. A key example relates to intrinsic spin in quantum chemistry that is analogous to the total angular-momentum when using a ls-coupling scheme. The spin projection being only two-fold degenerate, i.e. \(m_s = \pm \frac{1}{2}\), spin-restricted many-body theories benefit less from the symmetry reduction than in the j-coupling scheme. Still, pre-processing the sums over spin projections is an important tool to reduce the computational cost and advance state-of-the-art expansion methods in strongly correlated electronic systems. Finite symmetry groups, e.g., the dihedral groups \(D_n\), may also arise in quantum molecules whereas cubic groups play an important role in the computation of homogeneous matter, e.g., the infinite electron gas or infinite nuclear matter, since periodic boundary conditions are employed to facilitate the calculation. In solid-state physics, symmetry properties of the many-body systems, e.g., helical symmetries in nano tubes, can also be exploited to reduce computational complexity.

All the aforementioned examples correspond to a reduction of exact symmetries of a many-body system. In recent years, exploiting emergent approximate symmetries has also been shown to be highly beneficial, in particular in the context of nuclear CI-based approaches. In this case, the symmetry group of the configuration basis \(G_\text {bas} \) is larger than the actual symmetry group of the Hamiltonian,

$$\begin{aligned} G_\text {Ham} \subset G_\text {bas} \, , \end{aligned}$$
(17)

thus, exploiting algebraic properties that are not strictly realized in nature. A prime example is the symplectic symmetry group \(Sp(3,{\mathbb {R}})\) that is not an exact symmetry of the nuclear Hamiltonian but of the kinetic energy operator. In the symmetry-adapted no-core shell model (SA-NCSM) an A-body configuration basis is constructed from the Casimir operators of the approximate symmetry group \(SU(3)\subset Sp(3,{\mathbb {R}})\). The use of symplectic algebra was shown to provide an efficient selection of many-body basis states, thus, yielding computational savings in the diagonalization of the many-body Hamiltonian at the price of a more involved handling of many-body operators [46].

4.3 SU(2) group

In order to move closer to a concrete implementation of the above procedure, let us introduce details about the nonabelian compact \(SU(2)\equiv \{R(\varOmega ), \varOmega \in D_{SU(2)}\}\) Lie group associated with the rotation of a A-body fermion system characterized by an integer or a half-integer angular momentum. The group is parametrized by three Euler angles \(\varOmega \equiv (\alpha ,\beta ,\gamma )\) whose domain of definition is

$$\begin{aligned} D_{SU(2)} \equiv D_{\alpha } \times D_{\beta } \times D_{\gamma } = [0,4\pi ] \times [0,\pi ] \times [0,2\pi ] \, . \end{aligned}$$
(18)

As SU(2) is considered to be a symmetry group of H, the commutation relations

$$\begin{aligned} \left[ H,R(\varOmega )\right] = \left[ T,R(\varOmega )\right] = \left[ V,R(\varOmega )\right] =0 \, , \end{aligned}$$
(19)

hold for \(\varOmega \in D_{SU(2)}\).

Subsequently, the unitary representation of SU(2) on Fock space is utilized

$$\begin{aligned} R(\varOmega ) =e^{-\frac{i}{\hbar }\alpha J_{z}}e^{-\frac{i}{\hbar }\beta J_{y}}e^{-\frac{i}{\hbar }\gamma J_{z}} \, . \end{aligned}$$
(20)

The components of the total angular-momentum vector make up the Lie algebra

$$\begin{aligned}{}[J_{i},J_{j}]=\epsilon _{ijk} i\hbar \, J_{k} \, , \end{aligned}$$
(21)

where \(\epsilon _{ijk}\) denotes the Levi-Civita tensor. The Casimir operator of the group built from the infinitesimal generators through a non-degenerate invariant bilinear form is the total angular momentum

$$\begin{aligned} \mathbf {J}^{2} \equiv \sum _{i=x,y,z} J^2_{i} \, . \end{aligned}$$
(22)

Matrix elements of the irreducible representations (IRREPs) of SU(2) are given by the so-called Wigner D functions [47]

$$\begin{aligned} \langle { \xi J M | R(\varOmega ) | \xi ' J' M' } \rangle \equiv \delta _{\xi \xi '} \delta _{JJ'} D_{MM'}^{J}(\varOmega ) \, , \end{aligned}$$
(23)

where \(| \xi J M \rangle \) is an eigenstate of \(\mathbf {J}^2\) and \(J_{z}\)

$$\begin{aligned} \mathbf {J}^2 | \xi J M \rangle&= J(J+1)\hbar ^2 | \xi J M \rangle \, , \end{aligned}$$
(24a)
$$\begin{aligned} J_{z} | \xi J M \rangle&= M\hbar | \xi J M \rangle \, , \end{aligned}$$
(24b)

with \(2J \in {\mathbb {N}}\), \(2M\in {\mathbb {Z}}\), \(J-M\in {\mathbb {N}}\) and \(-J\le M \le +J\). The index \(\xi \) collects all quantum numbers but J and M. The \((2J\!+\!1)\)-dimensional IRREPs are labelled by J and are spanned by the set of states \(\{| \xi J M \rangle \}\) for fixed J and \(\xi \).

An irreducible tensor operator \({\mathbf {T}^{J}}\) of rank J is made of \(2J+1\) operators \(T^{J}_{K}\) transforming under rotation as

$$\begin{aligned} R(\varOmega ) \, T^{J}_{K} \, R(\varOmega )^{-1}&= \sum _{M} T^{J}_{M} \, D^{J}_{MK}(\varOmega ) \,\,\, , \end{aligned}$$
(25a)

or, equivalently, fulfilling

$$\begin{aligned}{}[J_z, T^{J}_{K}]&= \hbar K \, T^{J}_{K} \, , \end{aligned}$$
(26a)
$$\begin{aligned}&= \hbar \sqrt{(J \pm K + 1)(J\mp K)} \, T^{J}_{K\pm 1} \, , \end{aligned}$$
(26b)

where \(J_\pm = J_x \pm i J_y\) denotes the usual raising (lowering) operators. The nuclear Hamiltonian is an example of a spherical tensor operator of rank zero. Such operators are denoted as scalar.

A powerful tool to treat spherical tensor operators is the celebrated Wigner-Eckart theorem (WET)

$$\begin{aligned}&\langle { \xi _1 j_1 m_1 | T^{J}_{M} | \xi _2 j_2 m_2 } \rangle \nonumber \\&\quad = (-1)^{2J} \frac{1}{\hat{\jmath } _1} \left( \begin{array}{cc|c} j_2 &{} J &{} j_1 \\ m_2 &{} M &{} m_1 \end{array}\right) ( \xi _1 j_1 | {\mathbf {T}^{J}} | \xi _2 j_2 )\, , \end{aligned}$$
(27)

where \(\hat{\jmath } \equiv \sqrt{2j+1}\). The theorem states that matrix elements of a given component of a spherical tensor in the basis spanning the IRREPs can be written as a product of a geometric part independent of the spherical tensor at play and of a reduced matrix element independent on the particular component of the spherical tensor and the members of the IRREPs under consideration [48].

In the special case of a scalar operator one has

$$\begin{aligned} \langle { \xi _1 j_1 m_1 | T^{0}_{0} | \xi _2 j_2 m_2 } \rangle = \delta _{j_1 j_2} \frac{1}{\hat{\jmath } _1} ( \xi _1 j_1 | {\mathbf {T}^{0}} | \xi _2 j_2 )\, , \end{aligned}$$
(28)

such that both the initial and reduced matrix elements are independent of any projection quantum number. In this particular case, the notion of reduced matrix element is thus irrelevant.

4.4 Fermionic algebra

One of the building blocks of quantum many-body theory are second-quantized operators

$$\begin{aligned} O^{ij} = \frac{1}{i!j!} \sum _{k_1 ... k_{i+j}} \bar{o}_{k_1 ... k_{i+j}} c^\dagger _{k_1} \cdots c^\dagger _{k_i} c_{k_{i+j}} \cdots c_{k_{i+1}} \, , \end{aligned}$$
(29)

where \(c^\dagger \) (c) denote single-particle creation (annihilation) operators associated with a basis \({\mathcal {B}}_1\) of the one-body Hilbert space

$$\begin{aligned} {\mathcal {H}}_1\equiv {\mathcal {H}}^{r}_1 \otimes {\mathcal {H}}^{s}_1 \otimes {\mathcal {H}}^{t}_1 \end{aligned}$$
(30)

that is the tensor product of a spatial part, a spin part and an isospin part. Anti-symmetrized matrix elements \({\bar{o}}_{k_1 ... k_{i+j}}\) carrying \((i+j)\) one-body indices constitute a mode-\((i+j)\) SU-T. Creation and annihilation operators are assumed to fulfil the canonical anti-commutation rules

$$\begin{aligned} \{c_{k_1},c_{k_2}\}&= 0 \, , \end{aligned}$$
(31a)
$$\begin{aligned} \{c^\dagger _{k_1},c^\dagger _{k_2}\}&= 0 \, ,\end{aligned}$$
(31b)
$$\begin{aligned} \{c_{k_1},c^\dagger _{k_2}\}&= \delta _{k_1 k_2} \, , \end{aligned}$$
(31c)

defining the Fermionic algebraFootnote 4. Processing many-body matrix elements of strings of such operators via various forms of Wick’s theorem is at the core of quantum many-body methods and gives rise to the multitude of TN’s at play in expansion methods.

4.5 SU(2) symmetry and basis states

In the following, \({\mathcal {B}}_1\) is taken to be the eigenbasis of a SU(2)-invariant Hamiltonian \(H_\text {bas}\) such that basis states are conveniently labeled as

$$\begin{aligned} | k \rangle = | n_k l_k j_k m_{j_k} t_k \rangle \, , \end{aligned}$$
(33)

where \(n_k\) denotes the radial quantum number, \(l_k\) the orbital quantum number, \(j_k\) the total angular-momentum quantum number, \(m_{j_k}\) its projection and \(t_k\) the isospin projection. This constitutes a so-called j-coupled basis, i.e. it is not a direct product of bases of \({\mathcal {H}}^{r}_1\) and \({\mathcal {H}}^{s}_1\) but a coupled basis whose members are eigenstates of the total angular momentum \(\mathbf {j}^2\). While the eigenstates of the aforementioned sHO Hamiltonian provide an example of practical interest, eigenbases of other one-body Hamiltonians characterized by rotational symmetry are equally valid.

Later on, the AMR-T’s employed throughout the symmetry reduction will carry reduced labels \({\tilde{k}}\) characterized by

$$\begin{aligned} {\tilde{k}} \equiv (n_k , l_k, j_k, t_k) \, , \end{aligned}$$
(34)

where the angular-momentum projection, i.e. the magnetic quantum number \(m_k\), is explicitly excluded compared to the definition of k through the given of the basis in Eq. (33).

The tensor product of two one-body states defines a basis state of the two-body Hilbert space \(\mathcal{H}_2\)

$$\begin{aligned} | k_1 k_2 \rangle \equiv |k_1 \rangle \otimes |k_2 \rangle \, . \end{aligned}$$
(35)

Contrarily, in the coupled representation the two total angular momenta \(j_{k_1}\) and \(j_{k_2}\) are coupled to a total two-body angular momentum J with projectionFootnote 5M,

$$\begin{aligned} | {\tilde{k}}_1 {\tilde{k}}_2 (J) \rangle \equiv \sum _{m_{k_1} m_{k_2}} \left( \begin{array}{cc|c} j_{k_1} &{} j_{k_2} &{} J \\ m_{k_1} &{} m_{k_2} &{} M \end{array}\right) \, |k_1 k_2 \rangle \, , \end{aligned}$$
(36)

where the vector space inner product

$$\begin{aligned} \left( \begin{array}{cc|c} j_{k_1} &{} j_{k_2} &{} J \\ m_{k_1} &{} m_{k_2} &{} M \end{array}\right) \equiv \langle { k_1 k_2 | {\tilde{k}}_1 {\tilde{k}}_2 (J) } \rangle \end{aligned}$$
(37)

denotes the Clebsch-Gordan (CG) coefficient mediating the transformation from the uncoupled to the coupled basis. The left-hand side of Eq. (36) defines two-body eigenstates of \(\varvec{J^2}\), the Casimir operator of the group. The inverse transformation of Eq. (36) is given by

$$\begin{aligned} | k_1 k_2 \rangle = \sum _{J=|j_{k_1} -j_{k_2} |}^{j_{k_1} +j_{k_2}} \sum _{M=-J}^J \left( \begin{array}{cc|c} j_{k_1} &{} j_{k_2} &{} J \\ m_{k_1} &{} m_{k_2} &{} M \end{array}\right) \, | {\tilde{k}}_1 {\tilde{k}}_2 (J) \rangle \, . \end{aligned}$$
(38)

Along the same lines, the uncoupled three-body basis states of \(\mathcal{H}_3\), i.e., the tensor product of three single-particle states

$$\begin{aligned} | k_1 k_2 k_3 \rangle \equiv |k_1 \rangle \otimes |k_2 \rangle \otimes |k_3 \rangle \end{aligned}$$
(39)

is defined. Performing the angular-momentum coupling requires fixing the coupling order which is subsequently chosen to be

$$\begin{aligned}&| [{\tilde{k}}_1 {\tilde{k}}_2 (J_{12})] {\tilde{k}}_3 (J) \rangle \nonumber \\&\quad = \sum _{ \begin{array}{c} m_{k_1} m_{k_2} \\ m_{k_3} M_{12} \end{array}} \left( \begin{array}{cc|c} j_{k_1} &{} j_{k_2} &{} J_{12} \\ m_{k_1} &{} m_{k_2} &{} M_{12} \end{array}\right) \left( \begin{array}{cc|c} J_{12} &{} j_{k_3} &{} J \\ M_{12} &{} m_{k_3} &{} M \end{array}\right) | k_1 k_2 k_3 \rangle \, , \end{aligned}$$
(40)

i.e., the first two single-particle states are coupled to an intermediate two-body angular-momentum quantum number \(J_{12}\), which is further coupled to the third state to yield the overall (half-integer) three-body angular-momentum J. In analogy to the two-particle case, Eq. (40) defines three-body eigenstates of \(\mathbf {J}^2\).

The choice of the coupling order for three-body states employed in Eq. (40) is arbitrary such that an alternative coupling scheme is given by

$$\begin{aligned}&| [{\tilde{k}}_1 [{\tilde{k}}_2 {\tilde{k}}_3(J_{23})] (J) \rangle \nonumber \\&\quad = \sum _{ \begin{array}{c} m_{k_1} m_{k_2} \\ m_{k_3} M_{12} \end{array}} \left( \begin{array}{cc|c} j_{k_2} &{} j_{k_3} &{} J_{23} \\ m_{k_2} &{} m_{k_3} &{} M_{23} \end{array}\right) \left( \begin{array}{cc|c} J_{23} &{} j_{k_1} &{} J \\ M_{23} &{} m_{k_1} &{} M \end{array}\right) | k_1 k_2 k_3 \rangle \, , \end{aligned}$$
(41)

where the second and third single-particle states are coupled to an intermediate angular momentum \(J_{23}\) that is subsequently coupled with \(j_{k_1}\) to an overall J. Both coupling schemes enable for the construction of a basis of \(\mathcal{H}_3\) that is an eigenbasis of \(\mathbf {J}^2\). The transformation between the two representations is given by

$$\begin{aligned}&| [{\tilde{k}}_1 {\tilde{k}}_2 (J_{12})] {\tilde{k}}_3 (J) \rangle \nonumber \\&\quad = (-1)^{j_1+j_2+j_3+J}\sum _{J_{23}} \hat{J}_{12}\hat{J}_{23} \begin{Bmatrix} j_1&j_2&J_{12} \\ j_3&J&J_{23} \end{Bmatrix} \nonumber \\&\quad \quad \times | {\tilde{k}}_1 [{\tilde{k}}_2 \tilde{k}_3 (J_{23})] (J) \rangle \, , \end{aligned}$$
(42)

where the Wigner 6j-symbol was introduced.

Recursively, N-body states can be introduced for \(N\ge 3\), e.g. for the uncoupled representation

$$\begin{aligned} |k_1 \cdots k_N \rangle \equiv \bigotimes _{i=1}^N |k_i \rangle \, . \end{aligned}$$
(43)

Since in current ab initio implementations four- and higher-body operators play no dominant role yet, this extension is not discussed here.

4.6 Many-body matrix elements

With the operator O being the \(\mu \) component of a spherical tensor of rank \(\lambda \), its uncoupled matrix elements are defined by

$$\begin{aligned} {\bar{o}}_{k_1 ...k _i k_{i+1} ... k_{i+j}} \equiv \langle { k_1 ... k_i | O^{\lambda }_{\mu } | k_{i+1} ... k_{i+j} } \rangle \, , \end{aligned}$$
(44)

where it is not assumed that the numbers of indices labelling the bra and the ket states coincide. By means of the transformations between uncoupled and coupled representation of the bra and ket states, coupled expressions for matrix elements can be derived. Focusing on a two-body operator characterized by uncoupled matrix elements \({\bar{o}}_{k_1 k_2 k_3 k_4}\), their angular-momentum-coupled counterparts areFootnote 6

$$\begin{aligned} {\tilde{O}}^{JMJ^\prime M^\prime }_{{\tilde{k}}_1 {\tilde{k}}_2 {\tilde{k}}_3 \tilde{k}_4}&= \sum _{ \begin{array}{c} m_{k_1} m_{k_2} \\ m_{k_3} m_{k_4} \end{array}} \bar{o}_{k_1 k_2 k_3 k_4} \left( \begin{array}{cc|c} j_{k_1} &{} j_{k_2} &{} J \\ m_{k_1} &{} m_{k_2} &{} M \end{array}\right) \left( \begin{array}{cc|c} j_{k_3} &{} j_{k_4} &{} J^\prime \\ m_{k_3} &{} m_{k_4} &{} M^\prime \end{array}\right) \, , \end{aligned}$$
(45)

Analogously, coupled three-body matrix elements are obtained as

$$\begin{aligned}&{\tilde{O}}^{J_{12}JM J_{45} J^\prime M^\prime }_{{\tilde{k}}_1 \tilde{k}_2 {\tilde{k}}_3 {\tilde{k}}_4 {\tilde{k}}_5 {\tilde{k}}_6} \nonumber \\&\quad ={\sum _{ \begin{array}{c} m_{k_1} m_{k_2} m_{k_3} M_{12}\\ m_{k_4} m_{k_5} m_{k_6} M_{45} \end{array}}} \quad \quad \left( \begin{array}{cc|c} j_{k_1} &{} j_{k_2} &{} J_{12} \\ m_{k_1} &{} m_{k_2} &{} M_{12} \end{array}\right) \left( \begin{array}{cc|c} J_{12} &{} j_{k_3} &{} J \\ M_{12} &{} m_{k_3} &{} M \end{array}\right) \nonumber \\&\quad \quad \times \left( \begin{array}{cc|c} j_{k_4} &{} j_{k_5} &{} J_{45} \\ m_{k_4} &{} m_{k_5} &{} M_{45} \end{array}\right) \left( \begin{array}{cc|c} J_{45} &{} j_{k_6} &{} J^\prime \\ M_{45} &{} m_{k_6} &{} M^\prime \end{array}\right) \nonumber \\&\quad \quad \times {\bar{o}}_{k_1k_2 k_3 k_4 k_5 k_6}\, . \end{aligned}$$
(46)

Neither Eq. (45) nor Eq. (46) assume the underlying operator to be scalar. If it is indeed the case, the selection rules \(J=J^\prime \) and \(M=M^\prime \) hold and the coupled matrix element is additionally independent of M. For the three-body operator, however, the intermediate couplings do not necessarily coincide, i.e., \(J_{12} \ne J_{45}\) in general.

5 Diagrammatic method

Even though all manipulations necessary to simplify angular-momentum expressions can be performed solely in terms of the expressions introduced in Sect. 3 it is at the heart of this work to introduce a more convenient representation of the involved algebraic steps that, additionally, allows for computer-aided derivations. As Feynman or Goldstone diagrams are used to efficiently capture the results of cumbersome applications of Wick’s theorem, diagrams can be introduced to restate complicated identities associated with angular momentum algebra [47]. A modern account of the underlying group-theoretic properties is provided in Ref. [45]. An introduction in the context of many-body theory can be found in Ref. [50]. Similar frameworks can be introduced to tackle other (more involved) symmetry groups.Footnote 7 The interested reader is referred to Ref. [51] for an extensive discussion.

5.1 Preliminaries

As seen in Sect. 3, CG coefficients constitute the basic building blocks of angular-momentum theory. However, CG coefficients are somewhat inconvenient due to their asymmetry with respect to the involved angular-momenta. A more symmetric representation can be obtained in terms of Wigner 3jm-symbolsFootnote 8

$$\begin{aligned} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) \equiv \frac{1}{\hat{\jmath } _1} (-1)^{j_2 -j_3 -m_1} \left( \begin{array}{cc|c} j_1 &{} j_2 &{} j_3 \\ -m_1 &{} m_2 &{} m_3 \end{array}\right) \, . \end{aligned}$$
(47)

Wigner 3jm-symbols are invariant under cyclic column permutations,

$$\begin{aligned} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) = \left( \begin{array}{ccc} j_3 &{} j_1 &{} j_2 \\ m_3 &{} m_1 &{} m_2 \end{array}\right) = \left( \begin{array}{ccc} j_2 &{} j_3 &{} j_1 \\ m_2 &{} m_3 &{} m_1 \end{array}\right) \, , \end{aligned}$$
(48)

whereas anti-cyclic permutations induce a phase factor

$$\begin{aligned} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) = (-1)^{j_1 + j_2 + j_3 } \left( \begin{array}{ccc} j_2 &{} j_1 &{} j_3 \\ m_2 &{} m_1 &{} m_3 \end{array}\right) \, . \end{aligned}$$
(49)

Wigner 3jm-symbols with opposite magnetic quantum numbers are related via the identity

$$\begin{aligned} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) = (-1)^{j_1 +j_2+j_3} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ -m_1 &{} -m_2 &{} -m_3 \end{array}\right) \, . \end{aligned}$$
(50)

Furthermore, 3jm-symbols with one vanishing (jm) pair simplify according to

$$\begin{aligned} \left( \begin{array}{ccc} j_1 &{} j_2 &{} 0 \\ m_1 &{} -m_2 &{} 0 \end{array}\right) = (-1)^{j_1 -m_1} \frac{1}{\hat{\jmath } _1} \delta _{j_1 j_2} \delta _{m_1 m_2} \, . \end{aligned}$$
(51)

5.2 Vertices

Wigner 3jm-symbols provide the building blocks of the diagrammatic formalism. They are represented by vertices in the so-called Yutsis graphs.Footnote 9 More specifically, a vertex carrying three outgoing lines, each labelled by a tuple \((j_k,m_k)\), represents the 3jm-symbol

figure a

The vertex sign denotes a convention specifying the column order that must be used to write the corresponding 3jm-symbol, i.e., a plus (minus) sign stipulates that the lines and the associated angular-momentum labels must be read counterclockwise (clockwise).

Furthermore, the vertex with one ingoing line represents

figure b

Starting from the two above definitions, the vertices with two and three ingoing lines are obtained by applying the operation consisting of inverting the directions of all three lines at once. Starting for example from the vertex with three outgoing lines, one obtains the vertex with three ingoing lines

figure c

whose expression is given by

$$\begin{aligned} (-1)^{j_1-m_1 +j_2-m_2+j_3-m_3} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ -m_1 &{} -m_2 &{} -m_3 \end{array}\right) \, , \end{aligned}$$
(52)

as a testimony of Eq. (50) and where the magnetic quantum numbers have been added to the phase at no cost given that \(m_1+m_2+m_3=0\) holds. Through this operation, the sign is not altered. Additionally, performing the operation twice does give back the original vertex thanks to the identity

$$\begin{aligned} (-1)^{2(j_1-m_1 +j_2-m_2+j_3-m_3)} =1 \, . \end{aligned}$$
(53)

Changing the sign carried by the vertex can be performed at the price of the phase factor

$$\begin{aligned} \varPhi _\text {ns} = (-1)^{j_1 + j_2 + j_3}\, , \end{aligned}$$
(54)

where the lower index ’ns’ stipulates the node sign reversal. Indeed, moving from a clockwise to a counterclockwise (or vice versa) reading of the vertex corresponds to performing one column inversion in the 3jm-symbol whose effect is characterized by Eq. (49). Notice that changing the vertex sign is equivalent to moving one line across another one.

5.3 Yutsis graphs

The network of 3jm-symbols generated via step (1) of the angular-momentum reduction of a SU-TN (see Sect. 3.1) is represented by a Yutsis graph. Those graphs are, thus, obtained by contracting a set of vertices through their edges in a way that consistently represent the network of 3jm-symbols.

Contracting the edges of two vertices is possible if both lines carry the same angular momentum quantum numbers (jm) and go in the same direction, i.e., one must be going out of the first vertex while the other one must be going into the second vertex

figure d

The contraction itself corresponds to summing over the common magnetic quantum number such that the internal line does not carry it anymore

figure e

Reading the vertices according to the definitions given previously, the algebraic expression resulting from the contraction reads as

$$\begin{aligned} \sum _{m_3} (-1)^{j_3-m_3} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) \left( \begin{array}{ccc} j_{1^\prime } &{} j_{2^\prime } &{} j_3 \\ m_{1^\prime } &{} m_{2^\prime } &{} -m_3 \end{array}\right) \, . \end{aligned}$$
(55)

Given a Yutsis graph, the direction of an internal line carrying angular momentum j can be reversed at the price of accounting for the phase factor

$$\begin{aligned} \varPhi _\text {rev} = (-1)^{2j}\, . \end{aligned}$$
(56)

An example of practical interest relates to fully contracting the two vertices

figure f

to generate the closed Yutsis graph

figure g

actually corresponding to the so-called Wigner 3j-symbol \(\begin{Bmatrix} j_1&j_2&j_3 \end{Bmatrix}\), also called triangular delta or triangular inequality. The corresponding algebraic expression is given by

$$\begin{aligned} \begin{Bmatrix} j_1&j_2&j_3 \end{Bmatrix}&= \sum _{m_1 m_2 m_3} (-1)^{j_1-m_1+ j_2-m_2+j_3-m_3} \nonumber \\&\times \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) \left( \begin{array}{ccc} j_{1} &{} j_2 &{} j_3 \\ -m_{1} &{} -m_{2} &{} -m_3 \end{array}\right) \nonumber \\&= {\left\{ \begin{array}{ll} 1, \quad \text {if} \, |j_1 - j_2| \le j_3 \le j_1 + j_2 \\ 0 , \quad \text {otherwise} \end{array}\right. } \, , \end{aligned}$$
(57)

which vanishes unless the inequalities are satisfied.

5.4 Unfactorizable graphs

Wigner 3nj-symbols provide relevant examples of Yutsis graphs that cannot be simplified via factorization rules. The first example is the Wigner 6j-symbol that is graphically represented as a tetrahedral structure

figure h

Translating the central vertex to the upper right corner and accounting for the change in the ordering of the lines attached to the upper-left and the lower-right vertices, the diagram can be equally represented as a square with two diagonal lines

figure i

Independently of which of the two diagrams is used, the corresponding algebraic expression is

$$\begin{aligned} \begin{Bmatrix} j_1&j_2&j_3 \\ j_4&j_5&j_6 \end{Bmatrix}&\equiv \sum _{m_1 ... m_6} (-1)^{\sum _{k=1}^{6} (j_k -m_k)} \nonumber \\&\quad \times \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) \left( \begin{array}{ccc} j_1 &{} j_5 &{} j_6 \\ -m_1 &{} -m_5 &{} m_6 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{ccc} j_4 &{} j_2 &{} j_6 \\ m_4 &{} -m_2 &{} -m_6 \end{array}\right) \left( \begin{array}{ccc} j_4 &{} j_5 &{} j_3 \\ -m_4 &{} m_5 &{} -m_3 \end{array}\right) \end{aligned}$$
(58)

The case \(n=3\) yields the Wigner 9j-symbol whose algebraic expression

$$\begin{aligned} \begin{Bmatrix} j_1&j_2&j_3 \\ j_4&j_5&j_6 \\ j_7&j_8&j_9 \end{Bmatrix}&\equiv \sum _{m_1 ... m_9} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) \left( \begin{array}{ccc} j_4 &{} j_5 &{} j_6 \\ m_4 &{} m_5 &{} m_6 \end{array}\right) \nonumber \\&\times \left( \begin{array}{ccc} j_7 &{} j_8 &{} j_9 \\ m_7 &{} m_8 &{} m_9 \end{array}\right) \left( \begin{array}{ccc} j_1 &{} j_4 &{} j_7 \\ m_1 &{} m_4 &{} m_7 \end{array}\right) \nonumber \\&\times \left( \begin{array}{ccc} j_2 &{} j_5 &{} j_8 \\ m_2 &{} m_5 &{} m_8 \end{array}\right) \left( \begin{array}{ccc} j_3 &{} j_6 &{} j_9 \\ m_3 &{} m_6 &{} m_9 \end{array}\right) \, , \end{aligned}$$
(59)

can be represented by the Yutsis graph given by the following hexagon

figure j

involving six vertices and nine lines by inverting the signs of the magnetic quantum numbers in the last three 3jm-symbols. While higher-order 3nj-symbols only rarely arise in nuclear many-body theory, they can be equally represented by an unfactorizable Yutsis graph. They do in fact naturally enter in the partial-wave decomposition of nuclear k-body Hamiltonians for \(k\ge 4\).

In practice, Wigner 3nj-symbols play an important role given that they can be pre-calculated and stored in cache in large-scale applications. This is typically done for 6j-symbols and if necessary for (a subset of) 9j-symbols. Since the number of 9j-symbols is very large for a selected model space it is often useful to re-express 9j-symbols as sums of products of 6j-symbols and resort to much smaller 6j-caches if the structure of the angular-momentum networks supports such a strategy.

5.5 From tensor networks to Yutsis graphs

The crucial first step consists of extracting the Yutsis graph associated with the SU-TN of interest. Following step (1) in Sect. 3.1, this is achieved by expressing the original SU-T’s in terms of SR-T’s and a set of CG coefficients that are consecutively replaced by their 3jm-symbol equivalents. The next step consists of splitting each involved summation according to

$$\begin{aligned} \sum _{k} \quad \rightarrow \sum _{n_k l_k j_k t_k m_k } \rightarrow \quad \sum _{{\tilde{k}}} \sum _{m_k } \, . \end{aligned}$$
(60)

In doing so, one can isolate the networks of 3jm-symbols along with the sums over the magnetic quantum numbers. This corresponds to extracting the associated Yutsis graph.

5.6 Factorization rules

Having the Yutsis graph at hand, the goal is to simplify it as much as possible. This corresponds to identifying specific subparts in the graph that can be reduced via the application of identities satisfied by appropriate (sub)sets of 3jm-symbols. Once this is completed, one is left with an expression involving irreducible Wigner 3nj-symbols (see Sect. 4.4) and no magnetic quantum number dependence anymore.

The benefit of using Yutsis graphs is that the search for reducible parts can be automated while their actual reduction can be realized by applying systematic factorization rules on the graph. The rules are characterized by the length of the cycles involved in the factorization process. Below, the factorization rules are introduced one after another with increasing degree of complexity, i.e., cycle length. For the proofs of the factorization formula, the reader is referred to Ref. [45]. A more extensive list of angular-momentum-algebra identities that can be used to define factorization rules can be found in Ref. [47].

5.7 Zero-line rule

The most elementary simplification rule relates to the handling of a 3jm-symbol with one vanishing (jm) pair, called zero line. The corresponding vertex is represented asFootnote 10

figure k

and, with resort to Eq. (51), could be reduced to a simple edge.

5.7.1 Cycles of length two

Fig. 1
figure 1

Factorization rule for a 2-cycle giving rise to two Kronecker deltas plus a 3j-symbol

The next simplest factorization corresponds to the reduction of a 2-cycle. Algebraically, the corresponding identity is the orthogonality relation

$$\begin{aligned} \text {YG}_{\text {2c}}&\equiv \sum _{m_1 m_2} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) \left( \begin{array}{ccc} j_{1} &{} j_2 &{} j_{3^\prime } \\ m_{1} &{} m_{2} &{} m_{3^\prime } \end{array}\right) \nonumber \\&= \sum _{m_1 m_2} (-1)^{\sum _{k=1}^{3}(j_k -m_k)} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ -m_1 &{} -m_2 &{} -m_3 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{ccc} j_{1} &{} j_2 &{} j_{3^\prime } \\ m_{1} &{} m_{2} &{} m_{3^\prime } \end{array}\right) \nonumber \\&= \frac{1}{\hat{\jmath }_3^2} \delta _{j_3 j_{3^\prime }} \delta _{m_3 m_{3^\prime }} \begin{Bmatrix} j_1&j_2&j_3 \end{Bmatrix} \, . \end{aligned}$$
(61)

Figure 1 provides the diagrammatic representation of the identity stated in Eq. (61). Thus, the 2-cycle rule replaces two vertices connected by two lines by a single line in a Yutsis graph.

5.7.2 Cycles of length three

The simplest factorization rule leading to a non-trivial Wigner 3nj-symbol corresponds to the factorization of a 3-cycle as displayed in Fig. 2. Algebraically, the factorization corresponds to the identity

$$\begin{aligned} \text {YG}_{\text {3c}}&\equiv \sum _{m_4 m_5 m_6} (-1)^{\sum _{k=4}^{6} (j_k-m_k)}\left( \begin{array}{ccc} j_5 &{} j_1 &{} j_6 \\ m_5 &{} m_1 &{} -m_6 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{ccc} j_6 &{} j_2 &{} j_4 \\ m_6 &{} m_2 &{} -m_4 \end{array}\right) \left( \begin{array}{ccc} j_4 &{} j_3 &{} j_5 \\ m_4 &{} m_3 &{} -m_5 \end{array}\right) \nonumber \\&= (-1)^{j_1+j_2+j_3} \left( \begin{array}{ccc} j_1 &{} j_2 &{} j_3 \\ m_1 &{} m_2 &{} m_3 \end{array}\right) \begin{Bmatrix} j_1&j_2&j_3 \\ j_4&j_5&j_6 \end{Bmatrix} \, . \end{aligned}$$
(62)

Equation (62) allows one to factorize a topology involving three vertices into an irreducible part, i.e. the 6j-symbol, and a single vertex. Therefore, the resulting graph contains two vertices and three lines less than the initial one.

Fig. 2
figure 2

Factorization rule for a 3-cycle giving rise to a single vertex plus a 6j-symbol

5.7.3 Cycles of length four

Fig. 3
figure 3

Factorization rule for a 4-cycle giving rise to a sum of terms with two 6j-symbols multiplying a Yutsis graph containing two vertices

The most involved factorization rule employed in this work corresponds to a cycle of length four as displayed in Fig. 3. The underlying algebraic identity is given by

$$\begin{aligned} \text {YG}_{\text {4c}}&\equiv \sum _{ \begin{array}{c} m_5 m_6 \\ m_7m_8 \end{array}} (-1)^{j_5-m_5 +j_6 -m_6 +j_7 -m_7 +j_8-m_8} \nonumber \\&\quad \times \left( \begin{array}{ccc} j_8 &{} j_1 &{} j_5 \\ m_8 &{} m_1 &{} -m_5 \end{array}\right) \left( \begin{array}{ccc} j_5 &{} j_2 &{} j_6 \\ m_5 &{} m_2 &{} -m_6 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{ccc} j_6 &{} j_3 &{} j_7 \\ m_6 &{} m_3 &{} -m_7 \end{array}\right) \left( \begin{array}{ccc} j_7 &{} j_4 &{} j_8 \\ m_7 &{} m_4 &{} -m_8 \end{array}\right) \nonumber \\&= (-1)^{j_7-j_1-j_4-j_5} \sum _{j_x m_x}(-1)^{j_x-m_x} \hat{\jmath }_x^2 \nonumber \\&\quad \times \left( \begin{array}{ccc} j_1 &{} j_x &{} j_4 \\ m_1 &{} -m_x &{} m_4 \end{array}\right) \left( \begin{array}{ccc} j_2 &{} j_x &{} j_3 \\ m_2 &{} m_x &{} m_3 \end{array}\right) \nonumber \\&\quad \times \begin{Bmatrix} j_1&j_x&j_4 \\ j_7&j_8&j_5 \end{Bmatrix} \begin{Bmatrix} j_2&j_x&j_3 \\ j_7&j_6&j_5 \end{Bmatrix} \, . \end{aligned}$$
(63)

Equation (63) allows to factorize the topology involving four vertices into an irreducible part made of two 6j-symbols and two vertices. Therefore, the resulting graph contains two vertices and three lines less than the initial one.

Note that the Yutsis graph in Fig. 3 has the symmetry of a square: rotations by multiples of \(90^\circ \) leave it invariant. The rotation is equivalent to relabeling the edges, and leads to a different equivalent factorization for rotation angles of \(90^\circ \) and \(270^\circ \). The handling of cycles of length four is thus nonunique.

5.7.4 Cycles beyond length four

While the present code supports factorizations involving up to cycles of length four, there exist topologies, sketched in Fig. 4, which cannot be simplified through the above stated rules but require more involved identities. In principle, this restricts the range of applicability to topologies that do not contain cycles of length five or higher. The smallest cubic graph involving a cycle of length five is the so-called Peterson graph containing ten vertices and 15 edges. Consequently, the simplest many-body diagram potentially leading to this topology must contain at least five two-body vertices, e.g., corresponding to a fifth-order MBPT diagram or a CC diagram with \(T_3\) amplitudes.

In the testing phase of the current version of the code, the factorization rules were applied to hundreds of many-body diagrams including topologies that are far beyond current state-of-the-art applications. In none of these test cases a Yutsis graph involving a cycle of length five or higher appeared. Future versions of the program will be extended along these lines by including factorizations of more complex topologies, or including more elaborate techniques such as the interchange rule [52].

Fig. 4
figure 4

Schematic picture of a generic higher-order topology that cannot be simplified in terms of the triangle or the quadrilateral rules. Vertex signs are left out for simplicity

6 Applications

A number of different many-body formalisms are now used to exemplify the steps at play in the symmetry reduction process of SU-TNs. The emphasis is on the angular-momentum reduction and details of the formalisms themselves are not within the scope of the present work. All considered examples are typical of state-of-the-art nuclear structure applications.

The formulae derived below are not in the computationally most optimized form. For instance, below parity- and isospin-conservation can be further exploited to yield more efficient implementations. However, processing SU(2)-symmetry yields by far the highest computational benefit due to larger dimensionality of the associated IRREPs.

Even with the symmetry-restricted tensor networks at hand, a reasonably fast implementation relies on an efficient handling of prestored recoupling symbols. One library that particularly suits the needs of nuclear many-body physicists is described in Ref. [53].

6.1 Many-body perturbation theory

In many-body perturbation theory (MBPT) an infinite power series is taken as an ansatz for the exact ground-state energy and wave function [8]

$$\begin{aligned} E_k(\lambda )&= E_k^{(0)} + \lambda E_k^{(1)} + \lambda ^2 E_k^{(2)} + ... \, , \end{aligned}$$
(64a)
$$\begin{aligned} |\varPsi _k(\lambda )\rangle&= |\varPhi \rangle + \lambda |\varPsi _k^{(1)} \rangle + \lambda ^2 |\varPsi _k^{(2)} \rangle + ... \, , \end{aligned}$$
(64b)

where the lower index k enumerates excited states in the spectrum and \(|\varPhi \rangle \equiv | \varPsi _k^{(0)} \rangle \) denotes the unperturbed reference state. The expansions in Eq. (64) are evaluated at \(\lambda =1\) to obtain the quantities corresponding to the original problem of interest. Since the following is exclusively concerned with the description of nuclear ground states, i.e., \(k=0\), the subscript is dropped for simplicity.

The starting point is given by the definition of a splitting of the full Hamiltonian

$$\begin{aligned} H = H_0 + \lambda H_1\, , \end{aligned}$$
(65)

into an unperturbed part \(H_0\) and a perturbation \(H_1\) such that the reference energy is given by

$$\begin{aligned} E_\text {ref} \equiv \langle { \varPhi | H | \varPhi } \rangle = E_0^{(0)} + E_0^{(1)}\, . \end{aligned}$$
(66)

The first contribution to the correlation energy

$$\begin{aligned} \varDelta E \equiv E_0 - E_\text {ref} \end{aligned}$$
(67)

is, thus, obtained at second order. The simplest choice is to take \(| \varPhi \rangle \) as a Slater determinant, typically obtained as the solution of a SU(2)-restricted Hartree-Fock (HF) calculation. In recent years, more sophisticated vacua have been used in order to account for so-called static correlations in open-shell systems. Both multi-configurational reference states obtained from a configuration interaction (CI) diagonalization in a small model space [13] and particle-number-broken HFB vacua [12] have shown to provide computationally cheap benchmarks without loss in accuracy when employing softened chiral potentials. For a recent review, see Ref. [15].

Presently, the simplest single-reference case of low-order canonical HF-MBPT is discussedFootnote 11. Examples are worked out in detail to enable a deeper understanding of each of the individual algorithmic steps.

6.1.1 Second-order energy correction

The second-order energy correction reads asFootnote 12

$$\begin{aligned} E_0^{(2)} = -\frac{1}{4} \sum _{abij} \frac{H_{abij} H_{ijab}}{\epsilon _{ij}^{ab} }\, , \end{aligned}$$
(68)

where ab and ij denote particle and hole states, respectively, i.e., states that are unoccupied and occupied in the reference Slater determinant, respectively. Additionally, a short-hand notation for the energy denominator is used

$$\begin{aligned} \epsilon _{ij...}^{ab...} \equiv \epsilon _a + \epsilon _b +... - \epsilon _i - \epsilon _j - ...\, , \end{aligned}$$
(69)

where \(\epsilon _k\) denotes HF single-particle energies. According to the previous definitions Eq. (68) provides a closed SU-TN involving two mode-4 tensors, i.e. \(H_{ijab}\) and \(\epsilon _{ij}^{ab}\).

Expressing the two involved tensors in Eq. (68) in terms of their AMR-T counterparts according to (the inverse of) Eq. (45) yields

$$\begin{aligned} E_0^{(2)}&= -\frac{1}{4} \sum _{{\tilde{a}} {\tilde{b}}{\tilde{i}}{\tilde{j}}} \frac{1}{{\epsilon _{{\tilde{i}}{\tilde{j}}}^{{\tilde{a}}{\tilde{b}}} }} \sum _{\begin{array}{c} J_1J_2 \\ M_1M_2 \end{array}} H^{J_1}_{{\tilde{a}}{\tilde{b}}\tilde{i} {\tilde{j}}} H^{J_2}_{{\tilde{i}}{\tilde{j}} {\tilde{a}}{\tilde{b}}} \sum _{\begin{array}{c} m_a m_b \\ m_i m_j \end{array}} \left( \begin{array}{cc|c} j_a &{} j_b &{} J_1 \\ m_a &{} m_b &{} M_1 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{cc|c} j_i &{} j_j &{} J_1 \\ m_i &{} m_j &{} M_1 \end{array}\right) \left( \begin{array}{cc|c} j_i &{} j_j &{} J_2 \\ m_i &{} m_j &{} M_2 \end{array}\right) \left( \begin{array}{cc|c} j_a &{} j_b &{} J_2 \\ m_a &{} m_b &{} M_2 \end{array}\right) \, , \end{aligned}$$
(70)

where the fact was used that \(\epsilon _{ij}^{ab} = \epsilon _{\tilde{i}{\tilde{j}}}^{{\tilde{a}}{\tilde{b}}}\) is already an AMR-T given that the single-particle energies are m-independent, i.e., \(\epsilon _{{\tilde{k}}} = \epsilon _k\). The tensor network in Eq. (70) is split into an SU(2)-invariant part that does not depend on single-particle angular-momentum projection quantum numbers and a part carrying the full dependence of magnetic quantum numbers that will be subsequently simplified. In a first step, CG coefficients are converted into 3jm-symbols yielding

$$\begin{aligned} E_0^{(2)}&= -\frac{1}{4} \sum _{{\tilde{a}} {\tilde{b}}{\tilde{i}}{\tilde{j}}} \frac{1}{{\epsilon _{{\tilde{i}}{\tilde{j}}}^{{\tilde{a}}{\tilde{b}}} }} \sum _{J_1J_2 } H^{J_1}_{{\tilde{a}}{\tilde{b}}{\tilde{i}} {\tilde{j}}} H^{J_2}_{{\tilde{i}}{\tilde{j}} {\tilde{a}}{\tilde{b}}} \hat{J} _1^2 \hat{J} _2^2 \nonumber \\&\quad \times \sum _{ M_1M_2} \sum _{\begin{array}{c} m_a m_b \\ m_i m_j \end{array}} (-1)^{-2j_a+2j_b - 2M_1} (-1)^{-2j_i+2j_j - 2M_2} \nonumber \\&\quad \times \left( \begin{array}{ccc} j_a &{} j_b &{} J_1 \\ m_a &{} m_b &{} -M_1 \end{array}\right) \left( \begin{array}{ccc} j_i &{} j_j &{} J_1 \\ m_i &{} m_j &{} -M_1 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{ccc} j_i &{} j_j &{} J_2 \\ m_i &{} m_j &{} -M_2 \end{array}\right) \left( \begin{array}{ccc} j_a &{} j_b &{} J_2 \\ m_a &{} m_b &{} -M_2 \end{array}\right) \, , \end{aligned}$$
(71)

where each phase factor gives in fact

$$\begin{aligned} (-1)^{-2j_a+2j_b - 2M_1}&= (-1)^{-2j_a+2j_b - 2(m_a + m_b)} \nonumber \\&= (-1)^{2(j_a - m_a) } (-1)^{2(j_b - m_b)} \nonumber \\&=1 \, . \end{aligned}$$
(72)

Focusing on the 3jm-symbols network in Eq. (71), the second step consists of reversing all m quantum numbers in the second and fourth 3jm-symbols

$$\begin{aligned}&\sum _{ M_1M_2} \sum _{\begin{array}{c} m_a m_b \\ m_i m_j \end{array}} (-1)^{j_a-m_a+j_b-m_b+j_i-m_i+j_j-m_j+J_1-M_1+J_2-M_2} \nonumber \\&\quad \times \left( \begin{array}{ccc} j_a &{} j_b &{} J_1 \\ m_a &{} m_b &{} -M_1 \end{array}\right) \left( \begin{array}{ccc} j_i &{} j_j &{} J_1 \\ -m_i &{} -m_j &{} M_1 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{ccc} j_i &{} j_j &{} J_2 \\ m_i &{} m_j &{} -M_2 \end{array}\right) \left( \begin{array}{ccc} j_a &{} j_b &{} J_2 \\ -m_a &{} -m_b &{} M_2 \end{array}\right) \, , \end{aligned}$$
(73)

at the price of an extra phase factor, where the magnetic quantum numbers have been added to the phase at no cost given that \(m_i+m_j-M_1=0\) and \(m_a+m_b-M_2=0\) hold and that \(M_1\) and \(M_2\) are integers. The expression in Eq. (73) is now in the proper form to allow for its identification with an appropriate Yutsis graph

figure l

Now that the working graph has been built, the next step consists in simplifying it via the application of appropriate factorization rules. The application of the 2-cycle rule, see Fig. 1, requires the direction of the edges carrying \(j_a\) and \(j_b\) to be reversed, thus bringing the phase \(\varPhi _\text {lr}=(-1)^{2j_a}(-1)^{2j_b}=(-1)^2=1\) and yielding the diagram

figure m

where the red box indicates the subpart of the diagram that is factorizated in the next step. Factorizing the 2-cycle provides the intermediate factor

$$\begin{aligned} \frac{1}{\hat{J} _1^{2}} \begin{Bmatrix} j_a&j_b&J_1 \end{Bmatrix} \delta _{J_1J_2} \end{aligned}$$
(74)

and leaves the diagram

figure n

In the last step, the 3j-symbol is identified after reversing the orientation of the edges carrying \(j_i\) and \(j_j\)

figure o

leading to the additional phase \(\varPhi _\text {lr}=(-1)^{2j_i+2j_j}=(-1)^2=1\) and providing the overall result

$$\begin{aligned} \frac{1}{\hat{J} _1^{2}} \begin{Bmatrix} j_a&j_b&J_1 \end{Bmatrix} \begin{Bmatrix} j_i&j_j&J_1 \end{Bmatrix} \delta _{J_1J_2} \, . \end{aligned}$$
(75)

Replacing the m-dependent part of Eq. (71) by Eq. (75) finally provides the AMR form of the second-order energy correction

$$\begin{aligned} E_0^{(2)} = -\frac{1}{4} \sum _J \hat{J} ^2 \sum _{{\tilde{a}}\tilde{b}{\tilde{i}}{\tilde{j}}} \frac{H^J_{{\tilde{a}}{\tilde{b}}{\tilde{i}}{\tilde{j}}} H^J_{{\tilde{i}}{\tilde{j}}{\tilde{a}}\tilde{b}}}{\epsilon ^{\tilde{a}\tilde{b}}_{\tilde{i}\tilde{j}} }\, , \end{aligned}$$
(76)

where triangular inequalities coming from 3j-symbols are assumed. While the initial SU-TN is of \(N^4\) complexity, the AMR-TN is of \({\tilde{N}}^4 \cdot (J_\text {max}+1)\) complexity, where \({\tilde{N}}\) is the number of reduced basis states \({\tilde{k}}\) and \(J_\text {max}\) corresponds to the maximum number of channels (i.e. allowed values) of the two-body angular-momentum given the maximum one-body angular momentum retained in the (truncated) basis \(\mathcal{B}_1\). For large model spaces the runtime is reduced by several orders of magnitude even for this very simple example.

6.1.2 Third-order energy correction

A more elaborate example is given by the third-order energy correction to the ground-state binding energy

$$\begin{aligned} E_0^{(3)} \equiv E^{(3)}_{pp}+ E^{(3)}_{hh} + E^{(3)}_{ph} \, , \end{aligned}$$
(77)

which is divided into three contributions [8]

$$\begin{aligned} E^{(3)}_{pp}&= \frac{1}{8} \sum _{abcdij} \frac{H_{ijab} H_{abcd} H_{cdij} }{\epsilon ^{ab}_{ij} \epsilon ^{cd}_{ij}} \, , \end{aligned}$$
(78a)
$$\begin{aligned} E^{(3)}_{hh}&= \frac{1}{8} \sum _{abijkl} \frac{H_{ijab} H_{klij} H_{abkl} }{\epsilon ^{ab}_{ij} \epsilon ^{ab}_{kl}} \, , \end{aligned}$$
(78b)
$$\begin{aligned} E^{(3)}_{ph}&= - \sum _{abcijk} \frac{H_{ijab} H_{kbic} H_{ackj} }{\epsilon ^{ab}_{ij} \epsilon ^{ac}_{kj}} \, . \end{aligned}$$
(78c)

Following the same procedure as for \(E_0^{(2)}\), one obtains the Yutsis graph associated with the particle-particle contribution (i.e. \(E^{(3)}_{pp}\)) is given by

figure p

and, similarly, the one extracted from the hole-hole contribution (i.e. \(E^{(3)}_{hh}\))

figure q

which are topologically identical. Due to the presence of one more Hamiltonian matrix element compared to the second-order energy correction, the number of 3jm-symbols, i.e. the number of nodes, is increased by two. In both cases, the red boxes indicate the subgraphs that are factorized by the application of the 2-cycle rule. Applying it twice and identifying the resulting Yutsis graph as a 3j-symbol leads to the result

$$\begin{aligned} \frac{1}{\hat{J} _1^{4}} \begin{Bmatrix} j_a&j_b&J_1 \end{Bmatrix} \begin{Bmatrix} j_c&j_d&J_1 \end{Bmatrix} \begin{Bmatrix} j_i&j_j&J_1 \end{Bmatrix} \delta _{J_1J_2} \delta _{J_2J_3} \, . \end{aligned}$$
(79)

Considering the \(\hat{J} _1^2 \hat{J} _2^2 \hat{J} _3^2\) factor coming from the prior conversion of CG coefficients into 3jm-symbols, the final AMR form of the two contributions is

$$\begin{aligned} E_{pp}^{(3)}&= \frac{1}{8} \sum _J \hat{J} ^2 \sum _{\tilde{a}\tilde{b}\tilde{c}\tilde{d}\tilde{i}\tilde{j}} \frac{ H^J_{\tilde{i} \tilde{j} \tilde{a} \tilde{b}} H^J_{\tilde{a} \tilde{b} \tilde{c} \tilde{d}} H^J_{\tilde{c} \tilde{d} \tilde{i} \tilde{j}} }{ \epsilon ^{\tilde{a}\tilde{b}}_{\tilde{i}\tilde{j}} \epsilon ^{\tilde{c}\tilde{d}}_{\tilde{i}\tilde{j}} } \, , \end{aligned}$$
(80a)
$$\begin{aligned} E_{hh}^{(3)}&= \frac{1}{8} \sum _J \hat{J} ^2 \sum _{\tilde{a}\tilde{b}\tilde{i}\tilde{j}\tilde{k}\tilde{l}} \frac{ H^J_{\tilde{i} \tilde{j} \tilde{a} \tilde{b}} H^J_{\tilde{k} \tilde{l} \tilde{i} \tilde{j}} H^J_{\tilde{a} \tilde{b} \tilde{k} \tilde{l}} }{ \epsilon ^{\tilde{a}\tilde{b}}_{\tilde{i}\tilde{j}} \epsilon ^{\tilde{a}\tilde{b}}_{\tilde{k}\tilde{l}} }\, , \end{aligned}$$
(80b)

which can be read as simple matrix-matrix products within each J channel.

The symmetry reduction of the particle-hole term (i.e. \(E^{(3)}_{ph}\)) is more involved such that, following the same steps, the associated Yutsis graph is

figure r

and can be re-arranged in a more convenient way as

figure s

which is nothing but a 9j-symbol. Consequently, the AMC form of the particle-hole term leads to the algebraic expression

$$\begin{aligned} E_{ph}^{(3)}&= - \sum _K \hat{K} ^2 \sum _{J_1 J_2 J_3} \hat{J} _1^2 \hat{J} _2^2 \hat{J} _3^2 \, \begin{Bmatrix} J_1&j_a&j_j \\ j_i&J_2&j_6 \\ j_b&j_k&J_3 \end{Bmatrix} \nonumber \\&\quad \times \sum _{{\tilde{a}}{\tilde{b}} {\tilde{c}}{\tilde{i}}\tilde{j} {\tilde{k}}} \frac{ H^{J_1}_{{\tilde{i}}{\tilde{j}} {\tilde{a}}{\tilde{b}}} H^{J_2}_{{\tilde{k}}{\tilde{b}}{\tilde{i}}{\tilde{c}}} H^{J_3}_{{\tilde{a}}{\tilde{c}} {\tilde{k}}{\tilde{j}}} }{ \epsilon _{{\tilde{a}}{\tilde{b}}}^{{\tilde{i}}{\tilde{j}}} \epsilon _{{\tilde{a}}{\tilde{c}}}^{{\tilde{k}}{\tilde{j}}} } \, . \end{aligned}$$
(81)

In practical applications, Eq. (81) is conveniently re-written by expressing the 9j-symbols as a sum of products of three 6j-symbols

$$\begin{aligned} E_{ph}^{(3)}&= - \sum _K \hat{K} ^2 \sum _{J_1 J_2 J_3} \hat{J} _1^2 \hat{J} _2^2 \hat{J} _3^2 \nonumber \\&\quad \times \sum _{{\tilde{a}}{\tilde{b}} {\tilde{c}}{\tilde{i}}\tilde{j} {\tilde{k}}} \frac{ H^{J_1}_{{\tilde{i}}{\tilde{j}} {\tilde{a}}{\tilde{b}}} H^{J_2}_{{\tilde{k}}{\tilde{b}}{\tilde{i}}{\tilde{c}}} H^{J_3}_{{\tilde{a}}{\tilde{c}} {\tilde{k}}{\tilde{j}}} }{ \epsilon _{{\tilde{a}}{\tilde{b}}}^{{\tilde{i}}{\tilde{j}}} \epsilon _{{\tilde{a}}{\tilde{c}}}^{{\tilde{k}}{\tilde{j}}}} \nonumber \\&\quad \times \begin{Bmatrix} j_i&j_b&J_1 \\ j_a&j_j&K \end{Bmatrix} \begin{Bmatrix} j_i&j_b&J_2 \\ j_k&j_c&K \end{Bmatrix} \begin{Bmatrix} j_k&j_c&J_3 \\ j_a&j_j&K \end{Bmatrix} \, , \end{aligned}$$
(82)

which can be obtained graphically by a successive application of the 4-cycle rule, the 3-cycle rule and finally the identification of a redundant 3j-symbol. Based on the introduction of so-called Pandya-transformed matrix elements [48]

$$\begin{aligned} \breve{O}^{J_1}_{pqrs} \equiv - \sum _{J_2} \hat{J} ^2_2 \begin{Bmatrix} j_p&j_q&J_1 \\ j_r&j_s&J_2 \end{Bmatrix} O^{J_2}_{psrq} \, , \end{aligned}$$
(83)

Eq. (82) can eventually be written as

$$\begin{aligned} E_{ph}^{(3)} = \sum _J \hat{J} ^2 \sum _{{\tilde{a}}{\tilde{b}} \tilde{c}{\tilde{i}}{\tilde{j}} {\tilde{k}}} \frac{ \breve{H}^J_{{\tilde{i}}{\tilde{b}} {\tilde{a}}{\tilde{j}}} \breve{H}^J_{{\tilde{a}}{\tilde{j}} {\tilde{k}}{\tilde{c}}} \breve{H}^J_{{\tilde{k}}{\tilde{c}} {\tilde{i}}{\tilde{b}}} }{ \epsilon _{\tilde{a}{\tilde{b}}}^{{\tilde{i}}{\tilde{j}}} \epsilon _{{\tilde{a}}{\tilde{c}}}^{\tilde{k}{\tilde{j}}} } \, , \end{aligned}$$
(84)

which reads as the trace of a two-fold matrix-matrix product of Pandya-transformed Hamiltonian matrix elements. Equation (84) clearly shows the computational benefit of an appropriate choice of the coupling order which in practice is not at all obvious.

6.2 Coupled-cluster theory

Contrary to a simple power series ansatz, coupled-cluster theory aims at a non-perturbative resummation of large classes of MBPT diagrams.

6.2.1 General formalism

The starting point in the CC framework is an exponential ansatz to parameterize the exact ground state [8],

$$\begin{aligned} |\varPsi \rangle = e^{T} | \varPhi \rangle \, , \end{aligned}$$
(85)

in terms of the connected cluster operator T defined as

$$\begin{aligned} T \equiv T_1 + T_2 + ... + T_A\, . \end{aligned}$$
(86)

The second-quantized form of the individual terms in Eq. 86 is given by

$$\begin{aligned} T_{n} \equiv \frac{1}{(n!)^2} \sum _{a_1...a_n} \sum _{i_1...i_n} t^{a_1 ...a _n}_{i_1 ...i_n} c^\dagger _{a_1} \cdots c^\dagger _{a_n} c_{i_n} \cdots c_{i_1} \, , \end{aligned}$$
(87)

with \(t^{a_1 ...a _n}_{i_1 ...i_n}\) the n-tuple cluster amplitudes characterizing a mode-2n tensor. Thanks to the exponential form for the wave operator, the CC approach is manifestly size-extensize. In actual applications, T is truncated at a fixed truncation level defining a particular CC model, e.g.,

$$\begin{aligned} T_\text {CCSD}&\equiv T_1 + T_2 \, \end{aligned}$$
(88a)
$$\begin{aligned} T_\text {CCSDT}&\equiv T_1 + T_2 + T_3 \, \nonumber \\&\quad \vdots \end{aligned}$$
(88b)

where the acronyms S,D,T,... indicate inclusion of single (S), double (D), triple (T), ... excitations. Working equations can conveniently be re-expressed in terms of the similarity-transformed Hamiltonian

$$\begin{aligned} {\bar{H}}&\equiv e^{-T} H e^T \nonumber \\&= (He^T)_c \, , \end{aligned}$$
(89)

where the lower index c stipulates the connected character of the expansion.

6.2.2 Energy equation

In the absence of three-body operators in the input Hamiltonian, the correlation energy is given for arbitrary CC truncations by

$$\begin{aligned} \varDelta E_\text {CC}&= \langle { \varPhi | {\bar{H}} | \varPhi } \rangle \nonumber \\&= \sum _{ai} t_{ai} f_{ia} + \sum _{abij} H_{abij} t_{ai} t_{bj} + \frac{1}{4} \sum _{abij} H_{abij} t_{ijab}\, . \end{aligned}$$
(90)

Equation (90) defines a closed TN involving at most four internal contractions. Note that higher-order amplitudes affect the energy only implicitly by relaxing \(T_1\) and \(T_2\) without entering the energy equation explicitly.

Contrary to canonical MBPT, the CC energy equation involves mode-2 tensors associated with one-body operators, i.e. the \(T_1\) amplitudes and the matrix elements \(f_{pq}\) of the Fock operator. The Fock operator is SU(2)-invariant as long as the mean-field calculation is performed in a symmetry-restricted way. As the reference Slater determinant is presently characterized by \(J=0\), cluster amplitudes are irreducible SU(2) tensors of rank \(J=0\) such that a similarity-transformed operator \({\bar{O}}\) has the same irreducible SU(2) tensor rank as its non-transformed counterpart O. Hence, Wigner-Eckart’s theorem trivially enables the introduction of reduced matrix elements

$$\begin{aligned} \langle { p | T_1 | q } \rangle&= \frac{1}{\hat{\jmath } _p}s \left( \begin{array}{cc|c} j_q &{} 0\, &{} j_p \\ m_q &{} 0\, &{} m_p \end{array}\right) ( {\tilde{p}} | \mathbf {T_{1}} | {\tilde{q}} ) \nonumber \\&= (-1)^{j_p - m_p} \left( \begin{array}{ccc} j_p &{} 0 &{} j_q \\ -m_p &{} 0 &{} m_q \end{array}\right) ( {\tilde{p}} | \mathbf {T_{1}} | {\tilde{q}} ) \, , \end{aligned}$$
(91a)
$$\begin{aligned} \langle { p | F | q } \rangle&= \frac{1}{\hat{\jmath } _p} \left( \begin{array}{cc|c} j_q &{} 0\, &{} j_p \\ m_q &{} 0\, &{} m_p \end{array}\right) ( {\tilde{p}} | \mathbf {F} | {\tilde{q}} )\nonumber \\&=(-1)^{j_p - m_p} \left( \begin{array}{ccc} j_p &{} 0 &{} j_q \\ -m_p &{} 0 &{} m_q \end{array}\right) ( {\tilde{p}} | \mathbf {F} | {\tilde{q}} ) \, . \end{aligned}$$
(91b)

Inserting such forms into the first contribution to the CC the energy yields

$$\begin{aligned} \sum _{ai} f_{ia} t_{ai}&= \sum _{{\tilde{a}} {\tilde{i}}} ( {\tilde{i}} \vert \mathbf {F} \vert {\tilde{a}} ) ( {\tilde{a}} \vert \mathbf {T_1} \vert {\tilde{i}} ) \sum _{m_a m_i} (-1)^{j_i - m_i + j_a - m_a} \nonumber \\&\quad \times \left( \begin{array}{ccc} j_i &{} 0 &{} j_a \\ m_i &{} 0 &{} -m_a \end{array}\right) \left( \begin{array}{ccc} j_a &{} 0 &{} j_i \\ m_a &{} 0 &{} -m_i \end{array}\right) \, , \end{aligned}$$
(92)

from which the m-dependent part can be extracted to yield the Yutsis graph

figure t

Reversing the direction of the \(j_a\) edge (\(\varPhi _\text {lr}=(-1)^{2j_a}=-1\)) together with changing the sign of the leftmost node (\(\varPhi _\text {ns}=(-1)^{j_a+j_i}\)) allows to make use of the 2-cycle rule which leads to

$$\begin{aligned} - (-1)^{j_a+j_i} \begin{Bmatrix} j_a&j_i&0 \end{Bmatrix} = - (-1)^{j_a+j_i} \delta _{j_a j_i} = \delta _{j_a j_i} \, , \end{aligned}$$
(93)

such that one obtains the final AMR form

$$\begin{aligned} \sum _{ai} f_{ia} t_{ai}&= \sum _{{\tilde{a}} {\tilde{i}}} \delta _{j_a j_i} ( {\tilde{i}} \vert \mathbf {F} \vert {\tilde{a}} ) ( {\tilde{a}} \vert \mathbf {T_1} \vert {\tilde{i}} ) \, . \end{aligned}$$
(94)

For the second term of the energy equation, one has

$$\begin{aligned}&\sum _{abij} H_{ijab} t_{ai} t_{bj} \nonumber \\&\quad = \sum _{{\tilde{a}} {\tilde{b}} {\tilde{i}} {\tilde{j}} } \sum _{J} \hat{J} ^2 \, H^J_{{\tilde{i}} {\tilde{j}} {\tilde{a}} {\tilde{b}}} \, ( {\tilde{a}} \vert \mathbf {T_1} \vert {\tilde{i}} ) \, ( {\tilde{b}} \vert \mathbf {T_1} \vert {\tilde{j}} ) \sum _{\begin{array}{c} m_a m_b \\ m_i m_j \end{array}} \sum _{M} \nonumber \\&\quad \quad \times (-1)^{(j_i - j_j + M)+(j_a - j_b + M)} \left( \begin{array}{ccc} j_i &{} j_j &{} J \\ m_i &{} m_j &{} -M \end{array}\right) \left( \begin{array}{ccc} j_a &{} j_b &{} J \\ m_a &{} m_b &{} -M \end{array}\right) \nonumber \\&\quad \quad \times (-1)^{(j_a-m_a)+(j_b-m_b)} \left( \begin{array}{ccc} j_a &{} 0 &{} j_i \\ m_a &{} 0 &{} -m_i \end{array}\right) \left( \begin{array}{ccc} j_b &{} 0 &{} j_j \\ m_b &{} 0 &{} -m_j \end{array}\right) \, . \end{aligned}$$
(95)

Reversing the signs of m quantum numbers in the second 3jm-symbol, the m-dependent part of Eq. (95) delivers the Yutsis graph

figure u

with two external edges carrying zero angular momentum. Applying twice the zero-line rule, one ends up with the graphical representation of a 3j-symbol, such that the m-dependent part of Eq. (95) reduces to

$$\begin{aligned} \frac{1}{\hat{\jmath } _a \hat{\jmath } _b} \delta _{j_a j_i} \delta _{j_b j_j} \begin{Bmatrix} j_a&j_b&J \end{Bmatrix} \, , \end{aligned}$$
(96)

thus providing the final closed AMR-TN under the form

$$\begin{aligned} \sum _{abij} H_{ijab} t_{ai} t_{bj}&= \sum _{{\tilde{a}} {\tilde{b}} \tilde{i} {\tilde{j}} } \sum _{J} \delta _{j_a j_i} \delta _{j_b j_j} \frac{\hat{J} ^2}{\hat{\jmath } _a \hat{\jmath } _b} H^J_{{\tilde{i}} {\tilde{j}} {\tilde{a}} {\tilde{b}}}\nonumber \\&\quad \times \, ( {\tilde{a}} \vert \mathbf {T_1} \vert {\tilde{i}} ) \, ( {\tilde{b}} \vert \mathbf {T_1} \vert {\tilde{j}} ) \, . \end{aligned}$$
(97)

The detailed derivation of the last contribution to the energy equation is omitted given that it is formally identical to the derivation of the second-order MBPT correction, i.e. the appropriate Yutsis graph is the one displayed in Sect. 5.1.1. The final result reads as

$$\begin{aligned} \frac{1}{4} \sum _{abij} H_{ijab} t_{abij}&= \frac{1}{4} \sum _J \hat{J} ^2 \sum _{{\tilde{a}}{\tilde{b}}{\tilde{i}}\tilde{j}} H^J_{{\tilde{i}}{\tilde{j}}{\tilde{a}}{\tilde{b}}} \, t^J_{{\tilde{a}}\tilde{b}{\tilde{i}}{\tilde{j}}} \, . \end{aligned}$$
(98)

6.2.3 Amplitude equations

The unknown cluster amplitudes are obtained by solving a set of CC amplitude equations

$$\begin{aligned} 0&= \langle { \varPhi ^a_i | {\bar{H}} | \varPhi } \rangle \, , \end{aligned}$$
(99a)
$$\begin{aligned} 0&= \langle { \varPhi ^{ab}_{ij} | {\bar{H}} | \varPhi } \rangle \, , \nonumber \\&\vdots \end{aligned}$$
(99b)

Equations (99) constitute a set of coupled non-linear equations that must be solved iteratively for every external index combination. They also provide typical examples of open SU-TNs containing external indices that are not summed overFootnote 13.

In order to perform the symmetry reduction, one must sum over all magnetic quantum numbers, and in particular the external ones. This will lead to a closed Yutsis graph. To do so, an external coupling order has to be fixed. The coupling

$$\begin{aligned} \frac{1}{\hat{\jmath } _a^2} \sum _{m_a m_i} \left( \begin{array}{cc|c} j_a &{} \,0\, &{} j_i \\ m_a &{} \,0\, &{} m_i \end{array}\right) \end{aligned}$$
(100)

is used in the case of the \(T_1\) amplitude equations and is such that

$$\begin{aligned} \frac{1}{\hat{\jmath } _a^2} \sum _{m_a m_i} \left( \begin{array}{cc|c} j_a &{} \,0\, &{} j_i \\ m_a &{} \,0\, &{} m_i \end{array}\right) t_{ai}&= \delta _{j_a j_i}\frac{1}{\hat{\jmath } _a} ( \tilde{a} \vert \mathbf {T_1} \vert \tilde{i} ) \, , \end{aligned}$$
(101)

whereas the coupling

$$\begin{aligned} \frac{1}{\hat{J} ^2} \sum _{m_a m_b m_i m_j M} \left( \begin{array}{cc|c} j_a &{} j_b &{} J \\ m_a &{} m_b &{} M \end{array}\right) \left( \begin{array}{cc|c} j_i &{} j_j &{} J \\ m_i &{} m_j &{} M \end{array}\right) \end{aligned}$$
(102)

is used in the case of the \(T_2\) amplitude equations and is such that

$$\begin{aligned} \frac{1}{\hat{J} ^2} \sum _{m_a m_b m_i m_j M} \left( \begin{array}{cc|c} j_a &{} j_b &{} J \\ m_a &{} m_b &{} M \end{array}\right) \left( \begin{array}{cc|c} j_i &{} j_j &{} J \\ m_i &{} m_j &{} M \end{array}\right) t_{abij}&= t^J_{\tilde{a}\tilde{b}\tilde{i}\tilde{j}} \, . \end{aligned}$$
(103)

The alternative couplingsFootnote 14

$$\begin{aligned} \frac{1}{\hat{J} ^2} \sum _{m_a m_b m_i m_j M} \left( \begin{array}{cc|c} j_a &{} j_i &{} J \\ m_a &{} m_i &{} M \end{array}\right) \left( \begin{array}{cc|c} j_b &{} j_j &{} J \\ m_b &{} m_j &{} M \end{array}\right) \end{aligned}$$
(104)

or even

$$\begin{aligned} \frac{1}{\hat{J} ^2} \sum _{m_a m_b m_i m_j M} \left( \begin{array}{cc|c} j_a &{} j_j &{} J \\ m_a &{} m_j &{} M \end{array}\right) \left( \begin{array}{cc|c} j_b &{} j_i &{} J \\ m_b &{} m_i &{} M \end{array}\right) \end{aligned}$$
(105)

can be used equally well. However, it turns out that the resulting equation will be much simpler when the first option is employed since the coupling order is consistent with the coupling order used for the Hamiltonian matrix elements. This is an example where prior experience provides a strong guidance for the proper choice of the angular-momentum coupling scheme even though ultimately all choices yield equivalent results.

To exemplify the coupling of open SU-TNs, one particular contribution to the CCSD doubles amplitude equation is chosen

$$\begin{aligned} D_{abij}&\equiv \sum _{kl} \sum _{ cd} H_{klcd} t_{dj} t_{ak} t_{cbil} \, , \end{aligned}$$
(106)

where (klcd) denote internal indices that are summed over while (abij) characterize the external indices. The construction of the angular-momentum network originating from the application of the external coupling, defined in Eq. (102), to Eq. (106) requires to sum over a product of

  1. (i)

    two 3jm-symbols coming from the external coupling of ab and ij,

  2. (ii)

    two 3jm-symbols with zero-edges coming from the application of Wigner-Eckart theorem to the \(T_1\) amplitudes,

  3. (iii)

    four 3jm-symbols coming from the coupling of H and \(T_2\) matrix elements,

yielding eight 3jm-symbols and eleven summations over magnetic quantum numbers, eight corresponding to one-body indices (\(m_a,m_b,m_c,m_d,m_i,m_j,m_k,m_l\)), two originating from the decoupling of H and \(T_2\) (\(M_1\),\(M_2\)) and one (M) coming from the external coupling of the double amplitude equation. The corresponding Yutsis graph is given by

figure v

The red box indicates a subgraph to which the 4-cycle factorization rule can be applied. However, first applying twice the zero-line rule to the leftmost and rightmost nodes (\(\hat{\jmath }_a^{-1} \delta _{j_a j_k}\) and \(\hat{\jmath }_i^{-1} \delta _{j_j j_d}\)) directly yields a Yutsis graph that is topologically equivalent to the one of the third-order particle-hole contribution in MBPT, i.e., which corresponds to a 9j-symbol. The final expression reads as

$$\begin{aligned} D^J_{\tilde{a}\tilde{b}\tilde{i}\tilde{j}}&= \sum _{J_1 J_2 K} \frac{\hat{J} ^2_1 \hat{J} ^2_2 \hat{K} ^2}{\hat{\jmath } _a \hat{\jmath } _j} \sum _{\tilde{k}\tilde{l}\tilde{c}\tilde{d}} \delta _{j_d j_j} \delta _{j_k j_a} H^{J_1}_{\tilde{k}\tilde{l}\tilde{c}\tilde{d}} ( \tilde{d} \vert \mathbf {T_1} \vert \tilde{j} ) ( \tilde{a} \vert \mathbf {T_1} \vert \tilde{k} ) \, \nonumber \\&\quad t^{J_2}_{\tilde{c}\tilde{b}\tilde{i}\tilde{l}} \begin{Bmatrix} j_i&j_b&K \\ j_a&j_j&J \end{Bmatrix} \begin{Bmatrix} j_c&j_l&K \\ j_a&j_j&J_1 \end{Bmatrix} \begin{Bmatrix} j_l&j_i&J_2 \\ j_b&j_c&K \end{Bmatrix}. \end{aligned}$$
(107)

6.3 In-medium similarity renormalization group

As a final example, the IMSRG approach is considered providing a non-perturbative alternative to CC theory. Throughout the last decade, IMSRG has been successfully applied to various nuclear observables, including low-lying excited states and electromagnetic transitions whose treatments were pioneered and applied to mid-mass closed-shell nuclei in Ref. [55]. Without the use of angular-momentum reduction, such studies in the mid-mass regime would have been impossible from a computational point of view. Thus, non-scalar operators associated with, e.g., electromagnetic transitions constitute an excellent playground to yet extend the application of our automated treatment of angular-momentum reduction.

6.3.1 General formalism

The IMSRG formalism is based on a unitary transformation U(s) of operators parametrized by a continuous variable \(s\in [0,\infty )\) such that

$$\begin{aligned} O(s) = U(s) O(0) U^\dagger (s) \, . \end{aligned}$$
(108)

Equation (108) can be recast into a first-order ordinary differential equation (ODE)

$$\begin{aligned} \frac{\text {d}}{\text {d}s} O(s) = [ \eta (s), O(s) ] \, , \end{aligned}$$
(109)

involving an anti-Hermitian generator \(\eta \) that can be chosen conveniently to obtain a desired decoupling pattern. A standard choice is given by the Wegner generator

$$\begin{aligned} \eta (s) = [H_\text {od}(s), H_\text {d}(s)] \, , \end{aligned}$$
(110)

defined as the commutator of the suitably chosen ’diagonal’ and ’off-diagonal’ parts of H, the end result being that \(H_\text {od}(s)\) is eventually driven to zero. Even though the initial operator may contain up to two-body parts only, the evaluation of the commutator in Eq. (109) increases the particle rank of the operator, thus, inducing many-body operators up to the A-body level. In practice, the IMSRG(2) truncation is typically employed in which operators of higher rank than two-body operators are discarded. As discussed in Ref. [56], the IMSRG(2) approximation is exact up to third order in MBPT for the ground-state energy while resumming large classes of higher-order diagrams.

6.3.2 Evolution of non-scalar operators

The form to Eq. (109) is completely generic and valid for an arbitrary Hermitian operator O, independently of its transformation properties with respect to SU(2) symmetry. For practical applications, the specific tensorial properties of O need however to be taken into account. The evaluation of the ground-state energy provides the simplest case since both \(O=H\) and the generator are scalar operators in this case.

In the general case where O is a spherical tensor operator of rank \(\lambda \), the evaluation of the AMR form of the commutator appearing in Eq. (109) is key. The associated form can be generically written as

$$\begin{aligned} C^\lambda _\mu&\equiv [ \mathbf {S}^{\lambda _1}, \mathbf {T}^{\lambda _2} ]^\lambda _\mu = [\mathbf {S}^{\lambda _1} \mathbf {T}^{\lambda _2}]^\lambda _\mu - [\mathbf {T}^{\lambda _2} \mathbf {S}^{\lambda _1}]^\lambda _\mu \, , \end{aligned}$$
(111)

where \(S^{\lambda _1}_{\mu _1}\) and \(T^{\lambda _2}_{\mu _2}\) are spherical tensor operators of rank \(\lambda _1\) and \(\lambda _2\), respectively, which are subsequently coupled to give a tensor of rank \(\lambda \). This coupling is obtained via spherical tensor product defined through

$$\begin{aligned}{}[\mathbf {S}^{\lambda _1} \mathbf {T}^{\lambda _2} ]^\lambda _\mu&\equiv \sum _{\mu _1 \mu _2} \left( \begin{array}{cc|c} \lambda _1 &{} \lambda _2 &{} \,\lambda \, \\ \mu _1 &{} \mu _2 &{} \,\mu \, \end{array}\right) S^{\lambda _1}_{\mu _1} T^{\lambda _2}_{\mu _2} \, , \end{aligned}$$
(112)

where the left-hand-side is indeed a spherical tensor operator of rank \(\lambda \).

While the complete list of contributions can be found in Ref. [55], the so-called particle-particle contribution to the two-body part of the evolved operator is considered as an example. The associated SU-TN expression is given by

$$\begin{aligned} C^{\lambda \mu }_{pqrs}&= \frac{1}{2} \sum _{tu} \bar{n}_t \bar{n}_u \sum _{\mu _1 \mu _2} \left( \begin{array}{cc|c} \lambda _1 &{} \lambda _2 &{} \,\lambda \, \\ \mu _1 &{} \mu _2 &{} \,\mu \, \end{array}\right) S^{\lambda _1\mu _1}_{pqtu} T^{\lambda _2\mu _2}_{turs} \, , \end{aligned}$$
(113)

where \(n_p \in \{0,1\}\) denotes the occupation number of the state \(|p\rangle \) and \(\bar{n}_p \equiv 1-n_p\). The occupation number is independent of the projection quantum number, i.e., \(n_p=n_{\tilde{p}}\) as well as \(\bar{n}_p=\bar{n}_{\tilde{p}}\).

Applying WET to the left-hand-side of Eq. (113) provides

$$\begin{aligned} C^{\lambda \mu }_{pqrs}&= \sum _{J_1 J_2 M_1 M_2} \frac{1}{\hat{J} _1} \left( \begin{array}{cc|c} j_p &{} j_q &{} J_1 \\ m_p &{} m_q &{} M_1 \end{array}\right) \left( \begin{array}{cc|c} j_r &{} j_s &{} J_2 \\ m_r &{} m_s &{} M_2 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{cc|c} J_2 &{} \lambda &{} J_1 \\ M_2 &{} \mu &{} M_1 \end{array}\right) ({\tilde{p}} {\tilde{q}} J_1 | \mathbf {C}^\lambda | {\tilde{r}} {\tilde{s}} J_2 ) \, , \end{aligned}$$
(114)

and similarly for the tensors operators arising from commutator expansion

$$\begin{aligned} S^{\lambda _1 \mu _1}_{pqtu}&= \sum _{J_3 J_4 M_3 M_4} \frac{1}{\hat{J} _3} \left( \begin{array}{cc|c} j_p &{} j_q &{} J_3 \\ m_p &{} m_q &{} M_3 \end{array}\right) \left( \begin{array}{cc|c} j_t &{} j_u &{} J_4 \\ m_t &{} m_u &{} M_4 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{cc|c} J_4 &{} \lambda _1 &{} J_3 \\ M_4 &{} \mu _1 &{} M_3 \end{array}\right) ({\tilde{p}} {\tilde{q}} J_3 | \mathbf {S}^{\lambda _1} | {\tilde{t}} {\tilde{u}} J_4 ) \, , \end{aligned}$$
(115a)
$$\begin{aligned} T^{\lambda _2 \mu _2}_{turs}&= \sum _{J_5 J_6 M_5 M_6} \frac{1}{\hat{J} _5} \left( \begin{array}{cc|c} j_t &{} j_u &{} J_5 \\ m_t &{} m_u &{} M_5 \end{array}\right) \left( \begin{array}{cc|c} j_r &{} j_s &{} J_6 \\ m_r &{} m_s &{} M_6 \end{array}\right) \nonumber \\&\quad \times \left( \begin{array}{cc|c} J_6 &{} \lambda _2 &{} J_5 \\ M_6 &{} \mu _2 &{} M_5 \end{array}\right) ({\tilde{t}} {\tilde{u}} J_5 | \mathbf {T}^{\lambda _2} | {\tilde{r}} {\tilde{s}} J_6 ) \, . \end{aligned}$$
(115b)

In the following the standard external coupling of a tensor operator (see Eq. (102) for the scalar case) is employed

$$\begin{aligned} \frac{1}{\hat{J} _1}\sum _{\begin{array}{c} m_a m_b \\ m_i m_j \end{array}} \sum _{M_1 M_2 \mu } \left( \begin{array}{cc|c} j_p &{} j_q &{} J_1 \\ m_p &{} m_q &{} M_1 \end{array}\right) \left( \begin{array}{cc|c} j_r &{} j_s &{} J_2 \\ m_r &{} m_s &{} M_2 \end{array}\right) \left( \begin{array}{cc|c} J_2 &{} \lambda &{} J_1 \\ M_2 &{} \mu &{} M_1 \end{array}\right) \, . \end{aligned}$$
(116)

Applying Eq. (116) to Eq. (113) and inserting all the transformations displayed in Eqs. (115) yields

$$\begin{aligned}&({\tilde{p}} {\tilde{q}} J_1 | \mathbf {C}^\lambda | {\tilde{r}} {\tilde{s}} J_2 ) \nonumber \\&\quad =\frac{1}{2}\sum _{\mu _1 \mu _2 \mu } \sum _{\{m_i\}} \sum _{\begin{array}{c} J_1,...,J_6 \\ M_1,...,M_6 \end{array}} \frac{1}{\hat{J} _1 \hat{J} _3 \hat{J} _5 } \left( \begin{array}{cc|c} \lambda _1 &{} \lambda _2 &{} \,\lambda \, \\ \mu _1 &{} \mu _2 &{} \,\mu \, \end{array}\right) \nonumber \\&\quad \quad \times \left( \begin{array}{cc|c} j_p &{} j_q &{} J_1 \\ m_p &{} m_q &{} M_1 \end{array}\right) \left( \begin{array}{cc|c} j_r &{} j_s &{} J_2 \\ m_r &{} m_s &{} M_2 \end{array}\right) \left( \begin{array}{cc|c} J_2 &{} \lambda &{} J_1 \\ M_2 &{} \mu &{} M_1 \end{array}\right) \nonumber \\&\quad \quad \times \left( \begin{array}{cc|c} j_p &{} j_q &{} J_3 \\ m_p &{} m_q &{} M_3 \end{array}\right) \left( \begin{array}{cc|c} j_t &{} j_u &{} J_4 \\ m_t &{} m_u &{} M_4 \end{array}\right) \left( \begin{array}{cc|c} J_4 &{} \lambda _1 &{} J_3 \\ M_4 &{} \mu _1 &{} M_3 \end{array}\right) \nonumber \\&\quad \quad \times \left( \begin{array}{cc|c} j_t &{} j_u &{} J_5 \\ m_t &{} m_u &{} M_5 \end{array}\right) \left( \begin{array}{cc|c} j_r &{} j_s &{} J_6 \\ m_r &{} m_s &{} M_6 \end{array}\right) \left( \begin{array}{cc|c} J_6 &{} \lambda _2 &{} J_5 \\ M_6 &{} \mu _2 &{} M_5 \end{array}\right) \nonumber \\&\quad \quad \times \bar{n}_{{\tilde{t}}}\bar{n}_{{\tilde{u}}} ({\tilde{p}} {\tilde{q}} J_3 | \mathbf {S}^{\lambda _1} | {\tilde{t}} {\tilde{u}} J_4 ) ({\tilde{t}} {\tilde{u}} J_5 | \mathbf {T}^{\lambda _2} | {\tilde{r}} {\tilde{s}} J_6 ) \, . \end{aligned}$$
(117)

After transforming CG coefficients into 3jm-symbols, the angular-momentum network appearing in Eq. (117) can be identified with the following Yutsis graph

figure w

in which the red boxes indicate the subgraphs to which the 2-cycle factorization rule is applied. The residual Yutsis graph corresponds to a 6j-symbol and a phase factor, such that one eventually obtains the reduced for of Eq. (117) as

$$\begin{aligned}&({\tilde{p}} {\tilde{q}} J_1 | \mathbf {C}^\lambda | {\tilde{r}} {\tilde{s}} J_2 ) \nonumber \\&\quad = \frac{1}{2} \hat{\lambda } (-1)^{J_1 + J_2 + \lambda } \sum _{J_3} \begin{Bmatrix} \lambda _1&\lambda _2&\lambda \\ J_2&J_1&J_3 \end{Bmatrix} \sum _{{\tilde{t}} {\tilde{u}}} \nonumber \\&\quad \quad \times \bar{n}_{\tilde{t}}\bar{n}_{{\tilde{u}}} ({\tilde{p}} {\tilde{q}} J_1 | \mathbf {S}^{\lambda _1} | {\tilde{t}} {\tilde{u}} J_3 ) ({\tilde{t}} {\tilde{u}} J_3 | \mathbf {T}^{\lambda _2} | {\tilde{r}} {\tilde{s}} J_2 ) \, . \end{aligned}$$
(118)

In the special case of scalar operator, i.e., \(\lambda = \lambda _1=\lambda _2=0\), the AMC form of the commutator simplifies to

$$\begin{aligned}&({\tilde{p}} {\tilde{q}} J | \mathbf {C}^\lambda | {\tilde{r}} {\tilde{s}} J ) \nonumber \\&\quad = \frac{1}{2\hat{J} } \sum _{{\tilde{t}} {\tilde{u}}} \bar{n}_{{\tilde{t}}} \bar{n}_{{\tilde{u}}} ({\tilde{p}} {\tilde{q}}J| \mathbf {S}^0| {\tilde{t}} {\tilde{u}} J) ({\tilde{t}} {\tilde{u}} J | \mathbf {T} ^0 | {\tilde{r}} {\tilde{s}} J) \, , \end{aligned}$$
(119)

where the following property of the 6j-symbol

$$\begin{aligned} \begin{Bmatrix} 0&0&0 \\ j_1&j_2&j_3 \end{Bmatrix} = (-1)^{2j_1} \frac{1}{\hat{\jmath } _1} \delta _{j_1 j_2} \delta _{j_2 j_3} \end{aligned}$$
(120)

has been used. Equation (119) can be rewritten in terms of angular-momentum-coupled matrix elements (Eq. (45)) instead of reduced matrix elements giving

$$\begin{aligned} C_{{\tilde{p}} {\tilde{q}} {\tilde{r}} {\tilde{s}}}^J = \frac{1}{2} \sum _{{\tilde{t}} {\tilde{u}}} {\bar{n}}_{{\tilde{t}}} {\bar{n}}_{{\tilde{u}}} S_{{\tilde{p}} {\tilde{q}} {\tilde{t}} {\tilde{u}}}^J T_{{\tilde{t}} {\tilde{u}} {\tilde{r}} {\tilde{s}}}^J \, . \end{aligned}$$
(121)

7 Conclusions

In the present work, an automated tool to perform symbolic angular-momentum algebra operations has been designed. This tool relates to the fact that the working equations, i.e. the symmetry-unrestricted tensor networks, at play in state-of-the-art nuclear many-body methods can be analytically reduced with respect to angular-momentum quantum numbers whenever they are effectively employed in a symmetry-restricted context. The corresponding time-consuming and error-prone derivation of the angular-momentum-reduced form of the tensor networks is thus performed in a matter of seconds. The design of the tool is based on the use of Yutsis graph representing networks of Wigner 3jm-symbols and fulfilling sets of factorization rules whose repeated application eventually provides the angular-momentum-reduced form of the equations. While examples of applications have been provided for many-body perturbation theory, coupled cluster theory and the in-medium similarity renormalization group method, the code can be interfaced with any many-body formalism of interest.

While the present paper focuses on SU(2) symmetry, extensions are envisioned for the future, e.g. to the subgroup of SU(2) at play in axially deformed nuclei, or to other symmetry groups.

In view of obtaining the error-free, fast and numerically optimized implementation of involved many-body formalisms, the present code serves as the missing link between an automated tool used to generate the initial symmetry-unrestricted equations and an automated tool used to produce the efficient source code dedicated to numerical applications.

8 Command-Line Interface and Input Files

For simple usage of the code, the amc program is provided. The amc program is a command-line interface to the code that can be used to reduce a set of equations and output the reduced equations to a LaTeX document. The unreduced equations are supplied as an AMC file, in a domain-specific language described in Sect. 7.2.

8.1 Command-Line Options

There are a few options, which can be passed to amc, that modify the behavior of the program:

-o OUTPUT, --output OUTPUT:

Write the resulting LaTeX document to OUTPUT. By default the code strips the extension from the input file, adds a .tex extension, and creates a file of that name in the same directory as the input file.

--collect-ninejs:

Try to reconstruct Wigner 9j-symbols from products of 6j-symbols in the reduced expressions. This results in shorter expressions, but might obscure opportunities to identify intermediates, e.g., when some of the 6j-symbols only depend on the indices of single tensors.

--keep-threejs:

Keep 3j-symbols generated during the reduction process. Most often, these inequality constraints are implicitly contained in tensor variables, so removing them does not generate any loss of information. Constraints that are implicit in 6j- or 9j-symbols are never shown.

--wet-convention CONVENTION:

Switch the convention used for reduced matrix elements. Currently, the code supports two conventions: the wigner convention

$$\begin{aligned} \langle { p | T^{J}_{M} | q } \rangle = (-1)^{2J} \frac{1}{\hat{\jmath } _p} \left( \begin{array}{cc|c} j_q &{} J &{} j_p \\ m_q &{} M &{} m_p \end{array}\right) ( {\tilde{p}} | {\mathbf {T}^{J}} | {\tilde{q}} ), \end{aligned}$$
(122)

which has been adopted in the body of the paper, and the sakurai convention

$$\begin{aligned} \langle { p | T^{J}_{M} | q } \rangle = \frac{1}{\hat{\jmath } _q} \left( \begin{array}{cc|c} j_q &{} J &{} j_p \\ m_q &{} M &{} m_p \end{array}\right) ( {\tilde{p}} | {\mathbf {T}^{J}} | {\tilde{q}} ). \end{aligned}$$
(123)

The wigner convention is used by default.

8.2 Angular-Momentum Coupling Language

To facilitate the use of the code the AMC language is provided to specify the tensors and their coupling schemes as well as to enter the equations to be coupled. The basic building blocks of the language are integers and fractions (( ), strings ( ), booleans ( ), and tuples [ ]. Comments are introduced by the pound sign (#) and last until the end of the line.

The tensors and equations are defined in a plain text file consisting of tensor declaration and equation statements. The statement

figure ab

declares a tensor with properties specified by the key-value pairs inside the curly braces. The following keys are accepted:

  1. mode

    The number of indices of the tensor. The mode is either specified as an even integer, e.g. 2 for a one-body operator or 4 for a two-body operator, or as a tuple of two numbers to specify x creator and y annihilator indices.

  2. scalar

    A boolean indicating that the tensor is scalar (rank 0). The code exploits additional angular-momentum constraints for scalar tensors, and uses the unreduced matrix elements by default.

  3. reduce

    A boolean indicating that this scalar tensor uses Wigner-Eckart reduced matrix elements. This key is ignored for nonscalar tensors, which always use reduced matrix elements. The default value is , so unreduced matrix elements are assumed.

  4. diagonal

    A boolean value that specifies whether the tensor is diagonal. Diagonal tensors have half the number of indices, i.e., a mode-2 diagonal tensor has one index.

  5. scheme

    The coupling scheme of the tensor. There are multiple ways to couple the angular momenta of the tensor indices. By default, the angular momenta of the first two creator indices are coupled, the resulting angular momentum is coupled with the third, etc., until all angular momenta have been coupled, and the process is repeated for the annihilator indices. This key accepts nested tuples that specify the coupling order of the tensor indices. Creator indices are numbered from 1 to x, annihilator indices from \(x+1\) to \(x+y\). The elements of each tuple are either tuples themselves or index numbers. Index numbers may be negated to request coupling of the time-reversed state.

  6. latex

    The LaTeX command used to typeset the tensor in the program output. By default, the name of the tensor is used.

To give an example,

figure ae

declares a scalar tensor X with two creator and two annihilator indices, whose m-scheme, i.e. SU(2) uncoupled, matrix elements can be recovered via

$$\begin{aligned} X_{pqrs}&= (-1)^{j_s-m_s+j_q-m_q} \nonumber \\&\quad \times \sum _{JM} \left( \begin{array}{cc|c} j_p &{} j_s &{} J \\ m_p &{} -m_s &{} M \end{array}\right) \left( \begin{array}{cc|c} j_r &{} j_q &{} J \\ m_r &{} -m_q &{} M \end{array}\right) X^{J}_{{\tilde{p}} {\tilde{q}} {\tilde{r}} {\tilde{s}}}. \end{aligned}$$
(124)

Equations are declared as

figure af

The variable on the left-hand side is a declared tensor with index subscripts, such as . Indices consisting of more than one character can be used by enclosing the subscript with braces and separating the indices with spaces, like in . Index names can consist of letters, numbers, and underscore characters. The expression on the right-hand side consists of sums of products of tensor variables, denoted by and operators. Two special operators are available: and . The operator lists the indices to be summed over. It is used in the following way:

figure an

The subscript lists the indices. The same rules apply as for tensor variables. All indices have to be mentioned exactly once either on the left-hand side of the equation or in the subscript of the sum operator.

The other operator is the permutation operator . It supports two modes of operation: used as P(ij), it permutes indices i and j in the expression to its right. Used as

$$\begin{aligned} P(i_1\dotsc i_m/j_1\dotsc j_n/\dotsc /k_1\dotsc k_p)\, , \end{aligned}$$

it generates all distinct permutations between the index sets separated by slashes. Concretely, \(P(i/j) = 1 - P(ij)\), \(P(ij/k) = 1 - P(ik) - P(jk)\), and \(P(i/j/k) = 1 - P(ij) - P(ik) - P(jk) + P(ij)P(jk) + P(ik)P(jk)\).

As an example, an equation arising from the three-body part C3 of the commutator of a normal-ordered two-body operator A2 with a three-body operator B3, needed for the IMSRG(3), can be entered like this:

figure ap

The tensors n and nbar are diagonal one-body tensors containing occupation numbers.

9 Organization of the code

The AMC code is organized into five modules: ast, output, parser, reduction, and yutsis. The ast module defines classes whose instances make up the abstract syntax trees that are processed by the package, along with some helper classes that simplify working with the trees themselves. The output module contains functions that turn abstract syntax trees back into other formats. Currently, it only contains a module for LaTeX output. The parser module provides a parser based on the PLY parser generator [57] that produces abstract syntax trees from AMC files. The reduction module contains functions to perform the angular-momentum reduction itself. Finally, the yutsis module contains classes and functions for building and manipulating Yutsis graphs, as well as for simplifying the resulting expressions.

The AMC package is directly executable, and the installer creates a wrapper named amc for convenience. Executing the package provides a command-line interface for parsing an AMC file, reduction of the contained expressions, and output of a LaTeX file.

The program flow is the following:

figure aq

First, the AMC file is parsed into an abstract syntax tree. The tree of each equation is expanded until it consists of a sum of products. For each term, a Yutsis graph is constructed according to the coupling schemes of the mentioned tensors. The reduction procedure looks for 2-, 3- and 4-cycles in the graph and applies the rules discussed in Sect. 4.6, iteratively factorizing the graph until it is completely expressed in terms of Kronecker deltas, triangular deltas, and 6j-symbols. If enabled, a post-processing step tries to reconstruct 9j-symbols by combining sets of three 6j-symbols. The resulting abstract syntax tree is constructed by replacing all tensor variables with reduced ones and adding the objects resulting from the reduction of the Yutsis graph. This syntax tree represents the reduced equation, and is subsequently converted to a LaTeX expression and written to the output document.

9.1 Testing files

The AMC package contains 7 example input files along with the outputs generated by the amc program. The examples cover all applications discussed in Sect. 5. Additionally, a more complex example is provided in the form of commutators of three-body operators that appear in IMSRG(3), and a file showing how to derive the Pandya transform of a scalar and a non-scalar tensor in a few lines of AMC code.

9.2 Methods

In this section only a pointer to the central methods is provided. See the API documentation that accompanies the package for more information.

parser.Parser.parse:

(instance method) Parse a string into an abstract syntax tree according to the AMC language grammar.

reduction.reduce_equation:

Reduce an equation, given as an abstract syntax tree, to symmetry-restricted form.

output.latex.equations_to_document:

Turn a list of equations into a LaTeX document. The equations can be in symmetry-reduced or unreduced form.