Template Function sequant::binarize(ExprPtr const&, IndexSet const&, const BinarizationOptions&)¶
Defined in File eval_expr.hpp
Function Documentation¶
-
template<typename ExprT = EvalExpr>
FullBinaryNode<ExprT> sequant::binarize(ExprPtr const &expr, IndexSet const &external = {}, const BinarizationOptions &opts = {})¶ Creates a binary tree for evaluation.
- Deprecated:
The root EvalExpr’s tensor has a positional bra/ket split: each surviving external ends up in whichever bra/ket slot it occupied in its source factor (see eval_expr.cpp ~ “target_indices” lambda). For terms equivalent under bra<->ket-swap, this can yield a head with an unconventional bra/ket layout (e.g., 3:1 for a CCSD T2 residual) that breaks downstream code reading the result tensor by slot position. Prefer the ResultExpr overload, which lets the caller declare the head’s bra/ket layout explicitly via the LHS and is space/convention-agnostic in the IR.
See also
binarize(ResultExpr const&)
- Parameters:
expr – an expression to binarize
external – additional external (uncontracted) indices; only needed for indices that appear more than once in
expr(i.e., hyperindices) but should not be contracted. Indices appearing once are automatically treated as external.