From dc1bc7f2db2e35ef04a79fcdc51b105271ac53df Mon Sep 17 00:00:00 2001 From: Spencer Churchill Date: Mon, 30 Oct 2023 08:42:38 -0700 Subject: [PATCH] add backends to test --- tests/conftest.py | 9 ++++++++- tests/test_device.py | 6 +----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 9116338..a9a01cc 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -57,7 +57,14 @@ # List of all devices that do *not* support analytic expectation # value computation. This generally includes hardware devices # and hardware simulators. -hw_devices = [SimulatorDevice] +hw_devices = [ + SimulatorDevice, + QPUDevice, + HarmonyQPUDevice, + Aria1QPUDevice, + Aria2QPUDevice, + Forte1QPUDevice, +] # List of all device shortnames shortnames = [d.short_name for d in analytic_devices + hw_devices] diff --git a/tests/test_device.py b/tests/test_device.py index df5f236..0b330d7 100755 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -96,7 +96,6 @@ def mock_submit_job(*args): dev.apply([]) def test_failedcircuit(self, monkeypatch): - monkeypatch.setattr( requests, "post", lambda url, timeout, data, headers: (url, data, headers) ) @@ -246,7 +245,7 @@ def mock_submit_job(*args): pass mocker.patch("pennylane_ionq.device.IonQDevice._submit_job", mock_submit_job) - dev = IonQDevice(wires=(0,1,2), gateset="native") + dev = IonQDevice(wires=(0, 1, 2), gateset="native") with qml.tape.QuantumTape() as tape: GPI(0.1, wires=[0]) @@ -275,6 +274,3 @@ def mock_submit_job(*args): "targets": [1, 2], "phases": [0.2, 0.3], } - - -