legendre_decomp.utils#
Utility functions
Functions#
|
Vectorized implementation of the default B tensor. |
|
Construct B tensor for ring decomposition. |
|
2次の近似から、index - channel 結合を切断する. |
Module Contents#
- legendre_decomp.utils.default_B(shape, order, xp=np)#
Vectorized implementation of the default B tensor.
- Parameters:
shape (Sequence[int]) – Shape of the corresponding X tensor.
order (int) – Order of the B tensor.
xp (ModuleType) – Array module, either numpy (CPU) or cupy (CUDA/GPU)
- Returns:
Default B tensor of specified order.
- Return type:
array-like
- legendre_decomp.utils.ring_decomposition_B(shape)#
Construct B tensor for ring decomposition.
- Parameters:
shape (Sequence[int]) – Shape of the corresponding X tensor.
- Returns:
B tensor for ring decomposition.
- Return type:
list[tuple[int, Ellipsis]]
- legendre_decomp.utils.index_channel_B(shape)#
2次の近似から、index - channel 結合を切断する.
- Parameters:
shape (Sequence[int]) – Shape of the corresponding X tensor.
- Returns:
B tensor with broken index-channel bond for larger than 2D.
- Return type:
list[tuple[int, Ellipsis]]