German
Sprachen
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.Pauli.compose

Pauli.compose(other, qargs=None, front=False, inplace=False)[Quellcode]

Return the operator composition with another Pauli.

Parameter
  • other (Pauli) – a Pauli object.

  • qargs (list or None) – Optional, qubits to apply dot product on (default: None).

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

  • inplace (bool) – If True update in-place (default: False).

Rückgabe

The composed Pauli.

Rückgabetyp

Pauli

Verursacht

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

Bemerkung

Composition (&) by default is defined as left matrix multiplication for matrix operators, while dot() is defined as right matrix multiplication. That is that A & B == A.compose(B) is equivalent to 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).