Skip to content

Commit 0e1f6db

Browse files
authored
update pyproject.toml to use latest PL ecosystem dependencies (#1441)
With the latest ecosystem released to PyPI, it's time to update `dev` to use these dependencies. This PR also reverts the change to install pennylane from master instead of the `v0.42.0-rc0` branch. This PR was prepared by first updating PL ecosystem to the latest release, then `poetry lock`. Then the remaining changes came from making the dependency tree happy. ⚠️ Important change: `qrisp` and `neural-tangents` were taken out of the `pyproject.toml` dependencies as they create some weird `tensorflow` error, ``` % poetry lock Updating dependencies Resolving dependencies... (6.3s) Package 'tensorflow-macos' is listed as a dependency of itself. ``` This is fine because the only demos that depend on them are non-executable.
1 parent 5c0638b commit 0e1f6db

7 files changed

+1617
-1762
lines changed

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ download:
6262
wget --no-verbose -N https://download.pytorch.org/tutorial/hymenoptera_data.zip -P $(DATADIR)
6363
unzip -q -o $(DATADIR)/hymenoptera_data.zip -d $(DATADIR)/
6464

65-
# TODO: Remove numpy installation command on next release. Currently Catalyst 0.11 pins jaxlib to 0.4.8
6665
# TODO: Update flax, or certain tutorials e.g. tutorial_rl_pulse.py will fail due to implicit confliction between jax==0.6.0 and flax==0.9.0
6766
environment:
6867
@command -v $(POETRY_BIN) --version >/dev/null 2>&1 || { echo >&2 "Setting up the environment requires a valid installation of python-poetry. Please install and add poetry to PATH or pass the executable using POETRY_BIN. Aborting."; exit 1; }
@@ -80,10 +79,8 @@ environment:
8079
$$PYTHON_VENV_PATH/bin/python -m pip install --upgrade git+https://github.com/PennyLaneAI/pennylane-qulacs.git#egg=pennylane-qulacs;\
8180
$$PYTHON_VENV_PATH/bin/python -m pip install --extra-index-url https://test.pypi.org/simple/ PennyLane-Catalyst --pre --upgrade;\
8281
$$PYTHON_VENV_PATH/bin/python -m pip install --extra-index-url https://test.pypi.org/simple/ PennyLane-Lightning --pre --upgrade;\
83-
$$PYTHON_VENV_PATH/bin/python -m pip install --upgrade git+https://github.com/PennyLaneAI/pennylane.git@v0.42.0-rc0#egg=pennylane;\
82+
$$PYTHON_VENV_PATH/bin/python -m pip install --upgrade git+https://github.com/PennyLaneAI/pennylane.git#egg=pennylane;\
8483
$$PYTHON_VENV_PATH/bin/python -m pip install --upgrade git+https://github.com/XanaduAI/iqpopt.git#egg=iqpopt;\
85-
$$PYTHON_VENV_PATH/bin/python -m pip install 'numpy<2';\
86-
$$PYTHON_VENV_PATH/bin/python -m pip install jax==0.6.0 jaxlib==0.6.0 flax==0.10.6;\
8784
fi;\
8885
fi
8986

demonstrations/linear_equations_hhl_qrisp_catalyst.metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"dateOfPublication": "2025-02-26T09:00:00+00:00",
15-
"dateOfLastModification": "2025-02-26T09:00:00+00:00",
15+
"dateOfLastModification": "2025-07-15T09:00:00+00:00",
1616
"categories": [
1717
"Algorithms",
1818
"Quantum Computing"

demonstrations/linear_equations_hhl_qrisp_catalyst.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
components easily. We'll demonstrate this later in this demo.
4141
4242
You can install Qrisp to experiment with this implementation yourself, at your own pace, by calling
43-
``pip install qrisp``.
43+
``pip install qrisp``. Please note that `qrisp` is only compatible with PennyLane versions
44+
<= 0.41.1 and Catalyst versions <= 0.11.0.
4445
4546
QuantumVariable
4647
~~~~~~~~~~~~~~~

demonstrations/ml_classical_shadows.metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}
77
],
88
"dateOfPublication": "2022-05-02T00:00:00+00:00",
9-
"dateOfLastModification": "2025-07-10T00:00:00+00:00",
9+
"dateOfLastModification": "2025-07-15T00:00:00+00:00",
1010
"categories": [
1111
"Quantum Machine Learning"
1212
],

demonstrations/ml_classical_shadows.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
This demo is compatible with the latest version of PennyLane and ``neural-tangents``.
3131
The latter is required for building the kernel for the infinite network used in training.
3232
As of July 10th, 2025, the latest version of ``neural-tangents`` (v0.6.5) is only compatible
33-
with ``jax<0.6.0``.
33+
with ``jax<0.6.0``. This means that this demo is only compatible with PennyLane versions
34+
<= 0.41.1 and Catalyst versions <= 0.11.0.
3435
3536
3637
Building the 2D Heisenberg model

poetry.lock

Lines changed: 1600 additions & 1738 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ markupsafe = "2.1.1"
5151
pyyaml = "^6.0.1"
5252
pennylane-sphinx-theme = { git = "https://github.com/PennyLaneAI/pennylane-sphinx-theme.git", branch = "sphinx-update" }
5353
pypandoc = "1.5"
54-
pennylane = "0.41.0"
54+
pennylane = "0.42.0"
5555
uv = "^0.5.25"
5656

5757

@@ -61,19 +61,19 @@ uv = "^0.5.25"
6161
# These pinned versions of PL are NOT used for Dev builds #
6262
# The latest commit from GitHub is used instead #
6363
###########################################################
64-
pennylane = "0.41.0"
65-
pennylane-cirq = "0.41.0"
66-
pennylane-qiskit = "0.41.0"
67-
pennylane-qulacs = "0.41.0"
68-
pennylane-catalyst = "0.11.0"
64+
pennylane = "0.42.0"
65+
pennylane-cirq = "0.42.0"
66+
pennylane-qiskit = "0.42.0"
67+
pennylane-qulacs = "0.42.0"
68+
pennylane-catalyst = "0.12.0"
6969
##########################################################
7070

7171
scipy = ">=1.12"
7272
numpy = "~1.26.4"
7373
numpyro = "~0.17.0"
7474
matplotlib = "3.7.2"
75-
jax = "0.4.28"
76-
jaxlib = "0.4.28"
75+
jax = "0.6.0"
76+
jaxlib = "0.6.0"
7777
jaxopt = "0.8.5"
7878
seaborn = "0.13.2"
7979
kahypar = "1.1.7"
@@ -82,12 +82,11 @@ covalent = "0.227.0rc0"
8282
openqaoa-core = "0.2.5"
8383
dwave-ocean-sdk = "7.0.0"
8484
pyzx = "0.7.0"
85-
neural-tangents = "0.6.2"
8685
plotly = ">=4.5.0"
8786
pydantic = "^2.8.2"
8887
ply = "3.11"
8988
optax = "0.2.4"
90-
flax = "0.9.0"
89+
flax = "0.10.6"
9190
qutip = "5.1.0"
9291
mitiq = "0.43.0"
9392
pennylane-qrack = "0.11.1"
@@ -105,9 +104,8 @@ qiskit = ">=1.0.0"
105104
qiskit-aer = ">=0.14.0,<0.16.0"
106105
sphinxcontrib-applehelp = "1.0.8"
107106
sphinx-gallery = "0.17.1"
108-
qrisp = ">=0.6.1"
109107
iqpopt = { git = "https://github.com/XanaduAI/iqpopt.git" }
110-
108+
tensorflow = "2.19"
111109

112110
# Install a difference version of torch from PyPI as the one from PyTorch repo is not compatible with MacOS
113111
torch = [
@@ -121,13 +119,9 @@ torchvision = [
121119

122120
# The following packages are platform locked to not install on MacOS as the installation breaks
123121
scikit-learn = { version = "1.3.0", markers = "platform_machine == 'x86_64'" }
124-
tensorflow = { version = "2.16.2", markers = "platform_machine == 'x86_64'" }
125122
flamingpy = { version = ">=0.10.1b1", markers = "platform_machine == 'x86_64'" }
126123
qulacs = { version = "0.6.1", markers = "platform_machine == 'x86_64'" }
127124

128-
# The following packages are only installed on MacOS for compatibility
129-
tensorflow-macos = { version = "2.16.2", markers = "sys_platform == 'darwin' and platform_machine == 'arm64'" }
130-
131125
[tool.poetry.group.metadata-validation]
132126
optional = true
133127

0 commit comments

Comments
 (0)