File tree Expand file tree Collapse file tree
qiskit/transpiler/passes/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99# Any modifications or derivative works of this code must retain this
1010# copyright notice, and modified files need to carry a notice indicating
1111# that they have been altered from the originals.
12-
1312"""Check if the DAG has reached a fixed point."""
14-
15- from __future__ import annotations
16-
1713from copy import deepcopy
14+ from typing import TYPE_CHECKING
15+
16+ if TYPE_CHECKING :
17+ from qiskit .dagcircuit import DAGCircuit
1818
19- from qiskit .dagcircuit import DAGCircuit
2019from qiskit .transpiler .basepasses import AnalysisPass
2120
2221
@@ -29,11 +28,10 @@ class DAGFixedPoint(AnalysisPass):
2928 """
3029
3130 def run (self , dag : DAGCircuit ) -> None :
32- """Run the DAGFixedPoint pass on * dag* ."""
31+ """Run the DAGFixedPoint pass on `` dag`` ."""
3332 if self .property_set ["_dag_fixed_point_previous_dag" ] is None :
3433 self .property_set ["dag_fixed_point" ] = False
3534 else :
3635 fixed_point_reached = self .property_set ["_dag_fixed_point_previous_dag" ] == dag
3736 self .property_set ["dag_fixed_point" ] = fixed_point_reached
38-
3937 self .property_set ["_dag_fixed_point_previous_dag" ] = deepcopy (dag )
You can’t perform that action at this time.
0 commit comments