Skip to content

MPS

Tenet.MPO Type
julia
MPO <: AbstractAnsatz

A Matrix Product Operator (MPO) Ansatz Tensor Network.

source

Tenet.MPO Method
julia
MPO(arrays::Vector{<:AbstractArray}; order=defaultorder(MPO))

Create a NonCanonical MPO from a vector of arrays.

Keyword Arguments

  • order The order of the indices in the arrays. Defaults to (:o, :i, :l, :r).

source

Tenet.MPS Type
julia
MPS <: AbstractAnsatz

A Matrix Product State Ansatz Tensor Network.

source

Tenet.MPS Method
julia
MPS(arrays::Vector{<:AbstractArray}; order=defaultorder(MPS))

Create a NonCanonical MPS from a vector of arrays.

Keyword Arguments

  • order The order of the indices in the arrays. Defaults to (:o, :l, :r).

source

Tenet.MPS Method
julia
MPS(::typeof(identity), n::Integer; physdim=2, maxdim=physdim^(n ÷ 2))

Returns an MPS of n sites whose tensors are initialized to COPY-tensors.

Keyword Arguments

  • physdim The physical or output dimension of each site. Defaults to 2.

  • maxdim The maximum bond dimension. Defaults to physdim^(n ÷ 2).

source

Base.rand Method
julia
Base.rand(rng::Random.AbstractRNG, ::Type{MPO}; n, maxdim, eltype=Float64, physdim=2)

Create a random MPO Tensor Network. In order to avoid norm explosion issues, the tensors are orthogonalized by QR factorization so its normalized and mixed canonized to the last site.

Keyword Arguments

  • n The number of sites.

  • maxdim The maximum bond dimension. If it is nothing, the maximum bond dimension increases exponentially with the number of sites up to (physdim^2)^(n ÷ 2).

  • eltype The element type of the tensors. Defaults to Float64.

  • physdim The physical or output dimension of each site. Defaults to 2.

source

Base.rand Method
julia
Base.rand(rng::Random.AbstractRNG, ::Type{MPS}; n, maxdim, eltype=Float64, physdim=2)

Create a random MPS Tensor Network in the MixedCanonical form where all tensors are right-canonical (ortogonality center at the first site). In order to avoid norm explosion issues, the tensors are orthogonalized by LQ factorization.

Keyword Arguments

  • n The number of sites.

  • maxdim The maximum bond dimension. If it is nothing, the maximum bond dimension increases exponentially with the number of sites up to physdim^(n ÷ 2).

  • eltype The element type of the tensors. Defaults to Float64.

  • physdim The physical or output dimension of each site. Defaults to 2.

source

Tenet.absorb! Method
julia
absorb!(tn::AbstractMPO; bond=(lane1, lane2), dir::Symbol = :left, delete_Λ = true)

For a given AbstractMPO Tensor Network, contract the singular values Λ located in the bond between lanes lane1 and lane2.

Keyword arguments

- `bond` The bond between the singular values tensor and the tensors to be contracted.
- `dir` The direction of the contraction. Defaults to `:left`.
- `delete_Λ` Whether to delete the singular values tensor after the contraction. Defaults to `true`.

source

Tenet.absorb Method
julia
absorb(tn::AbstractMPO; kwargs...)

Non-mutating version of absorb!.

source

Tenet.check_form Method
julia
check_form(mps::AbstractMPO)

Check if the tensors in the mps are in the proper Form.

source

Tenet.evolve! Method
julia
evolve!::AbstractAnsatz, mpo::AbstractMPO; threshold=nothing, maxdim=nothing, normalize=true, reset_index=true)

Evolve the AbstractAnsatz ψ with the AbstractMPO mpo along the output indices of ψ. If threshold or maxdim are not nothing, the tensors are truncated after each sweep at the proper value, and the bond is normalized if normalize=true. If reset_index=true, the indices of the ψ are reset to the original ones.

source

Tenet.truncate_sweep! Method
julia
truncate_sweep!

Do a right-to-left QR sweep on the AbstractMPO ψ and then left-to-right SVD sweep and truncate the tensors according to the threshold or maxdim values. The bond is normalized if normalize=true.

source

DocumenterMermaid.MermaidScriptBlock([...])

Made with DocumenterVitepress.jl