diff --git a/docs/src/index.rst b/docs/src/index.rst index 9a63f69..63e72a7 100644 --- a/docs/src/index.rst +++ b/docs/src/index.rst @@ -35,8 +35,8 @@ Additionally, for tensors which are invariant under general global symmetries, v lib/tensors lib/sparse lib/mps - lib/environments lib/algorithms + lib/environments lib/models lib/utility lib/caches diff --git a/docs/src/lib/algorithms.rst b/docs/src/lib/algorithms.rst index 446c01d..204c96c 100644 --- a/docs/src/lib/algorithms.rst +++ b/docs/src/lib/algorithms.rst @@ -44,6 +44,15 @@ Infinite MPS algorithms :members: changebonds +Infinite PEPS algorithms +------------------------ + +.. autoclass:: src.algorithms.Ctmrg + :no-members: + :members: fixedpoint + + + Eigsolvers ---------- diff --git a/docs/src/lib/environments.rst b/docs/src/lib/environments.rst index cde31f8..696ad17 100644 --- a/docs/src/lib/environments.rst +++ b/docs/src/lib/environments.rst @@ -9,4 +9,5 @@ Environments This section contains the API documentation for the :mod:`.environments` module. .. autoclass:: src.environments.FiniteEnvironment - +.. autoclass:: src.environments.CtmrgEnvironment + :no-members: diff --git a/docs/src/lib/mps.rst b/docs/src/lib/mps.rst index 53e7d7e..569c9d6 100644 --- a/docs/src/lib/mps.rst +++ b/docs/src/lib/mps.rst @@ -28,3 +28,6 @@ Operators .. autoclass:: src.mps.PepsTensor .. autoclass:: src.mps.PepsSandwich :no-members: +.. autoclass:: src.mps.UniformPeps + :no-members: + :members: UniformPeps diff --git a/src/algorithms/Ctmrg.m b/src/algorithms/Ctmrg.m index 649c8d3..2c15eeb 100644 --- a/src/algorithms/Ctmrg.m +++ b/src/algorithms/Ctmrg.m @@ -1,5 +1,29 @@ classdef Ctmrg - % Corner Transfer Matrix Renormalisation Group algorithm for PEPS. + % `Corner Transfer Matrix Renormalisation Group algorithm `_ for PEPS. + % + % Properties + % ---------- + % tol : :class:`double` + % tolerance for convergence criterion, defaults to :code:`1e-10`. + % + % miniter : :class:`int` + % minimum number of iteration, defaults to :code:`5`. + % + % maxiter : :class:`int` + % maximum number of iteration, defaults to :code:`100`. + % + % projectortype : :class:`char` + % projector scheme used in the algorithm, currently only supports a single default + % value. + % + % trunc : :class:`struct` + % specification of truncation options, see :meth:`.Tensor.tsvd` for details. + % + % verbosity : :class:`.Verbosity` + % verbosity level of the algorithm, defaults to :code:`Verbosity.iter`. + % + % doplot : :class:`logical` + % plot progress, defaults to :code:`false`. %% Options properties @@ -37,6 +61,38 @@ end function [envs, new_norm, err] = fixedpoint(alg, peps_top, peps_bot, envs) + % Find the fixed point CTMRG environment of an infinite PEPS overlap. + % + % Usage + % ----- + % :code:`[envs, new_norm, err] = fixedpoint(alg, peps_top, peps_bot, envs)` + % + % Arguments + % --------- + % alg : :class:`.Ctmrg` + % CTMRG algorithm. + % + % peps_top : :class:`.UniformPeps` + % top-layer uniform PEPS, usually interpreted as the 'ket' in the overlap. + % + % peps_bot : :class:`.UniformPeps` + % bottom-layer uniform PEPS, usually interpreted as the 'bra' in the overlap, + % defaults to the top layer state. + % + % envs : :class:`.CtmrgEnv` + % initial guess for the fixed point CTMRG environment. + % + % Returns + % ------- + % envs : :class:`.CtmrgEnv` + % fixed point CTMRG environment. + % + % new_norm : :class:`double` + % corresponding norm. + % + % err : :class:`double` + % final error measure at convergence. + arguments alg peps_top diff --git a/src/environments/CtmrgEnvironment.m b/src/environments/CtmrgEnvironment.m index 5b57ea5..18bb2da 100644 --- a/src/environments/CtmrgEnvironment.m +++ b/src/environments/CtmrgEnvironment.m @@ -1,6 +1,17 @@ classdef CtmrgEnvironment - %CTMRGENVIRONMENT Summary of this class goes here - % Detailed explanation goes here + % Data structure for managing CTMRG environments. + % + % Properties + % ---------- + % corners : :class:`cell` of :class:`.Tensor` + % cell array of corner tensors. + % + % edges : :class:`cell` of :class:`.Tensor` + % cell array of edge tensors. + % + % Todo + % ---- + % Document. properties corners diff --git a/src/mps/PepsSandwich.m b/src/mps/PepsSandwich.m index 0db3ebd..015670b 100644 --- a/src/mps/PepsSandwich.m +++ b/src/mps/PepsSandwich.m @@ -5,10 +5,10 @@ % Properties % ---------- % top : :class:`.PepsTensor` - % top-layer PEPS tensor, usually interpreted as the 'bra' in the overlap. + % top-layer PEPS tensor, usually interpreted as the 'ket' in the overlap. % % bot : :class:`.PepsTensor` - % bottom-layer PEPS tensor, usually interpreted as the 'ket' in the overlap. + % bottom-layer PEPS tensor, usually interpreted as the 'bra' in the overlap. % % Todo % ---- diff --git a/src/mps/UniformPeps.m b/src/mps/UniformPeps.m index 33ee666..dd881bb 100644 --- a/src/mps/UniformPeps.m +++ b/src/mps/UniformPeps.m @@ -1,6 +1,14 @@ classdef UniformPeps - % UniformPeps - Implementation of infinite translation invariant PEPS + % Implementation of infinite translation invariant PEPS % + % Properties + % ---------- + % A : :class:`cell` of :class:`.PepsTensor` + % cell array of PEPS tensors in 2D unit cell. + % + % Todo + % ---- + % Document. properties A cell @@ -12,15 +20,17 @@ function peps = UniformPeps(varargin) % Usage % ----- - % :code:`peps = UniformMps(A)` + % :code:`peps = UniformPeps(A)` % % Arguments % --------- - % A : :class:`cell` of :class:`PepsTensor` + % A : :class:`cell` of :class:`.PepsTensor` + % cell array of PEPS tensors in 2D unit cell. % % Returns % ------- - % peps : :class:`UniformPeps` + % peps : :class:`.UniformPeps` + % infinite translation-invariant PEPS. if nargin == 0, return; end % default empty constructor