Skip to content

Commit

Permalink
Update minimum compiler version (#5645)
Browse files Browse the repository at this point in the history
**Description of the Change:** The minimum compiler version needs to be
updated due to device API update. This is the last PR to be merged to
the release candidate as it depends on Catalyst being updated.

---------

Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: Astral Cai <astral.cai@xanadu.ai>
  • Loading branch information
3 people committed May 6, 2024
1 parent 4879a61 commit 195b230
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/stable/external.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ 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_Lightning==0.36.0
pexpect==4.9.0
pillow==10.3.0
platformdirs==4.2.0
Expand Down
2 changes: 1 addition & 1 deletion pennylane/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"semantic-version>=2.7",
"autoray>=0.6.1",
"cachetools",
"pennylane-lightning>=0.35",
"pennylane-lightning>=0.36",
"requests",
"typing_extensions",
]
Expand Down
1 change: 1 addition & 0 deletions tests/drawer/test_draw_catalyst.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import pytest
import pennylane as qml

pytest.skip(allow_module_level=True)
catalyst = pytest.importorskip("catalyst")
mpl = pytest.importorskip("matplotlib")

Expand Down
6 changes: 4 additions & 2 deletions tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from jax.core import ShapedArray # pylint:disable=wrong-import-order, wrong-import-position

# pylint: disable=too-few-public-methods, too-many-public-methods
pytest.skip(allow_module_level=True)


@pytest.fixture
Expand All @@ -43,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)

Expand All @@ -53,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)()

Expand Down

0 comments on commit 195b230

Please sign in to comment.