We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bc1b34 commit 74a9466Copy full SHA for 74a9466
1 file changed
qiskit/transpiler/passes/analysis/width.py
@@ -9,12 +9,12 @@
9
# Any modifications or derivative works of this code must retain this
10
# copyright notice, and modified files need to carry a notice indicating
11
# that they have been altered from the originals.
12
-
13
"""Calculate the width of a DAG circuit."""
+from typing import TYPE_CHECKING
14
15
-from __future__ import annotations
+if TYPE_CHECKING:
16
+ from qiskit.dagcircuit import DAGCircuit
17
-from qiskit.dagcircuit import DAGCircuit
18
from qiskit.transpiler.basepasses import AnalysisPass
19
20
@@ -26,5 +26,5 @@ class Width(AnalysisPass):
26
"""
27
28
def run(self, dag: DAGCircuit) -> None:
29
- """Run the Width pass on *dag*."""
+ """Run the Width pass on ``dag``."""
30
self.property_set["width"] = dag.width()
0 commit comments