t3_kronecker_weights#

t3toolbox.backend.t3_operations.t3_kronecker_weights(weights_A, weights_B)#
def t3_kronecker_weights(
        weights_A: typ.Tuple[typ.Sequence[NDArray], typ.Sequence[NDArray]],  # (tucker_weights, tt_weights)
        weights_B: typ.Tuple[typ.Sequence[NDArray], typ.Sequence[NDArray]],  # (tucker_weights, tt_weights)
) -> typ.Tuple[
    typ.Tuple[NDArray, ...],  # Kronecker tucker_weights, ranks multiply
    typ.Tuple[NDArray, ...],  # Kronecker tt_weights,     ranks multiply
]:

Per-edge Kronecker product of two weight tuples (the Hadamard * combine: ranks multiply). The weights of A B (elementwise product of the represented tensors) are the Kronecker products of the edge weights (verified). This is a last-axis outer product broadcasting the shared ``C`` stack(wA wB)[..., a*rB + b] = wA[..., a]·wB[..., b] (A-major) – not np.kron (which would Kronecker the stack axes too). The A-major order must match the Hadamard core-combine’s.

Parameters:
  • weights_A (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])

  • weights_B (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]]