Implementation of the variational optimizer for the PEPS model (varipeps.optimization.optimizer)
- varipeps.optimization.optimizer.autosave_function(filename: PathLike, tensors: Array, unitcell: PEPS_Unit_Cell, counter: int | None = None, auxiliary_data: Dict[str, Any] | None = None) None[source]
- varipeps.optimization.optimizer.optimize_peps_network(input_tensors: ~varipeps.peps.unitcell.PEPS_Unit_Cell | ~typing.Sequence[~jax.Array], expectation_func: ~varipeps.expectation.model.Expectation_Model, convert_to_unitcell_func: ~varipeps.mapping.model.Map_To_PEPS_Model | None = None, autosave_filename: ~os.PathLike = 'data/autosave.hdf5', autosave_func: ~typing.Callable[[~os.PathLike, ~typing.Sequence[~jax.Array], ~varipeps.peps.unitcell.PEPS_Unit_Cell], None] = <function autosave_function>, additional_input: ~typing.Dict[str, ~jax.Array] = {}) Tuple[Sequence[Array], PEPS_Unit_Cell, float | Array][source]
Optimize a PEPS unitcell using a variational method.
As convergence criterion the norm of the gradient is used.
- Parameters:
input_tensors (
PEPS_Unit_Cellor sequence ofjax.numpy.ndarray) – The PEPS unitcell to work on or the tensors which should be mapped by convert_to_unitcell_func to a PEPS unitcell.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.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 first input parameter.Default:Noneautosave_filename (
os.PathLike, optional) – Filename where intermediate results are automatically saved.Default:'data/autosave.hdf5'autosave_func (callable, optional) – Function which is called to autosave the intermediate results. The function has to accept the arguments (filename, tensors, unitcell).
Default:<function autosave_function>additional_input (
dictofstrtojax.numpy.ndarraymapping, optional) – Dict with additional inputs which should be considered in the calculation of the expectation value.Default:{}- Returns:
OptimizeResult object with the optimized tensors, network and the final expectation value. See the type definition for other possible fields.
- Return type: