-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Example stacking DDD and ZNE #2345
Conversation
… Currently combining DDD + ZNE is failing due to a return type incompatbility
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2345 +/- ##
=======================================
Coverage 98.22% 98.22%
=======================================
Files 87 87
Lines 4059 4059
=======================================
Hits 3987 3987
Misses 72 72 ☔ View full report in Codecov by Sentry. |
Thanks @jordandsullivan. To solve the issue that the notebook doesn't render in the documentation, you just need to add it to the TOC tree in the examples file. Eventually we use md files, but as a temporary file, it should work fine also with .ipynb format. The jupytext extension allows you to edit the md file as a notebook. |
My suggestion is that the executor should be only called by ZNE. The DD part is a "pre-processing", with input the initial circuit (e.g., GHZ state) and output the DD compiled quantum circuit. This is fed to ZNE. This should remove incompatibility types. |
…into the circuit itself and passing that to zne. Now functional
Thanks for the tip @nathanshammah , that did it. Now the question is mainly how to find a combination of error levels and circuit depth for which using DDD and ZNE together is in fact useful. Unfortunately, DDD seems to do best when you insert a lot of idle time in the circuit (which I modeled by inserting identity gates), while ZNE does significantly worse. ZNE itself shines in lower depth circuits. Perhaps it would be useful to do a characterization sweep of the range of noise levels or circuit depths at which each technique was useful? |
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.
Left some preliminary comments, but I haven't run the notebook yet.
I'm not sure why the output does not seem to be getting included in the docs build :/ https://mitiq--2345.org.readthedocs.build/en/2345/examples/combine_ddd_zne.html |
@jordandsullivan hm? I can see the output in the doc build. |
@cosenal Ah I just needed to do a hard reload (CMD+SHIFT+R) in my browser. It's showing up for me 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.
The one at the bottom is the most important comment.
LGTM! |
* First draft tutorial DDD + ZNE * Ammended error model to be time-correlated to allow DDD to be useful. Currently combining DDD + ZNE is failing due to a return type incompatbility * Add measurements. Still return type incompatibility * Switched from using ddd.mitigate_executor to inserting ddd sequences into the circuit itself and passing that to zne. Now functional * Adding markdown version of tutorial * Updated docstring for generate_mirror_circuits to reflect accurate return types * Identified error model and qubit idle regime in which the techniques work better together * Added new md notebook to examples toctree * Change format to myst so that cells execute in docs build * Adding formats: md:myst to display notebook correctly * Rephrase final sentence * Correct execute call to be `noisy-exec`, add clarity. * Remove unnecessary new executor instantiation. * correct typo
Description
Tutorial to combine ZNE and DDD.
License
Before opening the PR, please ensure you have completed the following where appropriate.