Apply a contraction (varipeps.contractions.apply_contraction())

varipeps.contractions.apply_contraction(name: str, peps_tensors: ~typing.Sequence[~jax.Array], peps_tensor_objs: ~typing.Sequence[~varipeps.peps.tensor.PEPS_Tensor], additional_tensors: ~typing.Sequence[~jax.Array], *, disable_identity_check: bool = False, custom_definition: ~typing.Dict[str, ~typing.List[~typing.List[str | ~typing.List[str]] | ~typing.List[~typing.Tuple[int] | ~typing.List[~typing.Tuple[int]]]]] | None = None, config: ~varipeps.config.PEPS_AD_Config = PEPS_AD_Config(ad_use_custom_vjp=True, ad_custom_print_steps=False, ad_custom_verbose_output=False, ad_custom_convergence_eps=1e-07, ad_custom_max_steps=75, checkpointing_ncon=False, checkpointing_projectors=False, ctmrg_convergence_eps=1e-08, ctmrg_enforce_elementwise_convergence=True, ctmrg_max_steps=75, ctmrg_print_steps=False, ctmrg_verbose_output=False, ctmrg_truncation_eps=1e-12, ctmrg_fail_if_not_converged=True, ctmrg_full_projector_method=<Projector_Method.FISHMAN: 3>, ctmrg_increase_truncation_eps=True, ctmrg_increase_truncation_eps_factor=100, ctmrg_increase_truncation_eps_max_value=1e-06, ctmrg_heuristic_increase_chi=True, ctmrg_heuristic_increase_chi_threshold=1e-06, ctmrg_heuristic_increase_chi_step_size=2, ctmrg_heuristic_decrease_chi=True, ctmrg_heuristic_decrease_chi_step_size=1, svd_sign_fix_eps=0.1, optimizer_method=<Optimizing_Methods.BFGS: 3>, optimizer_max_steps=300, optimizer_convergence_eps=1e-05, optimizer_ctmrg_preconverged_eps=1e-05, optimizer_fail_if_no_step_size_found=False, optimizer_l_bfgs_maxlen=50, optimizer_preconverge_with_half_projectors=True, optimizer_preconverge_with_half_projectors_eps=0.001, optimizer_autosave_step_count=2, optimizer_random_noise_eps=0.0001, optimizer_random_noise_max_retries=5, optimizer_random_noise_relative_amplitude=0.1, optimizer_reuse_env_eps=0.001, line_search_method=<Line_Search_Methods.WOLFE: 3>, line_search_initial_step_size=1.0, line_search_reduction_factor=0.5, line_search_max_steps=20, line_search_armijo_const=0.0001, line_search_wolfe_const=0.9, line_search_use_last_step_size=False, basinhopping_niter=20, basinhopping_T=0.001, basinhopping_niter_success=5, spiral_wavevector_type=<Wavevector_Type.TWO_PI_POSITIVE_ONLY: 1>), _jitable: bool = False) Array

Apply a contraction to a list of tensors.

For details on the contractions and their definition see varipeps.contractions.Definitions.

Parameters:
Keyword Arguments:
  • disable_identity_check (bool, optional) – Disable the check if the tensor is identical to the one of the corresponding object.

    Default: False

  • custom_definition (Definition, optional) – Use a custom definition for the contraction which is not defined in the varipeps.contractions.Definitions class.

    Default: None

  • config (PEPS_AD_Config, optional) – Global configuration object of the variPEPS library. Please see its class definition for details.

    Default: PEPS_AD_Config(ad_use_custom_vjp=True, ad_custom_print_steps=False, ad_custom_verbose_output=False, ad_custom_convergence_eps=1e-07, ad_custom_max_steps=75, checkpointing_ncon=False, checkpointing_projectors=False, ctmrg_convergence_eps=1e-08, ctmrg_enforce_elementwise_convergence=True, ctmrg_max_steps=75, ctmrg_print_steps=False, ctmrg_verbose_output=False, ctmrg_truncation_eps=1e-12, ctmrg_fail_if_not_converged=True, ctmrg_full_projector_method=<Projector_Method.FISHMAN: 3>, ctmrg_increase_truncation_eps=True, ctmrg_increase_truncation_eps_factor=100, ctmrg_increase_truncation_eps_max_value=1e-06, ctmrg_heuristic_increase_chi=True, ctmrg_heuristic_increase_chi_threshold=1e-06, ctmrg_heuristic_increase_chi_step_size=2, ctmrg_heuristic_decrease_chi=True, ctmrg_heuristic_decrease_chi_step_size=1, svd_sign_fix_eps=0.1, optimizer_method=<Optimizing_Methods.BFGS: 3>, optimizer_max_steps=300, optimizer_convergence_eps=1e-05, optimizer_ctmrg_preconverged_eps=1e-05, optimizer_fail_if_no_step_size_found=False, optimizer_l_bfgs_maxlen=50, optimizer_preconverge_with_half_projectors=True, optimizer_preconverge_with_half_projectors_eps=0.001, optimizer_autosave_step_count=2, optimizer_random_noise_eps=0.0001, optimizer_random_noise_max_retries=5, optimizer_random_noise_relative_amplitude=0.1, optimizer_reuse_env_eps=0.001, line_search_method=<Line_Search_Methods.WOLFE: 3>, line_search_initial_step_size=1.0, line_search_reduction_factor=0.5, line_search_max_steps=20, line_search_armijo_const=0.0001, line_search_wolfe_const=0.9, line_search_use_last_step_size=False, basinhopping_niter=20, basinhopping_T=0.001, basinhopping_niter_success=5, spiral_wavevector_type=<Wavevector_Type.TWO_PI_POSITIVE_ONLY: 1>)

Returns:

The contracted tensor.

Return type:

jax.numpy.ndarray