Details
ResourceFunction["TensorTrainContract"] reconstructs a full dense array from its Tensor Train (TT) representation (also known as the Matrix Product State representation). It is the inverse of TensorTrainDecomposition.
The input is a nonempty list of rank-3 arrays {A1,A2…,An}, where n is the number of dimensions of the resulting array.
The bond dimension refers to the size of the internal contracted indices connecting adjacent tensor cores. It effectively dictates the rank and compression level of the Tensor Train.
Each core Ak has dimensions {χk-1,dk,χk} where dk is the size of the kth dimension of the resulting array, and χk is the bond dimension between cores k andk+1.
The first core has χ0=1 and the last core has χn=1.
Contracting the cores returned by
TensorTrainDecomposition reconstructs the original array, exactly up to floating-point error when the decomposition was exact, or up to the truncation error when a
"MaxBondDimension" cap or nonzero
Tolerance was applied.