mpo_product#

cuquantum.densitymat.mpo_product(
*operands: Tuple[MatrixProductOperator, Sequence[int], bool | None, Sequence[bool] | None],
coeff: Number | ndarray | ndarray | Callback | Tuple[Number, Callback] | Tuple[ndarray | ndarray, Callback] = 1.0,
batch_size: int = 1,
) OperatorTerm[source]#

Return an OperatorTerm from a product of matrix product operators (MPOs).

Parameters:
  • operands

    Operands in the product. Each operand is a tuple of length 2 to 4 of the form (mpo, modes, conjugation, duals), where conjugation and duals are optional.

    • mpo is an instance of MatrixProductOperator.

    • modes is a sequence of state mode indices specifying which modes of the quantum state the MPO acts on. Its length must equal the number of sites in the MPO.

    • conjugation=True implies that the complex conjugate transpose of the MPO is applied. Defaults to False.

    • duals is a sequence of booleans specifying mode duality: False (default) for ket modes, True for bra modes. Its length must equal the number of sites in the MPO.

  • coeff – Coefficient(s) associated with this OperatorTerm.

  • batch_size – Batch size of coefficient coeff, needs to be specified only if coeff is a Callback.

Returns:

An OperatorTerm constructed from the product of MatrixProductOperator instances.