quemb.molbe.sparse_2el_integral.MutableSemiSparse3DTensor

class quemb.molbe.sparse_2el_integral.MutableSemiSparse3DTensor(shape, exch_reachable)

Special datastructure for semi-sparse and partially symmetric 3-indexed tensors.

For a tensor, \(T_{ijk}\), to be stored in this datastructure we assume

  • 2-fold permutational symmetry for the \(i, j\) indices, i.e. \(T_{ijk} = T_{jik}\)

  • sparsity along the \(i, j\) indices, i.e. \(T_{ijk} = 0\) for many \(i, j\)

  • dense storage along the \(k\) index

It can be used for example to store the 3-center, 2-electron integrals \((\mu \nu | P)\), with AOs \(\mu, \nu\) and auxiliary basis indices \(P\). Semi-sparsely, because it is assumed that there are many exchange pairs \(\mu, \nu\) which are zero, while the integral along the auxiliary basis \(P\) is stored densely as numpy array.

2-fold permutational symmetry for the \(\mu, \nu\) pairs is assumed, i.e.

\[(\mu \nu | P) == (\nu, \mu | P)\]

Note that this class is immutable which enables to store the unique, non-zero data in a dense manner, which has some performance benefits.

Attributes

class_type = jitclass.MutableSemiSparse3DTensor#7fd651ace870<unique_dense_data:array(float64, 2d, C),shape:UniTuple(int64 x 3),exch_reachable:ListType[array(int64, 1d, C)],_data:DictType[uint64,float64]<iv=None>,naux:int64>
shape: tuple[int, int, int]
naux: int
exch_reachable: list[ndarray[tuple[int], dtype[NewType(OrbitalIdx, integer)]]]

Methods

__init__(shape, exch_reachable)

to_dense()

Convert to dense 3D tensor