Korean
언어
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.Operator.compose

Operator.compose(other, qargs=None, front=False)[소스]

Return the operator composition with another Operator.

매개변수
  • other (Operator) – a Operator object.

  • qargs (list or None) – Optional, a list of subsystem positions to apply other on. If None apply on all subsystems (default: None).

  • front (bool) – If True compose using right operator multiplication, instead of left multiplication [default: False].

반환

The composed Operator.

반환 형식

Operator

예외 발생

QiskitError – if other cannot be converted to an operator, or has incompatible dimensions for specified subsystems.

참고

Composition (&) by default is defined as left matrix multiplication for matrix operators, while @ (equivalent to dot()) is defined as right matrix multiplication. That is that A & B == A.compose(B) is equivalent to B @ A == B.dot(A) when A and B are of the same type.

Setting the front=True kwarg changes this to right matrix multiplication and is equivalent to the dot() method A.dot(B) == A.compose(B, front=True).