Library documentation

States

MPSKit.FiniteMPSType
FiniteMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbstractFiniteMPS

Type that represents a finite Matrix Product State.

Fields

  • ALs – left-gauged MPS tensors
  • ARs – right-gauged MPS tensors
  • ACs – center-gauged MPS tensors
  • CLs – 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 tensors

  • f::Function=rand: initializer function for tensor data

  • eltype::Type{<:Number}=ComplexF64: scalar type of tensors

  • physicalspaces::Vector{<:Union{S, CompositeSpace{S}}: list of physical spaces

  • N::Int: number of sites

  • physicalspace::Union{S,CompositeSpace{S}}: local physical space

  • virtualspaces::Vector{<:Union{S, CompositeSpace{S}}: list of virtual spaces

  • maxvirtualspace::S: maximum virtual space

Keywords

  • normalize: normalize the constructed state
  • overwrite=false: overwrite the given input tensors
  • left=oneunit(S): left-most virtual space
  • right=oneunit(S): right-most virtual space
MPSKit.InfiniteMPSType
InfiniteMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbtractMPS

Type that represents an infinite Matrix Product State.

Fields

  • AL – left-gauged MPS tensors
  • AR – right-gauged MPS tensors
  • AC – center-gauged MPS tensors
  • CR – 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}}) where
            {S<:ElementarySpace}
InfiniteMPS(As::AbstractVector{<:GenericMPSTensor}; tol=1e-14, maxiter=100)
InfiniteMPS(ALs::AbstractVector{<:GenericMPSTensor}, C₀::MPSBondTensor;
            tol=1e-14, maxiter=100)

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 tensors

  • ALs::AbstractVector{<:GenericMPSTensor}: vector of left-gauged site tensors

  • C₀::MPSBondTensor: initial gauge tensor

  • f::Function=rand: initializer function for tensor data

  • eltype::Type{<:Number}=ComplexF64: scalar type of tensors

  • physicalspaces::AbstractVector{<:Union{S, CompositeSpace{S}}: list of physical spaces

  • virtualspaces::AbstractVector{<:Union{S, CompositeSpace{S}}: list of virtual spaces

Keywords

  • tol: gauge fixing tolerance
  • maxiter: gauge fixing maximum iterations
MPSKit.WindowMPSType
WindowMPS{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 environment
  • window::FiniteMPS – finite window Matrix Product State
  • right_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.

Note

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.

Missing docstring.

Missing docstring for MPSMultiline. Check Documenter's build log for details.

Operators

Missing docstring.

Missing docstring for SparseMPO. Check Documenter's build log for details.

MPSKit.MPOHamiltonianType
MPOHamiltonian

represents a general periodic quantum hamiltonian

really just a sparsempo, with some garantuees on its structure

Environments

MPSKit.PerMPOInfEnvType
This object manages the periodic mpo environments for an MPSMultiline
MPSKit.MPOHamInfEnvType
This object manages the hamiltonian environments for an InfiniteMPS
MPSKit.FinEnvType
FinEnv 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.

Missing docstring for MPSKit.IDMRGEnvs. Check Documenter's build log for details.

Generic actions

MPSKit.∂CFunction
Zero-site derivative (the C matrix to the right of pos)
Missing docstring.

Missing docstring for ∂∂C. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂AC. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂∂AC. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂∂AC2. Check Documenter's build log for details.

Missing docstring.

Missing docstring for c_proj. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ac_proj. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ac2_proj. Check Documenter's build log for details.

MPSKit.expectation_valueFunction

calculates 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_groundstateFunction
find_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 guess
  • H::AbstractMPO: operator for which to find the groundstate
  • [environments]: MPS environment manager
  • algorithm: optimization algorithm

Keywords

  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbose::Bool: display progress information
MPSKit.timestepFunction
timestep(Ψ, H, dt, algorithm, environments)
timestep!(Ψ, H, dt, algorithm, environments)

Compute the time-evolved state $Ψ′ ≈ exp(-iHdt) Ψ$.

Arguments

  • Ψ::AbstractMPS: current state
  • H::AbstractMPO: evolution operator
  • dt::Number: timestep
  • algorithm: evolution algorithm
  • [environments]: environment manager
MPSKit.leading_boundaryFunction
leading_boundary(state,opp,alg,envs=environments(state,ham))

approximate the leading eigenvector for opp
Missing docstring.

Missing docstring for dynamicaldmrg. Check Documenter's build log for details.

Missing docstring.

Missing docstring for changebonds. Check Documenter's build log for details.

MPSKit.excitationsFunction
excitations(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 excitations
  • algorithm: 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 compute
  • solver: algorithm for the linear solver of the quasiparticle environments
  • init: initial excited state guess
MPSKit.approximateFunction
approximate(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.VUMPSType
VUMPS{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 criterium
  • tol_gauge::Float64: tolerance for gauging algorithm
  • maxiter::Int: maximum amount of iterations
  • orthmaxiter::Int: maximum amount of gauging iterations
  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, Ψ, H, envs) -> Ψ, envs
  • verbose::Bool: display progress information
MPSKit.IDMRG1Type
IDMRG1{A} <: Algorithm

Single site infinite DMRG algorithm for finding groundstates.

Fields

  • tol_galerkin::Float64: tolerance for convergence criterium
  • tol_gauge::Float64: tolerance for gauging algorithm
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbose::Bool: display progress information
MPSKit.IDMRG2Type
IDMRG2{A} <: Algorithm

2-site infinite DMRG algorithm for finding groundstates.

Fields

  • tol_galerkin::Float64: tolerance for convergence criterium
  • tol_gauge::Float64: tolerance for gauging algorithm
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbose::Bool: display progress information
  • trscheme: truncation algorithm for [tsvd]TensorKit.tsvd
MPSKit.DMRGType
DMRG{A,F} <: Algorithm

Single site DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbose::Bool: display progress information
  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, Ψ, H, envs) -> Ψ, envs
MPSKit.DMRG2Type
DMRG2{A,F} <: Algorithm

2-site DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbose::Bool: display progress information
  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, Ψ, H, envs) -> Ψ, envs
  • trscheme: truncation algorithm for [tsvd]TensorKit.tsvd
MPSKit.GradientGrassmannType
GradientGrassmann <: 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 search
  • finalize!::Function: user-supplied function which is applied after each iteration, with signature finalize!(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 construct
  • finalize!: finalizer algorithm
  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: level of information display

Time evolution algorithms

MPSKit.TDVPType
TDVP{A} <: Algorithm

Single site TDVP algorithm for time evolution.

Fields

  • expalg::A: exponentiator algorithm
  • tolgauge::Float64: tolerance for gauging algorithm
  • maxiter::Int: maximum amount of gauging iterations
MPSKit.TDVP2Type
TDVP2{A} <: Algorithm

2-site TDVP algorithm for time evolution.

Fields

  • expalg::A: exponentiator algorithm
  • tolgauge::Float64: tolerance for gauging algorithm
  • maxiter::Int: maximum amount of gauging iterations
  • trscheme: truncation algorithm for [tsvd]TensorKit.tsvd
Missing docstring.

Missing docstring for TaylorCluster. Check Documenter's build log for details.

Missing docstring.

Missing docstring for WII. Check Documenter's build log for details.

Leading boundary algorithms

Missing docstring.

Missing docstring for VUMPS. Check Documenter's build log for details.

Missing docstring.

Missing docstring for GradientGrassmann. Check Documenter's build log for details.

Bond change algorithms

MPSKit.RandExpandType

expands the bond dimension by adding random unitary vectors

[Excitations]

MPSKit.QuasiparticleAnsatzType
QuasiparticleAnsatz <: Algorithm

Optimization algorithm for quasiparticle excitations on top of MPS groundstates, as introduced in this paper.

Fields

  • toler::Float64: tolerance for convergence criterium
  • krylovdim::Int: Krylov subspace dimension
MPSKit.FiniteExcitedType
FiniteExcited{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.