Template Function sequant::opt::detail::sliced_footprints

Function Documentation

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

Footprint tables for every sliced-set B of batchable indices.

Returns a vector of 2^m tables, where m = aux_list.size(). Table B is the result of subset_footprints evaluated with an extent function that replaces the full extent of aux_list[k] with min(full_extent, batch) whenever bit k is set in B.

Parameters:
  • network – The TensorNetwork.

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

  • idxsz – Callable mapping an Index to its full extent.

  • is_batchable – Predicate identifying batchable indices.

  • batch_target_size – Per-index slice-size function (an upper bound): a sliced batchable index ix contributes min(full_extent, batch_target_size(aux_list[k])). This is a conservative (over-)estimate of the realized whole-tile batch, which the backend rounds down to a tile multiple (never above the target).

  • aux_list – Ordered list of distinct batchable indices (as returned by batchable_index_list).

  • inner_pow – Optional k-aware CSV/PNO composite extent forwarded to each per-B subset_footprints call; see inner_aware_volume. Orthogonal to slicing (composites are not the batchable aux indices).

Returns:

tables[B][n] = footprint of subset n under sliced-set B.