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), where dual is optional. tensor contains the numerical data of the elementary operator and an optional callback function providing the tensor data. Accepted inputs for tensor are

  • coeff – Coefficient associated with this OperatorTerm.

  • dtype – Data type of this OperatorTerm. Default value is inferred from input operands unless this function returns a scalar OperatorTerm, in which case dtype is required.

Returns

An OperatorTerm constructed from the tensor product of elementary operators.