feynlag.pheno.contraction.contract_trace¶
- feynlag.pheno.contraction.contract_trace(factors, tensors, dot, memo=None)[source]¶
Tr[factors] × ∏ tensors, fully contracted, as a scalar (γ₅-free part — see the module docstring).- Parameters:
factors – the Dirac string, as for
_expand_chiral_string(), with a'G'factor’s free Lorentz index given as a plain hashable name (not a tuple).tensors – loose tensors sharing those names —
('g', a, b)(a metric) and('v', combo, a)(the vectorΣ c_h h^a,combo = ((c_h, head), …)).dot – callable
(head, head) -> scalar, e.g.dot().memo – optional slash-trace cache, see
_scalar_trace().
- Raises:
ValueError – an index name that does not appear exactly twice.