Skip to main content

Module tt

Module tt 

Source
Expand description

Tensor trains: TT-SVD with error-budget / Gavish–Donoho truncation, and full contraction.

A tensor X(i₁,…,i_d) is written G₁(i₁)·G₂(i₂)⋯G_d(i_d) with core G_k of shape r_{k−1} × n_k × r_k (r₀ = r_d = 1), stored row-major as the (r_{k−1}·n_k) × r_k matrix. tt_svd returns the canonical left-orthogonal gauge: every core but the last has orthonormal columns as a (r_{k−1}n_k) × r_k matrix, so the whole norm ‖X‖_F lives in G_d, and the TT is unique up to an orthogonal r_k × r_k rotation per bond (fixed here by the SVD’s singular-vector basis, i.e. the rotation that diagonalises each left-unfolding Gram).

Structs§

TensorTrain
A tensor train in row-major core storage.
Truncation
Rank-selection rule for each unfolding in tt_svd.

Constants§

GD_MIN_DIM
Smallest unfolding side on which gd_rank applies its cap.

Functions§

contract
Contract cores to the full tensor. Each step is one GEMM: P (M × r_{k−1}) · G_k (r_{k−1} × n_k r_k), and the row-major result is (M n_k) × r_k.
gd_omega
Gavish–Donoho (2014) optimal hard threshold coefficient for unknown noise, ω(β) ≈ 0.56β³ − 0.95β² + 1.82β + 1.43, β = min(m,n)/max(m,n).
gd_rank
Number of singular values above the Gavish–Donoho threshold for an m × n matrix with spectrum s (descending, length min(m,n)).
tail_rank
Smallest rank whose discarded tail energy Σ_{j≥r} σ_j² is ≤ delta2.
tt_svd
TT-SVD (Oseledets 2011) of x reshaped to modes, left-orthogonal gauge.