tt_operations#

Operations on bare tensor-train chains (the tt family).

A “tt chain” is the TT core sequence alone – no Tucker cores, no masks: ragged (a len=d tuple of stack_shape+(rLi,ni,rR(i+1)) arrays) or uniform (one (d,)+stack_shape+(r,n,r) supercore). Every public function here is polymorphic over the two (inferred via is_ndarray), following the shared-sweep precedent of tt_orthogonalization; the ragged name doubles as the polymorphic name, so there is no separate utt_ twin.

Functions#

tt_reverse(tt_cores)

Reverse a tensor-train chain: reverse the mode order and swap the two bond axes of each core.

tt_squash_tails(tt_cores)

Collapse the leading and trailing TT bonds to one without changing the represented tensor.

tt_change_core_shapes(tt_cores, new_tucker_ranks, ...)

Increase/decrease Tucker and/or TT ranks for TT cores using zero padding/truncation.

tt_zipper_left_to_right(coresA, coresB)

Accumulate left-to-right the partial contractions of two TT chains sharing tensor indices.

tt_zipper_right_to_left(coresA, coresB)

As tt_zipper_left_to_right(), accumulating right-to-left. Polymorphic via