Module transformation: orthogonalization, truncation and other transformations of the HT-tensors

teneva_ht_jax.transformation: transformation of HT-tensors.

This module contains the function for transformation of the HT-tensor into full format.




teneva_ht_jax.transformation.full(Y)[source]

Export HT-tensor to the full format.

Parameters:

Y (list) – HT-tensor.

Returns:

multidimensional array related to the given HT-tensor.

Return type:

jnp.ndarray

Note

This function can only be used for relatively small tensors, because the resulting tensor will have n^d elements and may not fit in memory for large dimensions. And this function does not take advantage of jax’s ability to speed up the code and can be slow, but it should only be meaningfully used for tensors of small dimensions.

Examples:

d = 8          # Dimension of the tensor
n = 10         # Mode size for the tensor
r = [3, 4, 5]  # Ranks for tree layers

# Build the random HT-tensor:
rng, key = jax.random.split(rng)
Y = tnv.rand(d, n, r, key)
# TODO!

# Y_full = tnv.full(Y) # This function is not ready!
# print(Y_full.shape)