-
Notifications
You must be signed in to change notification settings - Fork 208
Trigger two demos of QA interests #1349
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
base: dev
Are you sure you want to change the base?
Conversation
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 <[email protected]>
**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 <[email protected]> Co-authored-by: Isaac De Vlugt <[email protected]>
**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
…os (#1332) **Context** Recently, Lie algebraic functionality was promoted from `qml.labs` to `qml.liealg` module. Some demos related to Lie algebras code up their own variants of some of this functionality. **Changes** - This PR adds references to the PL functionalities and removes their copies within the "Fixed-depth Hamiltonian simulation via Cartan decomposition" demo. - The names of the variants in the demos are updated if there is a corresponding PennyLane pendant. - Naming change from "KAK theorem" to "KAK decomposition", following #1287 --------- Co-authored-by: Korbinian Kottmann <[email protected]>
…asLayer` (#1334) **Context:** `KerasLayer` has been already deprecated in PennyLane master branch (see PennyLaneAI/pennylane#7097). This PR updates the `tutorial_qnn_module_tf` demo that relies on `KerasLayer` in `Keras2`. **Summary:** Converted the mentioned demo into non-executable. As a result, the following changes to output were made: - Uploaded our previous scatter plot figure into `_static` and show in the first output - Hardcoded the TF/Keras fitting output printing info as the second and third output - Removed those TF warnings that used to exist. Users shall still get these warnings printing if they run on their own ~Added user warning on the top of `tutorial_qnn_module_tf`.~ ~Inplace warning catchers for wherever the `KerasLayer` was used.~ **Relevant references:** **Possible Drawbacks:** **Related GitHub Issues:** [sc-86997] ---- 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 - [ ] Demo - [ ] How-to --------- Co-authored-by: Josh Izaac <[email protected]> Co-authored-by: Isaac De Vlugt <[email protected]> Co-authored-by: Christina Lee <[email protected]>
As the name says. Change will be reverted after feature freeze.
The problem is that the computed horizontal CSA $\mathfrak{h}$ is not necessarily composed of just Pauli words, but soms of Paulis (Pauli sentence). The old version was assuming everything was Pauli, did the decomposition in terms of Pauli words, and accordingly counted elements. Updating this here to decompose in the actual basis of the horizontal CSA $\mathfrak{h}$ and show explicitly that the decomposition is stricly in it. edit: this works all well locally with correct jax, optax and pl version, but for some reason fails in CI🅰️ 🅰️ 🅰️ edit2: increasing the tolerance in `horizontal_cartan_subalgebra` fixes this. A bit problematic that this cannot be reproduced locally 😢 --------- Co-authored-by: Yushao Chen (Jerry) <[email protected]> Co-authored-by: David Wierichs <[email protected]>
👋 Hey, looks like you've updated some demos! 🐘 Don't forget to update the Please hide this comment once the field(s) are updated. Thanks! |
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. |
This is a trigger PR only for inspecting certain demos built on PL-master and QML-dev