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

Define and integrate plxpr device jvps #7019

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Feb 27, 2025

Context:

Description of the Change:

  • Adds Device.jaxpr_jvp method to the device API
  • Implements DefaultQubit.jaxpr_jvp for both adjoint and backprop
  • Integrates device provided jvps with the capture pipeline
  • Sets up the execution_config before calling qnode_prim.bind. This way we don't have to setup multiple times.
  • Adds a few more logging statements

Benefits:

Device provided jvps with program capture.

Backprop jvps fit in to the workflow structure a bit more smoothly.

Possible Drawbacks:

Trying to figure out how to best test backprop versus adjoint dervatives.

Related GitHub Issues:

[sc-82170] [sc-82168]

Replaces #6905

@albi3ro albi3ro marked this pull request as ready for review February 27, 2025 20:57
Copy link
Contributor

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.

@albi3ro albi3ro changed the title Capture device jvps Define and integrate plxpr device jvps Feb 27, 2025
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 97.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.60%. Comparing base (2c3a11f) to head (26023de).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pennylane/devices/default_qubit.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7019      +/-   ##
==========================================
- Coverage   99.60%   99.60%   -0.01%     
==========================================
  Files         484      484              
  Lines       46249    46277      +28     
==========================================
+ Hits        46065    46092      +27     
- Misses        184      185       +1     

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

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.

1 participant