38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
---
|
||
title: anti_commutator
|
||
description: API reference for qiskit.opflow.anti_commutator
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.opflow.anti_commutator
|
||
---
|
||
|
||
<span id="qiskit-opflow-anti-commutator" />
|
||
|
||
# qiskit.opflow\.anti\_commutator
|
||
|
||
<Function id="qiskit.opflow.anti_commutator" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/opflow/utils.py" signature="anti_commutator(op_a, op_b)">
|
||
Deprecated: Compute anti-commutator of op\_a and op\_b.
|
||
|
||
$$
|
||
AB + BA.
|
||
$$
|
||
|
||
<Admonition title="Deprecated since version 0.24.0" type="danger">
|
||
The function `qiskit.opflow.utils.anti_commutator()` is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. For code migration guidelines, visit [https://qisk.it/opflow\_migration](https://qisk.it/opflow_migration).
|
||
</Admonition>
|
||
|
||
**Parameters**
|
||
|
||
* **op\_a** ([*OperatorBase*](qiskit.opflow.OperatorBase "qiskit.opflow.operator_base.OperatorBase")) – Operator A
|
||
* **op\_b** ([*OperatorBase*](qiskit.opflow.OperatorBase "qiskit.opflow.operator_base.OperatorBase")) – Operator B
|
||
|
||
**Returns**
|
||
|
||
the anti-commutator
|
||
|
||
**Return type**
|
||
|
||
[OperatorBase](qiskit.opflow.OperatorBase "qiskit.opflow.OperatorBase")
|
||
</Function>
|
||
|