tv_apply_transpose_from_sweep#
- t3toolbox.backend.apply.tv_apply_transpose_from_sweep(c, ww, frame, frame_sweep, sum_over_probes=False)#
def tv_apply_transpose_from_sweep( c: NDArray, # residual, shape = W + K + C (K optional) ww: typ.Sequence[NDArray], # apply vectors (one-hot e_index for entries), len=d, elm_shape=W+(Ni,) frame: typ.Tuple[ typ.Sequence[NDArray], # up_tucker_cores U. len=d (unused; uniform call signature) typ.Sequence[NDArray], # down_tt_cores O. len=d typ.Sequence[NDArray], # left_tt_cores P. len=d (unused) typ.Sequence[NDArray], # right_tt_cores Q. len=d ], # frame order = T3Frame.data = (up, down, left, right) frame_sweep: typ.Tuple[ typ.Sequence[NDArray], # xis typ.Sequence[NDArray], # mus ], # = tv_precompute_apply_frame_sweep(frame, ww) (lean: no nu/eta) sum_over_probes: bool = False, ) -> typ.Tuple[typ.Sequence[NDArray], typ.Sequence[NDArray]]: # (dU_tildes, dG_tildes) = T3Variations.data
Transpose of the all-modes apply reusing a precomputed frame sweep – the bare
𝒥ᵀ, by the adjoint-state method (the scalar residualcseeds one reversesigma_hatsweep; see_apply_transpose_adjoint()). Takes the lean(xis, mus)sweep + the frame coresO, Q(it recomputes the right context rather than storingnu/eta– half the memory). Reuse hook forfitting.py(one frame sweep feeds the forward and this transpose). FullW + K + C(the residualcmay carry the tangent stackK). No gauge projectorΠ.- Parameters:
c (NDArray)
ww (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]])
frame_sweep (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])
sum_over_probes (bool)
- Return type:
t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]]