diff --git a/qlasskit/types/qint.py b/qlasskit/types/qint.py index a2902e2c..1df826f8 100644 --- a/qlasskit/types/qint.py +++ b/qlasskit/types/qint.py @@ -316,7 +316,7 @@ def bitwise_and(cls, tleft: TExp, tright: TExp) -> TExp: @classmethod def bitwise_or(cls, tleft: TExp, tright: TExp) -> TExp: return cls.bitwise_generic(Or, tleft, tright) - + @classmethod def floor_div(cls, tleft: TExp, tright: TExp) -> TExp: """Perform floor division on two Qint""" diff --git a/qlasskit/types/qtype.py b/qlasskit/types/qtype.py index 07aff796..1747bd5a 100644 --- a/qlasskit/types/qtype.py +++ b/qlasskit/types/qtype.py @@ -227,7 +227,7 @@ def bitwise_and(tleft: TExp, tright: TExp) -> TExp: @staticmethod def bitwise_or(tleft: TExp, tright: TExp) -> TExp: raise Exception("abstract bitwise_or") - + @staticmethod def floor_div(tleft: TExp, tright: TExp) -> TExp: raise Exception("abstract floor_div") diff --git a/test/qlassf/test_int.py b/test/qlassf/test_int.py index 4b7e925b..0207ec36 100644 --- a/test/qlassf/test_int.py +++ b/test/qlassf/test_int.py @@ -58,7 +58,7 @@ def test_qint2_to_bin(self): c = Qint2(1).to_bin() self.assertEqual(c, "10") self.assertEqual(c, Qint2(1).export("binary")) - + def test_floor_div(self): self.assertEqual(Qint2.floor_div(Qint2(10), Qint2(3)), Qint2(3)) self.assertEqual(Qint2.floor_div(Qint2(20), Qint2(4)), Qint2(5))