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

Enable qpu.backend for IonQ backends #81

Merged
merged 15 commits into from
Nov 2, 2023
Merged

Enable qpu.backend for IonQ backends #81

merged 15 commits into from
Nov 2, 2023

Conversation

splch
Copy link
Contributor

@splch splch commented Oct 26, 2023

use the new backend field:

dev = qml.device(
    'ionq.qpu',
    backend='aria-1',
    api_key=api_key,
    wires=2,
)

to call qpu.aria-1

Copy link
Contributor

@lillian542 lillian542 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution to the plugin, this looks great! 🎉

I would like to request one change in the implementation - I’m hesitant to add hardware-specific subclasses for different machines when there is no functional difference that needs to be supported. The call signature

qml.device(“ionq.qpu”, backend=“aria-1”, api_key=api_key, wires=2)

works well, and it won’t require a new version of the plugin to be released if IonQ adds, removes, or changes the names of any of the devices. This is generally also what we’ve done with other plugins - for examples, see the Honeywell or Rigetti plugin documentation.

Other than that, there are just a couple of small things that need to be added for tests and documentation :)

tests/conftest.py Outdated Show resolved Hide resolved
pennylane_ionq/device.py Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
tests/test_device.py Show resolved Hide resolved
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a967df1) 95.73% compared to head (2f491bd) 93.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
- Coverage   95.73%   93.79%   -1.95%     
==========================================
  Files           5        5              
  Lines         305      306       +1     
==========================================
- Hits          292      287       -5     
- Misses         13       19       +6     
Files Coverage Δ
pennylane_ionq/device.py 93.04% <100.00%> (-2.58%) ⬇️

... and 1 file with indirect coverage changes

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

@lillian542
Copy link
Contributor

Thanks! Can you also run black -l 100 pennylane_ionq/ to update whatever the formatting check is bothered about?

The CodeCov "reduced coverage" looks to me like it's an artifact of reformatting and not a change in how much of the plugin functionality is covered by the tests.

Copy link
Contributor

@lillian542 lillian542 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, thanks!

@Alex-Preciado Alex-Preciado requested a review from albi3ro November 2, 2023 15:25
@albi3ro albi3ro merged commit 61ddfad into PennyLaneAI:master Nov 2, 2023
7 of 8 checks passed
@splch splch deleted the add-targets branch November 2, 2023 20:51
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