Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

CommutationChecker

class CommutationChecker[source]

Bases: object

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.

Methods

commute

Checks if two Operations commute.