Function sequant::opt::detail::batchable_index_list¶
Defined in File single_term_detail.hpp
Function Documentation¶
-
inline container::vector<Index> sequant::opt::detail::batchable_index_list(TensorNetwork const &network, std::function<bool(Index const&)> const &is_batchable)¶
Collects the distinct batchable indices (in appearance order) across all tensors in
network.Iterates over every tensor slot (bra, ket, and aux) and appends an index to the result the first time it is seen and
is_batchablereturns true for it. The returned list assigns each index a stable bit position: index at positionkis bitkof a sliced-set bitmaskB.- Parameters:
network – The TensorNetwork to scan.
is_batchable – Predicate returning true for indices in a batchable space (e.g. a DF/RI auxiliary space).
- Returns:
Ordered, deduplicated list of batchable indices.