Apply a contraction (varipeps.contractions.apply_contraction())
- varipeps.contractions.apply_contraction(name: str, peps_tensors: Sequence[Array], peps_tensor_objs: Sequence[PEPS_Tensor], additional_tensors: Sequence[Array], *, disable_identity_check: bool = True) Array
Apply a contraction to a list of tensors.
For details on the contractions and their definition see
varipeps.contractions.Definitions.- Parameters:
name (
str) – Name of the contraction. Must be a class attribute of the classvaripeps.contractions.Definitions.peps_tensors (sequence of
jax.numpy.ndarray) – The PEPS tensor arrays that should be contracted.peps_tensor_objs (sequence of
PEPS_Tensor) – The PEPS tensor objects corresponding the the arrays. These arguments are split up due to limitation of the jax library.additional_tensors (sequence of
jax.numpy.ndarray) – Additional non-PEPS tensors which should be contracted (e.g. gates).
- Keyword Arguments:
disable_identity_check (
bool, optional) – Disable the check if the tensor is identical to the one of the corresponding object.Default:True- Returns:
The contracted tensor.
- Return type:
jax.numpy.ndarray