uniform_minimal =============== .. py:function:: t3toolbox.backend.uniform_fitting.uniform_minimal(x0) .. code-block:: python def uniform_minimal( x0: typ.Any, # UniformTuckerTensorTrain ) -> typ.Any: # the same tensor with structurally-minimal ranks (x0 itself if already minimal) Reduce ``x0`` to its **structurally-minimal ranks** -- the SAME tensor, with any unrealizable nominal rank dropped (e.g. a TT bond rank exceeding what the Tucker ranks can realize). A no-op (returns ``x0`` unchanged) when it is already minimal, which is the common case. **Uniform fitting requires a minimal frame** (:py:func:`uniform_least_squares_problem`). The reason is structural: from a *non*-minimal frame the manifold retraction truncates to the realizable (minimal) rank, which no longer matches the fixed masks the optimizer holds loop-invariant -- so the next step's masking desyncs and crashes. The ragged layer tolerates non-minimal ranks (per-core shapes adapt); the uniform layer cannot (its masks are fixed), so it must start minimal and stay minimal (from a minimal frame the retraction provably preserves the ranks). Reduction: ``t3svd`` (-> left-orthogonal) then a ``'right_to_left'`` :py:meth:`~t3toolbox.uniform_tucker_tensor_train.UniformTuckerTensorTrain.rank_adjustment_sweep` (-> minimal, right-orthogonal). Same-tensor, done once at setup (eager).