varipeps

VariPEPS

  • Introduction
  • Installation using pip
  • Usage
  • Citation
  • Features
  • Examples

API documentation

  • Public API Reference
    • Config of variPEPS module (varipeps.config)
    • Contractions definitions and helper methods (varipeps.contractions)
    • CTMRG method (varipeps.ctmrg)
    • Calculation of expectation values (varipeps.expectation)
    • Mapping of other structures to PEPS unitcells (varipeps.mapping)
    • Variational optimizer for the PEPS network (varipeps.optimization)
      • Implementation of the basinhopping optimizer for the PEPS model (varipeps.optimization.basinhopping)
      • Methods to calculate the CTRMG env and expectation value along with the gradient (varipeps.optimization.inner_function)
      • Implementation of line search methods for the CTMRG variational optimization (varipeps.optimization.line_search)
        • NoSuitableStepSizeError
        • line_search()
      • Implementation of the variational optimizer for the PEPS model (varipeps.optimization.optimizer)
    • Implementation of PEPS structure (varipeps.peps)
    • Typing helper (varipeps.typing)
    • Utility functions (varipeps.utils)
varipeps
  • variPEPS API reference
  • Variational optimizer for the PEPS network (varipeps.optimization)
  • Implementation of line search methods for the CTMRG variational optimization (varipeps.optimization.line_search)
  • View page source

Implementation of line search methods for the CTMRG variational optimization (varipeps.optimization.line_search)

exception varipeps.optimization.line_search.NoSuitableStepSizeError[source]

Bases: Exception

varipeps.optimization.line_search.line_search(input_tensors: Sequence[Array], unitcell: PEPS_Unit_Cell, expectation_func: Expectation_Model, gradient: Array, descent_direction: Array, current_value: float | Array, last_step_size: float | Array | None = None, convert_to_unitcell_func: Map_To_PEPS_Model | None = None, generate_unitcell: bool = False, spiral_indices: Sequence[int] | None = None, additional_input: Dict[str, Array] = {}, reinitialize_env_as_identities: bool = True) → Tuple[List[Array], PEPS_Unit_Cell, float | Array, float | Array][source]

Run two-way backtracing line search method for the CTMRG routine.

Parameters:
  • input_tensors (sequence of jax.numpy.ndarray) – Sequence of the current tensors which should be optimized.

  • unitcell (PEPS_Unit_Cell) – The PEPS unitcell to work on.

  • expectation_func (Expectation_Model) – Callable to calculate one expectation value which is used as loss loss function of the model. Likely the function to calculate the energy.

  • gradient (jax.numpy.ndarray) – The gradient of the CTMRG method and expectation function for the current step.

  • descent_direction (jax.numpy.ndarray) – The descent direction which should be used for the line search.

  • current_value (float or jax.numpy.ndarray) – The current value of the evaluation of the expectation function.

  • last_step_size (float or jax.numpy.ndarray, optional) – The step size found in the last line search.

    Default: None

  • convert_to_unitcell_func (Map_To_PEPS_Model, optional) – Function to convert the input_tensors to a PEPS unitcell. If ommited, it is assumed that a PEPS unitcell is the input.

    Default: None

  • generate_unitcell (bool, optional) – Force generation of unitcell from new tensors

    Default: False

  • spiral_indices (sequence of int, optional) – If spiral iPEPS ansatz is used, this argument contains the indices of the wave vectors in the input tensor list.

    Default: None

  • additional_input (dict of str to jax.numpy.ndarray mapping, optional) – Dict with additional inputs which should be considered in the calculation of the expectation value.

    Default: {}

  • reinitialize_env_as_identities (bool, optional) – Flag if the env tensors should be reinitialized with identities.

    Default: True

Returns:

Tuple with the optimized tensors, the new unitcell, the reduced expectation value and the step size found in the line search.

Return type:

tuple(list(jax.numpy.ndarray), PEPS_Unit_Cell, float, float)

Raises:
  • ValueError – The parameters mismatch the expected inputs.

  • RuntimeError – The line search does not converge.

Previous Next

© Copyright 2021-2024, Jan Naumann, Philipp Schmoll, Frederik Wilde, Finn Krein.

Built with Sphinx using a theme provided by Read the Docs.