Skip to content

Commit 74a9466

Browse files
authored
Refactor import statements in width.py
1 parent 0bc1b34 commit 74a9466

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • qiskit/transpiler/passes/analysis

qiskit/transpiler/passes/analysis/width.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
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
"""Calculate the width of a DAG circuit."""
13+
from typing import TYPE_CHECKING
1414

15-
from __future__ import annotations
15+
if TYPE_CHECKING:
16+
from qiskit.dagcircuit import DAGCircuit
1617

17-
from qiskit.dagcircuit import DAGCircuit
1818
from qiskit.transpiler.basepasses import AnalysisPass
1919

2020

@@ -26,5 +26,5 @@ class Width(AnalysisPass):
2626
"""
2727

2828
def run(self, dag: DAGCircuit) -> None:
29-
"""Run the Width pass on *dag*."""
29+
"""Run the Width pass on ``dag``."""
3030
self.property_set["width"] = dag.width()

0 commit comments

Comments
 (0)