t3_operations#

Structural operations on ragged t3 data.

Squash tails, segment/concatenate, stack/unstack, broadcast-to-common-stack, core-shape utilities, and the weighted-layer core ops (t3_absorb_weights / t3_{concatenate,kronecker}_weights / t3_weights_consistent).

Functions#

t3_broadcast_to_common_stack(tucker_cores, tt_cores)

Broadcast every core of a T3 up to the common (broadcast) stack of all its cores.

t3_absorb_tucker_into_tt(tucker_cores, tt_cores)

Absorb each Tucker core into its TT core, replacing the mode (n) leg with the physical (N)

t3_squash_tails(data)

Collapse the leading/trailing TT bonds of a T3 to one, without changing the represented tensor.

t3_segment(data[, start, stop])

Contiguous mode-segment of a T3: slice both core families over modes start:stop.

t3_concatenate(xx)

Concatenate a sequence of T3 segments into one T3 (inverse of t3_segment()).

tucker_change_core_shapes(tucker_cores, new_shape, ...)

Increase/decrease Tucker and/or TT ranks for TT cores using zero padding/truncation.

t3_stack(xx)

t3_unstack(x)

Given multiple stacked T3s, this unstacks them

t3_core_shapes(shape, tucker_ranks, tt_ranks[, ...])

Determines the shapes of the T3 cores based on the ranks.

t3_sum(x[, axis])

Sum over axes of TuckerTensorTrain.

t3_absorb_weights(x0, weights)

Contract diagonal edge weights into a Tucker tensor train's cores (shape-preserving).

t3_weights_consistent(x0, weights)

True iff the weight tuple's lengths, per-edge ranks, and stack_shape match the T3 x0

t3_concatenate_weights(weights_A, weights_B)

Per-edge concatenation of two weight tuples (the + / direct-sum combine: ranks add). Last-axis

t3_kronecker_weights(weights_A, weights_B)

Per-edge Kronecker product of two weight tuples (the Hadamard * combine: ranks multiply). The