t3m_inplace_fused ================= .. py:function:: t3toolbox.backend.t3_linalg.t3m_inplace_fused(x, y, max_tucker_ranks = None, max_tt_ranks = None, rtol = None, atol = None) .. code-block:: python def t3m_inplace_fused( x: typ.Tuple[typ.Sequence[NDArray], typ.Sequence[NDArray]], # (tucker_cores_x, tt_cores_x) y: typ.Tuple[typ.Sequence[NDArray], typ.Sequence[NDArray]], # (tucker_cores_y, tt_cores_y) max_tucker_ranks: typ.Union[int, typ.Sequence[int], None] = None, # scalar caps all, or len=d max_tt_ranks: typ.Union[int, typ.Sequence[int], None] = None, # scalar caps all, or len=d+1 rtol: typ.Optional[float] = None, # requires unstacked (enforced by the frontend) atol: typ.Optional[float] = None, ) -> typ.Tuple[ typ.Tuple[NDArray, ...], # x_times_y tucker_cores typ.Tuple[NDArray, ...], # x_times_y tt_cores ]: Elementwise product ``x ⊙ y`` -- method (b): a fused left-to-right sweep that truncates as it goes, never materializing the full product (the workhorse; see ``docs/ttm_t3m_ht_note.tex``). Right-orthogonalizes the two central TTs separately (the Kronecker of right-canonical cores is right-canonical, so the product's central TT is right-canonical without being formed), then sweeps left to right carrying the *separate* ``(r_x, r_y)`` bonds. At each mode it builds the product core on the fly, then does the **joint** per-site T3 truncation (the Tucker rank, weighted by the canonical environment, then the TT bond) -- both truncations are optimal because the right side is right-canonical. ``O(d·r⁴)``, memory ``O(r̃·n²·r²)`` (one site). Stack-aware with max-rank truncation; ``rtol``/``atol`` require unstacked. No truncation requested -> the exact full product.