Function sequant::mbpt::bernoulli::detail::wick_reduce

Function Documentation

ExprPtr sequant::mbpt::bernoulli::detail::wick_reduce(const ExprPtr &expr_in)

Applies Wick’s theorem to expr retaining PARTIAL contractions, reducing a product of normal-ordered operators to a sum of normal-ordered operators (each = coefficient tensor × at most one residual NormalOperator; fully-contracted terms carry none). Unlike the expectation-value path it keeps operators rather than collapsing to a scalar VEV.

Note

expr is left untouched; the reduction runs on a clone.