Skip to content

Commit

Permalink
reformat, fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
sjdilkes committed Nov 7, 2024
1 parent 4fd3537 commit 8c3a758
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pytket/extensions/qiskit/backends/aer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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"])

Expand Down
4 changes: 2 additions & 2 deletions pytket/extensions/qiskit/backends/ibm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions pytket/extensions/qiskit/qiskit_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -69,7 +69,7 @@
ClassicalRegister,
QuantumCircuit,
QuantumRegister,
)
) # type: ignore
from qiskit.circuit import (
Barrier,
Clbit,
Expand Down

0 comments on commit 8c3a758

Please sign in to comment.