-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PennyLane is compatible with JAX 0.4.28 #6255
Conversation
…aN to np.nan" This reverts commit b3ab335. Reverting changes from numpy formating and NAN
revert changes from numpy printing settings
attempt to use the legacy printing option
…o compatible-np-2.0
…nd suggestion from code reviw
…o compatible-np-2.0
…o compatible-np-2.0
…2-install set to true
…o compatible-np-2.0
…o compatible-np-2.0
…ion/test_optimization_utils.py`
… is already in `setup.py`
…o compatible-np-2.0
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6255 +/- ##
==========================================
- Coverage 99.58% 99.57% -0.01%
==========================================
Files 443 444 +1
Lines 42273 42336 +63
==========================================
+ Hits 42096 42158 +62
- Misses 177 178 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @PietropaoloFrisoni 🎉
Just wanted to ask about documenting the change and potentially adapting requirements
files to the new supported JAX version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
**Context:** As part of the effort to make PL compatible with Numpy 2.0 (see #6061), we need to upgrade JAX to 0.4.26+ since such a version introduced the support for Numpy 2.0. We opted for JAX 0.4.28 since it is the same version used by Catalyst. **Description of the Change:** As above. **Benefits:** PL is compatible with Numpy 2.0 and Jax 0.4.28. **Possible Drawbacks:** - From JAX 0.4.27, in `jax.jit`, passing invalid static_argnums or static_argnames now leads to an error rather than a warning. In PL, this breaks every test where we set `shots` in the `QNode` call with `static_argnames=["shots"]`. At this stage, we decided to mark such tests with `pytest.xfail` to allow the upgrade. **Related GitHub Issues:** None. **Related Shortcut Stories**: [sc-61389] --------- Co-authored-by: dwierichs <david.wierichs@xanadu.ai>
**Context:** As part of the effort to make PL compatible with Numpy 2.0 (see #6061), we need to upgrade JAX to 0.4.26+ since such a version introduced the support for Numpy 2.0. We opted for JAX 0.4.28 since it is the same version used by Catalyst. **Description of the Change:** As above. **Benefits:** PL is compatible with Numpy 2.0 and Jax 0.4.28. **Possible Drawbacks:** - From JAX 0.4.27, in `jax.jit`, passing invalid static_argnums or static_argnames now leads to an error rather than a warning. In PL, this breaks every test where we set `shots` in the `QNode` call with `static_argnames=["shots"]`. At this stage, we decided to mark such tests with `pytest.xfail` to allow the upgrade. **Related GitHub Issues:** None. **Related Shortcut Stories**: [sc-61389] --------- Co-authored-by: dwierichs <david.wierichs@xanadu.ai>
Context: As part of the effort to make PL compatible with Numpy 2.0 (see #6061), we need to upgrade JAX to 0.4.26+ since such a version introduced the support for Numpy 2.0. We opted for JAX 0.4.28 since it is the same version used by Catalyst.
Description of the Change: As above.
Benefits: PL is compatible with Numpy 2.0 and Jax 0.4.28.
Possible Drawbacks:
jax.jit
, passing invalid static_argnums or static_argnames now leads to an error rather than a warning. In PL, this breaks every test where we setshots
in theQNode
call withstatic_argnames=["shots"]
. At this stage, we decided to mark such tests withpytest.xfail
to allow the upgrade.Related GitHub Issues: None.
Related Shortcut Stories: [sc-61389]