Template Function sequant::opt::detail::run_single_term_opt

Function Documentation

template<class Model, typename TIdxs>
EvalSequence sequant::opt::detail::run_single_term_opt(Model const &m, TensorNetwork const &network, TIdxs const &tidxs)

Generic single-term optimization: build context, solve, reconstruct.

Template Parameters:

Model – A type satisfying the CostModel concept (a built-in objective such as AdditiveModel, or a user-defined model).

Parameters:
  • m – The model instance carrying the objective’s parameters.

  • network – The TensorNetwork containing the tensors to be contracted.

  • tidxs – The set of indices that should remain open in the final result.

Returns:

The optimal EvalSequence under the model’s objective.