Function sequant::eval::dryrun::make_dryrun_result

Function Documentation

inline ResultPtr sequant::eval::dryrun::make_dryrun_result(container::svector<Index> idx, std::shared_ptr<CostModel const> cm, ExtentOverrides overrides = {}, ExtentOverrides lobounds = {})

Builds whichever concrete DryRun Result type matches idx's content: a nested ResultDryRunNested if any index in idx is proto-indexed (a CSV/PNO composite leg, e.g. a CSV amplitude’s PNO domain leg a_1<i_1,i_2>), otherwise a flat ResultDryRun.

Dispatch is by content of the decoded result annotation, not by either operand’s concrete type &#8212; exactly mirroring how the real eval engine itself decides tensor-of-tensor-ness (EvalExpr::tot(), from the same proto-indexed-leg criterion). This is what lets prod()/sum() freely combine a flat operand (e.g. a bare 3-center DF integral) with a nested one (e.g. a CSV/PNO coefficient), exactly as real CSV-CCSD terms do, without either side needing to know the other’s concrete type.