From 3f743b4f9938f61affbd70ca8810186ba44d5c2c Mon Sep 17 00:00:00 2001 From: Mudit Pandey Date: Mon, 30 Sep 2024 16:31:24 -0400 Subject: [PATCH 1/2] Suppress QubitDevice deprecation warnings in stable-latest tests --- .github/workflows/aqt-latest-latest.yml | 4 +++- .github/workflows/aqt-stable-latest.yml | 5 ++++- .github/workflows/braket-latest-latest.yml | 3 ++- .github/workflows/braket-stable-latest.yml | 3 ++- .github/workflows/cirq-latest-latest.yml | 4 +++- .github/workflows/cirq-stable-latest.yml | 5 ++++- .github/workflows/ionq-latest-latest.yml | 4 +++- .github/workflows/ionq-stable-latest.yml | 5 ++++- .github/workflows/qiskit-latest-latest.yml | 4 +++- .github/workflows/qiskit-stable-latest.yml | 6 ++++-- .github/workflows/qulacs-latest-latest.yml | 4 +++- .github/workflows/qulacs-stable-latest.yml | 5 ++++- .github/workflows/rigetti-latest-latest.yml | 4 +++- .github/workflows/rigetti-stable-latest.yml | 5 ++++- workflow-template-latest.yml | 5 ++++- 15 files changed, 50 insertions(+), 16 deletions(-) diff --git a/.github/workflows/aqt-latest-latest.yml b/.github/workflows/aqt-latest-latest.yml index 2a32df1..55e9ceb 100644 --- a/.github/workflows/aqt-latest-latest.yml +++ b/.github/workflows/aqt-latest-latest.yml @@ -58,4 +58,6 @@ jobs: run: | - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/aqt-stable-latest.yml b/.github/workflows/aqt-stable-latest.yml index 7e6d33b..74a567d 100644 --- a/.github/workflows/aqt-stable-latest.yml +++ b/.github/workflows/aqt-stable-latest.yml @@ -64,4 +64,7 @@ jobs: run: | - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/braket-latest-latest.yml b/.github/workflows/braket-latest-latest.yml index 341c962..3faf1f5 100644 --- a/.github/workflows/braket-latest-latest.yml +++ b/.github/workflows/braket-latest-latest.yml @@ -67,4 +67,5 @@ jobs: pl-device-test --device=braket.local.qubit --tb=short --skip-ops -k 'not Sample and not no_0_shots' - name: Run plugin tests - run: python -m pytest plugin_repo/test/unit_tests --tb=short + run: | + python -m pytest plugin_repo/test/unit_tests --tb=short diff --git a/.github/workflows/braket-stable-latest.yml b/.github/workflows/braket-stable-latest.yml index 4b06e8c..422cc81 100644 --- a/.github/workflows/braket-stable-latest.yml +++ b/.github/workflows/braket-stable-latest.yml @@ -73,4 +73,5 @@ jobs: pl-device-test --device=braket.local.qubit --tb=short --skip-ops -k 'not Sample and not no_0_shots' - name: Run plugin tests - run: python -m pytest plugin_repo/test/unit_tests --tb=short + run: | + python -m pytest plugin_repo/test/unit_tests --tb=short diff --git a/.github/workflows/cirq-latest-latest.yml b/.github/workflows/cirq-latest-latest.yml index 7c792b4..5f88a9a 100644 --- a/.github/workflows/cirq-latest-latest.yml +++ b/.github/workflows/cirq-latest-latest.yml @@ -66,4 +66,6 @@ jobs: pl-device-test --device=cirq.qsim --tb=short --skip-ops --analytic=False --shots=20000 - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/cirq-stable-latest.yml b/.github/workflows/cirq-stable-latest.yml index 4c20548..0a97e41 100644 --- a/.github/workflows/cirq-stable-latest.yml +++ b/.github/workflows/cirq-stable-latest.yml @@ -72,4 +72,7 @@ jobs: pl-device-test --device=cirq.qsim --tb=short --skip-ops --analytic=False --shots=20000 - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/ionq-latest-latest.yml b/.github/workflows/ionq-latest-latest.yml index 4f7d066..497598b 100644 --- a/.github/workflows/ionq-latest-latest.yml +++ b/.github/workflows/ionq-latest-latest.yml @@ -60,4 +60,6 @@ jobs: pl-device-test --device=ionq.simulator --tb=short --skip-ops --shots=10000 - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/ionq-stable-latest.yml b/.github/workflows/ionq-stable-latest.yml index eb78bd1..0bb0449 100644 --- a/.github/workflows/ionq-stable-latest.yml +++ b/.github/workflows/ionq-stable-latest.yml @@ -66,4 +66,7 @@ jobs: pl-device-test --device=ionq.simulator --tb=short --skip-ops --shots=10000 - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/qiskit-latest-latest.yml b/.github/workflows/qiskit-latest-latest.yml index a237e30..67a3b86 100644 --- a/.github/workflows/qiskit-latest-latest.yml +++ b/.github/workflows/qiskit-latest-latest.yml @@ -65,4 +65,6 @@ jobs: pl-device-test --device=qiskit.aer --tb=short --skip-ops --shots=None --device-kwargs backend=unitary_simulator - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/qiskit-stable-latest.yml b/.github/workflows/qiskit-stable-latest.yml index 282b79b..00cf961 100644 --- a/.github/workflows/qiskit-stable-latest.yml +++ b/.github/workflows/qiskit-stable-latest.yml @@ -44,7 +44,6 @@ jobs: pip install --upgrade pyscf pip install 'pytest<8.1.0' pip install pytest-mock pytest-cov flaky pytest-benchmark - pip install semantic-version pip freeze - name: Install PennyLane and Plugin @@ -72,4 +71,7 @@ jobs: pl-device-test --device=qiskit.aer --tb=short --skip-ops --shots=None --device-kwargs backend=unitary_simulator - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/qulacs-latest-latest.yml b/.github/workflows/qulacs-latest-latest.yml index c0eb851..d5e3e3a 100644 --- a/.github/workflows/qulacs-latest-latest.yml +++ b/.github/workflows/qulacs-latest-latest.yml @@ -61,4 +61,6 @@ jobs: pl-device-test --device=qulacs.simulator --tb=short --skip-ops --shots=20000 - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/qulacs-stable-latest.yml b/.github/workflows/qulacs-stable-latest.yml index 4f17c77..4fd44c2 100644 --- a/.github/workflows/qulacs-stable-latest.yml +++ b/.github/workflows/qulacs-stable-latest.yml @@ -67,4 +67,7 @@ jobs: pl-device-test --device=qulacs.simulator --tb=short --skip-ops --shots=20000 - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/rigetti-latest-latest.yml b/.github/workflows/rigetti-latest-latest.yml index 45cf80f..ae7907b 100644 --- a/.github/workflows/rigetti-latest-latest.yml +++ b/.github/workflows/rigetti-latest-latest.yml @@ -67,4 +67,6 @@ jobs: pl-device-test --device=rigetti.wavefunction --tb=short --skip-ops --shots=20000 - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/rigetti-stable-latest.yml b/.github/workflows/rigetti-stable-latest.yml index c7fffb3..5150a18 100644 --- a/.github/workflows/rigetti-stable-latest.yml +++ b/.github/workflows/rigetti-stable-latest.yml @@ -73,4 +73,7 @@ jobs: pl-device-test --device=rigetti.wavefunction --tb=short --skip-ops --shots=20000 - name: Run plugin tests - run: python -m pytest plugin_repo/tests -W "error::pennylane.PennyLaneDeprecationWarning" --tb=short + run: | + python -m pytest plugin_repo/tests --tb=short \ + -W "error::pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" diff --git a/workflow-template-latest.yml b/workflow-template-latest.yml index 76cf0a8..b7fc4df 100644 --- a/workflow-template-latest.yml +++ b/workflow-template-latest.yml @@ -108,5 +108,8 @@ jobs: {%- endfor %} - name: Run plugin tests - run: python -m pytest plugin_repo/{{ tests_loc }}{% if no_deprecation_error %}{% else %} -W "error::pennylane.PennyLaneDeprecationWarning"{% endif %} --tb=short {%- for kwarg in test_kwargs %} {{ kwarg }} {%- endfor %} + run: | + python -m pytest plugin_repo/{{ tests_loc }} --tb=short {%- for kwarg in test_kwargs %} {{ kwarg }}{%- endfor %}{% if no_deprecation_error %}{% else %} \ + -W "error::pennylane.PennyLaneDeprecationWarning"{% endif %}{% if latest or no_deprecation_error %}{% else %} \ + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning"{% endif %} From ea28c4047be30381d07f0c95a109c1c4b7dcadb9 Mon Sep 17 00:00:00 2001 From: Mudit Pandey Date: Mon, 30 Sep 2024 16:49:23 -0400 Subject: [PATCH 2/2] Suppress QubitStateVector deprecation warning --- .github/workflows/aqt-stable-latest.yml | 3 ++- .github/workflows/cirq-stable-latest.yml | 3 ++- .github/workflows/ionq-stable-latest.yml | 3 ++- .github/workflows/qiskit-stable-latest.yml | 3 ++- .github/workflows/qulacs-stable-latest.yml | 3 ++- .github/workflows/rigetti-stable-latest.yml | 3 ++- workflow-template-latest.yml | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/aqt-stable-latest.yml b/.github/workflows/aqt-stable-latest.yml index 74a567d..3e2d8a6 100644 --- a/.github/workflows/aqt-stable-latest.yml +++ b/.github/workflows/aqt-stable-latest.yml @@ -67,4 +67,5 @@ jobs: run: | python -m pytest plugin_repo/tests --tb=short \ -W "error::pennylane.PennyLaneDeprecationWarning" \ - -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitStateVector:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/cirq-stable-latest.yml b/.github/workflows/cirq-stable-latest.yml index 0a97e41..cbfe90b 100644 --- a/.github/workflows/cirq-stable-latest.yml +++ b/.github/workflows/cirq-stable-latest.yml @@ -75,4 +75,5 @@ jobs: run: | python -m pytest plugin_repo/tests --tb=short \ -W "error::pennylane.PennyLaneDeprecationWarning" \ - -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitStateVector:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/ionq-stable-latest.yml b/.github/workflows/ionq-stable-latest.yml index 0bb0449..13f7f98 100644 --- a/.github/workflows/ionq-stable-latest.yml +++ b/.github/workflows/ionq-stable-latest.yml @@ -69,4 +69,5 @@ jobs: run: | python -m pytest plugin_repo/tests --tb=short \ -W "error::pennylane.PennyLaneDeprecationWarning" \ - -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitStateVector:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/qiskit-stable-latest.yml b/.github/workflows/qiskit-stable-latest.yml index 00cf961..a3d30f0 100644 --- a/.github/workflows/qiskit-stable-latest.yml +++ b/.github/workflows/qiskit-stable-latest.yml @@ -74,4 +74,5 @@ jobs: run: | python -m pytest plugin_repo/tests --tb=short \ -W "error::pennylane.PennyLaneDeprecationWarning" \ - -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitStateVector:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/qulacs-stable-latest.yml b/.github/workflows/qulacs-stable-latest.yml index 4fd44c2..7c0475d 100644 --- a/.github/workflows/qulacs-stable-latest.yml +++ b/.github/workflows/qulacs-stable-latest.yml @@ -70,4 +70,5 @@ jobs: run: | python -m pytest plugin_repo/tests --tb=short \ -W "error::pennylane.PennyLaneDeprecationWarning" \ - -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitStateVector:pennylane.PennyLaneDeprecationWarning" diff --git a/.github/workflows/rigetti-stable-latest.yml b/.github/workflows/rigetti-stable-latest.yml index 5150a18..2182010 100644 --- a/.github/workflows/rigetti-stable-latest.yml +++ b/.github/workflows/rigetti-stable-latest.yml @@ -76,4 +76,5 @@ jobs: run: | python -m pytest plugin_repo/tests --tb=short \ -W "error::pennylane.PennyLaneDeprecationWarning" \ - -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitStateVector:pennylane.PennyLaneDeprecationWarning" diff --git a/workflow-template-latest.yml b/workflow-template-latest.yml index b7fc4df..4e9c7fb 100644 --- a/workflow-template-latest.yml +++ b/workflow-template-latest.yml @@ -111,5 +111,6 @@ jobs: run: | python -m pytest plugin_repo/{{ tests_loc }} --tb=short {%- for kwarg in test_kwargs %} {{ kwarg }}{%- endfor %}{% if no_deprecation_error %}{% else %} \ -W "error::pennylane.PennyLaneDeprecationWarning"{% endif %}{% if latest or no_deprecation_error %}{% else %} \ - -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning"{% endif %} + -W "ignore:QubitDevice:pennylane.PennyLaneDeprecationWarning" \ + -W "ignore:QubitStateVector:pennylane.PennyLaneDeprecationWarning"{% endif %}