Function sequant::impl::binarize(ExprPtr const&, IndexSet const&, const BinarizationOptions&, std::size_t&, detail::InlineContext *)

Function Documentation

EvalExprNode sequant::impl::binarize(ExprPtr const &expr, IndexSet const &uncontract, const BinarizationOptions &opts, std::size_t &node_counter, detail::InlineContext *inline_ctx)
Parameters:
  • node_counter – Running left-first-post-order count of contraction (Product) nodes constructed so far, threaded by reference through the whole recursive descent for one top-level binarize call, so it can be checked against opts.node_batch_axes.size() by the caller. Must be the same counter object across the entire call tree of a single top-level invocation; do not reset per subtree.

  • inline_ctx – the definitions to inline into the leaves of the expression; null for none