Calculate the new converged CTMRG tensors (varipeps.ctmrg.calc_ctmrg_env() and peps_ad.ctmrg.calc_ctmrg_env_custom_rule())

varipeps.ctmrg.calc_ctmrg_env(peps_tensors: Sequence[Array], unitcell: PEPS_Unit_Cell, *, eps: float | None = None, enforce_elementwise_convergence: bool | None = None, _return_truncation_eps: bool = False) PEPS_Unit_Cell

Calculate the new converged CTMRG tensors for the unit cell. The function updates the environment all iPEPS tensors in the unit cell according to the periodic structure.

Parameters:
Keyword Arguments:
  • eps (float, optional) – The convergence criterion.

    Default: None

  • (obj (enforce_elementwise_convergence) – bool): Enforce elementwise convergence of the CTM tensors instead of only convergence of the singular values of the corners.

Returns:

New instance of the unitcell with all updated converged CTMRG tensors of all elements of the unitcell.

Return type:

PEPS_Unit_Cell

varipeps.ctmrg.calc_ctmrg_env_custom_rule(peps_tensors: Sequence[Array], unitcell: PEPS_Unit_Cell, _return_truncation_eps: bool = False) PEPS_Unit_Cell

Wrapper function of calc_ctmrg_env which enables the use of the custom VJP for the calculation of the gradient.

Parameters:
Returns:

New instance of the unitcell with all updated converged CTMRG tensors of all elements of the unitcell.

Return type:

PEPS_Unit_Cell