fv_weights_from_t3_weights#
- t3toolbox.backend.fv_operations.fv_weights_from_t3_weights(t3_weights)#
def fv_weights_from_t3_weights( t3_weights: typ.Tuple[typ.Sequence[NDArray], typ.Sequence[NDArray]], # (tucker_weights, tt_weights) ) -> typ.Tuple[ typ.Tuple[NDArray, ...], # up_weights = tucker_weights typ.Tuple[NDArray, ...], # down_weights = tucker_weights typ.Tuple[NDArray, ...], # left_weights = tt_weights[:-1] typ.Tuple[NDArray, ...], # right_weights = tt_weights[1:] ]:
Build frame weights (a tangent metric) from base-point edge weights
(tucker_weights, tt_weights).up = down = tucker_weights;left = tt_weights[:-1],right = tt_weights[1:]. The TT slicing encodes the convention thatH_i’s left bond is TT bondiand its right bond is bondi+1– non-obvious, hence a named function. The result is a validT3FrameWeights; it pairs with a minimal-rank tangent (where the down/complement ranknDequals the Tucker ranknU, e.g. fromt3svd). A non-minimal tangent hasnD < nUand would mismatch the down family at use.- Parameters:
t3_weights (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])
- Return type:
t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis], t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis], t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis], t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis]]