einsum
- adcc.einsum(subscripts: str, *operands: Tensor, optimise: None | bool | Literal['optimal', 'dp', 'greedy', 'random-greedy', 'random-greedy-128', 'branch-all', 'branch-2', 'auto', 'auto-hq'] | Collection[Tuple[int, ...]] | Callable[[List[FrozenSet[str]], FrozenSet[str], Dict[str, int], int | None], Collection[Tuple[int, ...]]] = 'auto') Tensor | Any
Evaluate Einstein summation convention for the operands similar to numpy’s einsum function. Uses opt_einsum and libadcc to perform the contractions.
Using this function does not evaluate, but returns a contraction expression tree where contractions are queued in optimal order.
- Parameters:
subscripts (str) – Specifies the subscripts for summation.
*operands (libadcc.Tensor) – These are the arrays for the operation.
optimise (OptimizeKind, optional (default:
auto)) – Choose the type of the path optimisation, see opt_einsum.contract for details.