GammaLoop · latest
On this page

contract

gammaloop Function

contract(atom_str: str) -> str

Contract repeated tensor indices using Idenso's structural contraction.

Parameters

atom_str str

Symbolica tensor expression whose repeated indices encode contractions.

Returns

str

The contracted expression, with compatible vector pairs written as dots.

Raises

Exception

If atom_str cannot be parsed or converted.

Examples

Rewrite a contraction before passing it to an Idenso workflow:

contract("spenso::g(spenso::mink(4,mu),spenso::mink(4,mu))")