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

[Capture] iterative_qpe uses qml control flow functions #6680

Merged
merged 9 commits into from
Dec 13, 2024

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Dec 5, 2024

Context:

The capture project allows us to convert more complicated hybrid workflows into jaxpr.

Description of the Change:

Makes it so that iterative_qpe can be compactly captured into jaxpr.

Benefits:

Possible Drawbacks:

The testing in this PR is horrible, but I don't really have a better way of doing it. The produced jaxpr is rather complicated, the produced jaxpr is not compatible with plxpr_to_tape, we currently only use single-branch-statistics to simulate MCM's, and we can't post-process MCM's.

Related GitHub Issues:

[sc-72592]

Copy link
Contributor

github-actions bot commented Dec 5, 2024

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.62%. Comparing base (2bb567a) to head (5515e98).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6680   +/-   ##
=======================================
  Coverage   99.62%   99.62%           
=======================================
  Files         474      474           
  Lines       44617    44628   +11     
=======================================
+ Hits        44448    44459   +11     
  Misses        169      169           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@albi3ro albi3ro changed the base branch from master to convert-to-tape December 10, 2024 19:28
@albi3ro albi3ro changed the base branch from convert-to-tape to master December 10, 2024 20:33
Copy link
Contributor

@PietropaoloFrisoni PietropaoloFrisoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

pennylane/ops/functions/iterative_qpe.py Outdated Show resolved Hide resolved
tests/ops/functions/test_iterative_qpe.py Outdated Show resolved Hide resolved
tests/ops/functions/test_iterative_qpe.py Show resolved Hide resolved
Co-authored-by: Pietropaolo Frisoni <pietropaolo.frisoni@xanadu.ai>
Copy link
Contributor

@PietropaoloFrisoni PietropaoloFrisoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to approve 🚀

@albi3ro albi3ro requested a review from mudit2812 December 13, 2024 15:17
@albi3ro albi3ro enabled auto-merge (squash) December 13, 2024 22:16
@albi3ro albi3ro merged commit 772b543 into master Dec 13, 2024
45 checks passed
@albi3ro albi3ro deleted the capture-iterative-qpe branch December 13, 2024 22:42
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.

3 participants