From c1d2a83df0ba0d527123abc7e785f85a325fc81f Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 16 May 2024 10:14:29 +0000 Subject: [PATCH] build based on a6afe15 --- dev/examples/index.html | 2 +- dev/index.html | 2 +- dev/lib/lib/index.html | 12 ++++++------ dev/man/intro/index.html | 2 +- dev/search/index.html | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dev/examples/index.html b/dev/examples/index.html index 918e21ce..e5b0bf96 100644 --- a/dev/examples/index.html +++ b/dev/examples/index.html @@ -1,2 +1,2 @@ -Examples · PEPSKit.jl
+Examples · PEPSKit.jl
diff --git a/dev/index.html b/dev/index.html index a985683d..2d47c0dd 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · PEPSKit.jl

PEPSKit.jl

Tools for working with projected entangled-pair states

It contracts, it optimizes, it may be broken at any point.

+Home · PEPSKit.jl

PEPSKit.jl

Tools for working with projected entangled-pair states

It contracts, it optimizes, it may be broken at any point.

diff --git a/dev/lib/lib/index.html b/dev/lib/lib/index.html index f2527e51..37807314 100644 --- a/dev/lib/lib/index.html +++ b/dev/lib/lib/index.html @@ -1,15 +1,15 @@ -Library · PEPSKit.jl

Library

PEPSKit.CTMRGType
struct CTMRG(; trscheme = TensorKit.notrunc(), tol = Defaults.ctmrg_tol,
+Library · PEPSKit.jl

Library

PEPSKit.CTMRGType
struct CTMRG(; trscheme = TensorKit.notrunc(), tol = Defaults.ctmrg_tol,
              maxiter = Defaults.ctmrg_maxiter, miniter = Defaults.ctmrg_miniter,
-             verbosity = 0, fixedspace = false)

Algorithm struct that represents the CTMRG algorithm for contracting infinite PEPS. The projector bond dimensions are set via trscheme which controls the truncation properties inside of TensorKit.tsvd. Each CTMRG run is converged up to tol where the singular value convergence of the corners as well as the norm is checked. The maximal and minimal number of CTMRG iterations is set with maxiter and miniter. Different levels of output information are printed depending on verbosity (0, 1 or 2). Regardless of the truncation scheme, the space can be kept fixed with fixedspace.

source
PEPSKit.CTMRGEnvType
struct CTMRGEnv{C,T}

Corner transfer-matrix environment containing unit-cell arrays of corner and edge tensors.

source
PEPSKit.CTMRGEnvMethod
CTMRGEnv(peps::InfinitePEPS{P}; Venv=oneunit(spacetype(P)))

Create a random CTMRG environment from a PEPS tensor. The environment bond dimension defaults to one and can be specified using the Venv space.

source
PEPSKit.GeomSumType
struct GeomSum <: GradMode

Gradient mode for CTMRG using explicit evaluation of the geometric sum.

source
PEPSKit.InfinitePEPOType
struct InfinitePEPO{T<:PEPOTensor}

Represents an infinte projected entangled-pair operator (PEPO) on a 3D cubic lattice.

source
PEPSKit.InfinitePEPOMethod
InfinitePEPO(d, D, L)
-InfinitePEPO(d, D, (Lx, Ly, Lz)))

Allow users to pass in integers and specify unit cell.

source
PEPSKit.InfinitePEPOMethod
InfinitePEPO(Pspaces, Nspaces, Espaces)

Allow users to pass in arrays of spaces, single layer special case.

source
PEPSKit.InfinitePEPSType
struct InfinitePEPS{T<:PEPSTensor}

Represents an infinite projected entangled-pair state on a 2D square lattice.

source
PEPSKit.InfinitePEPSMethod
InfinitePEPS(f=randn, T=ComplexF64, Pspaces, Nspaces, Espaces)

Allow users to pass in arrays of spaces.

source
PEPSKit.InfinitePEPSMethod
InfinitePEPS(f=randn, T=ComplexF64, Pspace, Nspace, [Espace]; unitcell=(1,1))

Create an InfinitePEPS by specifying its spaces and unit cell. Spaces can be specified either via Int or via ElementarySpace.

source
PEPSKit.ManualIterType
struct ManualIter <: GradMode

Gradient mode for CTMRG using manual iteration to solve the linear problem.

source
PEPSKit.NLocalOperatorType
struct NLocalOperator{I<:AbstractInteraction}

Operator in form of a AbstractTensorMap which is parametrized by an interaction type. Mostly, this is used to define Hamiltonian terms and observables.

source
PEPSKit.NearestNeighborType
struct NearestNeighbor <: AbstractInteraction

Interaction representing nearest neighbor terms that act on two adjacent sites.

source
PEPSKit.OnSiteType
struct OnSite <: AbstractInteraction

Trivial interaction representing terms that act on one isolated site.

source
PEPSKit.PEPOTensorType
const PEPOTensor{S}

Default type for PEPO tensors with a single incoming and outgoing physical index, and 4 virtual indices, conventionally ordered as: O : P ⊗ P' ← N ⊗ E ⊗ S ⊗ W.

source
PEPSKit.PEPO_∂∂ACType
struct PEPO_∂∂AC{T,O,P}

Represents the effective Hamiltonian for the one-site derivative of an MPS.

source
PEPSKit.PEPO_∂∂CType
struct PEPO_∂∂C{T<:GenericMPSTensor{S,N}}

Represents the effective Hamiltonian for the zero-site derivative of an MPS.

source
PEPSKit.PEPSOptimizeType
PEPSOptimize{G}(; boundary_alg = CTMRG(), optimizer::OptimKit.OptimizationAlgorithm = LBFGS()
-                reuse_env::Bool = true, gradient_alg::G, verbosity::Int = 0)

Algorithm struct that represent PEPS ground-state optimization using AD. Set the algorithm to contract the infinite PEPS in boundary_alg; currently only CTMRG is supported. The optimizer computes the gradient directions based on the CTMRG gradient and updates the PEPS parameters. In this optimization, the CTMRG runs can be started on the converged environments of the previous optimizer step by setting reuse_env to true. Otherwise a random environment is used at each step. The CTMRG gradient itself is computed using the gradient_alg algorithm. Different levels of output verbosity can be activated using verbosity (0, 1 or 2).

source
PEPSKit.PEPSTensorType
const PEPSTensor{S}

Default type for PEPS tensors with a single physical index, and 4 virtual indices, conventionally ordered as: T : P ← N ⊗ E ⊗ S ⊗ W.

source
PEPSKit.PEPSTensorMethod
PEPSTensor(f, ::Type{T}, Pspace::S, Nspace::S,
+             verbosity = 0, fixedspace = false)

Algorithm struct that represents the CTMRG algorithm for contracting infinite PEPS. The projector bond dimensions are set via trscheme which controls the truncation properties inside of TensorKit.tsvd. Each CTMRG run is converged up to tol where the singular value convergence of the corners as well as the norm is checked. The maximal and minimal number of CTMRG iterations is set with maxiter and miniter. Different levels of output information are printed depending on verbosity (0, 1 or 2). Regardless of the truncation scheme, the space can be kept fixed with fixedspace.

source
PEPSKit.CTMRGEnvType
struct CTMRGEnv{C,T}

Corner transfer-matrix environment containing unit-cell arrays of corner and edge tensors.

source
PEPSKit.CTMRGEnvMethod
CTMRGEnv(peps::InfinitePEPS{P}; Venv=oneunit(spacetype(P)))

Create a random CTMRG environment from a PEPS tensor. The environment bond dimension defaults to one and can be specified using the Venv space.

source
PEPSKit.GeomSumType
struct GeomSum <: GradMode

Gradient mode for CTMRG using explicit evaluation of the geometric sum.

source
PEPSKit.InfinitePEPOType
struct InfinitePEPO{T<:PEPOTensor}

Represents an infinte projected entangled-pair operator (PEPO) on a 3D cubic lattice.

source
PEPSKit.InfinitePEPOMethod
InfinitePEPO(d, D, L)
+InfinitePEPO(d, D, (Lx, Ly, Lz)))

Allow users to pass in integers and specify unit cell.

source
PEPSKit.InfinitePEPOMethod
InfinitePEPO(Pspaces, Nspaces, Espaces)

Allow users to pass in arrays of spaces, single layer special case.

source
PEPSKit.InfinitePEPSType
struct InfinitePEPS{T<:PEPSTensor}

Represents an infinite projected entangled-pair state on a 2D square lattice.

source
PEPSKit.InfinitePEPSMethod
InfinitePEPS(f=randn, T=ComplexF64, Pspaces, Nspaces, Espaces)

Allow users to pass in arrays of spaces.

source
PEPSKit.InfinitePEPSMethod
InfinitePEPS(f=randn, T=ComplexF64, Pspace, Nspace, [Espace]; unitcell=(1,1))

Create an InfinitePEPS by specifying its spaces and unit cell. Spaces can be specified either via Int or via ElementarySpace.

source
PEPSKit.ManualIterType
struct ManualIter <: GradMode

Gradient mode for CTMRG using manual iteration to solve the linear problem.

source
PEPSKit.NLocalOperatorType
struct NLocalOperator{I<:AbstractInteraction}

Operator in form of a AbstractTensorMap which is parametrized by an interaction type. Mostly, this is used to define Hamiltonian terms and observables.

source
PEPSKit.NearestNeighborType
struct NearestNeighbor <: AbstractInteraction

Interaction representing nearest neighbor terms that act on two adjacent sites.

source
PEPSKit.OnSiteType
struct OnSite <: AbstractInteraction

Trivial interaction representing terms that act on one isolated site.

source
PEPSKit.PEPOTensorType
const PEPOTensor{S}

Default type for PEPO tensors with a single incoming and outgoing physical index, and 4 virtual indices, conventionally ordered as: O : P ⊗ P' ← N ⊗ E ⊗ S ⊗ W.

source
PEPSKit.PEPO_∂∂ACType
struct PEPO_∂∂AC{T,O,P}

Represents the effective Hamiltonian for the one-site derivative of an MPS.

source
PEPSKit.PEPO_∂∂CType
struct PEPO_∂∂C{T<:GenericMPSTensor{S,N}}

Represents the effective Hamiltonian for the zero-site derivative of an MPS.

source
PEPSKit.PEPSOptimizeType
PEPSOptimize{G}(; boundary_alg = CTMRG(), optimizer::OptimKit.OptimizationAlgorithm = LBFGS()
+                reuse_env::Bool = true, gradient_alg::G, verbosity::Int = 0)

Algorithm struct that represent PEPS ground-state optimization using AD. Set the algorithm to contract the infinite PEPS in boundary_alg; currently only CTMRG is supported. The optimizer computes the gradient directions based on the CTMRG gradient and updates the PEPS parameters. In this optimization, the CTMRG runs can be started on the converged environments of the previous optimizer step by setting reuse_env to true. Otherwise a random environment is used at each step. The CTMRG gradient itself is computed using the gradient_alg algorithm. Different levels of output verbosity can be activated using verbosity (0, 1 or 2).

source
PEPSKit.PEPSTensorType
const PEPSTensor{S}

Default type for PEPS tensors with a single physical index, and 4 virtual indices, conventionally ordered as: T : P ← N ⊗ E ⊗ S ⊗ W.

source
PEPSKit.PEPSTensorMethod
PEPSTensor(f, ::Type{T}, Pspace::S, Nspace::S,
            [Espace::S], [Sspace::S], [Wspace::S]) where {T,S<:ElementarySpace}
 PEPSTensor(f, ::Type{T}, Pspace::Int, Nspace::Int,
-           [Espace::Int], [Sspace::Int], [Wspace::Int]) where {T}

Construct a PEPS tensor based on the physical, north, east, west and south spaces. Alternatively, only the space dimensions can be provided and ℂ is assumed as the field. The tensor elements are generated based on f and the element type is specified in T.

source
PEPSKit.PEPS_∂∂ACType
struct PEPS_∂∂AC{T,O1,O2}

Represents the effective Hamiltonian for the one-site derivative of an MPS.

source
PEPSKit.PEPS_∂∂CType
struct PEPS_∂∂C{T<:GenericMPSTensor{S,N}}

Represents the effective Hamiltonian for the zero-site derivative of an MPS.

source
MPSKit.expectation_valueFunction
MPSKit.expectation_value(peps::InfinitePEPS, env, O::NLocalOperator)

Evaluate the expectation value of any NLocalOperator on each unit-cell entry of peps and env.

source
MPSKit.leading_boundaryFunction
MPSKit.leading_boundary(state, alg::CTMRG, [envinit])

Contract state using CTMRG and return the CTM environment. Per default, a random initial environment is used.

source
PEPSKit._rruleMethod
_rrule(alg_rrule, config, f, args...; kwargs...) -> ∂f, ∂args...

Customize the pullback of a function f. This function can specialize on its first argument in order to have multiple implementations for a pullback. If no specialization is needed, the default alg_rrule=nothing results in the default AD pullback.

Warning

No tangent is expected for the alg_rrule argument

source
PEPSKit.check_elementwise_convergenceMethod
check_elementwise_convergence(envfinal, envfix; atol=1e-6)

Check if the element-wise difference of the corner and edge tensors of the final and fixed CTMRG environments are below some tolerance.

source
PEPSKit.costfunMethod
costfun(peps::InfinitePEPS, env, op::NLocalOperator{NearestNeighbor})

Compute the expectation value of a nearest-neighbor operator. This is used to evaluate and differentiate the energy in ground-state PEPS optimizations.

source
PEPSKit.ctmrg_iterMethod
ctmrg_iter(state, env::CTMRGEnv{C,T}, alg::CTMRG) where {C,T}

Perform one iteration of CTMRG that maps the state and env to a new environment, and also return the truncation error. One CTMRG iteration consists of four left_move calls and 90 degree rotations, such that the environment is grown and renormalized in all four directions.

source
PEPSKit.fixedpointMethod
fixedpoint(ψ₀::InfinitePEPS{T}, H, alg::PEPSOptimize, [env₀::CTMRGEnv]) where {T}

Optimize ψ₀ with respect to the Hamiltonian H according to the parameters supplied in alg. The initial environment env₀ serves as an initial guess for the first CTMRG run. By default, a random initial environment is used.

source
PEPSKit.fpgradFunction
fpgrad(∂F∂x, ∂f∂x, ∂f∂A, y0, alg)

Compute the gradient of the cost function for CTMRG by solving the following equation:

dx = ∑ₙ (∂f∂x)ⁿ ∂f∂A dA = (1 - ∂f∂x)⁻¹ ∂f∂A dA

where ∂F∂x is the gradient of the cost function with respect to the PEPS tensors, ∂f∂x is the partial gradient of the CTMRG iteration with respect to the environment tensors, ∂f∂A is the partial gradient of the CTMRG iteration with respect to the PEPS tensors, and y0 is the initial guess for the fixed-point iteration. The function returns the gradient dx of the fixed-point iteration.

source
PEPSKit.gauge_fixMethod
gauge_fix(envprev::CTMRGEnv{C,T}, envfinal::CTMRGEnv{C,T}) where {C,T}

Fix the gauge of envfinal based on the previous environment envprev. This assumes that the envfinal is the result of one CTMRG iteration on envprev. Given that the CTMRG run is converged, the returned environment will be element-wise converged to envprev.

source
PEPSKit.hook_pullbackMethod
hook_pullback(f, args...; alg_rrule=nothing, kwargs...)

Wrapper function to customize the pullback of a function f. This function is equivalent to f(args...; kwargs...), but the pullback can be customized by implementing the following function:

_rrule(alg_rrule, config, f, args...; kwargs...) -> NoTangent(), ∂f, ∂args...

This function can specialize on its first argument in order to customize the pullback. If no specialization is needed, the default alg_rrule=nothing results in the default AD pullback.

See also _rrule.

source
PEPSKit.left_moveMethod
left_move(state, env::CTMRGEnv{C,T}, alg::CTMRG) where {C,T}

Grow, project and renormalize the environment env in west direction. Return the updated environment as well as the projectors and truncation error.

source
PEPSKit.operator_envFunction
operator_env(peps::InfinitePEPS, env::CTMRGEnv, ::AbstractInteraction)

Contract a PEPS and a CTMRG environment to form an operator environment. The open bonds correspond to the indices of an operator with the specified AbstractInteraction type.

source
PEPSKit.projector_typeMethod
projector_type(T::DataType, size)

Create two arrays of specified size that contain undefined tensors representing left and right acting projectors, respectively. The projector types are inferred from the TensorMap type T which avoids having to recompute transpose tensors.

source
PEPSKit.@diffsetMacro
@diffset assign

Helper macro which allows in-place operations in the forward-pass of Zygote, but resorts to non-mutating operations in the backwards-pass. The expression assign should assign an object to an pre-existing AbstractArray and the use of updating operators is also possible. This is especially needed when in-place assigning tensors to unit-cell arrays of environments.

source
PEPSKit.DefaultsModule
module Defaults
+           [Espace::Int], [Sspace::Int], [Wspace::Int]) where {T}

Construct a PEPS tensor based on the physical, north, east, west and south spaces. Alternatively, only the space dimensions can be provided and ℂ is assumed as the field. The tensor elements are generated based on f and the element type is specified in T.

source
PEPSKit.PEPS_∂∂ACType
struct PEPS_∂∂AC{T,O1,O2}

Represents the effective Hamiltonian for the one-site derivative of an MPS.

source
PEPSKit.PEPS_∂∂CType
struct PEPS_∂∂C{T<:GenericMPSTensor{S,N}}

Represents the effective Hamiltonian for the zero-site derivative of an MPS.

source
MPSKit.expectation_valueFunction
MPSKit.expectation_value(peps::InfinitePEPS, env, O::NLocalOperator)

Evaluate the expectation value of any NLocalOperator on each unit-cell entry of peps and env.

source
MPSKit.leading_boundaryFunction
MPSKit.leading_boundary(state, alg::CTMRG, [envinit])

Contract state using CTMRG and return the CTM environment. Per default, a random initial environment is used.

source
PEPSKit._rruleMethod
_rrule(alg_rrule, config, f, args...; kwargs...) -> ∂f, ∂args...

Customize the pullback of a function f. This function can specialize on its first argument in order to have multiple implementations for a pullback. If no specialization is needed, the default alg_rrule=nothing results in the default AD pullback.

Warning

No tangent is expected for the alg_rrule argument

source
PEPSKit.check_elementwise_convergenceMethod
check_elementwise_convergence(envfinal, envfix; atol=1e-6)

Check if the element-wise difference of the corner and edge tensors of the final and fixed CTMRG environments are below some tolerance.

source
PEPSKit.costfunMethod
costfun(peps::InfinitePEPS, env, op::NLocalOperator{NearestNeighbor})

Compute the expectation value of a nearest-neighbor operator. This is used to evaluate and differentiate the energy in ground-state PEPS optimizations.

source
PEPSKit.ctmrg_iterMethod
ctmrg_iter(state, env::CTMRGEnv{C,T}, alg::CTMRG) where {C,T}

Perform one iteration of CTMRG that maps the state and env to a new environment, and also return the truncation error. One CTMRG iteration consists of four left_move calls and 90 degree rotations, such that the environment is grown and renormalized in all four directions.

source
PEPSKit.fixedpointMethod
fixedpoint(ψ₀::InfinitePEPS{T}, H, alg::PEPSOptimize, [env₀::CTMRGEnv]) where {T}

Optimize ψ₀ with respect to the Hamiltonian H according to the parameters supplied in alg. The initial environment env₀ serves as an initial guess for the first CTMRG run. By default, a random initial environment is used.

source
PEPSKit.fpgradFunction
fpgrad(∂F∂x, ∂f∂x, ∂f∂A, y0, alg)

Compute the gradient of the cost function for CTMRG by solving the following equation:

dx = ∑ₙ (∂f∂x)ⁿ ∂f∂A dA = (1 - ∂f∂x)⁻¹ ∂f∂A dA

where ∂F∂x is the gradient of the cost function with respect to the PEPS tensors, ∂f∂x is the partial gradient of the CTMRG iteration with respect to the environment tensors, ∂f∂A is the partial gradient of the CTMRG iteration with respect to the PEPS tensors, and y0 is the initial guess for the fixed-point iteration. The function returns the gradient dx of the fixed-point iteration.

source
PEPSKit.gauge_fixMethod
gauge_fix(envprev::CTMRGEnv{C,T}, envfinal::CTMRGEnv{C,T}) where {C,T}

Fix the gauge of envfinal based on the previous environment envprev. This assumes that the envfinal is the result of one CTMRG iteration on envprev. Given that the CTMRG run is converged, the returned environment will be element-wise converged to envprev.

source
PEPSKit.hook_pullbackMethod
hook_pullback(f, args...; alg_rrule=nothing, kwargs...)

Wrapper function to customize the pullback of a function f. This function is equivalent to f(args...; kwargs...), but the pullback can be customized by implementing the following function:

_rrule(alg_rrule, config, f, args...; kwargs...) -> NoTangent(), ∂f, ∂args...

This function can specialize on its first argument in order to customize the pullback. If no specialization is needed, the default alg_rrule=nothing results in the default AD pullback.

See also _rrule.

source
PEPSKit.left_moveMethod
left_move(state, env::CTMRGEnv{C,T}, alg::CTMRG) where {C,T}

Grow, project and renormalize the environment env in west direction. Return the updated environment as well as the projectors and truncation error.

source
PEPSKit.operator_envFunction
operator_env(peps::InfinitePEPS, env::CTMRGEnv, ::AbstractInteraction)

Contract a PEPS and a CTMRG environment to form an operator environment. The open bonds correspond to the indices of an operator with the specified AbstractInteraction type.

source
PEPSKit.projector_typeMethod
projector_type(T::DataType, size)

Create two arrays of specified size that contain undefined tensors representing left and right acting projectors, respectively. The projector types are inferred from the TensorMap type T which avoids having to recompute transpose tensors.

source
PEPSKit.@diffsetMacro
@diffset assign

Helper macro which allows in-place operations in the forward-pass of Zygote, but resorts to non-mutating operations in the backwards-pass. The expression assign should assign an object to an pre-existing AbstractArray and the use of updating operators is also possible. This is especially needed when in-place assigning tensors to unit-cell arrays of environments.

source
PEPSKit.DefaultsModule
module Defaults
     const ctmrg_maxiter = 100
     const ctmrg_miniter = 4
     const ctmrg_tol = 1e-12
     const fpgrad_maxiter = 100
     const fpgrad_tol = 1e-6
-end

Module containing default values that represent typical algorithm parameters.

  • ctmrg_maxiter = 100: Maximal number of CTMRG iterations per run
  • ctmrg_miniter = 4: Minimal number of CTMRG carried out
  • ctmrg_tol = 1e-12: Tolerance checking singular value and norm convergence
  • fpgrad_maxiter = 100: Maximal number of iterations for computing the CTMRG fixed-point gradient
  • fpgrad_tol = 1e-6: Convergence tolerance for the fixed-point gradient iteration
source
+end

Module containing default values that represent typical algorithm parameters.

  • ctmrg_maxiter = 100: Maximal number of CTMRG iterations per run
  • ctmrg_miniter = 4: Minimal number of CTMRG carried out
  • ctmrg_tol = 1e-12: Tolerance checking singular value and norm convergence
  • fpgrad_maxiter = 100: Maximal number of iterations for computing the CTMRG fixed-point gradient
  • fpgrad_tol = 1e-6: Convergence tolerance for the fixed-point gradient iteration
source
diff --git a/dev/man/intro/index.html b/dev/man/intro/index.html index 740a6a92..cff058bb 100644 --- a/dev/man/intro/index.html +++ b/dev/man/intro/index.html @@ -1,2 +1,2 @@ -Manual · PEPSKit.jl
+Manual · PEPSKit.jl
diff --git a/dev/search/index.html b/dev/search/index.html index 76fbb57c..0423f845 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · PEPSKit.jl

Loading search...

    +Search · PEPSKit.jl

    Loading search...