-
Notifications
You must be signed in to change notification settings - Fork 188
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
ZNE demo using catalyst #1207
base: master
Are you sure you want to change the base?
ZNE demo using catalyst #1207
Conversation
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.
I know this is still a WIP and some of the chunks I made comments are are block-commented out, so happy to take subsequent passes on this as it is developed!
1. an example quantum circuit to run | ||
2. a way to execute circuits | ||
|
||
The circuits we use here will be ..., and the method of execution will be a noisy simulation |
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.
The circuits we use here will be ...,
. Is the ellipsis a placeholder for types of circuits used?
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.
Yup exactly! @cosenal is going to fill in some of the code, and I wasn't sure what he was changing the circuits too :)
print(mitigated_circuit()) | ||
|
||
############################################################################## | ||
# But there's still a big unanswered question! _If I can do this all in PennyLane, what is Catalyst |
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.
This is actually a great question and one that took me a while to thoroughly understand and appreciate!
Co-Authored-By: Vincent Russo <[email protected]>
------------------------------------------------------------------------------------------------------------ **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]>
## Changes - FIx metadata URL
See title change.
…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
@josh146 @dime10 @nathanshammah The tutorial is ready for review. |
############################################################################## | ||
# About the authors | ||
# ----------------- | ||
# .. include:: ../_static/authors/alessandro_cosentino.txt | ||
# | ||
# .. include:: ../_static/authors/nate_stemen.txt |
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.
@ikurecic should this stay here, or is this created as part of the build process now?
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.
@natestemen You can remove it. It doesn't cause any trouble to keep it, but you can remove it.
Using ZNE with PennyLane | ||
------------------------ |
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.
Would it be possible to either rename this section (for example, 'Demo overview') or simply put in an image (the OGthumbnail at 70% width) instead of the section title?
It's quite a confusing structure for readers as it is right now.
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.
I agree, good suggestion. Done in bc166cf
Co-authored-by: Ivana Kurečić <[email protected]>
What is zero-noise extrapolation (ZNE) | ||
----------- |
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.
What is zero-noise extrapolation (ZNE) | |
----------- | |
What is zero-noise extrapolation (ZNE) | |
-------------------------------------- |
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.
Tutorial looks great 😍
recommend reading the `Mitiq docs <https://mitiq.readthedocs.io/en/stable/guide/zne-5-theory.html>`_ | ||
and the references therein), let's first review what happens when using the protocol in practice. |
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.
nice!
Co-authored-by: Romain Moyard <[email protected]>
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 @cosenal and @natestemen , I have left just a couple of minor suggestions, and I will check in with you about the timeline.
leveraging JIT compilation through Catalyst. | ||
|
||
.. image:: ../_static/demo_thumbnails/regular_demo_thumbnails/thumbnail_zne_catalyst.png | ||
:width: 65% |
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.
:width: 65% | |
:width: 70% |
To fit the intended design.
Digital zero-noise extrapolation with Catalyst | ||
============================================== | ||
|
||
In this tutorial, you will learn how to use error mitigation, and in particular |
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.
In this tutorial, you will learn how to use error mitigation, and in particular | |
In this tutorial, you will learn how to use :doc:`error mitigation <tutorial_error_mitigation>`, and in particular |
This is just a suggestion.
Digital zero-noise extrapolation with Catalyst | ||
============================================== |
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.
Digital zero-noise extrapolation with Catalyst | |
============================================== | |
Digital zero-noise extrapolation (ZNE) with Catalyst | |
==================================================== |
|
||
ZNE in particular is also offered out of the box in PennyLane as a *differentiable* error mitigation technique, | ||
for usage in combination with variational workflows. More on this in the tutorial | ||
:doc:`Differentiating quantum error mitigation transforms <tutorial_diffable-mitigation>`. |
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.
Would you want to add this as a related Demo, as well?
"title": "Digital zero-noise extrapolation with Catalyst", | ||
"authors": [ | ||
{ | ||
"username": "cosenal" |
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.
@cosenal , if you add a Headline to your profile, it will also show up in the author bio summary under the Demo.
results by running circuits at varying noise levels and extrapolating back to a hypothetical | ||
zero-noise case. While this tutorial won't delve into the theory behind ZNE in detail (for which we | ||
recommend reading the `Mitiq docs <https://mitiq.readthedocs.io/en/stable/guide/zne-5-theory.html>`_ | ||
and the references therein), let's first review what happens when using the protocol in practice. |
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.
and the references therein), let's first review what happens when using the protocol in practice. | |
and the references therein), let's first review what happens when using the protocol in practice, in three stages. |
Could we set the expectations like this or in a similar way? As a first-time reader, the structure confused me a bit.
zero-noise case. While this tutorial won't delve into the theory behind ZNE in detail (for which we | ||
recommend reading the `Mitiq docs <https://mitiq.readthedocs.io/en/stable/guide/zne-5-theory.html>`_ | ||
and the references therein), let's first review what happens when using the protocol in practice. | ||
|
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.
I think this is a great way to explain the steps, but I'm a bit confused by how these three stages related to the following sections. Could we maybe align those two a bit better? Even if you just refer to specific stages within the text/code, that would already be valuable.
--------------------------- | ||
|
||
The first step for demoing an error mitigation routine is to define a circuit. | ||
Here we build a simple mirror circuit starting off a unitary 2-design. |
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.
Here we build a simple mirror circuit starting off a unitary 2-design. | |
Here we build a simple mirror circuit starting off a `unitary 2-design <https://en.wikipedia.org/wiki/Quantum_t-design>`__. |
Let's include a web reference.
Title: Digital Zero-Noise Extrapolation with Catalyst
Summary: A simple tutorial walking through how to use the latest features of Catalyst's implementation of ZNE.
If you are writing a demonstration, please answer these questions to facilitate the marketing process.
GOALS — Why are we working on this now?
Promote the capabilities of Catalyst.
AUDIENCE — Who is this for?
Quantum application scientists, and error mitigation researchers.
KEYWORDS — What words should be included in the marketing post?
Error mitigation, JIT
Which of the following types of documentation is most similar to your file?
(more details here)