Ground-state algorithms
Reference for the ground-state search interface and its algorithms. For a task-oriented walkthrough see the how-to guides; the full, canonical docstrings for the whole package live in the Library index.
Interface
MPSKit.find_groundstate Function
find_groundstate(ψ₀, H, [environments]; kwargs...) -> (ψ, environments, ϵ)
find_groundstate(ψ₀, H, algorithm, [environments]) -> (ψ, environments, ϵ)Compute the ground state for Hamiltonian H with initial guess ψ₀. If no algorithm is specified, one is selected automatically from the type of ψ₀ and the supplied keywords (see the automatic-selection notes below).
Arguments
ψ₀::AbstractMPS: initial guessH::AbstractMPO: operator for which to find the ground state[environments]: MPS environment manageralgorithm: optimization algorithm
Keyword Arguments
tol::Float64 = 1.0e-10: tolerance for the convergence criterionmaxiter::Int = 200: maximum number of iterationsverbosity::Int = 3: display progress informationtrscheme = nothing: if supplied, a truncation scheme that enables bond-dimension growth through a two-site algorithm (see below)
Automatic algorithm selection
When no algorithm is passed, the choice depends on the type of ψ₀:
InfiniteMPS:VUMPS(with its tolerance floored at1e-4), refined byGradientGrassmannwhentol < 1e-4. Iftrschemeis given, anIDMRG2stage is prepended to grow the bond dimension.AbstractFiniteMPS:DMRG. Iftrschemeis given, aDMRG2stage is prepended to grow the bond dimension.
Because single-site DMRG preserves the bond dimension of ψ₀, passing a trscheme (or an explicit two-site algorithm) is the usual way to converge from a low-bond-dimension initial guess such as a product state.
Returns
ψ::AbstractMPS: converged ground stateenvironments: environments corresponding to the converged stateϵ::Float64: final convergence error upon terminating the algorithm
Examples
Ground state of a 4-site transverse-field Ising chain, H = -∑ XₖXₖ₊₁ - ∑ Zₖ, starting from a product state and letting DMRG2 grow the bond dimension:
julia> X = TensorMap(Float64[0 1; 1 0], ℂ^2, ℂ^2);
julia> Z = TensorMap(Float64[1 0; 0 -1], ℂ^2, ℂ^2);
julia> L = 4; lattice = fill(ℂ^2, L);
julia> H = FiniteMPOHamiltonian(lattice, ((i, i + 1) => -(X ⊗ X) for i in 1:(L - 1))) +
FiniteMPOHamiltonian(lattice, ((i,) => -Z for i in 1:L));
julia> ψ₀ = FiniteMPS(ones(Float64, (ℂ^2)^L));
julia> ψ, envs, ϵ = find_groundstate(ψ₀, H; verbosity = 0, trscheme = truncrank(16));
julia> round(real(expectation_value(ψ, H)); digits = 4)
-4.7588Algorithms
MPSKit.DMRG Type
struct DMRG{A, F, E, G} <: MPSKit.AlgorithmDensity Matrix Renormalization Group algorithm for finding the dominant eigenvector.
Each site update is, in order: (1) an optional bond expansion (alg_expand), (2) a single-site eigensolve, and (3) a gauge step (alg_gauge). With the defaults (alg_expand = nothing and alg_gauge = nothing, a non-truncating QR gauge derived from trscheme = notrunc()) this is textbook single-site DMRG, which cannot change the bond dimension. Setting alg_expand to a bond-expansion algorithm (e.g. OptimalExpand, RandExpand, SketchedExpand) enriches the bond with directions orthogonal to the current state ahead of each eigensolve, recovering Controlled Bond Expansion (CBE) DMRG. Setting alg_gauge to a bond-expanding gauge algorithm (e.g. DMRG3S) instead enriches the bond as part of the gauge step, after the eigensolve. Either way, a truncating gauge (see below) is then desirable to cut the enlarged bond back down.
Choosing the gauge
By default, alg_gauge is built for you from trscheme/alg_svd/alg_orth: trscheme = notrunc() (the default) gives a QR decomposition (alg_orth, Householder by default), any other trscheme gives a truncated SVD (alg_svd with that trscheme).
DMRG() # QR gauge, no truncation
DMRG(; trscheme = truncdim(50)) # truncated SVD gaugeTo use a bond-expanding gauge such as DMRG3S, pass it directly as alg_gauge; trscheme etc. are still routed through to build the inner gauge it wraps, exactly as above:
DMRG(; alg_gauge = DMRG3S(0.1, ExponentialDecay(0.7)), trscheme = truncdim(50))If alg_gauge is instead given with its inner gauge already set (e.g. DMRG3S(0.1, sched, some_gauge)), trscheme/alg_svd/alg_orth must be left at their defaults — passing both is an error, since it leaves two conflicting sources for the same setting.
Fields
tol::Float64: tolerance for convergence criteriummaxiter::Int64: maximal amount of iterationsverbosity::Int64: setting for how much information is displayedalg_eigsolve::Any: algorithm used for the eigenvalue solversfinalize::Any: callback function applied after each iteration, of signaturefinalize(iter, ψ, H, envs) -> ψ, envsalg_expand::Any: algorithm used to expand the bond ahead of each local update, ornothingfor nonealg_gauge::Any: gauge algorithm applied after each local update:NoExpandfor a plain gauge step (a QR algorithm with no truncation, or a truncated SVD), or an algorithm that additionally expands the bond beforehand (e.g.DMRG3S)
See also
Used as the algorithm argument of find_groundstate and approximate.
MPSKit.DMRG2 Type
struct DMRG2{A, G, F} <: MPSKit.AlgorithmTwo-site DMRG algorithm for finding the dominant eigenvector.
Fields
tol::Float64: tolerance for convergence criteriummaxiter::Int64: maximal amount of iterationsverbosity::Int64: setting for how much information is displayedalg_eigsolve::Any: algorithm used for the eigenvalue solversalg_gauge::Any: factorization used for the post-update gauge: a truncated SVD (alg_svdwithtrscheme)finalize::Any: callback function applied after each iteration, of signaturefinalize(iter, ψ, H, envs) -> ψ, envs
See also
Used as the algorithm argument of find_groundstate and approximate.
MPSKit.VUMPS Type
struct VUMPS{F} <: MPSKit.AlgorithmVariational optimization algorithm for uniform matrix product states, based on the combination of DMRG with matrix product state tangent space concepts.
Fields
tol::Float64: tolerance for convergence criteriummaxiter::Int64: maximal amount of iterationsverbosity::Int64: setting for how much information is displayedalg_gauge::Any: algorithm used for gauging theInfiniteMPSalg_eigsolve::Any: algorithm used for the eigenvalue solversalg_environments::Any: algorithm used for the MPS environmentsfinalize::Any: callback function applied after each iteration, of signaturefinalize(iter, ψ, H, envs) -> ψ, envs
See also
Used as the algorithm argument of find_groundstate and leading_boundary.
References
MPSKit.IDMRG Type
struct IDMRG{A} <: MPSKit.AlgorithmSingle site infinite DMRG algorithm for finding the dominant eigenvector.
Fields
tol::Float64: tolerance for convergence criteriummaxiter::Int64: maximal amount of iterationsverbosity::Int64: setting for how much information is displayedalg_gauge::Any: algorithm used for gauging the MPSalg_eigsolve::Any: algorithm used for the eigenvalue solvers
See also
Used as the algorithm argument of find_groundstate, leading_boundary, and approximate.
MPSKit.IDMRG2 Type
struct IDMRG2{A, S} <: MPSKit.AlgorithmTwo-site infinite DMRG algorithm for finding the dominant eigenvector.
Fields
tol::Float64: tolerance for convergence criteriummaxiter::Int64: maximal amount of iterationsverbosity::Int64: setting for how much information is displayedalg_gauge::Any: algorithm used for gauging the MPSalg_eigsolve::Any: algorithm used for the eigenvalue solversalg_svd::Any: algorithm used for the singular value decompositiontrscheme::MatrixAlgebraKit.TruncationStrategy: algorithm used for truncation of the two-site update
See also
Used as the algorithm argument of find_groundstate, leading_boundary, and approximate.
MPSKit.GradientGrassmann Type
struct GradientGrassmann{O<:OptimKit.OptimizationAlgorithm, F} <: MPSKit.AlgorithmVariational gradient-based optimization algorithm that keeps the MPS in left-canonical form, as points on a Grassmann manifold. The optimization is then a Riemannian gradient descent with a preconditioner to induce the metric from the Hilbert space inner product.
Constructors
GradientGrassmann(; kwargs...)Keyword Arguments
method = ConjugateGradient: instance of optimization algorithm, or type of optimization algorithm to constructfinalize!: finalizer algorithmtol = Defaults.tol: tolerance for convergence criteriummaxiter = Defaults.maxiter: maximum amount of iterationsverbosity = Defaults.verbosity - 1: level of information display
Fields
method::OptimKit.OptimizationAlgorithm: optimization algorithmfinalize!::Any: callback function applied after each iteration, of signaturefinalize!(x, f, g, numiter) -> x, f, g
See also
Used as the algorithm argument of find_groundstate and leading_boundary.
References
source