Skip to content

merge dev into master for v0.42.0 release #1442

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

Merged
merged 58 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e55cc46
Merge branch 'master' into dev
actions-user Apr 28, 2025
d960e90
Merge branch 'master' into dev
actions-user Apr 28, 2025
2eecb99
Merge branch 'master' into dev
actions-user Apr 29, 2025
f1921ae
Merge branch 'master' into dev
actions-user May 6, 2025
9ae3031
Merge branch 'master' into dev
actions-user May 7, 2025
af301f0
Merge branch 'master' into dev
actions-user May 7, 2025
9cb6151
Merge branch 'master' into dev
actions-user May 21, 2025
6064a23
Merge branch 'master' into dev
actions-user May 21, 2025
bc98eaf
Merge branch 'master' into dev
actions-user May 21, 2025
fc103a7
Merge branch 'master' into dev
actions-user May 22, 2025
88bbef6
Merge branch 'master' into dev
actions-user May 22, 2025
6e51773
Merge branch 'master' into dev
actions-user May 23, 2025
6b6b97d
Merge branch 'master' into dev
actions-user May 27, 2025
207a239
Merge branch 'master' into dev
actions-user May 28, 2025
f9036aa
Merge branch 'master' into dev
actions-user May 28, 2025
2ca7421
Merge branch 'master' into dev
actions-user May 29, 2025
397708c
Merge branch 'master' into dev
actions-user May 29, 2025
a0498e3
iqpopt demo fix (#1383)
josephbowles May 29, 2025
4c2484d
Merge branch 'master' into dev
actions-user May 30, 2025
92b745e
Merge branch 'master' into dev
actions-user May 30, 2025
e6b8019
Merge branch 'master' into dev
actions-user Jun 2, 2025
45586b7
Merge branch 'master' into dev
actions-user Jun 2, 2025
db79606
Merge branch 'master' into dev
actions-user Jun 3, 2025
9ceb164
Merge branch 'master' into dev
actions-user Jun 9, 2025
d89d971
Merge branch 'master' into dev
actions-user Jun 10, 2025
5bec473
Merge branch 'master' into dev
actions-user Jun 11, 2025
309b078
fix `dev` branch errors (#1393)
andrijapau Jun 11, 2025
595391e
Merge branch 'master' into dev
actions-user Jun 12, 2025
bd0627e
Merge branch 'master' into dev
actions-user Jun 12, 2025
9c303b4
Merge branch 'master' into dev
actions-user Jun 12, 2025
1feaf4d
Merge branch 'master' into dev
actions-user Jun 12, 2025
536ec75
Merge branch 'master' into dev
actions-user Jun 18, 2025
c80e0f4
Merge branch 'master' into dev
actions-user Jun 18, 2025
ee426e5
Merge branch 'master' of github.com:PennyLaneAI/qml into dev
rashidnhm Jun 19, 2025
4968043
Update lockfile
rashidnhm Jun 19, 2025
2ae496e
sync v2 with latest dev (#1415)
Alan-eMartin Jun 19, 2025
657c7de
Merge branch 'master' into dev
actions-user Jun 20, 2025
123961e
Merge branch 'master' into dev
actions-user Jun 23, 2025
2ceccbc
macos makefile fix (#1427)
mudit2812 Jul 7, 2025
5ebe6db
Temporarily update `Makefile` to install `pennylane@v0.42.0-rc0` (#1428)
andrijapau Jul 7, 2025
4b108ca
Merge branch 'master' into dev
actions-user Jul 8, 2025
02b99e2
QML V2 dev branch fixes (#1423)
doctorperceptron Jul 9, 2025
eb9d7fc
Fix V2 constraints (#1430)
doctorperceptron Jul 9, 2025
11306dc
Merge branch 'master' into dev
actions-user Jul 10, 2025
a255e60
update warning for dependencies in `qnn_module_tf` demo (#1434)
andrijapau Jul 10, 2025
e8dbfb5
Minor updates to tutorial_odegen and ml_classical_shadows (#1429)
astralcai Jul 10, 2025
a87ab46
Adjust output format in `how_to_user_qiskit1_with_pennylane` (#1433)
JerryChen97 Jul 10, 2025
bade853
Fix result for the Demo `how_to_catalyst_lightning_gpu.py` (#1438)
LuisAlfredoNu Jul 11, 2025
a395d67
Manual demo fixes for 0.42 QA (#1436)
mudit2812 Jul 14, 2025
5c0638b
upgrade `quimb` and `cotengra` versions (#1420)
andrijapau Jul 14, 2025
0e1f6db
update `pyproject.toml` to use latest PL ecosystem dependencies (#1441)
andrijapau Jul 16, 2025
f02f55d
Sync v2 from dev (#1443)
Alan-eMartin Jul 16, 2025
f41105e
update constraints-stable.txt
andrijapau Jul 16, 2025
7c527cd
revert quimb version
andrijapau Jul 16, 2025
4bea597
try forcing constraints on pennylane / catalyst versions
andrijapau Jul 16, 2025
461fdb0
Revert "try forcing constraints on pennylane / catalyst versions"
andrijapau Jul 16, 2025
9897cec
Revert "revert quimb version"
andrijapau Jul 16, 2025
991bf2b
Revert "update constraints-stable.txt"
andrijapau Jul 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ download:
wget --no-verbose -N https://download.pytorch.org/tutorial/hymenoptera_data.zip -P $(DATADIR)
unzip -q -o $(DATADIR)/hymenoptera_data.zip -d $(DATADIR)/

# 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
environment:
@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; }
@if [ '$(BASE_ONLY)' = 'true' ]; then\
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ Due to the large scope of requirements in this repository, the traditional `requ
and `pyproject.toml` is being introduced instead, the goal being easier management in regard to adding/updating packages.

To install all the dependencies locally, [poetry](https://python-poetry.org/) needs to be installed. Please follow the
[official installation documentation](https://python-poetry.org/docs/#installation).
[official installation documentation](https://python-poetry.org/docs/#installation). To ensure that no issues arise, we
recommend using the [official installer](https://python-poetry.org/docs/#installing-with-the-official-installer).

**IMPORTANT NOTE:** It is important to install Poetry using the official instructions and NOT into the same virtual env as QML itself, this would cause poetry to manage itself and raise unexpected errors.

### Installing dependencies

Expand Down
Binary file modified _static/demonstration_assets/adjoint_diff/scaling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
233 changes: 0 additions & 233 deletions _static/demonstration_assets/quantum_volume/lima.svg

This file was deleted.

7 changes: 6 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@
import numpy as np
from jinja2 import FileSystemLoader, Environment
import yaml
from pennylane import PennyLaneDeprecationWarning
from pathlib import Path

sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.join(os.path.dirname(__file__)))

# This module has been refactored from pennylane v0.41.0 to v0.42.0
# This can be removed after the release of v0.42.0
try:
from pennylane.exceptions import PennyLaneDeprecationWarning
except ModuleNotFoundError:
from pennylane import PennyLaneDeprecationWarning

# -- Project information -----------------------------------------------------
# General information about the project.
Expand Down
2 changes: 1 addition & 1 deletion demonstrations/adjoint_diff_benchmarking.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
],
"dateOfPublication": "2021-11-23T00:00:00+00:00",
"dateOfLastModification": "2024-10-07T00:00:00+00:00",
"dateOfLastModification": "2025-07-11T00:00:00+00:00",
"categories": [
"Getting Started"
],
Expand Down
34 changes: 16 additions & 18 deletions demonstrations/adjoint_diff_benchmarking.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,20 @@
import timeit
import matplotlib.pyplot as plt
import pennylane as qml
import jax

jax.config.update("jax_platform_name", "cpu")
jax.config.update('jax_enable_x64', True)
import pennylane.numpy as pnp

plt.style.use("bmh")

n_samples = 5


def get_time(qnode, params):
globals_dict = {'grad': jax.grad, 'circuit': qnode, 'params': params}
globals_dict = {"grad": qml.grad, "circuit": qnode, "params": params}
return timeit.timeit("grad(circuit)(params)", globals=globals_dict, number=n_samples)


def wires_scaling(n_wires, n_layers):
key = jax.random.PRNGKey(42)
rng = pnp.random.default_rng(12345)

t_adjoint = []
t_ps = []
Expand All @@ -58,7 +55,7 @@ def circuit(params, wires):

# set up the parameters
param_shape = qml.StronglyEntanglingLayers.shape(n_wires=i_wires, n_layers=n_layers)
params = jax.random.normal(key, param_shape)
params = rng.normal(size=pnp.prod(param_shape), requires_grad=True).reshape(param_shape)

t_adjoint.append(get_time(circuit_adjoint, params))
t_backprop.append(get_time(circuit_backprop, params))
Expand All @@ -68,10 +65,10 @@ def circuit(params, wires):


def layers_scaling(n_wires, n_layers):
key = jax.random.PRNGKey(42)
rng = pnp.random.default_rng(12345)

dev = qml.device("lightning.qubit", wires=n_wires)
dev_python = qml.device('default.qubit', wires=n_wires)
dev_python = qml.device("default.qubit", wires=n_wires)

t_adjoint = []
t_ps = []
Expand All @@ -88,7 +85,7 @@ def circuit(params):
for i_layers in n_layers:
# set up the parameters
param_shape = qml.StronglyEntanglingLayers.shape(n_wires=n_wires, n_layers=i_layers)
params = jax.random.normal(key, param_shape)
params = rng.normal(size=pnp.prod(param_shape), requires_grad=True).reshape(param_shape)

t_adjoint.append(get_time(circuit_adjoint, params))
t_backprop.append(get_time(circuit_backprop, params))
Expand All @@ -110,9 +107,9 @@ def circuit(params):
# Generating the graphic
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(10, 4))

ax1.plot(wires_list, adjoint_wires, '.-', label="adjoint")
ax1.plot(wires_list, ps_wires, '.-', label="parameter-shift")
ax1.plot(wires_list, backprop_wires, '.-', label="backprop")
ax1.plot(wires_list, adjoint_wires, ".-", label="adjoint")
ax1.plot(wires_list, ps_wires, ".-", label="parameter-shift")
ax1.plot(wires_list, backprop_wires, ".-", label="backprop")

ax1.legend()

Expand All @@ -122,16 +119,17 @@ def circuit(params):
ax1.set_yscale("log")
ax1.set_title("Scaling with wires")

ax2.plot(layers_list, adjoint_layers, '.-', label="adjoint")
ax2.plot(layers_list, ps_layers, '.-', label="parameter-shift")
ax2.plot(layers_list, backprop_layers, '.-', label="backprop")
ax2.plot(layers_list, adjoint_layers, ".-", label="adjoint")
ax2.plot(layers_list, ps_layers, ".-", label="parameter-shift")
ax2.plot(layers_list, backprop_layers, ".-", label="backprop")

ax2.legend()

ax2.set_xlabel("Number of layers")
ax2.set_xticks(layers_list)
ax2.set_ylabel("Time")
ax2.set_title("Scaling with Layers")
ax2.set_ylabel("Log Time")
ax2.set_yscale("log")
ax2.set_title("Scaling with layers")

plt.savefig("scaling.png")

Expand Down
2 changes: 1 addition & 1 deletion demonstrations/ahs_aquila.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
],
"dateOfPublication": "2023-05-16T00:00:00+00:00",
"dateOfLastModification": "2024-10-07T00:00:00+00:00",
"dateOfLastModification": "2025-07-11T00:00:00+00:00",
"categories": ["Quantum Hardware", "Devices and Performance", "Quantum Computing"],
"tags": [],
"previewImages": [
Expand Down
Loading
Loading