Skip to content
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

Tutorial tn - cont'd #1225

Open
wants to merge 33 commits into
base: tutorial-tn
Choose a base branch
from

Conversation

EmilianoG-byte
Copy link
Collaborator

@EmilianoG-byte EmilianoG-byte commented Sep 25, 2024

Continuation of this other PR: #1193

minhtriet and others added 26 commits August 28, 2024 13:52
------------------------------------------------------------------------------------------------------------

**Title:** How to implement VQD with PennyLane

**Summary:**

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**

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

* GOALS — Finding first excitation energy is necessary to model reaction


* AUDIENCE — Chemistry researchers, beginners in quantum computing.


* KEYWORDS — Quantum Chemistry


* 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))
    
- [x] Tutorial
- [x] Demo
- [x] How-to

[sc-64060]

---------

Co-authored-by: Guillermo Alonso-Linaje <[email protected]>
Co-authored-by: soranjh <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
…1184)

## Ticket
-
[sc-70154-update-qml-readme-to-highlight-image-standards](https://app.shortcut.com/xanaduai/story/70154/update-qml-readme-to-highlight-image-standards)

## Changes
- Add instructions to `README.md` about image standards to be followed
while writing demos this QML repository.
- Requirements sources from this
[doc](https://www.notion.so/xanaduai/Image-standards-for-web-projects-264c09e45a8941a597918b878a2f1a5e)
- Since QML is public & the notion doc is private (accessible by Xanadu
only) added the relevant standards in text form in the `README.md`

## Preview
-
https://github.com/PennyLaneAI/qml/blob/2e9da1bb2bef3cd8a2eb504459f686ab20b9ec0c/README.md
Co-authored-by: Tom Bromley <[email protected]>
Co-authored-by: GitHub Nightly Merge Action <[email protected]>
Co-authored-by: soranjh <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
Co-authored-by: Matthew Silverman <[email protected]>
Co-authored-by: CatalinaAlbornoz <[email protected]>
Co-authored-by: Josh Izaac <[email protected]>
Co-authored-by: lillian542 <[email protected]>
Co-authored-by: Rashid N H M <[email protected]>
Co-authored-by: Guillermo Alonso-Linaje <[email protected]>
Co-authored-by: Jay Soni <[email protected]>
Co-authored-by: soranjh <[email protected]>
Co-authored-by: ixfoduap <[email protected]>
Co-authored-by: Diego <[email protected]>
Co-authored-by: Utkarsh <[email protected]>
Co-authored-by: Romain Moyard <[email protected]>
Co-authored-by: Stepan Fomichev <[email protected]>
Co-authored-by: soranjh <[email protected]>
Co-authored-by: Alvaro Ballon <[email protected]>
Co-authored-by: Diego <[email protected]>
Co-authored-by: Lee J. O'Riordan <[email protected]>
Co-authored-by: Korbinian Kottmann <[email protected]>
Co-authored-by: DanielNino27 <[email protected]>
Co-authored-by: Paul Finlay <[email protected]>
Co-authored-by: ashishks0522 <[email protected]>
Co-authored-by: Mikhail Andrenkov <[email protected]>
Co-authored-by: David Wierichs <[email protected]>
Co-authored-by: Astral Cai <[email protected]>
Co-authored-by: Diksha Dhawan <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: WrathfulSpatula <[email protected]>
Co-authored-by: Olivia Di Matteo <[email protected]>
Co-authored-by: Pietropaolo Frisoni <[email protected]>
Co-authored-by: Ahmed Darwish <[email protected]>
Co-authored-by: Michael Vu <[email protected]>
Co-authored-by: Gopal Ramesh Dahale <[email protected]>
Co-authored-by: Sankalp Sanand <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Austin Huang <[email protected]>
Co-authored-by: Isaac De Vlugt <[email protected]>
Co-authored-by: Ashish Kanwar Singh <[email protected]>
Co-authored-by: Isaac De Vlugt <[email protected]>
Co-authored-by: qottmann <[email protected]>
Co-authored-by: Justin Pickering <[email protected]>
Co-authored-by: cmt <[email protected]>
This was forgotten from one pull request to the other. See PennyLaneAI#1205
Changes operator ordering in the Clifford demo based on user feedback.
**Title:** I

ntro to Qubitization

**Summary:**

Encoding a Hamiltonian into a quantum computer is a fundamental task for
many applications, but the way to do it is not unique. One method that
has gained special status is known as Qubitization. In this demo, we
will introduce the Qubitization operator and explain how to view it as a
rotation operator.

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**

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

* GOALS — Why are we working on this now?

Support the content of the Algorithm Toolkit. `qml.Qubitization` has
been one of the latests additions

* AUDIENCE — Who is this for?

everyone, it should be easy to understand

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


In this demo we propose a cool way to visualize the algorithm. It could
be good to refer to that

Qubitization, block encoding, visualization, algorithm toolkit

* 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

---------

Co-authored-by: ixfoduap <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
…ized quantum circuits (PennyLaneAI#1209)

**Title:**
Classical estimation of expectation values from parametrized quantum
circuits

**Summary:**
Rapid demo on simulation result
[here](https://arxiv.org/abs/2409.01706).

**Relevant references:**
https://arxiv.org/abs/2409.01706

**Possible Drawbacks:**

**Related GitHub Issues:**

* 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

---------

Co-authored-by: Ivana Kurečić <[email protected]>
…rod environments (PennyLaneAI#1216)

**Title:** Update workflows to upload and sync objects.inv to dev,
staging and prod environments

**Summary:** 
Currently we do not sync the generated objects.inv file from QML sphinx
build. This causes issues when building docs for pennylane docs as
linking to things within QML fails.

A quick solution was being used currently where the objects.inv was
being manually updated, but this PR changes the workflow so that it is
done with merges to dev/master branches,

**Relevant references:**

[sc-73313](https://app.shortcut.com/xanaduai/story/73313/update-qml-pipeline-to-save-objects-inv-from-each-master-dev-branch-build)


**Possible Drawbacks:**
None.

**Related GitHub Issues:**
None.

----
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.*

N/A

* AUDIENCE — Who is this for?

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

N/A. Internal facing changes.

* 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
This reverts the deletion of "Machine learning for quantum many-body
problems" tutorial as a non-executable demo compatible with the latest
version of PennyLane.

[sc-68239]

---------

Co-authored-by: Ivana Kurečić <[email protected]>
**Title:** Adversarial Attacks on Quantum Machine Learning

**Summary:** Tutorial on attacks and defenses in Quantum machine
learning with hands-on example.

**Relevant references:** 'A comparative analysis of adversarial
robustness for quantum and classical machine learning' by M.Wendlinger,
K.Tscharke, P.Debus

**Possible Drawbacks:**

**Related GitHub Issues:**

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

* GOALS — Why are we working on this now?

Show a PL implementation of a recent paper, introduce emerging topic of
quantum adversarial machine learning


* AUDIENCE — Who is this for?

Everyone interested in Quantum machine learning, especially those with
focus on security


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

Quantum machine learning, adversarial attacks, QAML, ..


* 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

@ikurecic

---------

Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Diego <[email protected]>
As name says.

* Updated `tutorial_vqe_vqd` to cast `h2.hf_state` as a numpy array.
It's a pennylane numpy array by default, which was causing warnings
about mixing autograd and jax interfaces.
* Suppress `ComplexWarning`s in `tutorial_vqe_vqd`.
* Cast `data` in `tutorial_eqnn_force_field` as complex, since we're
`einsum`-ing it with a complex tensor.

These changes will not fix all `ComplexWarning`s. That will require
changes in pennylane (see
[here](PennyLaneAI/pennylane#6256)).

**NOTE**
After checking all build artifacts locally, I can confirm that the
following `ComplexWarning`s remain:

* 4 warnings in `tutorial_pulse_programming`
* 1 warning in `tutorial_here_comes_the_sun`

Partially fixes PennyLaneAI#1212 

[sc-73429]

---------

Co-authored-by: David Wierichs <[email protected]>
**Title:** how to run QSVT on Hardware

**Summary:** Performing polynomial transformations on matrices or
operators is a task of great interest, which we have previously
addressed in our introductory demos on QSVT and its practical
applications. In this how-to guide, we will show how we can implement
the QSVT subroutine in a hardware-compatible way, taking your
applications to the next level.


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

* GOALS — Why are we working on this now?

We are making a Push to QSVT as it currently gives many problems and we
want to make clear how to use it correctly.

* AUDIENCE — Who is this for?

People who know the algorithm but want to see how to implement it in
hardware.

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


QSVT, hardware, how-to

* Which of the following types of documentation is most similar to your
file?

    
- [ ] Tutorial
- [ ] Demo
- [ x ] How-to

---------

Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
New PR pointing to master
Some discussions were made in the [other
PR](PennyLaneAI#1123)

---------

Co-authored-by: ixfoduap <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
## Changes
- Ticket:
[sc-73085-add-support-for-discussionforumurl-in-demo](https://app.shortcut.com/xanaduai/story/73085/add-support-for-discussionforumurl-in-demo-metadata-files)
- Added support for `discussionForumUrl` field in `metadata.json` files
for demos
- This can be used to link a specific discussion forum thread to a demo
- Bumped schema version to `0.1.2`

## Testing
- `"discussionForumUrl":
"https://discuss.pennylane.ai/c/pennylane-help/5"` - Passes ✅
- [Action
Run](https://github.com/PennyLaneAI/qml/actions/runs/10943682894/job/30383786592)
- `"discussionForumUrl": "https://pennylane.ai/c/pennylane-help/5"` -
Fails ❌
- [Action
Run](https://github.com/PennyLaneAI/qml/actions/runs/10943718222/job/30383899155)

---------

Co-authored-by: Paul Finlay <[email protected]>
### Before submitting

Please complete the following checklist when submitting a PR:

- [ ] Ensure that your tutorial executes correctly, and conforms to the
      guidelines specified in the [README](../README.md).

- [ ] Remember to do a grammar check of the content you include.
- [ ] All tutorials conform to
      [PEP8 standards](https://www.python.org/dev/peps/pep-0008/).
      To auto format files, simply `pip install black`, and then
      run `black -l 100 path/to/file.py`.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


------------------------------------------------------------------------------------------------------------

**Title:**
Generative quantum eigensolver demo using Pennylane

**Summary:**
We use Pennylane to generate a static molecular dataset and calculate
the corresponding energies to train a small GPT model as described by
https://arxiv.org/abs/2401.09253. We show that as training progresses,
the GPT model generates operator sequences whose predicted energies more
accurately resembles the true energies calculated by Pennylane. In
addition, the sampling process is shown to better generate the ground
state for better performing models.

- Story ticket:
https://app.shortcut.com/xanaduai/story/64095/contribute-gqe-demo-as-a-pennylane-demo

**Relevant references:**

**Possible Drawbacks:**

**Related GitHub Issues:**

----
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: JosephRRB <[email protected]>
Co-authored-by: Josh Izaac <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
MPS simulation demo [sc-66753]

---------

Co-authored-by: Pietropaolo Frisoni <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
…1127)

**Intro to the BlueQubit (CPU) device [DRAFT]**

First draft on the tutorial on how to use the BlueQubit device and run
up to 33 qubit circuit simulations with Pennylane.

---------

Co-authored-by: Ivana Kurečić <[email protected]>
Co-authored-by: Ivana Kurečić <[email protected]>
Copy link

github-actions bot commented Sep 25, 2024

Thank you for opening this pull request.

You can find the built site at this link.

Deployment Info:

  • Pull Request ID: 1225
  • Deployment SHA: 25fffed3a8e6bd9eb9d30a5bd4aa07a7fe29d040
    (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.

@Qottmann Qottmann self-requested a review September 26, 2024 08:17
add note about direction of quantum circuit tensors
Emiliano Godinez added 2 commits September 30, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.