Library documentation
States
MPSKit.FiniteMPS
— TypeFiniteMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbstractFiniteMPS
Type that represents a finite Matrix Product State.
Fields
ALs
– left-gauged MPS tensorsARs
– right-gauged MPS tensorsACs
– center-gauged MPS tensorsCLs
– gauge tensors
Where each is entry can be a tensor or missing
.
Notes
By convention, we have that:
AL[i] * CL[i+1]
=AC[i]
=CL[i] * AR[i]
AL[i]' * AL[i] = 1
AR[i] * AR[i]' = 1
Constructors
FiniteMPS([f, eltype], physicalspaces::Vector{<:Union{S, CompositeSpace{S}},
virtualspaces::Vector{<:Union{S, CompositeSpace{S}};
normalize=true) where {S<:ElementarySpace}
FiniteMPS([f, eltype], physicalspaces::Vector{<:Union{S,CompositeSpace{S}}},
maxvirtualspace::S;
normalize=true, left=oneunit(S), right=oneunit(S)) where {S<:ElementarySpace}
FiniteMPS([f, eltype], N::Int, physicalspace::Union{S,CompositeSpace{S}},
maxvirtualspace::S;
normalize=true, left=oneunit(S), right=oneunit(S)) where {S<:ElementarySpace}
FiniteMPS(As::Vector{<:GenericMPSTensor}; normalize=false, overwrite=false)
Construct an MPS via a specification of physical and virtual spaces, or from a list of tensors As
. All cases reduce to the latter.
Arguments
As::Vector{<:GenericMPSTensor}
: vector of site tensorsf::Function=rand
: initializer function for tensor dataeltype::Type{<:Number}=ComplexF64
: scalar type of tensorsphysicalspaces::Vector{<:Union{S, CompositeSpace{S}}
: list of physical spacesN::Int
: number of sitesphysicalspace::Union{S,CompositeSpace{S}}
: local physical spacevirtualspaces::Vector{<:Union{S, CompositeSpace{S}}
: list of virtual spacesmaxvirtualspace::S
: maximum virtual space
Keywords
normalize
: normalize the constructed stateoverwrite=false
: overwrite the given input tensorsleft=oneunit(S)
: left-most virtual spaceright=oneunit(S)
: right-most virtual space
MPSKit.InfiniteMPS
— TypeInfiniteMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbtractMPS
Type that represents an infinite Matrix Product State.
Fields
AL
– left-gauged MPS tensorsAR
– right-gauged MPS tensorsAC
– center-gauged MPS tensorsCR
– gauge tensors
Notes
By convention, we have that:
AL[i] * CR[i]
=AC[i]
=CR[i-1] * AR[i]
AL[i]' * AL[i] = 1
AR[i] * AR[i]' = 1
Constructors
InfiniteMPS([f, eltype], physicalspaces::Vector{<:Union{S, CompositeSpace{S}},
virtualspaces::Vector{<:Union{S, CompositeSpace{S}};
kwargs...) where {S<:ElementarySpace}
InfiniteMPS(As::AbstractVector{<:GenericMPSTensor}; kwargs...)
InfiniteMPS(ALs::AbstractVector{<:GenericMPSTensor}, C₀::MPSBondTensor;
kwargs...)
Construct an MPS via a specification of physical and virtual spaces, or from a list of tensors As
, or a list of left-gauged tensors ALs
.
Arguments
As::AbstractVector{<:GenericMPSTensor}
: vector of site tensorsALs::AbstractVector{<:GenericMPSTensor}
: vector of left-gauged site tensorsC₀::MPSBondTensor
: initial gauge tensorf::Function=rand
: initializer function for tensor dataeltype::Type{<:Number}=ComplexF64
: scalar type of tensorsphysicalspaces::AbstractVector{<:Union{S, CompositeSpace{S}}
: list of physical spacesvirtualspaces::AbstractVector{<:Union{S, CompositeSpace{S}}
: list of virtual spaces
Keywords
tol
: gauge fixing tolerancemaxiter
: gauge fixing maximum iterations
MPSKit.WindowMPS
— TypeWindowMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbstractFiniteMPS
Type that represents a finite Matrix Product State embedded in an infinte Matrix Product State.
Fields
left_gs::InfiniteMPS
– left infinite environmentwindow::FiniteMPS
– finite window Matrix Product Stateright_gs::InfiniteMPS
– right infinite environment
Constructors
WindowMPS(left_gs::InfiniteMPS, window_state::FiniteMPS, [right_gs::InfiniteMPS])
WindowMPS(left_gs::InfiniteMPS, window_tensors::AbstractVector, [right_gs::InfiniteMPS])
WindowMPS([f, eltype], physicalspaces::Vector{<:Union{S, CompositeSpace{S}},
virtualspaces::Vector{<:Union{S, CompositeSpace{S}}, left_gs::InfiniteMPS,
[right_gs::InfiniteMPS])
WindowMPS([f, eltype], physicalspaces::Vector{<:Union{S,CompositeSpace{S}}},
maxvirtualspace::S, left_gs::InfiniteMPS, [right_gs::InfiniteMPS])
Construct a WindowMPS via a specification of left and right infinite environment, and either a window state or a vector of tensors to construct the window. Alternatively, it is possible to supply the same arguments as for the constructor of FiniteMPS
, followed by a left (and right) environment to construct the WindowMPS in one step.
By default, the right environment is chosen to be equal to the left, however no copy is made. In this case, changing the left state will also affect the right state.
WindowMPS(state::InfiniteMPS, L::Int)
Construct a WindowMPS from an InfiniteMPS, by promoting a region of length L
to a FiniteMPS
.
MPSKit.MPSMultiline
— Typeconst MPSMultiline = Multiline{<:InfiniteMPS}
Type that represents multiple lines of InfiniteMPS
objects.
Constructors
MPSMultiline(mpss::AbstractVector{<:InfiniteMPS})
MPSMultiline([f, eltype], physicalspaces::Matrix{<:Union{S, CompositeSpace{S}},
virtualspaces::Matrix{<:Union{S, CompositeSpace{S}}) where
{S<:ElementarySpace}
MPSMultiline(As::AbstractMatrix{<:GenericMPSTensor}; kwargs...)
MPSMultiline(ALs::AbstractMatrix{<:GenericMPSTensor},
C₀::AbstractVector{<:MPSBondTensor}; kwargs...)
See also: Multiline
Operators
Missing docstring for SparseMPO
. Check Documenter's build log for details.
MPSKit.DenseMPO
— TypeRepresents a dense periodic mpo
MPSKit.MPOHamiltonian
— TypeMPOHamiltonian
represents a general periodic quantum hamiltonian
really just a sparsempo, with some garantuees on its structure
Environments
MPSKit.AbstractInfEnv
— TypeAbstract environment for an infinite state
MPSKit.PerMPOInfEnv
— TypeThis object manages the periodic mpo environments for an MPSMultiline
MPSKit.MPOHamInfEnv
— TypeThis object manages the hamiltonian environments for an InfiniteMPS
MPSKit.FinEnv
— TypeFinEnv keeps track of the environments for FiniteMPS / WindowMPS
It automatically checks if the queried environment is still correctly cached and if not - recalculates
if above is set to nothing, above === below.
opp can be a vector of nothing, in which case it'll just be the overlap
Missing docstring for MPSKit.IDMRGEnvs
. Check Documenter's build log for details.
Generic actions
MPSKit.∂C
— FunctionZero-site derivative (the C matrix to the right of pos)
Missing docstring for ∂∂C
. Check Documenter's build log for details.
Missing docstring for ∂AC
. Check Documenter's build log for details.
Missing docstring for ∂∂AC
. Check Documenter's build log for details.
MPSKit.∂AC2
— FunctionTwo-site derivative
Missing docstring for ∂∂AC2
. Check Documenter's build log for details.
Missing docstring for c_proj
. Check Documenter's build log for details.
Missing docstring for ac_proj
. Check Documenter's build log for details.
Missing docstring for ac2_proj
. Check Documenter's build log for details.
MPSKit.expectation_value
— Functioncalculates the expectation value of op, where op is a plain tensormap where the first index works on site at
calculates the expectation value of op = op1op2op3*... (ie an N site operator) starting at site at
calculates the expectation value for the given operator/hamiltonian
Algorithms
MPSKit.find_groundstate
— Functionfind_groundstate(Ψ, H, [environments]; kwargs...)
find_groundstate(Ψ, H, algorithm, environments)
Compute the groundstate for Hamiltonian H
with initial guess Ψ
. If not specified, an optimization algorithm will be attempted based on the supplied keywords.
Arguments
Ψ::AbstractMPS
: initial guessH::AbstractMPO
: operator for which to find the groundstate[environments]
: MPS environment manageralgorithm
: optimization algorithm
Keywords
tol::Float64
: tolerance for convergence criteriummaxiter::Int
: maximum amount of iterationsverbose::Bool
: display progress information
MPSKit.timestep
— Functiontimestep(Ψ, H, dt, algorithm, environments)
timestep!(Ψ, H, dt, algorithm, environments)
Compute the time-evolved state $Ψ′ ≈ exp(-iHdt) Ψ$.
Arguments
Ψ::AbstractMPS
: current stateH::AbstractMPO
: evolution operatordt::Number
: timestepalgorithm
: evolution algorithm[environments]
: environment manager
MPSKit.leading_boundary
— Functionleading_boundary(Ψ,opp,alg,envs=environments(Ψ,ham))
Approximate the leading eigenvector for opp.
Missing docstring for dynamicaldmrg
. Check Documenter's build log for details.
MPSKit.changebonds
— Functionchangebonds(ψ::AbstractMPS, H, alg, envs) -> ψ′, envs′
changebonds(ψ::AbstractMPS, alg) -> ψ′
Change the bond dimension of ψ
using the algorithm alg
, and return the new ψ
and the new envs
.
See also: SvdCut
, RandExpand
, VUMPSSvdCut
, OptimalExpand
MPSKit.excitations
— Functionexcitations(H, algorithm::QuasiparticleAnsatz, Ψ::FiniteQP, [left_environments],
[right_environments]; num=1)
excitations(H, algorithm::QuasiparticleAnsatz, Ψ::InfiniteQP, [left_environments],
[right_environments]; num=1, solver=Defaults.solver)
excitations(H, algorithm::FiniteExcited, Ψs::NTuple{<:Any, <:FiniteMPS};
num=1, init=copy(first(Ψs)))
Compute the first excited states and their energy gap above a groundstate.
Arguments
H::AbstractMPO
: operator for which to find the excitationsalgorithm
: optimization algorithmΨ::QP
: initial quasiparticle guessΨs::NTuple{N, <:FiniteMPS}
:N
first excited states[left_environments]
: left groundstate environment[right_environments]
: right groundstate environment
Keywords
num::Int
: number of excited states to computesolver
: algorithm for the linear solver of the quasiparticle environmentsinit
: initial excited state guess
MPSKit.approximate
— Functionapproximate(state::InfiniteMPS, toapprox::Tuple{<:Union{SparseMPO,DenseMPO},<:InfiniteMPS}, alg, envs = environments(state,toapprox))
approximate(state::MPSMultiline, toapprox::Tuple{<:MPOMultiline,<:MPSMultiline}, alg::VUMPS, envs = environments(state,toapprox))
approximate(ost::MPSMultiline, toapprox::Tuple{<:MPOMultiline,<:MPSMultiline}, alg::IDMRG1, oenvs = environments(ost,toapprox))
approximate(ost::MPSMultiline, toapprox::Tuple{<:MPOMultiline,<:MPSMultiline}, alg::IDMRG2, oenvs = environments(ost,toapprox))
Approximate an infinite MPO-MPS state (a state obtained by applying an iMPO to an iMPS) by an iMPS with a smaller bond dimension.
- The MPO-MPS state to be truncated is provided in `toapprox`, and the truncated state is initialized by the input `state`. The iMPO and iMPS can be periodic in the vertical direction (using `MPOMultiline` and `MPSMultiline`).
- The truncation algorithm can be chosen among `VUMPS`, `IDMRG1`, `IDMRG2`.
Groundstate algorithms
MPSKit.VUMPS
— TypeVUMPS{F} <: Algorithm
Variational optimization algorithm for uniform matrix product states, as introduced in https://arxiv.org/abs/1701.07035.
Fields
tol_galerkin::Float64
: tolerance for convergence criteriummaxiter::Int
: maximum amount of iterationsorthmaxiter::Int
: maximum amount of gauging iterationsfinalize::F
: user-supplied function which is applied after each iteration, with signaturefinalize(iter, Ψ, H, envs) -> Ψ, envs
verbose::Bool
: display progress informationdynamical_tols::Bool
: whether to use dynamically adjusted tolerancestol_min::Float64
: minimum tolerance for subroutinestol_max::Float64
: maximum tolerance for subroutineseigs_tolfactor::Float64
: factor for dynamically setting the eigensolver tolerance with respect to the current galerkin errorenvs_tolfactor::Float64
: factor for dynamically setting the environment tolerance with respect to the current galerkin errorgauge_tolfactor::Float64
: factor for dynamically setting the gauging tolerance with respect to the current galerkin error
MPSKit.IDMRG1
— TypeIDMRG1{A} <: Algorithm
Single site infinite DMRG algorithm for finding groundstates.
Fields
tol_galerkin::Float64
: tolerance for convergence criteriumtol_gauge::Float64
: tolerance for gauging algorithmeigalg::A
: eigensolver algorithmmaxiter::Int
: maximum number of outer iterationsverbose::Bool
: display progress information
MPSKit.IDMRG2
— TypeIDMRG2{A} <: Algorithm
2-site infinite DMRG algorithm for finding groundstates.
Fields
tol_galerkin::Float64
: tolerance for convergence criteriumtol_gauge::Float64
: tolerance for gauging algorithmeigalg::A
: eigensolver algorithmmaxiter::Int
: maximum number of outer iterationsverbose::Bool
: display progress informationtrscheme
: truncation algorithm for [tsvd]TensorKit.tsvd
MPSKit.DMRG
— TypeDMRG{A,F} <: Algorithm
Single site DMRG algorithm for finding groundstates.
Fields
tol::Float64
: tolerance for convergence criteriumeigalg::A
: eigensolver algorithmmaxiter::Int
: maximum number of outer iterationsverbose::Bool
: display progress informationfinalize::F
: user-supplied function which is applied after each iteration, with signaturefinalize(iter, Ψ, H, envs) -> Ψ, envs
MPSKit.DMRG2
— TypeDMRG2{A,F} <: Algorithm
2-site DMRG algorithm for finding groundstates.
Fields
tol::Float64
: tolerance for convergence criteriumeigalg::A
: eigensolver algorithmmaxiter::Int
: maximum number of outer iterationsverbose::Bool
: display progress informationfinalize::F
: user-supplied function which is applied after each iteration, with signaturefinalize(iter, Ψ, H, envs) -> Ψ, envs
trscheme
: truncation algorithm for [tsvd]TensorKit.tsvd
MPSKit.GradientGrassmann
— TypeGradientGrassmann <: Algorithm
Variational 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.
Fields
method::OptimKit.OptimizationAlgorithm
: algorithm to perform the gradient searchfinalize!::Function
: user-supplied function which is applied after each iteration, with signaturefinalize!(x::GrassmannMPS.ManifoldPoint, f, g, numiter) -> x, f, g
Constructors
GradientGrassmann(; kwargs...)
Keywords
method=ConjugateGradient
: instance of optimization algorithm, or type of optimization algorithm to constructfinalize!
: finalizer algorithmtol::Float64
: tolerance for convergence criteriummaxiter::Int
: maximum amount of iterationsverbosity::Int
: level of information display
Time evolution algorithms
MPSKit.TDVP
— TypeTDVP{A} <: Algorithm
Single site TDVP algorithm for time evolution.
Fields
expalg::A
: exponentiator algorithmtolgauge::Float64
: tolerance for gauging algorithmmaxiter::Int
: maximum amount of gauging iterations
MPSKit.TDVP2
— TypeTDVP2{A} <: Algorithm
2-site TDVP algorithm for time evolution.
Fields
expalg::A
: exponentiator algorithmtolgauge::Float64
: tolerance for gauging algorithmmaxiter::Int
: maximum amount of gauging iterationstrscheme
: truncation algorithm for [tsvd]TensorKit.tsvd
Missing docstring for TaylorCluster
. Check Documenter's build log for details.
Missing docstring for WII
. Check Documenter's build log for details.
Leading boundary algorithms
Missing docstring for VUMPS
. Check Documenter's build log for details.
Missing docstring for GradientGrassmann
. Check Documenter's build log for details.
Bond change algorithms
MPSKit.OptimalExpand
— Typestruct OptimalExpand <: Algorithm end
An algorithm that expands the given mps using the algorithm given in the VUMPS paper, by selecting the dominant contributions of a two-site updated MPS tensor, orthogonal to the original ψ.
Fields
trscheme::TruncationScheme = truncdim(1)
: The truncation scheme to use.
MPSKit.RandExpand
— Typestruct RandExpand <: Algorithm end
An algorithm that expands the bond dimension by adding random unitary vectors that are orthogonal to the existing state. This is achieved by performing a truncated SVD on a random two-site MPS tensor, which is made orthogonal to the existing state.
Fields
trscheme::TruncationScheme = truncdim(1)
: The truncation scheme to use.
MPSKit.VUMPSSvdCut
— Typestruct VUMPSSvdCut <: Algorithm end
An algorithm that uses an IDMRG2 step to change the bond dimension of a state.
Fields
tol_gauge::Real = Defaults.tolgauge
: The tolerance for the gauge.tol_galerkin::Real = Defaults.tol
: The tolerance for the Galerkin truncation.tol_eigenval::Real = Defaults.tol
: The tolerance for the eigenvalue solver.trscheme::TruncationScheme = notrunc()
: The truncation scheme to use.
MPSKit.SvdCut
— Typestruct SvdCut <: Algorithm end
An algorithm that uses truncated SVD to change the bond dimension of a Ψ.
Fields
trscheme::TruncationScheme = notrunc()
: The truncation scheme to use.
[Excitations]
MPSKit.QuasiparticleAnsatz
— TypeQuasiparticleAnsatz <: Algorithm
Optimization algorithm for quasiparticle excitations on top of MPS groundstates, as introduced in this paper.
Fields
toler::Float64
: tolerance for convergence criteriumkrylovdim::Int
: Krylov subspace dimension
MPSKit.FiniteExcited
— TypeFiniteExcited{A} <: Algorithm
Variational optimization algorithm for excitations of finite Matrix Product States by minimizing the energy of $H - λᵢ |ψᵢ><ψᵢ|$.
Fields
gsalg::A
: optimization algorithm.weight::Float64
: energy penalty for previous states.