The TensorCrossInterpolation module implements the tensor cross interpolation algorithm for efficient interpolation of multi-index tensors and multivariate functions.
This algorithm is used in the quantics tensor cross interpolation (QTCI) method for exponentially efficient interpolation of functions with scale separation. QTCI is implemented in the QuanticsTCI.jl module.
This module has been registered in the General registry. It can be installed by typing the following in a Julia REPL:
using Pkg; Pkg.add("TensorCrossInterpolation.jl")
This section only contains the bare minimum to get you started. An example with more explanation can be found in the user manual.
Given a multivariate function f
, the function crossinterpolate2
will generate a tensor cross interpolation for f
. For example, to interpolate the 8d lorentzian
import TensorCrossInterpolation as TCI
f(v) = 1/(1 + v' * v)
# There are 8 tensor indices, each with values 1...10
localdims = fill(10, 8)
tolerance = 1e-8
tci, ranks, errors = TCI.crossinterpolate2(Float64, f, localdims; tolerance=tolerance)
Note:
f
is defined as a function that takes a singleVector
of integers.- The return type of
f
(Float64
in this case) must be stated explicitly in the call tocrossinterpolate2
.
The resulting TensorCI2
object can be further manipulated, see user manual.
To evaluate the TCI interpolation, simply call your TensorCI1
object like you would call the original function:
originalvalue = f([1, 2, 3, 4, 5, 6, 7, 8])
interpolatedvalue = tci([1, 2, 3, 4, 5, 6, 7, 8])
The sum of all function values on the lattice can be obtained very efficiently from a tensor train:
sumvalue = sum(tci)
An example with more explanation can be found in the user manual.
A small helper module for easy conversion of TensorCI1
, TensorCI2
and TensorTrain
objects into ITensors MPS
objects. This should be helpful for those integrating TCI into a larger tensor network algorithm.
For this conversion, simply call the MPS
constructor on the object:
mps = MPS(tci)
A module that implements the quantics representation and combines it with TCI for exponentially efficient interpolation of functions with scale separation.
- If you are having have technical trouble, feel free to contact me directly.
- Feature requests and bug reports are always welcome, feel free to open an issue for those.
- If you have implemented something that might be useful for others, we'd appreciate a merge request!
This project is maintained by
- Marc K. Ritter @marc_ritter
- Hiroshi Shinaoka @h.shinaoka
For their contributions to this library's code, we thank
- Satoshi Terasaki @terasakisatoshi
- Y. Núñez Fernández, M. Jeannin, P. T. Dumitrescu, T. Kloss, J. Kaye, O. Parcollet, and X. Waintal, Learning Feynman Diagrams with Tensor Trains, Phys. Rev. X 12, 041018 (2022). (arxiv link: arXiv:2207.06135)
- I. V. Oseledets, Tensor-Train Decomposition, SIAM J. Sci. Comput. 33, 2295 (2011).