
    z	i                     B    S r SSKJr  SSKJr  SSKJr   " S S\5      rg)z>Analysis pass to find commutation relations between DAG nodes.    )SessionCommutationChecker)AnalysisPass)analyze_commutationsc                   :   ^  \ rS rSrSrSS.U 4S jjrS rSrU =r$ )CommutationAnalysis   zAnalysis pass to find commutation relations between DAG nodes.

This sets ``property_set['commutation_set']`` to a dictionary that describes
the commutation relations on a given wire: all the gates on a wire
are grouped into a set of gates that commute.
N)_commutation_checkerc                @   > [         TU ]  5         Uc  [        nXl        g )N)super__init__scccomm_checker)selfr	   	__class__s     t/home/james-whalen/.local/lib/python3.13/site-packages/qiskit/transpiler/passes/optimization/commutation_analysis.pyr   CommutationAnalysis.__init__   s"      '#& 0    c                 \    [        XR                  R                  5      U R                  S'   g)zRun the CommutationAnalysis pass on `dag`.

Run the pass on the DAG, and write the discovered commutation relations
into the ``property_set``.
commutation_setN)r   r   ccproperty_set)r   dags     r   runCommutationAnalysis.run%   s'     0DCIZIZI]I]/^+,r   )r   )	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classcell__)r   s   @r   r   r      s#     04 1 1_ _r   r   N)	r   "qiskit.circuit.commutation_libraryr   r   qiskit.transpiler.basepassesr   'qiskit._accelerate.commutation_analysisr   r    r   r   <module>r&      s"    E O 5 H_, _r   