Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.opflow.primitive_ops.PrimitiveOp.compose

PrimitiveOp.compose(other, permutation=None, front=False)[source]

Return Operator Composition between self and other (linear algebra-style: A@B(x) = A(B(x))), overloaded by @.

Note: You must be conscious of Quantum Circuit vs. Linear Algebra ordering conventions. Meaning, X.compose(Y) produces an X∘Y on qubit 0, but would produce a QuantumCircuit which looks like

-[Y]-[X]-

Because Terra prints circuits with the initial state at the left side of the circuit.

প্যারামিটার
  • other (OperatorBase) -- The OperatorBase with which to compose self.

  • permutation (Optional[List[int]]) -- List[int] which defines permutation on other operator.

  • front (bool) -- If front==True, return other.compose(self).

রিটার্নস

An OperatorBase equivalent to the function composition of self and other.

রিটার্ন টাইপ

OperatorBase