Function sequant::impl::binarize

Function Documentation

EvalExprNode sequant::impl::binarize(ExprPtr const &expr, IndexSet const &uncontract, const BinarizationOptions &opts, std::size_t &node_counter)
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.