Previous topic

Quantics Tensor Train Vectors

Next topic

Weighted Tensor Train Vectors

This Page

Quantics Tensor Train Matrices

class TensorToolbox.core.QTTmat(A, base, nrows, ncols, is_sparse=None, store_location='', store_object=None, store_freq=1, store_overwrite=False)

Constructor of multidimensional matrix in Quantics Tensor Train format [1][2].

Parameters:
  • A (ndarray,TT) – Available input formats are full tensor in numpy.ndarray, Tensor Train structure (list of cores). If input is ndarray, then it must be in mattensor format (see aux.py)
  • base (int) – folding base for QTT representation
  • nrows (int) – If int then the row size will be the same in all dimensions, if list then len(nrows) == len(self.TT) (numer of cores) and row size will change for each dimension.
  • ncols (int) – If int then the column size will be the same in all dimensions, if list then len(ncols) == len(self.TT) (numer of cores) and column size will change for each dimension.
build(eps=1e-10, method='svd', rs=None, fix_rank=False, Jinit=None, delta=0.0001, maxit=100, mv_eps=1e-06, mv_maxit=100, kickrank=2)

Common interface for the construction of the approximation.

Parameters:
  • eps (float) – [default == 1e-10] For method==’svd’: precision with which to approximate the input tensor. For method==’ttcross’: TT-rounding tolerance for rank-check.
  • method (string) – ‘svd’ use singular value decomposition to construct the TT representation [3], ‘ttcross’ use low rank skeleton approximation to construct the TT representation [4], ‘ttdmrg’ uses Tensor Train Renormalization Cross to construct the TT representation [5][6], ‘ttdmrgcross’ uses ‘ttdmrg’ with ‘ttcross’ approximation of supercores
  • rs (list) – list of integer ranks of different cores. If None then the incremental TTcross approach will be used. (method==’ttcross’)
  • fix_rank (bool) – determines whether the rank is allowed to be increased (method==’ttcross’)
  • Jinit (list) – list of list of integers containing the r starting columns in the lowrankapprox routine for each core. If None then pick them randomly. (method==’ttcross’)
  • delta (float) – accuracy parameter in the TT-cross routine (method==’ttcross’). It is the relative error in Frobenious norm between two successive iterations.
  • maxit (int) – maximum number of iterations in the lowrankapprox routine (method==’ttcross’)
  • mv_eps (float) – accuracy parameter for each usage of the maxvol algorithm (method==’ttcross’)
  • mv_maxit (int) – maximum number of iterations in the maxvol routine (method==’ttcross’)
  • fix_rank – Whether the rank is allowed to increase
  • kickrank (int) – rank overshooting for ‘ttdmrg’
get_full_ncols()

Returns the number of cols of the unfolded matrices

get_full_nrows()

Returns the number of rows of the unfolded matrices

get_ncols()

Returns the number of cols of the folded matrices

get_nrows()

Returns the number of rows of the folded matrices

ndims()

Return the number of dimensions of the tensor space