English
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.commutator

commutator(a, b)[source]

Compute commutator of a and b.

\[ab - ba.\]
Parameters
  • a (OperatorTypeT) – Operator a.

  • b (OperatorTypeT) – Operator b.

Returns

The commutator

Return type

OperatorTypeT