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

Support for the new device API #565

Merged
merged 27 commits into from
Mar 7, 2024
Merged

Support for the new device API #565

merged 27 commits into from
Mar 7, 2024

Conversation

rmoyard
Copy link
Contributor

@rmoyard rmoyard commented Feb 29, 2024

Context:

PennyLane recently added a new device API.

Description of the Change:

In this PR we create anothe QJIT device that supports the new device API. Users define preprocessing by adding transforms to the preprocess method.

We can add our own transforms in the QJIT device preprocess function, if necessary.

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.49%. Comparing base (bc401d9) to head (d858bdb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #565      +/-   ##
==========================================
+ Coverage   99.48%   99.49%   +0.01%     
==========================================
  Files          50       50              
  Lines        8683     8740      +57     
  Branches      616      624       +8     
==========================================
+ Hits         8638     8696      +58     
  Misses         25       25              
+ Partials       20       19       -1     

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

@rmoyard rmoyard marked this pull request as ready for review February 29, 2024 21:53
@rmoyard
Copy link
Contributor Author

rmoyard commented Feb 29, 2024

[sc-57856]

frontend/catalyst/qjit_device.py Show resolved Hide resolved
@sergei-mironov sergei-mironov dismissed their stale review March 6, 2024 12:54

Questions resolved

@rmoyard rmoyard requested a review from maliasadi March 6, 2024 15:30
Copy link
Collaborator

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

Thanks @rmoyard! My main concern is around the interaction between custom Catalyst operations/restrictions, the TOML specification, and the device pre-processing.

doc/dev/custom_devices.rst Show resolved Hide resolved
frontend/catalyst/jax_tracer.py Show resolved Hide resolved
frontend/catalyst/jax_tracer.py Show resolved Hide resolved
frontend/catalyst/qjit_device.py Show resolved Hide resolved
frontend/catalyst/qjit_device.py Outdated Show resolved Hide resolved
frontend/catalyst/qjit_device.py Outdated Show resolved Hide resolved
@rmoyard rmoyard requested a review from dime10 March 7, 2024 18:17
Copy link
Collaborator

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

Nice 👍

@rmoyard rmoyard enabled auto-merge (squash) March 7, 2024 21:15
@rmoyard rmoyard merged commit 5e6d6bd into main Mar 7, 2024
34 checks passed
@rmoyard rmoyard deleted the support_new_device_api branch March 7, 2024 21:59
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.

5 participants