compute_orthogonal_representation_ranks#
- t3toolbox.backend.ranks.compute_orthogonal_representation_ranks(shape, tucker_ranks, tt_ranks, use_jax=False)#
def compute_orthogonal_representation_ranks( shape: typ.Sequence[int], # (N0, ..., N(d-1)) tucker_ranks: typ.Union[ typ.Sequence[int], # (n0,...,n(d-1)) NDArray, # dtype=int, shape=(d,) + stack_shape ], tt_ranks: typ.Union[ typ.Sequence[int], # (r0,...,rd) NDArray, # dtype=int, shape=(d+1,) + stack_shape ], use_jax: bool = False, ) -> typ.Tuple[ typ.Union[ typ.Tuple[int,...], # (nU0,...,nU(d-1)) NDArray, # dtype=int, shape=(d,) + stack_shape ], # up_tucker_ranks typ.Union[ typ.Tuple[int, ...], # (nD0',...,nD(d-1)') NDArray, # dtype=int, shape=(d,) + stack_shape ], # down_tucker_ranks typ.Union[ typ.Tuple[int,...], # (rL0',...,rLd') NDArray, # dtype=int, shape=(d+1,) + stack_shape ], # left_tt_ranks typ.Union[ typ.Tuple[int, ...], # (rR0',...,rRd') NDArray, # dtype=int, shape=(d+1,) + stack_shape ], # right_tt_ranks ]:
The ranks the orthogonal-representation sweep (
fv_conversions.t3_orthogonal_representations) produces, without running it – the uniform frame masks are built from these, so this recurrence must follow the sweep’s ORDER exactly:Tucker down-orthogonalization:
up_i = min(n_i, N_i);a LEFT sweep on the original TT bonds:
left_{i+1} = min(left_i * up_i, r_{i+1});a RIGHT sweep over the left-orthogonal chain:
right_i = min(left_i, up_i * right_{i+1});the down cores:
down_i = min(up_i, left_i * right_{i+1}).
The boundary bonds are 1 (the sweep squashes the tails). Until 2026-08-22 this ran the paper’s right-then-left order on the original bonds; on minimal-rank structures the two agree, on any non-minimal TT bond they do not, and the uniform frame’s left/down masks were too small (review S1). Host numpy throughout: ranks are static structure (
use_jaxis accepted for compatibility and ignored).- Parameters:
- Return type:
t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Tuple[int, …], NDArray], t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Tuple[int, …], NDArray], t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Tuple[int, …], NDArray], t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Tuple[int, …], NDArray]]