diff --git a/pytket/pytket/backends/backend.py b/pytket/pytket/backends/backend.py index 33887777de..f737870d34 100644 --- a/pytket/pytket/backends/backend.py +++ b/pytket/pytket/backends/backend.py @@ -144,7 +144,7 @@ def rebase_pass(self) -> BasePass: @abstractmethod def default_compilation_pass( - self, optimisation_level: int = 2, **kwargs + self, optimisation_level: int = 2, **kwargs: KwargTypes ) -> BasePass: """ A suggested compilation pass that will will, if possible, produce an equivalent @@ -173,7 +173,7 @@ def default_compilation_pass( ... def get_compiled_circuit( - self, circuit: Circuit, optimisation_level: int = 2, **kwargs + self, circuit: Circuit, optimisation_level: int = 2, **kwargs: KwargTypes ) -> Circuit: """ Return a single circuit compiled with :py:meth:`default_compilation_pass` See @@ -187,7 +187,10 @@ def get_compiled_circuit( return return_circuit def get_compiled_circuits( - self, circuits: Sequence[Circuit], optimisation_level: int = 2, **kwargs + self, + circuits: Sequence[Circuit], + optimisation_level: int = 2, + **kwargs: KwargTypes, ) -> List[Circuit]: """Compile a sequence of circuits with :py:meth:`default_compilation_pass` and return the list of compiled circuits (does not act in place). diff --git a/pytket/tests/simulator/tket_sim_backend.py b/pytket/tests/simulator/tket_sim_backend.py index 705348cba9..f4bca4733c 100644 --- a/pytket/tests/simulator/tket_sim_backend.py +++ b/pytket/tests/simulator/tket_sim_backend.py @@ -105,7 +105,7 @@ def rebase_pass(self) -> BasePass: return auto_rebase_pass(_GATE_SET) def default_compilation_pass( - self, optimisation_level: int = 1, **kwargs + self, optimisation_level: int = 1, **kwargs: KwargTypes ) -> BasePass: assert optimisation_level in range(3) if optimisation_level == 0: @@ -158,7 +158,7 @@ class TketSimShotBackend(TketSimBackend): _supports_contextual_optimisation = True def default_compilation_pass( - self, optimisation_level: int = 1, **kwargs + self, optimisation_level: int = 1, **kwargs: KwargTypes ) -> BasePass: assert optimisation_level in range(3) if optimisation_level == 0: