Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
630e476
Merge branch 'master' into dev
actions-user Feb 10, 2026
4cea78c
Merge branch 'master' into dev
actions-user Feb 11, 2026
0609a79
Merge branch 'master' into dev
actions-user Feb 11, 2026
ce1b934
Merge branch 'master' into dev
actions-user Feb 12, 2026
4dfda0a
Merge branch 'master' into dev
actions-user Feb 12, 2026
6bd0bbe
Merge branch 'master' into dev
actions-user Feb 13, 2026
c7e4db4
Merge branch 'master' into dev
actions-user Feb 13, 2026
94ac77b
Merge branch 'master' into dev
actions-user Feb 17, 2026
f61eca4
fix: update deprecated usage of `id` in demos (#1693)
andrijapau Feb 19, 2026
03c1e97
Merge branch 'master' into dev
actions-user Feb 24, 2026
25bf3d9
Merge branch 'master' into dev
actions-user Feb 25, 2026
7823677
Merge branch 'master' into dev
actions-user Feb 26, 2026
15a86e1
Merge branch 'master' into dev
actions-user Feb 27, 2026
e635847
Merge branch 'master' into dev
actions-user Mar 9, 2026
356f62d
Merge branch 'master' into dev
actions-user Mar 9, 2026
55fa58a
Merge branch 'master' into dev
actions-user Mar 11, 2026
30bd0bd
Merge branch 'master' into dev
actions-user Mar 12, 2026
537192f
Merge branch 'master' into dev
actions-user Mar 13, 2026
5b73c85
Merge branch 'master' into dev
actions-user Mar 13, 2026
e13b4b7
Merge branch 'master' into dev
actions-user Mar 16, 2026
fa1bc58
Merge branch 'master' into dev
actions-user Mar 16, 2026
21cb4da
fix: `BasisRotation` is now a `Subroutine` (#1717)
andrijapau Mar 16, 2026
73c65c3
Merge branch 'master' into dev
actions-user Mar 17, 2026
b9ca7df
Merge branch 'master' into dev
actions-user Mar 23, 2026
f01ad52
Merge branch 'master' into dev
actions-user Mar 24, 2026
2efdce2
Merge branch 'master' into dev
actions-user Mar 26, 2026
f989475
Merge branch 'master' into dev
actions-user Mar 26, 2026
a79d4a3
Merge branch 'master' into dev
actions-user Mar 27, 2026
b66f986
Merge branch 'master' into dev
actions-user Apr 2, 2026
b801e35
Merge branch 'master' into dev
actions-user Apr 2, 2026
1d1b02d
Merge branch 'master' into dev
actions-user Apr 6, 2026
d0bdc26
Merge branch 'master' into dev
actions-user Apr 9, 2026
25ff506
Merge branch 'master' into dev
actions-user Apr 9, 2026
a6d9b15
Merge branch 'master' into dev
actions-user Apr 10, 2026
a9cac91
Merge branch 'master' into dev
actions-user Apr 13, 2026
2291b26
[Demo] qLDPC codes (#1714)
obliviateandsurrender Apr 13, 2026
f0a1793
Merge master into dev (#1747)
doctorperceptron Apr 14, 2026
a35edda
Fix dev merge (#1751)
doctorperceptron Apr 15, 2026
31cbe67
Merge branch 'master' into dev
doctorperceptron Apr 15, 2026
220d646
Merge branch 'master' into dev
doctorperceptron Apr 15, 2026
57823c0
Merge branch 'master' into dev
actions-user Apr 15, 2026
6d6b0e7
Merge branch 'master' into dev
actions-user Apr 20, 2026
2bb074a
Merge branch 'master' into dev
actions-user Apr 20, 2026
81a615a
Merge branch 'master' into dev
actions-user Apr 20, 2026
bce73f3
Fix master dev conflicts after qml to qp (#1768)
doctorperceptron Apr 22, 2026
0d334c5
Resolve conflicts
doctorperceptron Apr 23, 2026
d54a022
Merge branch 'master' into dev
actions-user Apr 24, 2026
c978755
Merge branch 'master' into dev
actions-user Apr 24, 2026
ea2edd3
Merge branch 'master' into dev
actions-user Apr 24, 2026
cf48b9a
Merge branch 'master' into dev
actions-user Apr 28, 2026
45012c2
Merge branch 'master' into dev
actions-user Apr 29, 2026
d8e66c6
Merge branch 'master' into dev
actions-user Apr 29, 2026
7ccee65
Merge branch 'master' into dev
actions-user May 4, 2026
ff3e9c7
Suppress warnings (#1777)
comp-phys-marc May 5, 2026
d4acaff
Merge branch 'master' into dev
actions-user May 6, 2026
6cce707
Merge branch 'master' into dev
actions-user May 6, 2026
62d29cd
Merge branch 'master' into dev
actions-user May 11, 2026
8298eca
Bump constraints version 0.45 (#1783)
JerryChen97 May 13, 2026
8e59188
add correct dateofmodification for two demos on dev (#1785)
JerryChen97 May 13, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import jaxopt

jax.config.update("jax_platform_name", "cpu")
jax.config.update("jax_enable_x64", True)

n_wires = 5
data = jnp.sin(jnp.mgrid[-2:2:0.2].reshape(n_wires, -1)) ** 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2024-01-18T00:00:00+00:00",
"dateOfLastModification": "2026-04-14T15:48:14+00:00",
"dateOfLastModification": "2026-05-05T00:00:00+00:00",
"categories": [
"Quantum Machine Learning",
"Optimization",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from jax import numpy as jnp
import optax

jax.config.update("jax_enable_x64", True)

n_wires = 5
data = jnp.sin(jnp.mgrid[-2:2:0.2].reshape(n_wires, -1)) ** 3
targets = jnp.array([-0.2, 0.4, 0.35, 0.2])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2024-01-18T00:00:00+00:00",
"dateOfLastModification": "2026-04-14T15:48:14+00:00",
"dateOfLastModification": "2026-05-05T00:00:00+00:00",
"categories": [
"Quantum Machine Learning",
"Optimization",
Expand Down
1 change: 1 addition & 0 deletions demonstrations_v2/tutorial_contextuality/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
import pennylane as qp
import numpy as np
jax.config.update("jax_platform_name", "cpu")
jax.config.update("jax_enable_x64", True)
np.random.seed(666) # seed used for random functions

A01 = np.array([[1, -1, 1], [1, -1, -1], [-1, 1, 0]]) # rules for player 0 vs player 1
Expand Down
2 changes: 1 addition & 1 deletion demonstrations_v2/tutorial_contextuality/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2023-09-06T00:00:00+00:00",
"dateOfLastModification": "2026-04-17T15:48:14+00:00",
"dateOfLastModification": "2026-05-05T00:00:00+00:00",
"categories": [
"Quantum Machine Learning"
],
Expand Down
4 changes: 2 additions & 2 deletions demonstrations_v2/tutorial_eqnn_force_field/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def equivariant_encoding(alpha, data, wires):

hamiltonian = jnp.einsum("i,ijk", data, sigmas) # Heisenberg Hamiltonian
U = jax.scipy.linalg.expm(-1.0j * alpha * hamiltonian / 2)
qp.QubitUnitary(U, wires=wires, id="E")
qp.fourier.mark(qp.QubitUnitary(U, wires=wires), "E")


######################################################################
Expand Down Expand Up @@ -260,7 +260,7 @@ def equivariant_encoding(alpha, data, wires):
def trainable_layer(weight, wires):
hamiltonian = jnp.einsum("ijk->jk", sigmas_sigmas)
U = jax.scipy.linalg.expm(-1.0j * weight * hamiltonian)
qp.QubitUnitary(U, wires=wires, id="U")
qp.fourier.mark(qp.QubitUnitary(U, wires=wires), "U")


# Invariant observable
Expand Down
4 changes: 2 additions & 2 deletions demonstrations_v2/tutorial_eqnn_force_field/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2024-03-12T00:00:00+00:00",
"dateOfLastModification": "2026-04-17T15:48:14+00:00",
"dateOfLastModification": "2026-04-22T15:48:14+00:00",
"categories": [
"Quantum Machine Learning",
"Quantum Chemistry"
Expand Down Expand Up @@ -107,4 +107,4 @@
"weight": 1.0
}
]
}
}
2 changes: 1 addition & 1 deletion demonstrations_v2/tutorial_general_parshift/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def cost(x):
"""Cost function on N qubits with N frequencies."""
qp.StatePrep(random_state(N, seed), wires=dev.wires)
for w in dev.wires:
qp.RZ(x, wires=w, id="x")
qp.fourier.mark(qp.RZ(x, wires=w), "x")
return qp.expval(qp.Hermitian(random_observable(N, seed), wires=dev.wires))

return cost
Expand Down
4 changes: 2 additions & 2 deletions demonstrations_v2/tutorial_general_parshift/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2021-08-23T00:00:00+00:00",
"dateOfLastModification": "2026-04-17T15:48:14+00:00",
"dateOfLastModification": "2026-04-22T15:48:14+00:00",
"categories": [
"Optimization"
],
Expand Down Expand Up @@ -89,4 +89,4 @@
"weight": 1.0
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
"""

import pennylane as qp
import numpy as np

import warnings
warnings.filterwarnings(action="ignore", category=np.exceptions.ComplexWarning)

symbols = ["H", "H", "H", "H"]
geometry = qp.math.array([[0., 0., -0.2], [0., 0., -0.1], [0., 0., 0.1], [0., 0., 0.2]])
Expand Down Expand Up @@ -234,7 +238,8 @@
def leaf_unitary_rotation(leaf, wires):
"""Applies the basis rotation transformation corresponding to the leaf tensor."""
basis_mat = qp.math.kron(leaf, qp.math.eye(2)) # account for spin
return qp.BasisRotation(unitary_matrix=basis_mat, wires=wires)
qp.BasisRotation(unitary_matrix=basis_mat, wires=wires)


######################################################################
# Similarly, the unitary transformation for the core tensors can be applied efficiently
Expand All @@ -248,22 +253,20 @@ def leaf_unitary_rotation(leaf, wires):

def core_unitary_rotation(core, body_type, wires):
"""Applies the unitary transformation corresponding to the core tensor."""
ops = []
if body_type == "one_body": # implements one-body term
for wire, cval in enumerate(qp.math.diag(core)):
for sigma in [0, 1]:
ops.append(qp.RZ(-cval, wires=2 * wire + sigma))
ops.append(qp.GlobalPhase(qp.math.sum(core), wires=wires))
qp.RZ(-cval, wires=2 * wire + sigma)
qp.GlobalPhase(qp.math.sum(core), wires=wires)

if body_type == "two_body": # implements two-body term
for odx1, odx2 in it.product(range(len(wires) // 2), repeat=2):
cval = core[odx1, odx2] / 4.0
for sigma, tau in it.product(range(2), repeat=2):
if odx1 != odx2 or sigma != tau:
ops.append(qp.IsingZZ(cval, wires=[2*odx1+sigma, 2*odx2+tau]))
qp.IsingZZ(cval, wires=[2*odx1+sigma, 2*odx2+tau])
gphase = 0.5 * qp.math.sum(core) - 0.25 * qp.math.trace(core)
ops.append(qp.GlobalPhase(-gphase, wires=wires))
return ops
qp.GlobalPhase(-gphase, wires=wires)

######################################################################
# We can now use these functions to approximate the evolution operator :math:`e^{-iHt}` for
Expand All @@ -281,9 +284,20 @@ def core_unitary_rotation(core, body_type, wires):
# step using the following :func:`CDFTrotterStep` function that uses the CDF Hamiltonian
# with the ``leaf_unitary_rotation`` and ``core_unitary_rotation`` functions defined earlier.
# We can then use the :func:`~.pennylane.trotterize` function to implement any higher-order
# Suzuki-Trotter products.
# Suzuki-Trotter products. It is crucial to wrap these steps in :func:`~.pennylane.prod`; this ensures
# the sequence of operators are preserved as a single block which prevents
# :func:`~.pennylane.trotterize` from re-ordering or reversing the internal terms.
#

@qp.prod
def block(time, leaf, core, body_type, wires):
# apply the basis rotation for leaf tensor
leaf_unitary_rotation(leaf, wires)
# apply the rotation for core tensor scaled by the time-step
core_unitary_rotation(time * core, body_type, wires)
# revert the change-of-basis for leaf tensor
leaf_unitary_rotation(leaf.conjugate().T, wires)

def CDFTrotterStep(time, cdf_ham, wires):
"""Implements a first-order Trotter step for a CDF Hamiltonian.

Expand All @@ -296,14 +310,7 @@ def CDFTrotterStep(time, cdf_ham, wires):
for bidx, (core, leaf) in enumerate(zip(cores, leaves)):
# Note: only the first term is one-body, others are two-body
body_type = "two_body" if bidx else "one_body"
qp.prod(
# revert the change-of-basis for leaf tensor
leaf_unitary_rotation(leaf.conjugate().T, wires),
# apply the rotation for core tensor scaled by the time-step
*core_unitary_rotation(time * core, body_type, wires),
# apply the basis rotation for leaf tensor
leaf_unitary_rotation(leaf, wires),
) # Note: prod applies operations in the reverse order (right-to-left).
block(time, leaf, core, body_type, wires)

######################################################################
# We now use this function to simulate the evolution of the :math:`H_4` Hamiltonian
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2025-03-05T09:00:00+00:00",
"dateOfLastModification": "2026-04-17T15:48:14+00:00",
"dateOfLastModification": "2026-05-05T00:00:00+00:00",
"categories": [
"Quantum Chemistry",
"Algorithms",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
#

import pennylane as qp
from pennylane import numpy as np
import numpy as np
import warnings

warnings.filterwarnings(action="ignore", category=UserWarning)

dataset = qp.data.load('qchem', molname="H3+")[0]
H, qubits = dataset.hamiltonian, len(dataset.hamiltonian.wires)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2024-04-26T00:00:00+00:00",
"dateOfLastModification": "2026-04-17T04:00:00+00:00",
"dateOfLastModification": "2026-05-05T00:00:00+00:00",
"categories": [
"Quantum Machine Learning",
"Optimization",
Expand Down
3 changes: 3 additions & 0 deletions demonstrations_v2/tutorial_liealgebra/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
import numpy as np
import pennylane as qp
from pennylane import X, Y, Z
import warnings

warnings.filterwarnings(action="ignore", category=RuntimeWarning)

su2 = [1j * X(0), 1j * Y(0), 1j * Z(0)]

Expand Down
2 changes: 1 addition & 1 deletion demonstrations_v2/tutorial_liealgebra/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2024-02-27T00:00:00+00:00",
"dateOfLastModification": "2026-04-21T15:48:14+00:00",
"dateOfLastModification": "2026-05-05T00:00:00+00:00",
"categories": [
"Quantum Computing"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
from jax import numpy as jnp
import optax

jax.config.update("jax_enable_x64", True)

pnp.random.seed(42)

dev = qp.device('default.qubit', wires=2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"executable_stable": true,
"executable_latest": true,
"dateOfPublication": "2024-10-01T00:00:00+00:00",
"dateOfLastModification": "2026-04-21T15:48:14+00:00",
"dateOfLastModification": "2026-05-05T00:00:00+00:00",
"categories": [
"Quantum Computing",
"Quantum Machine Learning"
Expand Down
6 changes: 3 additions & 3 deletions dependencies/constraints-plc-dev.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{"name": "pennylane-catalyst", "version": "0.15.0"},
{"name": "pennylane-lightning", "version": "0.45.0"},
{"name": "pennylane", "version": "0.45.0"}
{"name": "pennylane-catalyst", "version": "0.16.0"},
{"name": "pennylane-lightning", "version": "0.46.0"},
{"name": "pennylane", "version": "0.46.0"}
]
6 changes: 3 additions & 3 deletions dependencies/constraints-stable.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Specifies global constraints for the stable build
--extra-index-url https://download.pytorch.org/whl/cpu
pennylane==0.44.*
pennylane==0.45.*
pennylane-cirq==0.44.*
pennylane-qiskit==0.44.*
pennylane-qiskit==0.45.*
pennylane-qulacs==0.44.*
pennylane-catalyst==0.14.*
pennylane-catalyst==0.15.*

# Install external packages
matplotlib==3.10.0
Expand Down
Loading