ut3_orthogonality_residual ========================== .. py:function:: t3toolbox.backend.ut3_orthogonalization.ut3_orthogonality_residual(data, side) .. code-block:: python def ut3_orthogonality_residual( data: UT3Data, side: str, # 'left' or 'right' ) -> NDArray: # shape = stack_shape; max abs deviation of the masked cores from orthonormality, per element Uniform analog of :py:func:`t3_orthogonality_residual`: non-enforcing check of left/right-orthogonal form (Tucker supercores down-orthogonal AND TT supercores left/right-orthogonal), **per stack element**. Compares each masked supercore's Gram against ``diag(mask)`` (the masked rows/cols are zero, so the identity is restricted to the real block). The boundary TT core (last for left, first for right) is the center remainder and is not checked. Reduced over the **non-stack** axes (the leading mode index ``d`` and the two gram axes), so the result has shape ``stack_shape``.