ut3svd_supercores#
- t3toolbox.backend.ut3_svd.ut3svd_supercores(cores, rank_truncation_masks, squash_tails_first=True, skip_orthogonalization=False, content=None)#
def ut3svd_supercores( cores: typ.Tuple[ NDArray, # tucker_supercore (assumed masked) NDArray, # tt_supercore ], rank_truncation_masks: typ.Tuple[ NDArray, # tucker_edge_mask -- prefix truncation masks NDArray, # tt_edge_mask ], squash_tails_first: bool = True, skip_orthogonalization: bool = False, # assume input already right-orthogonal (Tucker down + TT right) content: typ.Optional[typ.Tuple[typ.Sequence[int], NDArray, NDArray]] = None, # (shape, tucker_edge_mask, tt_edge_mask) of the INPUT -- HOST. Given -> every # kept-basis SVD (pre-orthogonalization + scan) is PAD-SAFE (review S1b). ) -> typ.Tuple[ typ.Tuple[NDArray, NDArray], # (tucker_supercore, tt_supercore) at the INPUT padded (n, r) NDArray, # frame_singular_values, shape=(d,)+stack+(n,) NDArray, # tt_singular_values, shape=(d+1,)+stack+(r,) ]:
The T3-SVD sweep: orthogonalize, then a left-to-right scan that SVDs each Tucker/TT edge, pads the factors back to the padded size, and multiplies by the prefix truncation masks. Operates at the input padded
(n, r);ut3svd()builds the masks and shrinks afterward.skip_orthogonalization=Trueassumes the input is already right-orthogonal (Tucker down-orthogonal, TT right-orthogonal – the gauge the L->R scan needs) and skips the orthogonalization passes. Silently wrong if the input is not in that form (not checked).- Parameters:
cores (t3toolbox.backend.common.typ.Tuple[NDArray, NDArray])
rank_truncation_masks (t3toolbox.backend.common.typ.Tuple[NDArray, NDArray])
squash_tails_first (bool)
skip_orthogonalization (bool)
content (t3toolbox.backend.common.typ.Optional[t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[int], NDArray, NDArray]])
- Return type:
t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[NDArray, NDArray], NDArray, NDArray]