Extensions
This page documents extensions to TensorCrossInterpolation.
Currently, there is only one extension, TCIITensorConversion.
TCIITensorConversion
Dependencies:
This module is automatically loaded when ITensors and ITensorMPS are present in addition to TensorCrossInterpolation. It offers conversion constructors between ITensorMPS types and TensorCrossInterpolation types, and an analogue of the evaluate function for ITensor types.
ITensorMPS.MPO — MethodMPO(tt::TCI.AbstractTensorTrain{T}; sites=nothing)Convert a tensor train to an ITensorMPS.MPO. Arguments:
tt: The tensor train to be converted.sites: An array of arrays of ITensor Index objects, wheresites[n][m]corresponds to the mth index attached to the nth site.
If siteindices is left empty, a default set of indices will be generated.
ITensorMPS.MPS — MethodMPS(tt::TCI.AbstractTensorTrain{T}; sites=nothing)Convert a tensor train to an ITensorMPS.MPS. Arguments:
tt: The tensor train to be converted.siteindices: An array of ITensor Index objects, wheresites[n]corresponds to the index for the nth site.
If siteindices is left empty, a default set of indices will be generated.
TensorCrossInterpolation.TensorTrain — Methodfunction TensorTrain(mps::ITensorMPS.MPS)Converts an ITensorMPS.MPS object into a TensorTrain. Note that this only works if the MPS has a single leg per site. Otherwise, use TensorCrossInterpolation.TensorTrain(mps::ITensorMPS.MPO).
TensorCrossInterpolation.TensorTrain — Methodfunction TensorTrain(mps::ITensorMPS.MPO)Converts an ITensorMPS.MPO object into a TensorCrossInterpolation.TensorTrain.
TensorCrossInterpolation.evaluate — Methodfunction evaluate(
mps::Union{ITensorMPS.MPS,ITensorMPS.MPO},
indices::AbstractVector{<:ITensors.Index},
indexvalues::AbstractVector{Int}
)Evaluates an MPS or MPO for a given set of index values.
indicesis a list ofITensors.Indexobjects that specifies the order in which indices are given.indexvaluesis a list of integer values in the same order asindices.
If many evaluations are necessary, it may be advantageous to convert your MPS to a TensorCrossInterpolation.TTCache object first.
TensorCrossInterpolation.evaluate — Methodfunction evaluate(
mps::Union{ITensorMPS.MPS,ITensorMPS.MPO},
indexspecs::Vararg{AbstractVector{<:Tuple{ITensorMPS.Index,Int}}}
)Evaluates an MPS or MPO for a given set of index values.
indexspecis a list of tuples, where each tuple contains anITensorMPS.Indexobject specifying an index, and anIntcorresponding to the value of the specified index.
If many evaluations are necessary, it may be advantageous to convert your MPS to a TensorCrossInterpolation.TTCache object first.