diff --git a/test/test_algo_deutschjozsa.py b/test/test_algo_deutschjozsa.py index f4a4095f..6f9a19d1 100644 --- a/test/test_algo_deutschjozsa.py +++ b/test/test_algo_deutschjozsa.py @@ -16,6 +16,7 @@ from qlasskit import Qint2, Qint4, qlassf from qlasskit.algorithms import DeutschJozsa +from qlasskit.compiler import SupportedCompilers from .utils import qiskit_measure_and_count @@ -26,7 +27,7 @@ def test_deutschjozsa_balanced(self): def hash(k: Qint2) -> bool: return k[0] ^ k[1] """ - qf = qlassf(f, compiler="tweedledum") + qf = qlassf(f) algo = DeutschJozsa(qf) qc_algo = algo.circuit().export("circuit", "qiskit") @@ -35,6 +36,10 @@ def hash(k: Qint2) -> bool: self.assertEqual(counts_readable["Balanced"], 1024) def test_deutschjozsa_balanced2(self): + # TODO: fix this in internalcompiler + if "tweedledum" not in SupportedCompilers: + return + f = """ def hash(k: bool) -> bool: return k @@ -52,7 +57,7 @@ def test_deutschjozsa_constant(self): def hash(k: Qint2) -> bool: return False """ - qf = qlassf(f, compiler="tweedledum") + qf = qlassf(f) algo = DeutschJozsa(qf) qc_algo = algo.circuit().export("circuit", "qiskit") diff --git a/test/test_algo_simon.py b/test/test_algo_simon.py index e631faa9..74c627dc 100644 --- a/test/test_algo_simon.py +++ b/test/test_algo_simon.py @@ -15,22 +15,22 @@ import unittest from qlasskit import Qint2, Qint4, qlassf -from qlasskit.compiler import SupportedCompilers from qlasskit.algorithms import Simon +from qlasskit.compiler import SupportedCompilers from .utils import qiskit_measure_and_count class TestAlgoSimon(unittest.TestCase): def test_simon(self): - if 'tweedledum' not in SupportedCompilers: - return - + # TODO: fix this in internalcompiler + if "tweedledum" not in SupportedCompilers: + return + f = """ def hash(k: Qint4) -> Qint4: return k >> 3 """ - # TODO: fix this in internalcompiler qf = qlassf(f, compiler="tweedledum") algo = Simon(qf)