t3_orthogonality_residual#

t3toolbox.backend.t3_orthogonalization.t3_orthogonality_residual(x, side)#
def t3_orthogonality_residual(
        x: typ.Tuple[typ.Sequence[NDArray], typ.Sequence[NDArray]],  # (tucker_cores, tt_cores)
        side: str,  # 'left' or 'right'
) -> NDArray:  # shape = stack_shape; max abs deviation from orthonormality per stack element (0 == exact)

Non-enforcing check of T3 left/right-orthogonal form: Tucker cores down-orthogonal AND TT cores left- (side='left') or right- (side='right') orthogonal, per stack element.

Returns the max-abs deviation from the identity over (each stacked block of), reduced over the non-stack axes (shape stack_shape):

  • Tucker B_i, all i: einsum('...io,...jo->...ij', B, B) = I

  • TT G_i, left (i = 0..d-2): einsum('...aib,...aic->...bc', G, G) = I

  • TT G_i, right (i = 1..d-1): einsum('...aib,...cib->...ac', G, G) = I

The boundary TT core (last for left, first for right) is the center remainder and is not checked. This is the form t3_left_orthogonalize() / t3_right_orthogonalize() produce and the form t3svd(..., assume_orthogonal=...) may assume.

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

  • side (str)

Return type:

NDArray