Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Gacon <gaconju@gmail.com>
  • Loading branch information
ikkoham and Cryoris authored Feb 27, 2023
1 parent d55f95f commit 650b3cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion qiskit/quantum_info/operators/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def double_commutator(
a: OperatorTypeT, b: OperatorTypeT, c: OperatorTypeT, *, commutes: bool = True
) -> OperatorTypeT:
r"""Compute symmetric double commutator of a, b and c.
See also Equation (13.6.18) in [1].
If `commutes` is `True`, it returns
Expand All @@ -76,12 +77,13 @@ def double_commutator(
a: Operator a.
b: Operator b.
c: Operator c.
commutes: True commutes, False anti-commutes.
commutes: ``True`` commutes, ``False`` anti-commutes.
Returns:
The double commutator
References:
[1]: R. McWeeny.
Methods of Molecular Quantum Mechanics.
2nd Edition, Academic Press, 1992.
Expand Down
3 changes: 2 additions & 1 deletion releasenotes/notes/add-commutator-96ef07433e8ca4e7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ features:
- |
Add utility functions :func:`~qiskit.quantum_info.commutator`,
:func:`~qiskit.quantum_info.anti_commutator`, and
:func:`~qiskit.quantum_info.double_commutator`.
:func:`~qiskit.quantum_info.double_commutator` to compute commutators
for any objects implementing a :class:`.LinearOp`.

0 comments on commit 650b3cb

Please sign in to comment.