cuequivariance.segmented_tensor_product.Path
- class cuequivariance.segmented_tensor_product.Path(indices, coefficients)
A tensor product path links segments from different operands and contains coefficients.
Attributes
- indicestuple[int, …]
One index per operand, pointing to the segment.
- coefficientsnp.ndarray
Coefficients of the path.
Examples
>>> Path((12, 44), 2.0) op0[12]*op1[44]*2.
- __init__(indices, coefficients)
Methods
__init__(indices, coefficients)assert_valid()Assert that the path is valid.
move_operand(operand, new_index)Move an operand to a new position.
move_operand_first(operand)Move an operand to the first position.
move_operand_last(operand)Move an operand to the last position.
permute_operands(perm)Apply a permutation to the operands.
Attributes
num_operandsThe number of operands.
indicescoefficients