uniform_minimal#
- t3toolbox.backend.uniform_fitting.uniform_minimal(x0, sharing=None)#
def uniform_minimal( x0: typ.Any, # UniformTuckerTensorTrain sharing: typ.Optional[typ.Sequence] = None, # len=d, static; one hashable group label per mode (None = unshared) ) -> typ.Any: # the same tensor with structurally-minimal ranks (x0 itself if already minimal)
Reduce
x0to 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 (returnsx0unchanged) when it is already minimal, which is the common case.Uniform fitting requires a minimal frame (
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'rank_adjustment_sweep()(-> minimal, right-orthogonal). Same-tensor, done once at setup (eager).With
sharing, minimality is the SHARED notion and the reduction is the grouped one – REQUIRED for a shared start: the per-mode reduction can clip a group rank the group ceiling admits (untying the group), and even at shared-minimal ranks its per-mode SVDs rotate each factor independently (untying the values). The grouped path keeps the factors tied and the group rank shared.- Parameters:
x0 (t3toolbox.backend.common.typ.Any)
sharing (t3toolbox.backend.common.typ.Optional[t3toolbox.backend.common.typ.Sequence])
- Return type:
t3toolbox.backend.common.typ.Any