JAX runtime warning

I am getting the following warning while using JAX with Pennylane.

RuntimeWarning: PennyLane is currently not compatible with versions of JAX > 0.4.28. You have version 0.5.2 installed.

Here is the qml.about()
Name: PennyLane
Version: 0.41.1
Summary: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
Home-page: GitHub - PennyLaneAI/pennylane: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Built by researchers, for research.
Author:
Author-email:
License: Apache License 2.0
Location: /usr/local/lib/python3.11/dist-packages
Requires: appdirs, autograd, autoray, cachetools, diastatic-malt, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, tomlkit, typing-extensions
Required-by: PennyLane_Lightning

Platform info: Linux-6.1.123±x86_64-with-glibc2.35
Python version: 3.11.13
Numpy version: 2.0.2
Scipy version: 1.15.3
Installed devices:

  • default.clifford (PennyLane-0.41.1)
  • default.gaussian (PennyLane-0.41.1)
  • default.mixed (PennyLane-0.41.1)
  • default.qubit (PennyLane-0.41.1)
  • default.qutrit (PennyLane-0.41.1)
  • default.qutrit.mixed (PennyLane-0.41.1)
  • default.tensor (PennyLane-0.41.1)
  • null.qubit (PennyLane-0.41.1)
  • reference.qubit (PennyLane-0.41.1)
  • lightning.qubit (PennyLane_Lightning-0.41.1)

Hi @mdaamir ,

As the warning says, our current version of PennyLane doesn’t support the latest JAX. However this will change in just one week!

As of the next release, PennyLane will support jax == 0.6.0 and 0.5.3. See more details in these PRs: (#6919) (#7299)

In the meantime here are some options:

  1. Downgrade your versions of JAX and Jaxlib (pip install jax==0.4.28 jaxlib==0.4.28)
  2. Use the master version of PennyLane pip install git+https://github.com/PennyLaneAI/pennylane.git#egg=pennylane
    (see more install instructions on our website if needed)
  3. Wait until next week (~Tuesday) and update your PennyLane version

I hope these work for you!

Thank you! @CatalinaAlbornoz

1 Like

Hi, is this new release still set for today (Tuesday) as mentioned? If not, how can I use the master version of pennylane in google colab?

Hi @sojak , welcome to the Forum!

The new release is now out!

You can use pip install pennylane --upgrade to use it.
In the future if you need to use the master version you can run:
pip install git+https://github.com/PennyLaneAI/pennylane.git#egg=pennylane

You can see more install options in pennylane.ai/install.

I hope this helps!

2 Likes