Skip to content

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
julia
abstract type AbstractMPO{O} <: AbstractVector{O} end

Abstract supertype for Matrix Product Operators (MPOs).

source
MPSKit.MPO Type
julia
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

source
MPSKit.FiniteMPO Type
julia
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.

source
MPSKit.InfiniteMPO Type
julia
InfiniteMPO(Os::PeriodicVector{O}) -> InfiniteMPO{O}

Matrix Product Operator (MPO) acting on an infinite tensor product space with a linear order.

source
MPSKit.MultilineMPO Type
julia
const MultilineMPO = Multiline{<:AbstractMPO}

Type that represents multiple lines of MPO objects.

Constructors

julia
MultilineMPO(mpos::AbstractVector{<:Union{SparseMPO, DenseMPO}})
MultilineMPO(Os::AbstractMatrix{<:MPOTensor})

See also

Multiline, AbstractMPO

source

Hamiltonians

MPSKit.MPOHamiltonian Type
julia
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:

julia
FiniteMPOHamiltonian(lattice::AbstractArray{<:VectorSpace}, local_operators...)
InfiniteMPOHamiltonian(lattice::AbstractArray{<:VectorSpace}, local_operators...)

Properties

  • A: bulk block of interacting operators at each site

  • B: operators that finish an interaction

  • C: operators that start an interaction

  • D: on-site terms

Examples

For example, constructing a nearest-neighbour Hamiltonian would look like this:

julia
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.

source
MPSKit.FiniteMPOHamiltonian Type
julia
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.

source
MPSKit.InfiniteMPOHamiltonian Type
julia
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.

source

Jordan-block MPO tensors

MPSKit.JordanMPOTensor Type
julia
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: the scalartype of the tensors.

  • S: the spacetype of 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::SparseBlockTensorMap holds the non-identity operators over the full virtual space (so A, B, C and D all 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 corner 1s 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.

source

Operator algebra

MPSKit.MultipliedOperator Type
julia
Structure representing a multiplied operator. Consists of
    - An operator op (MPO, Hamiltonian, ...)
    - An object f that gets multiplied with the operator (Number, function, ...)
source
MPSKit.TimedOperator Type
julia
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)*op
source
MPSKit.UntimedOperator Type
julia
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 operator
source
MPSKit.LazySum Type
julia
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

julia
LazySum(x::Vector)
LazySum(ops::AbstractVector, fs::AbstractVector)

Fields

  • ops::Vector: vector of summable objects
source