Template Function sequant::opt::detail::subset_footprints

Function Documentation

template<typename TIdxs, typename IdxToSz>
container::vector<double> sequant::opt::detail::subset_footprints(TensorNetwork const &network, TIdxs const &tidxs, IdxToSz &&idxsz, std::function<double(Index const&, std::size_t)> const &inner_pow = {}, container::vector<char> const *connected = nullptr)

Footprint (dense element count) of every subset’s result tensor.

S[n] is the product of extents of the open indices of subset n (those remaining after contracting the tensors in n, given tidxs as the final target indices). S[0] (empty subset) and any scalar result are 0. Shared by the peak DP and its tests so both agree on per-subset sizes.

Parameters:
  • network – The TensorNetwork.

  • tidxs – Target (open) indices of the network.

  • idxsz – Callable mapping an Index to its extent.

  • inner_pow – Optional k-aware CSV/PNO composite extent forwarded to footprint_counter; see inner_aware_volume.

Returns:

S[n] = footprint of subset n's result tensor.