Skip to content

Commit

Permalink
Move impl comment from docstring to comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhartman committed Mar 20, 2023
1 parent 0454437 commit 72ebda6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions qiskit/circuit/commutation_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ def _identity_op(num_qubits):
)


# This code is essentially copy-pasted from commutative_analysis.py.
# This code cleverly hashes commutativity and non-commutativity results between DAG nodes and seems
# quite efficient for large Clifford circuits.
# They may be other possible efficiency improvements: using rule-based commutativity analysis,
# evicting from the cache less useful entries, etc.
class CommutationChecker:
"""Checks if two Operations commute.
This code is essentially copy-pasted from commutative_analysis.py.
This code cleverly hashes commutativity and non-commutativity results between DAG nodes and seems
quite efficient for large Clifford circuits.
They may be other possible efficiency improvements: using rule-based commutativity analysis,
evicting from the cache less useful entries, etc.
"""
"""Checks if two Operations commute."""

def __init__(self):
super().__init__()
Expand Down

0 comments on commit 72ebda6

Please sign in to comment.