MPS
Tenet.MPO Type
MPO <: AbstractAnsatzA Matrix Product Operator (MPO) Ansatz Tensor Network.
Tenet.MPO Method
MPO(arrays::Vector{<:AbstractArray}; order=defaultorder(MPO))Create a NonCanonical MPO from a vector of arrays.
Keyword Arguments
orderThe order of the indices in the arrays. Defaults to(:o, :i, :l, :r).
Tenet.MPS Method
MPS(arrays::Vector{<:AbstractArray}; order=defaultorder(MPS))Create a NonCanonical MPS from a vector of arrays.
Keyword Arguments
orderThe order of the indices in the arrays. Defaults to(:o, :l, :r).
Tenet.MPS Method
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
physdimThe physical or output dimension of each site. Defaults to 2.maxdimThe maximum bond dimension. Defaults tophysdim^(n ÷ 2).
Base.rand Method
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
nThe number of sites.maxdimThe maximum bond dimension. If it isnothing, the maximum bond dimension increases exponentially with the number of sites up to(physdim^2)^(n ÷ 2).eltypeThe element type of the tensors. Defaults toFloat64.physdimThe physical or output dimension of each site. Defaults to 2.
Base.rand Method
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
nThe number of sites.maxdimThe maximum bond dimension. If it isnothing, the maximum bond dimension increases exponentially with the number of sites up tophysdim^(n ÷ 2).eltypeThe element type of the tensors. Defaults toFloat64.physdimThe physical or output dimension of each site. Defaults to 2.
Tenet.absorb! Method
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`.Tenet.check_form Method
check_form(mps::AbstractMPO)Check if the tensors in the mps are in the proper Form.
Tenet.evolve! Method
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.
Tenet.truncate_sweep! Method
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.
DocumenterMermaid.MermaidScriptBlock([...])