Template Function sequant::detail::compute_index_replacement_rules¶
Defined in File wick.impl.hpp
Function Documentation¶
computes index replacement rules
Kronecker deltas are translated into index replacement rules. If using orthonormal representation, overlaps between orthonormal spaces are Kronecker deltas, hence such overlaps are also used to produce replacement rules. (N.B. even if working in orthonormal representation, dependent spaces are not orthonormal if their protoindices differ). Summations are then reduced by index replacements. Reducing sums over dummy (internal) indices uses 2 rules:
if a Kronecker delta binds 2 internal indices I and J, replace them with a new internal index representing intersection of spaces of I and J, !!remove delta!!
if a Kronecker delta binds an internal index J and an external index I:
if space of J includes space of I, replace J with I, !!remove delta!!
if space of J is a subset of space of I, replace J with a new internal index representing intersection of spaces of I and J, !!keep the delta!!
- Returns:
index replacement map + whether found any kronecker tensors or overlaps equivalent to them; the former may be empty even if the latter is true, if, e.g., contain trivial self-overlaps with identical indices; return null if
productis zero for any reason, e.g. because it includes an overlap of 2 indices from nonoverlapping spaces