Function sequant::detail::basis_counts

Function Documentation

inline AsyCost::ExponentMap sequant::detail::basis_counts(Tensor const &t)

Tally indices per IndexBasis appearing in the bra+ket+aux of t. The aux slots are included so that auxiliary spaces (e.g. density-fitting/THC) show up in the cost. AsyCost is only used for analysis/reporting, so bases are taken verbatim from the indices, with no registry lookup.

Cost is expressed in terms of whatever IndexBasis each index carries, so each basis instance of a space is a symbol of its own. A union-space index (e.g. MR hole I=i∪u) contributes its union dimension |I|=|i|+|u| as a single symbol: it is not decomposed into base-space (i, u, …) block terms.