Template Function sequant::opt::detail::subset_open_aux

Function Documentation

template<typename TIdxs>
container::vector<std::size_t> sequant::opt::detail::subset_open_aux(TensorNetwork const &network, TIdxs const &tidxs, container::vector<Index> const &aux_list)

Per-subset bitmask of batchable indices that are OPEN in that subset.

For each subset n of the input tensors, bit k of open_aux[n] is set iff aux_list[k] is among the open (external) indices of subset n (those that remain after contracting n's tensors, with tidxs as the final targets). Used by the multi-mode batched DP and oracle to restrict the sliced-set context to indices actually open in a sized subset, so that table lookups (sliced_footprints) are indexed consistently on both sides.

Parameters:
  • network – The TensorNetwork.

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

  • aux_list – Ordered list of distinct batchable indices (as returned by batchable_index_list); index k maps to bit k.

Returns:

open_aux[n] for every subset n.