t3_to_dense_chain#

t3toolbox.backend.t3_conversions.t3_to_dense_chain(tucker_cores, tt_cores, squash_tails=True)#
def t3_to_dense_chain(
        tucker_cores: typ.Union[
            typ.Sequence[NDArray],  # ragged:  len=d, elm_shape=stack_shape+(ni, Ni)
            NDArray,                # uniform: shape=(d,)+stack_shape+(ni, Ni)
        ],
        tt_cores: typ.Union[
            typ.Sequence[NDArray],  # ragged:  len=d, elm_shape=stack_shape+(ri, ni, r(i+1))
            NDArray,                # uniform: shape=(d,)+stack_shape+(ri, ni, r(i+1))
        ],
        squash_tails: bool = True,
) -> NDArray:  # stack_shape + (N0,...,N(d-1)); +leading/trailing TT-rank axes if squash_tails=False

Chain-contract (Tucker-absorbed) TT cores into a dense tensor – the representation-agnostic core of t3_to_dense().

Works on a ragged core tuple or a uniform supercore array: it only zips/indexes the cores and uses a leading '...' for the stack, so a supercore’s leading mode axis is consumed by iteration just like a tuple. Callers handle the representation-specific pre/post steps (ragged: broadcast to a common stack; uniform: mask, then static prefix-slice to the real shape).

Parameters:
  • tucker_cores (t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Sequence[NDArray], NDArray])

  • tt_cores (t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Sequence[NDArray], NDArray])

  • squash_tails (bool)

Return type:

NDArray