-
Notifications
You must be signed in to change notification settings - Fork 208
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
mehrdad2m
wants to merge
22
commits into
dev
Choose a base branch
from
update-statprep-decompose-demos
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+174
−696
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
commented
Mar 12, 2025
demonstrations/tutorial_how_to_quantum_just_in_time_compile_vqe_catalyst.metadata.json
Outdated
Show resolved
Hide resolved
…e_catalyst.metadata.json
**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]
Fixing some deprecation warnings
Thank you for opening this pull request. You can find the built site at this link. Deployment Info:
Note: It may take several minutes for updates to this pull request to be reflected on the deployed site. |
dime10
approved these changes
Mar 18, 2025
There was a problem hiding this 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: