qiskit-documentation/docs/api/qiskit/0.29/qiskit.opflow.double_commut...

46 lines
1.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: double_commutator (v0.29)
description: API reference for qiskit.opflow.double_commutator in qiskit v0.29
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.opflow.double_commutator
---
<span id="qiskit-opflow-double-commutator" />
# qiskit.opflow\.double\_commutator
<Function id="qiskit.opflow.double_commutator" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/opflow/utils.py" signature="double_commutator(op_a, op_b, op_c, sign=False)">
Compute symmetric double commutator of op\_a, op\_b and op\_c. See McWeeny chapter 13.6 Equation of motion methods (page 479)
If sign is False, it returns
$$
[[A, B], C]/2 + [A, [B, C]]/2
= (2ABC + 2CBA - BAC - CAB - ACB - BCA)/2.
$$
If sign is True, it returns
$$
\lbrace[A, B], C\rbrace/2 + \lbrace A, [B, C]\rbrace/2
= (2ABC - 2CBA - BAC + CAB - ACB + BCA)/2.
$$
**Parameters**
* **op\_a** (`OperatorBase`) Operator A
* **op\_b** (`OperatorBase`) Operator B
* **op\_c** (`OperatorBase`) Operator C
* **sign** (`bool`) False anti-commutes, True commutes
**Returns**
the double commutator
**Return type**
[OperatorBase](qiskit.aqua.operators.OperatorBase "qiskit.aqua.operators.OperatorBase")
</Function>