Skip to content

Commit cfba941

Browse files
PietropaoloFrisoniaustingmhuang
authored andcommitted
Manual cherry picking sync from latest rc to master (#7381)
This PR applies some changes to master coming from [this PR](#7369), which has been merged in the release candidate branch for the bugfix release of PennyLane 0.41.1. More details can be found in the original PR description. This PR aims to update the master branch with the changes currently present in the stable version of PennyLane (0.41.1, no longer 0.41.0)
1 parent 8262b05 commit cfba941

File tree

5 files changed

+32
-3
lines changed

5 files changed

+32
-3
lines changed

doc/development/release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This page contains the release notes for PennyLane.
55

66
.. mdinclude:: ../releases/changelog-dev.md
77

8+
.. mdinclude:: ../releases/changelog-0.41.1.md
9+
810
.. mdinclude:: ../releases/changelog-0.41.0.md
911

1012
.. mdinclude:: ../releases/changelog-0.40.0.md

doc/releases/changelog-0.41.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:orphan:
22

3-
# Release 0.41.0 (current release)
3+
# Release 0.41.0
44

55
<h3>New features since last release</h3>
66

doc/releases/changelog-0.41.1.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
:orphan:
2+
3+
# Release 0.41.1 (current release)
4+
5+
<h3>Bug fixes 🐛</h3>
6+
7+
* A warning is raised if PennyLane is imported and a version of JAX greater than 0.4.28 is installed.
8+
[(#7369)](https://github.com/PennyLaneAI/pennylane/pull/7369)
9+
10+
<h3>Contributors ✍️</h3>
11+
12+
This release contains contributions from (in alphabetical order):
13+
14+
Pietropaolo Frisoni

pennylane/capture/capture_operators.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,28 @@
1515
This submodule defines the abstract classes and primitives for capturing operators.
1616
"""
1717

18+
import importlib.metadata as importlib_metadata
19+
import warnings
1820
from functools import lru_cache
1921
from typing import Optional, Type
2022

23+
from packaging.version import Version
24+
2125
import pennylane as qml
2226

2327
has_jax = True
2428
try:
2529
import jax
30+
31+
jax_version = importlib_metadata.version("jax")
32+
if Version(jax_version) > Version("0.4.28"): # pragma: no cover
33+
warnings.warn(
34+
f"PennyLane is not yet compatible with JAX versions > 0.4.28. "
35+
f"You have version {jax_version} installed. "
36+
f"Please downgrade JAX to <=0.4.28 to avoid runtime errors.",
37+
RuntimeWarning,
38+
)
39+
2640
except ImportError:
2741
has_jax = False
2842

pennylane/qnn/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
1818
.. note::
1919
20-
Check out our `Keras <demos/qnn_module_tf>`__ and `Torch <demos/tutorial_qnn_module_torch>`__ tutorials for further details.
21-
20+
Check out our `Keras <https://pennylane.ai/qml/demos/qnn_module_tf>`__ and `Torch <https://pennylane.ai/qml/demos/tutorial_qnn_module_torch>`__ tutorials for further details.
2221
2322
2423
.. rubric:: Classes

0 commit comments

Comments
 (0)