ufv_variation_shapes#

t3toolbox.backend.ufv_operations.ufv_variation_shapes(frame_data)#
def ufv_variation_shapes(
        frame_data:  typ.Tuple,   # uniform frame .data = (up_sc, down_sc, left_sc, right_sc, shape, masks)
) -> typ.Tuple[
    typ.Tuple[int, ...],          # tucker variation supercore shape = (d,) + C + (nD, N)
    typ.Tuple[int, ...],          # tt variation supercore shape     = (d,) + C + (rL, nU, rR)
]:

The uniform variation supercore shapes of a frame – the backend twin of the frontend UT3Frame.uniform_variation_shapes (which omits the stack; this one includes it).

The ONE place the uniform frame-to-variation axis convention lives, so it cannot drift. The padded dims are read exactly as UT3Frame and ut3_orthogonal_representations() read them:

nU = up.shape[-2]    nD = down.shape[-2]    rL = left.shape[-1]    rR = right.shape[-1]    N = up.shape[-1]

Note rL comes off the left supercore’s last axis. Every uniform bond pads to a single r, so the left supercore’s leading and trailing bond axes happen to be equal and shape[-3] gives the same number today – but that is a coincidence of the padding, not the contract, and it would break silently under per-edge padding. Use this function rather than indexing by hand.

Parameters:

frame_data (t3toolbox.backend.common.typ.Tuple)

Return type:

t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[int, …], t3toolbox.backend.common.typ.Tuple[int, …]]