Operators
Reference for matrix product operators and Hamiltonians. The full, canonical docstrings for the whole package live in the Library index.
Matrix product operators
MPSKit.AbstractMPO Type
abstract type AbstractMPO{O} <: AbstractVector{O} endAbstract supertype for Matrix Product Operators (MPOs).
sourceMPSKit.MPO Type
struct MPO{O,V<:AbstractVector{O}} <: AbstractMPO{O}Matrix Product Operator (MPO) acting on a tensor product space with a linear order.
See also: FiniteMPO, InfiniteMPO
MPSKit.FiniteMPO Type
FiniteMPO(Os::Vector{O}) -> FiniteMPO{O}
FiniteMPO(O::AbstractTensorMap{S,N,N}) where {S,N} -> FiniteMPO{O<:MPOTensor}Matrix Product Operator (MPO) acting on a finite tensor product space with a linear order.
sourceMPSKit.InfiniteMPO Type
InfiniteMPO(Os::PeriodicVector{O}) -> InfiniteMPO{O}Matrix Product Operator (MPO) acting on an infinite tensor product space with a linear order.
sourceMPSKit.MultilineMPO Type
const MultilineMPO = Multiline{<:AbstractMPO}Type that represents multiple lines of MPO objects.
Constructors
MultilineMPO(mpos::AbstractVector{<:Union{SparseMPO, DenseMPO}})
MultilineMPO(Os::AbstractMatrix{<:MPOTensor})See also
sourceHamiltonians
MPSKit.MPOHamiltonian Type
struct MPOHamiltonian{TO<:JordanMPOTensor, V<:AbstractArray{TO<:JordanMPOTensor, 1}} <: AbstractMPO{TO<:JordanMPOTensor}MPO representation of a Hamiltonian. This is a specific form of an AbstractMPO, where all the sites are represented by an upper triangular block matrix of the following form:
where A, B, C, and D are MPOTensors, or (sparse) blocks thereof.
Constructors
The finite and infinite variants, FiniteMPOHamiltonian and InfiniteMPOHamiltonian, are constructed from a lattice of physical spaces together with a set of inds => operator pairs describing the local terms:
FiniteMPOHamiltonian(lattice::AbstractArray{<:VectorSpace}, local_operators...)
InfiniteMPOHamiltonian(lattice::AbstractArray{<:VectorSpace}, local_operators...)Properties
A: bulk block of interacting operators at each siteB: operators that finish an interactionC: operators that start an interactionD: on-site terms
Examples
For example, constructing a nearest-neighbour Hamiltonian would look like this:
lattice = fill(ℂ^2, 10)
H = FiniteMPOHamiltonian(lattice, (i, i+1) => O for i in 1:length(lattice)-1)See also
instantiate_operator is responsible for instantiating the local operators in a form that is compatible with this constructor.
MPSKit.FiniteMPOHamiltonian Type
FiniteMPOHamiltonian(Ws::Vector{<:AbstractMatrix})Create a FiniteMPOHamiltonian from a vector of matrices, such that Ws[i][j, k] represents the operator at site i, left level j and right level k. Here, the entries can be either MPOTensor, Missing or Number.
MPSKit.InfiniteMPOHamiltonian Type
InfiniteMPOHamiltonian(Ws::Vector{<:AbstractMatrix})Create an InfiniteMPOHamiltonian from a vector of matrices, such that Ws[i][j, k] represents the operator at site i, left level j and right level k. Here, the entries can be either MPOTensor, Missing or Number.
Jordan-block MPO tensors
MPSKit.JordanMPOTensor Type
struct JordanMPOTensor{T<:Number, S, A<:DenseArray{T<:Number, 1}} <: BlockTensorKit.AbstractBlockTensorMap{T<:Number, S, 2, 2}A single tensor of a matrix product operator (MPO) in upper triangular (Jordan) block form, as used to represent the local tensors of an MPOHamiltonian. The virtual (row, column) structure is
where A is the bulk of interacting operators, C/B are the operators that start/finish an interaction, D is the on-site term, and the diagonal 1s are identities.
Type parameters
T <: Number: thescalartypeof the tensors.S: thespacetypeof the tensors.A <: DenseVector{T}: the storage type of the underlying tensors.
Properties
The reduced-leg A, B, C and D blocks are exposed as properties (W.A, W.B, W.C, W.D), reconstructed on demand from the stored tensors and scalars.
Notes
Rather than storing the dense block matrix, the genuine operators and the identities are kept separately:
tensors::SparseBlockTensorMapholds the non-identity operators over the full virtual space (soA,B,CandDall live at their(row, 1, 1, col)position).scalars::Dict{CartesianIndex{4}, T}holds the scalar multiples of the identity, keyed by their(row, 1, 1, col)virtual position; the diagonal corner1s are stored here as well.
An index is never present in both tensors and scalars. This keeps the ubiquitous identity blocks free of dense storage and lets identities be materialized lazily only when needed.
Operator algebra
MPSKit.MultipliedOperator Type
Structure representing a multiplied operator. Consists of
- An operator op (MPO, Hamiltonian, ...)
- An object f that gets multiplied with the operator (Number, function, ...)MPSKit.TimedOperator Type
Structure representing a time-dependent operator. Consists of
- An operator op (MPO, Hamiltonian, ...)
- An function f that gives the time-dependence according to op(t) = f(t)*opMPSKit.UntimedOperator Type
Structure representing a time-independent operator that will be multiplied with a constant coefficient. Consists of
- An operator (MPO, Hamiltonian, ...)
- A number f that gets multiplied with the operatorMPSKit.LazySum Type
struct LazySum{O} <: AbstractArray{O, 1}Type that represents a lazy sum, i.e. explicit summation is only done when needed. This type is basically an AbstractVector with some extra functionality to calculate things efficiently.
Constructors
LazySum(x::Vector)
LazySum(ops::AbstractVector, fs::AbstractVector)Fields
ops::Vector: vector of summable objects