From 1e6c1a71c7fe61427fc19f7c7b5960f1ee1a00ce Mon Sep 17 00:00:00 2001 From: "Davide Gessa (dakk)" Date: Mon, 27 Nov 2023 13:41:12 +0100 Subject: [PATCH] fix typing --- qlasskit/algorithms/deutschjozsa.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qlasskit/algorithms/deutschjozsa.py b/qlasskit/algorithms/deutschjozsa.py index 0ff2cc17..6e52a9eb 100644 --- a/qlasskit/algorithms/deutschjozsa.py +++ b/qlasskit/algorithms/deutschjozsa.py @@ -66,9 +66,6 @@ def output_qubits(self) -> List[int]: # @override def decode_output( self, istr: Union[str, int, List[bool]] - ) -> Union[bool, Tuple, Qtype]: + ) -> Union[bool, Tuple, Qtype, str]: iq = interpret_as_qtype(istr, self.f.args[0].ttype, len(self.f.args[0])) - if iq == 0: - return "Constant" - else: - return "Balanced" + return "Constant" if iq == 0 else "Balanced"