From 598af875efaaed14fdf1a867770a2c7f92d915e0 Mon Sep 17 00:00:00 2001 From: Aaron Berdy Date: Tue, 28 Nov 2023 16:20:08 -0800 Subject: [PATCH] remove classmethod test --- .../experimental/autoqasm/test_transpiler.py | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/test/unit_tests/braket/experimental/autoqasm/test_transpiler.py b/test/unit_tests/braket/experimental/autoqasm/test_transpiler.py index 2bc7c27c9..c5d0d9056 100644 --- a/test/unit_tests/braket/experimental/autoqasm/test_transpiler.py +++ b/test/unit_tests/braket/experimental/autoqasm/test_transpiler.py @@ -86,40 +86,6 @@ def bell(q0: int, q1: int): assert bell_noarg_partial.to_ir() == expected_no_arg_partial -def test_classmethod() -> None: - """Tests aq.main decorator application to a classmethod.""" - - # TODO: see if this functionality should work - pytest.xfail("cls must be handled") - # we could try to catch `cls` parameters and use qualname to extrapolate - # class info, but it's a best-effort approach - - class MyClass: - @classmethod - def bell(cls, q0: int, q1: int): - h(q0) - cnot(q0, q1) - - @classmethod - @aq.main(num_qubits=2) - def bell_decorated(cls, q0: int, q1: int): - cls.bell(q0, q1) - - expected = """OPENQASM 3.0; -input int[32] q0; -input int[32] q1; -qubit[2] __qubits__; -h __qubits__[q0]; -cnot __qubits__[q0], __qubits__[q1];""" - - assert aq.main(num_qubits=2)(MyClass.bell).to_ir() == expected - assert MyClass.bell_decorated.to_ir() == expected - - a = MyClass() - assert aq.main(num_qubits=2)(a.bell).to_ir() == expected - assert a.bell_decorated.to_ir() == expected - - def test_method() -> None: """Tests aq.main decorator application to a classmethod."""