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

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open

Conversation

andrijapau
Copy link
Contributor

@andrijapau andrijapau commented Jul 16, 2025

Following the release guide,

Create a new branch from dev, and open a PR to merge the new branch into master. Once merged in, ensure that master subsequently builds successfully.

This merges all changes from dev that occured for the release of v0.42.0 PL ecosystem.

PR is a follow up to #1441 where we updated dependencies in dev. This PR was created with,

  • Make branch final-dev-v0420 after pulling latest dev
  • Create PR targeting master

actions-user and others added 30 commits April 28, 2025 19:56
bug fix for the iqp circuit optimization demo. We updated the external
package (IQPopt) and this caused an issue because we didn't specify a
kwarg in one of the functions. Should be back now.

---------

Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
Co-authored-by: Paul Finlay <50180049+doctorperceptron@users.noreply.github.com>
Co-authored-by: doctorperceptron <paul@xanadu.ai>
**Context:**

Unfortunately, lots of errors were hiding for a long time. Most of them
are resolved by updating dependencies.

[sc-92403]

---------

Co-authored-by: dwierichs <david.wierichs@xanadu.ai>
Co-authored-by: JerryChen97 <chenys13@outlook.com>
actions-user and others added 21 commits June 12, 2025 21:31
## Summary:
Run `qml sync-v2` from `dev`/`latest` to sync changes in
`demonstrations` to `demonstrations_v2`.
Update `Makefile` to be compatible with MacOS.
Add small note to README about the recommended way to install Poetry.

[sc-94732]

---------

Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
Same PR as a few releases ago:
#1198

Change will be reverted after FF!

[sc-94754]
This PR introduces a few fixes to the V2 demos pipeline to get all demos
to build:
- Add support for pennylane v0.41.1 and v0.42.0 wrt the
`PennyLaneDeprecationWarning` since the containing module has been
refactored. This warning is imported by Sphinx before the V2 pipeline
installs the dev version of pennylane, so we need a try/catch for
importing this module.
- Several changes to the dev constraints file, including cirq and
constraining PennyLane to install from the RC branch.
- A big change to the `qml build` tool. The current tool assumes all
constraints can be satisfied together, which just isn't possible once we
start installing the `dev` versions of PennyLane, Catalyst, and several
plugins. This is addressed here by adding an additional step to the `qml
build` tool to install each of these libraries separately at their
correct versions. This step mirrors what is currently done in the
Makefile.

The above have been tested and verified that the entire V2 dev pipeline
builds successfully

![Screenshot 2025-07-09 at 11 15
29 AM](https://github.com/user-attachments/assets/8440aca4-b852-4898-b585-ba5f79315159)

This PR also syncs recent changes to the demos in `dev` into the
`demonstrations_v2` folder, and increases the verbosity of the `qml`
build tool so we have better visibility into the behaviour of the
pipeline while we're still in testing mode.
Removes unnecessary constraint from the V2 pipelin.
**Context:**

This demo only works with `pennylane<=0.40.0` and a specific tensorflow
version.

**Change:**

Mention this in the warning.

<img width="866" height="380" alt="image"
src="https://github.com/user-attachments/assets/007b5661-6a1b-4b3c-a54e-1abf4957c802"
/>
**Title:**

**Summary:**
- The odegen demo is very sensitive to the initial guess. Updating the
random seed so that the plot looks nicer.
- The classical shadows demo is not compatible with latest jax, and is
using an old interface of sklearn

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**
**Title:**
Adjust output format in `how_to_user_qiskit1_with_pennylane`

**Summary:**
Corrected two altered output since last modification.

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**
**Title:**
Fix result for the Demo `how_to_catalyst_lightning_gpu.py`

**Summary:**
Since JAX v0.5.0, the PRNGKey behaviour has been updated, so using the
same PRNGKey with different versions of JAX will impact what outputs
jax.random gives.

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-95314]

----
If you are writing a demonstration, please answer these questions to
facilitate the marketing process.

* GOALS — Why are we working on this now?

*Eg. Promote a new PL feature or show a PL implementation of a recent
paper.*


* AUDIENCE — Who is this for?

*Eg. Chemistry researchers, PL educators, beginners in quantum
computing.*


* KEYWORDS — What words should be included in the marketing post?


* Which of the following types of documentation is most similar to your
file?
(more details
[here](https://www.notion.so/xanaduai/Different-kinds-of-documentation-69200645fe59442991c71f9e7d8a77f8))
    
- [ ] Tutorial
- [X] Demo
- [ ] How-to
* Update `ahs_aquila` demo to render `qml.QuantumFunctionError`
deprecation warning
* Update `qnspsa` demo to stop unravelling parameters to cost function
* Update adjoint differentiation demos (`adjoint_diff_benchmarking` and
`tutorial_adjoint_diff`) to use autograd instead of JAX
  * Use log scaling for y-axis of second plot
* Update `getting_started_with_hybrid_jobs` demo to render deprecation
warning, and use a while loop to block until job metrics are available
* Update `quantum_volume` demo with new coupling map and instructions
for setting up API key
**Context:**

This demo was getting random warnings,
```
/home/runner/work/qml/qml/venv/lib/python3.10/site-packages/cotengra/hyperoptimizers/hyper.py:57: UserWarning: Couldn't find `optuna`, `cmaes`, or `nevergrad` so will use completely random sampling in place of hyper-optimization.
  warnings.warn(
/home/runner/work/qml/qml/venv/lib/python3.10/site-packages/cotengra/hyperoptimizers/hyper.py:76: UserWarning: Couldn't find `optuna`, `cmaes`, or `nevergrad` so will use completely random sampling in place of hyper-optimization.
  warnings.warn(
```
which seemed to only occur with `cotengra <= 0.7.4`.


![image](https://github.com/user-attachments/assets/2ed9409a-1e9b-4662-a1da-296bd8ce303a)



**Description of the change:**

By upgrading `cotengra` (and `quimb` ... why not?), the warnings
disappear.

**Benefits:**

No more warnings,


![image](https://github.com/user-attachments/assets/317699c6-d0f5-48ce-96ee-71041f87f1ce)
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.
Copy link

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

@andrijapau andrijapau requested a review from a team July 16, 2025 00:22
@andrijapau andrijapau changed the title merge dev into master merge dev into master for v0.42.0 release Jul 16, 2025
Copy link

github-actions bot commented Jul 16, 2025

Thank you for opening this pull request.

You can find the built site at this link.

Deployment Info:

  • Pull Request ID: 1442
  • Deployment SHA: f02f55d39eebd462f27bbb3e865e528f28132589
    (The Deployment SHA refers to the latest commit hash the docs were built from)

Note: It may take several minutes for updates to this pull request to be reflected on the deployed site.

**Title:**
Fix v2 builds

**Summary:**
This PR syncs changes from `demonstrations` with `demonstrations_v2` and
adds `pennylane_qisket` as a individual dependency in
`tutorial_error_mitigation`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:build-all-qml-demos Build all the Demos for this Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants