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,
Return an
OperatorTermfrom 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), whereconjugationanddualsare optional.mpois an instance ofMatrixProductOperator.modesis 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=Trueimplies that the complex conjugate transpose of the MPO is applied. Defaults toFalse.dualsis a sequence of booleans specifying mode duality:False(default) for ket modes,Truefor 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 ifcoeffis aCallback.
- Returns:
An
OperatorTermconstructed from the product ofMatrixProductOperatorinstances.