Skip to content

tensor4all/T4ATensorCI.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T4ATensorCI

Dev CI

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 library is a continuation of the TensorCrossInterpolation.jl library.

Installation

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("T4ATensorCI")

Usage

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 $f(\mathbf v) = 1/(1 + \mathbf v^2)$ on an 8-dimensional lattice of integers, $\mathbf{v} \in {1, 2, ..., 10}^8$:

import T4ATensorCI 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 single Vector of integers.
  • The return type of f (Float64 in this case) must be stated explicitly in the call to crossinterpolate2.

The resulting TensorCI2 object can be further manipulated, see user manual. To evaluate the TCI interpolation, simply call your TensorCI2 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)

Online user manual

An example with more explanation can be found in the user manual.

Related modules

A module that implements the quantics representation and combines it with TCI for exponentially efficient interpolation of functions with scale separation.

Contributions

  • 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!

Authors

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

References

Packages

No packages published

Contributors 3

  •  
  •  
  •