tv_apply#

t3toolbox.backend.apply.tv_apply(ww, variation, frame)#
def tv_apply(
        ww:         typ.Sequence[NDArray],  # apply vectors, len=d, elm_shape=W+(Ni,)
        variation:  typ.Tuple[
            typ.Sequence[NDArray],          # var_tucker_cores. len=d, elm_shape=K+C+(nOi,Ni)
            typ.Sequence[NDArray],          # var_tt_cores.     len=d, elm_shape=K+C+(rLi,nUi,rRi)
        ],
        frame:       typ.Tuple[
            typ.Sequence[NDArray],          # up_tucker_cores  U. len=d
            typ.Sequence[NDArray],          # down_tt_cores    O. len=d
            typ.Sequence[NDArray],          # left_tt_cores    P. len=d
            typ.Sequence[NDArray],          # right_tt_cores   Q. len=d
        ],                                  # frame order = T3Frame.data = (up, down, left, right)
) -> NDArray:                               # the scalar apply(v, ww), one per stack element; shape = W + K + C

Apply a tangent vector in all modes: contract the dense tangent with ww in every index.

The all-modes special case of probing – a single left-to-right pass (mu-hat via P, then the perturbation sigma via Q), contracted at the terminal bond. No right (nu) / central (eta) sweeps, no per-mode assembly. See Section 6.2.2 (Algorithms 6-7) of Alger et al. (2026).

See also

tv_entries, tv_probe

Parameters:
  • ww (t3toolbox.backend.common.typ.Sequence[NDArray])

  • variation (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])

  • frame (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])

Return type:

NDArray