Skip to content

Commit

Permalink
Fix mypy under rustworkx 0.13.0 (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
garrison committed Jun 12, 2023
1 parent 4b65161 commit 4451f1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions circuit_knitting_toolbox/utils/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from collections.abc import Sequence, Iterable, Hashable, MutableMapping
from typing import NamedTuple

from rustworkx import PyGraph, connected_components
from rustworkx import PyGraph, connected_components # type: ignore[attr-defined]
from qiskit.circuit import (
QuantumCircuit,
CircuitInstruction,
Expand Down Expand Up @@ -99,7 +99,7 @@ def separate_circuit(
def _partition_labels_from_circuit(circuit: QuantumCircuit) -> list[int]:
"""Generate partition labels from the connectivity of a quantum circuit."""
# Determine connectivity structure of the circuit
graph = PyGraph()
graph: PyGraph = PyGraph()
graph.add_nodes_from(range(circuit.num_qubits))
for instruction in circuit.data:
qubits = instruction.qubits
Expand Down

0 comments on commit 4451f1a

Please sign in to comment.