ttclass.m

From Spinach Documentation Wiki
Revision as of 11:44, 9 July 2019 by Kuprov (talk | contribs) (→‎Examples)
Jump to: navigation, search

Creates an object of a tensor train class. A tensor train is a type of un-opened Kronecker product that behaves as a matrix or a vector of a very large dimension, but takes a reasonable amount of memory to store. See https://doi.org/10.1137/090752286 for further information.

Syntax

    tt=ttclass(coeff,kronterms,tolerance)

Arguments

       coeff   - coefficient in front of the spin operator,
                 usually the interaction magnitude

   kronterms   - column cell array of matrices whose Krone-
                 cker product makes up the spin operator

   tolerance   - maximum deviation in the 2-norm between the
                 TT representation and the flat matrix repre-
                 sentation that the TT format is allowed to
                 introduce

Outputs

    tt   - tensor train object

Examples

Creating an un-opened Kronecker product of a 5x5 and a 7x7 matrices:

    >> a=ttclass(1,{rand(5);rand(7)},0)

    a = 

      35×35 ttclass array with properties:

             coeff: 1
             cores: {2×1 cell}
         tolerance: 0
        debuglevel: 0

Notes

  1. If multiple columns are supplied in kronterms, multiple coefficients are given in coeff, and multiple tolerances are given in tolerance, the resulting tensor train is assumed to be the sum of the individual tensor trains specified in different columns.
  2. Tensor trains are exotic and capricious structures, do not use them unless you know what you are doing.

See also

polyadic.m, ttclass/mtimes.m, ttclass/kron.m, ttclass/full.m


Version 2.4, authors: Dmitry Savostyanov, Ilya Kuprov