34 lines
729 B
Plaintext
34 lines
729 B
Plaintext
---
|
||
title: commutator
|
||
description: API reference for qiskit.quantum_info.commutator
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.quantum_info.commutator
|
||
---
|
||
|
||
<span id="qiskit-quantum-info-commutator" />
|
||
|
||
# qiskit.quantum\_info.commutator
|
||
|
||
<Function id="qiskit.quantum_info.commutator" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/quantum_info/operators/utils/commutator.py" signature="commutator(a, b)">
|
||
Compute commutator of a and b.
|
||
|
||
$$
|
||
ab - ba.
|
||
$$
|
||
|
||
**Parameters**
|
||
|
||
* **a** (*OperatorTypeT*) – Operator a.
|
||
* **b** (*OperatorTypeT*) – Operator b.
|
||
|
||
**Returns**
|
||
|
||
The commutator
|
||
|
||
**Return type**
|
||
|
||
*OperatorTypeT*
|
||
</Function>
|
||
|