diff --git a/pytket/extensions/qiskit/backends/aer.py b/pytket/extensions/qiskit/backends/aer.py index 1a465e22..dbbf2df7 100644 --- a/pytket/extensions/qiskit/backends/aer.py +++ b/pytket/extensions/qiskit/backends/aer.py @@ -225,7 +225,7 @@ def default_compilation_pass( and self._backend_info.get_misc("characterisation") ): return self._arch_dependent_default_compilation_pass( - arch, + arch, # type: ignore optimisation_level, # type: ignore ) @@ -343,9 +343,9 @@ def get_result(self, handle: ResultHandle, **kwargs: KwargTypes) -> BackendResul include_density_matrix=self._supports_density_matrix, ) for circ_index, backres in enumerate(backresults): - self._cache[ResultHandle(jobid, circ_index, qubit_n, ppc)][ - "result" - ] = backres + self._cache[ResultHandle(jobid, circ_index, qubit_n, ppc)]["result"] = ( + backres + ) return cast(BackendResult, self._cache[handle]["result"]) diff --git a/pytket/extensions/qiskit/backends/ibm_utils.py b/pytket/extensions/qiskit/backends/ibm_utils.py index ff261cd4..d7987bab 100644 --- a/pytket/extensions/qiskit/backends/ibm_utils.py +++ b/pytket/extensions/qiskit/backends/ibm_utils.py @@ -30,7 +30,7 @@ from qiskit.transpiler import CouplingMap, PassManager # type: ignore from qiskit.transpiler.passes import SabreLayout, SetLayout # type: ignore from qiskit.transpiler.passmanager_config import PassManagerConfig # type: ignore -from qiskit.transpiler.preset_passmanagers import common +from qiskit.transpiler.preset_passmanagers import common # type: ignore from ..qiskit_convert import qiskit_to_tk, tk_to_qiskit @@ -103,7 +103,7 @@ def _architecture_to_couplingmap(architecture: Architecture) -> CouplingMap: def _gen_lightsabre_transformation( architecture: Architecture, optimization_level: int = 2, seed=0, attempts=20 -) -> Callable[Circuit, Circuit]: +) -> Callable[[Circuit], Circuit]: """ Generates a function that can be passed to CustomPass for running LightSABRE routing. diff --git a/pytket/extensions/qiskit/qiskit_convert.py b/pytket/extensions/qiskit/qiskit_convert.py index 49dcb584..5283f312 100644 --- a/pytket/extensions/qiskit/qiskit_convert.py +++ b/pytket/extensions/qiskit/qiskit_convert.py @@ -29,7 +29,7 @@ from uuid import UUID import numpy as np -import sympy +import sympy # type: ignore from numpy.typing import NDArray from qiskit_ibm_runtime.models.backend_configuration import ( # type: ignore PulseBackendConfiguration, @@ -69,7 +69,7 @@ ClassicalRegister, QuantumCircuit, QuantumRegister, -) +) # type: ignore from qiskit.circuit import ( Barrier, Clbit,