cuquantum.densitymat.tensor_product¶
- cuquantum.densitymat.tensor_product(*operands: Sequence[Tuple[Union[ElementaryOperator, Tuple[Union[numpy.ndarray, cupy.ndarray], Optional[Callable]]], Sequence[int], Optional[Sequence[bool]]]], coeff: Union[numbers.Number, Callable] = 1.0, dtype: Optional[str] = None) OperatorTerm [source]¶
Return an
OperatorTerm
from a tensor product of elementary operators.- Parameters
operands –
Operands in the tensor product. Each operand is a tuple of length 2 or 3 of the form
(tensor, modes, dual)
, wheredual
is optional.tensor
contains the numerical data of the elementary operator and an optional callback function providing the tensor data. Accepted inputs fortensor
areSubclass of
ElementaryOperator
, i.e.DenseOperator
andMultidiagonalOperator
NDArrayType
, which will be converted to aDenseOperator
Tuple[NDArrayType, Callable]
, which will be passed to the initializer ofDenseOperator
coeff – Coefficient associated with this
OperatorTerm
.dtype – Data type of this
OperatorTerm
. Default value is inferred from input operands unless this function returns a scalarOperatorTerm
, in which casedtype
is required.
- Returns
An
OperatorTerm
constructed from the tensor product of elementary operators.