t3_squash_tails#
- t3toolbox.backend.t3_operations.t3_squash_tails(data)#
def t3_squash_tails( data: typ.Tuple[ typ.Sequence[NDArray], # tucker_cores. len=d, elm_shape=stack_shape+(ni,Ni) typ.Sequence[NDArray], # tt_cores. len=d, elm_shape=stack_shape+(rLi,ni,rR(i+1)) ], ) -> typ.Tuple[ typ.Tuple[NDArray, ...], # tucker_cores, unchanged typ.Tuple[NDArray, ...], # tt_cores with r0=rd=1 ]:
Collapse the leading/trailing TT bonds of a T3 to one, without changing the represented tensor.
The T3-data-level twin of
ut3_squash_tails()(the Tucker cores are untouched; the TT chain goes throughtt_squash_tails()).- Parameters:
data (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])
- Return type:
t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis], t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis]]