From 7e51d2b220a6fac8b1c9842e68faa4a59f2aa439 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 10:21:20 -0400 Subject: [PATCH] Daily rc sync to master (#5665) Automatic sync from the release candidate to master during a feature freeze. --------- Co-authored-by: Mudit Pandey Co-authored-by: Astral Cai Co-authored-by: Vincent Michaud-Rioux Co-authored-by: David Wierichs Co-authored-by: lillian542 <38584660+lillian542@users.noreply.github.com> Co-authored-by: Pietropaolo Frisoni Co-authored-by: Christina Lee Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com> Co-authored-by: Jay Soni Co-authored-by: Guillermo Alonso-Linaje <65235481+KetpuntoG@users.noreply.github.com> Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com> Co-authored-by: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com> Co-authored-by: Diksha Dhawan <40900030+ddhawan11@users.noreply.github.com> Co-authored-by: Isaac De Vlugt Co-authored-by: Diego <67476785+DSGuala@users.noreply.github.com> Co-authored-by: trbromley Co-authored-by: erick-xanadu <110487834+erick-xanadu@users.noreply.github.com> Co-authored-by: David Ittah Co-authored-by: GitHub Actions Bot <> --- .github/stable/external.txt | 4 ++-- .github/workflows/upload.yml | 2 ++ doc/releases/changelog-0.36.0.md | 5 ++++- pennylane/compiler/compiler.py | 2 +- pennylane/ops/functions/dot.py | 6 ++++++ setup.py | 2 +- tests/test_compiler.py | 5 +++-- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/stable/external.txt b/.github/stable/external.txt index e4e2acf314c..f5c4fc5daaa 100644 --- a/.github/stable/external.txt +++ b/.github/stable/external.txt @@ -109,8 +109,8 @@ packaging==24.0 pandocfilters==1.5.1 parso==0.8.4 pathspec==0.12.1 -PennyLane-Catalyst==0.5.0 -PennyLane_Lightning==0.35.1 +PennyLane-Catalyst==0.6.0 +PennyLane_Lightning==0.36.0 pexpect==4.9.0 pillow==10.3.0 platformdirs==4.2.0 diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index 4e901bd58d4..393c9a4c377 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -6,6 +6,8 @@ on: jobs: tests: uses: ./.github/workflows/interface-unit-tests.yml + secrets: + codecov_token: ${{ secrets.CODECOV_TOKEN }} with: branch: ${{ github.ref }} diff --git a/doc/releases/changelog-0.36.0.md b/doc/releases/changelog-0.36.0.md index dde4b503a15..d5d404d12f5 100644 --- a/doc/releases/changelog-0.36.0.md +++ b/doc/releases/changelog-0.36.0.md @@ -877,7 +877,7 @@ * Fixed a bug in `qml.math.kron` that makes Torch incompatible with NumPy. [(#5540)](https://github.com/PennyLaneAI/pennylane/pull/5540) -* Fixes a bug in `_group_measurements` that fails to group measurements with commuting observables when they are operands of `Prod`. +* Fixed a bug in `_group_measurements` that fails to group measurements with commuting observables when they are operands of `Prod`. [(#5525)](https://github.com/PennyLaneAI/pennylane/pull/5525) * `qml.equal` can now be used with sums and products that contain operators on no wires like `I` and `GlobalPhase`. @@ -887,6 +887,9 @@ between `op.has_diagonalzing_gates` and `op.diagonalizing_gates()` [(#5603)](https://github.com/PennyLaneAI/pennylane/pull/5603) +* Updated the `method` kwarg of `qml.TrotterProduct().error()` to be more clear that we are computing upper-bounds. + [(#5637)](https://github.com/PennyLaneAI/pennylane/pull/5637) +

Contributors ✍️

This release contains contributions from (in alphabetical order): diff --git a/pennylane/compiler/compiler.py b/pennylane/compiler/compiler.py index fd355fa472f..816705bf35c 100644 --- a/pennylane/compiler/compiler.py +++ b/pennylane/compiler/compiler.py @@ -22,7 +22,7 @@ from semantic_version import Version -PL_CATALYST_MIN_VERSION = Version("0.5.0") +PL_CATALYST_MIN_VERSION = Version("0.6.0") class CompileError(Exception): diff --git a/pennylane/ops/functions/dot.py b/pennylane/ops/functions/dot.py index 727aa9a0927..b6bed90c72e 100644 --- a/pennylane/ops/functions/dot.py +++ b/pennylane/ops/functions/dot.py @@ -132,6 +132,12 @@ def dot( :ref:`Pauli Graph Colouring` and :func:`~pennylane.pauli.group_observables`. """ + for t in (Operator, PauliWord, PauliSentence): + if isinstance(ops, t): + raise ValueError( + f"ops must be an Iterable of {t.__name__}'s, not a {t.__name__} itself." + ) + if len(coeffs) != len(ops): raise ValueError("Number of coefficients and operators does not match.") if len(coeffs) == 0 and len(ops) == 0: diff --git a/setup.py b/setup.py index fd0c1c3da57..d1b84d2de59 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ "semantic-version>=2.7", "autoray>=0.6.1", "cachetools", - "pennylane-lightning>=0.35", + "pennylane-lightning>=0.36", "requests", "typing_extensions", ] diff --git a/tests/test_compiler.py b/tests/test_compiler.py index 14311109a4c..904fbad2964 100644 --- a/tests/test_compiler.py +++ b/tests/test_compiler.py @@ -44,7 +44,7 @@ def catalyst_incompatible_version(): @pytest.mark.usefixtures("catalyst_incompatible_version") def test_catalyst_incompatible(): - """Test qjit with an incompatible Catalyst version < 0.4.0""" + """Test qjit with an incompatible Catalyst version that's lower than required.""" dev = qml.device("lightning.qubit", wires=1) @@ -54,7 +54,8 @@ def circuit(): return qml.state() with pytest.raises( - CompileError, match="PennyLane-Catalyst 0.5.0 or greater is required, but installed 0.0.1" + CompileError, + match="PennyLane-Catalyst 0.[0-9]+.0 or greater is required, but installed 0.0.1", ): qml.qjit(circuit)()