Skip to content

Update stateprep decomposition in tutorial_how_to_quantum_just_in_time_compile_vqe_catalyst demo #1325

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 22 commits into
base: dev
Choose a base branch
from

Conversation

mehrdad2m
Copy link
Contributor

@mehrdad2m mehrdad2m commented Mar 12, 2025

Title:
Update tutorial_how_to_quantum_just_in_time_compile_vqe_catalyst demo.

Summary:
Update a demo to reflect changes in this PR.
Remove compute_decomposition for the state prep instruction as it will happen automatically when in a gradient method.

Relevant references:

Possible Drawbacks:

Related GitHub Issues:

actions-user and others added 17 commits January 21, 2025 19:45
Providing `gradient_kwargs` as additional `kwargs` to `QNode` is
deprecated as of: PennyLaneAI/pennylane#6828.

[sc-81531]
**Title:**
Adjust interface of `ControlledQubitUnitary` to be compatible with
PennyLane v0.41

**Summary:**
changed 5 occurences in
demonstrations/tutorial_classically_boosted_vqe.py and
demonstrations/tutorial_testing_symmetry.py

**Related Shortcut Stories:**
[sc-80842]

---------

Co-authored-by: Alex Preciado <alex.preciado@xanadu.ai>
**Context:**

In PennyLaneAI/pennylane#6939, a fix was made to
`qml.expval` so that it no longer silently converts the result to a real
number. However, in `tutorial_pulse_programming101.py` we use a
Hamiltonian with complex-typed coefficients. This resulted in an
imaginary expectation value (`X+0j`) and broke the `jax.value_and_grad`
function.

**Description of change:**

Wrap the `qnode` function to get the expectation value and convert it to
a real number. This allows `jax.value_and_grad` to be used and fixes the
demo.
…egacy interfaces (#1284)

**Title:**
Update `tutorial_noisy_circuits.py` to port `default.mixed` free of
legacy interfaces

**Summary:**
In the Tutorial of Noisy Circuits, there's a call `dev.state` which is a
legacy-only interface. In our current standard, the device object will
not store the state any more and we should return the latest state via
the corresponding measure.

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**

----

---------

Co-authored-by: Andrija Paurevic <46359773+andrijapau@users.noreply.github.com>
Co-authored-by: Isaac De Vlugt <isaacdevlugt@gmail.com>
… happen automatically when in a gradient method.
mehrdad2m and others added 3 commits March 12, 2025 15:24
**Title:**
`scipy` used in qml has been very old.
Upgrade `scipy` version to 1.12 

**Summary:**
`scipy`: 1.11.4 -> 1.12.0

`mitiq`: 0.32 -> 0.43
`qutip`: 4.7.3 -> 5.1.0

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-86308]
Copy link

Thank you for opening this pull request.

You can find the built site at this link.

Deployment Info:

  • Pull Request ID: 1325
  • Deployment SHA: 55d79a631f90a2b7384300dfaf77aa7107fb21a3
    (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.

Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants