From fb468b2f3d63b4a5d16b83f8538a0e08c6f07c84 Mon Sep 17 00:00:00 2001 From: Melf Date: Mon, 6 Nov 2023 15:22:36 +0000 Subject: [PATCH] update --- docs/changelog.rst | 5 +++++ tests/qvm_backend_test.py | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 8268fb7..b8e9bf8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,11 @@ Changelog ~~~~~~~~~ +0.31.0 (unreleased) +------------------- + +* add pyquil.gates.XY to the native gateset + 0.30.0 (October 2023) --------------------- diff --git a/tests/qvm_backend_test.py b/tests/qvm_backend_test.py index 6b80f4b..f0a2d82 100644 --- a/tests/qvm_backend_test.py +++ b/tests/qvm_backend_test.py @@ -390,6 +390,25 @@ def test_shots_bits_edgecases(qvm: None, quilc: None) -> None: assert res.get_counts() == correct_counts +@pytest.mark.skipif( + skip_qvm_tests, reason="Can only run Rigetti QVM if docker is installed" +) +def test_gateset(qvm: None, quilc: None) -> None: + qc = get_qc("9q-square", as_qvm=True) + forest_backend = ForestBackend(qc) + + for n_bits in range(1, 9): # Getting runtime error if n_qubit > 9. + for n_shots in range(1, 11): + c = Circuit(n_bits, n_bits) + c.ISWAP(0.1, 0, 2) + c.measure_all() + + c = forest_backend.get_compiled_circuit(c) + h = forest_backend.process_circuit(c, n_shots) + # h = forest_backend.process_circuit(c, n_shots, valid_check=False) + forest_backend.get_result(h) + + @pytest.mark.skipif( skip_qvm_tests, reason="Can only run Rigetti QVM if docker is installed" )