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.MPOMethod
MPO(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, where sites[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.

source
ITensorMPS.MPSMethod
MPS(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, where sites[n] corresponds to the index for the nth site.

If siteindices is left empty, a default set of indices will be generated.

source
TensorCrossInterpolation.evaluateMethod
function 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.

  • indices is a list of ITensors.Index objects that specifies the order in which indices are given.
  • indexvalues is a list of integer values in the same order as indices.

If many evaluations are necessary, it may be advantageous to convert your MPS to a TensorCrossInterpolation.TTCache object first.

source
TensorCrossInterpolation.evaluateMethod
function 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.

  • indexspec is a list of tuples, where each tuple contains an ITensorMPS.Index object specifying an index, and an Int corresponding 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.

source