Factorize a function on the continuous using quantics grid#
-
struct Quantics#
This class represents a quantics grid. A quantics grid is an uniform grid with $2^R$ points in [a,b): $x_i=a+i\Delta$, where $\Delta = (b -a)/2^R $ and $i=0,1,…,2^R-1 $. The function $f$ is mapped to a tensor with $R$ legs in the following way. The binary digits $\sigma_i\}$ of $i$ are used as indices of the tensor $F$ defined by: $ F(\sigma_i\})=f(x_i) $
-
template<class T>
class QTensorCI : public xfac::TensorCI2<T># This class is a TensorCI2 built form a function f(x1,x2,…,xn) where the binary digits of the each xi are used to buid a tensor of length n*nBit Apart from the TensorCI2 including its tensor train, the main output is the quantics tensor train: a cheap representation of the function that can be saved/loaded to file
Public Functions
-
inline QTensorCI(function<T(vector<double>)> f_, grid::Quantics grid_, TensorCI2Param par = {})#
constructs a rank-1 QTensorCI from a function f:(u1,u2,…,un)->T and the given quantics grid
-
inline QTensorCI(function<T(double)> f_, grid::Quantics grid_, TensorCI2Param par = {})#
constructs a rank-1 QTensorCI from a function f:(u1)->T and the given quantics grid. Specialization for the 1d case.
-
inline QTensorTrain<T> get_qtt() const#
returns the underline quantics tensor train
-
inline void addPivotPoints(vector<vector<double>> const &xpivots)#
add the pivots to all bonds of the tci. Each point is translated to the corresponding tensor index
-
inline void addPivotValues(vector<double> const &xpivots)#
add the pivots to all bonds of the tci. Each point is translated to the corresponding tensor index. Specialization for the 1d case.
-
inline QTensorCI(function<T(vector<double>)> f_, grid::Quantics grid_, TensorCI2Param par = {})#
-
template<class T>
struct QTensorTrain# store a quantics tensor train, ie a tensor train and a quantics grid. This struct is able to save/load a multidimensional function R^n -> T