quemb.molbe.sparse_2el_integral.SemiSparse3DTensor

class quemb.molbe.sparse_2el_integral.SemiSparse3DTensor(unique_dense_data, 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.SemiSparse3DTensor#7f01d31e27e0<_keys:array(int64, 1d, C),unique_dense_data:array(float64, 2d, C),shape:UniTuple(int64 x 3),exch_reachable:ListType[array(int64, 1d, C)],naux:int64>
unique_dense_data: ndarray[tuple[int, ...], dtype[float64]]
shape: tuple[int, int, int]
naux: int
exch_reachable: list[ndarray[tuple[int], dtype[NewType(OrbitalIdx, integer)]]]

Methods

__init__(unique_dense_data, shape, ...)

to_dense()

Convert to dense 3D tensor