sf.physics.bargmann.contract_two_Abc

mrmustard.physics.bargmann.contract_two_Abc(Abc1, Abc2, idx1, idx2)[source]

Returns the contraction of two (A,b,c) triples with given indices.

Note that the indices must be a complex variable pairs with each other to make this contraction meaningful. Please make sure the corresponding complex variable with respect to your Abc triples. For examples, if the indices of Abc1 denotes the variables (\alpha, \beta), the indices of Abc2 denotes the variables (\alpha^*,\gamma), the contraction only works with idx1 = [0], idx2 = [0].

Parameters:
  • Abc1 (Tuple[ndarray[Tuple[int, int], TypeVar(C, complex64, complex128)], ndarray[Tuple[int], TypeVar(C, complex64, complex128)], complex]) – the first (A,b,c) triple

  • Abc2 (Tuple[ndarray[Tuple[int, int], TypeVar(C, complex64, complex128)], ndarray[Tuple[int], TypeVar(C, complex64, complex128)], complex]) – the second (A,b,c) triple

  • idx1 (Sequence[int]) – the indices of the first (A,b,c) triple to contract

  • idx2 (Sequence[int]) – the indices of the second (A,b,c) triple to contract

Returns:

The contracted (A,b,c) triple