tensor_product#
-
cuquantum.
densitymat. tensor_product( - *operands: Tuple[ElementaryOperator | ndarray | ndarray | Tuple[ndarray | ndarray, Callback], Sequence[int], Sequence[bool] | None],
- coeff: Number | ndarray | ndarray | Callback | Tuple[Number, Callback] | Tuple[ndarray | ndarray, Callback] = 1,
- batch_size: int = 1,
- dtype: str | None = None,
Return an
OperatorTermfrom 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), wheredualis optional.tensorcontains the numerical data of the elementary operator and an optional callback function providing the tensor data. Accepted inputs fortensorareSubclass of
ElementaryOperator, i.e.DenseOperatorandMultidiagonalOperatorNDArrayType, which will be converted to aDenseOperatorTuple[NDArrayType, Callable], which will be passed to the initializer ofDenseOperator
coeff – Coefficient(s) 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 casedtypeis required.batch_size – Batch size of coefficient
coeff, needs to be specified only ifcoeffis aCallback.
- Returns:
An
OperatorTermconstructed from the tensor product of elementary operators.