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

Add null qubit #1179

Merged
merged 88 commits into from
Oct 11, 2024
Merged

Add null qubit #1179

merged 88 commits into from
Oct 11, 2024

Conversation

AmintorDusko
Copy link
Contributor

@AmintorDusko AmintorDusko commented Oct 4, 2024

Context: Implement a Catalyst runtime plugin that mocks out all functions in the QuantumDevice interface and implement a PennyLane device plugin (implemented in qjit_device.py) providing access to the Null runtime device.

Description of the Change:

  • Rename the device from "dummy" to "null".
  • Make sure the device is up to date with the latest version of the QuantumDevice interface.
  • Ensure proper unit testing of the device in C++.
  • Package and ship this plugin for both development builds and wheels.

Benefits:
Such a device will be useful for a few reasons:

  • "execute" programs without needing to install additional plugins
  • Simplify and speed up integration tests when numerical results aren't needed
  • Benchmark programs while excluding the cost of simulation -> exposes the compilation and infrastructure overhead
  • Can also act as an instruction tracer / program printer

Possible Drawbacks: It is a surprise.

Related GitHub Issues:

[sc-72829] [sc-72830]

Copy link
Contributor

@erick-xanadu erick-xanadu left a comment

Choose a reason for hiding this comment

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

Hi @AmintorDusko , everything I've seen looks good. Whenever you feel ready to open it for review, just change it so that it is not in draft mode. Cheers!

frontend/test/lit/test_decomposition.py Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Oct 4, 2024

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md on your branch 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.

@AmintorDusko AmintorDusko marked this pull request as ready for review October 4, 2024 19:52
@AmintorDusko AmintorDusko requested review from a team and maliasadi October 4, 2024 19:52
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.93%. Comparing base (6126963) to head (7b71301).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1179      +/-   ##
==========================================
- Coverage   97.93%   97.93%   -0.01%     
==========================================
  Files          77       77              
  Lines       10921    10918       -3     
  Branches      971      971              
==========================================
- Hits        10695    10692       -3     
  Misses        179      179              
  Partials       47       47              

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

Copy link
Contributor

@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 Amintor, I'll give conditional approval here pending resolution of the last comments.

runtime/tests/Test_NullQubit.cpp Outdated Show resolved Hide resolved
runtime/tests/CMakeLists.txt Show resolved Hide resolved
runtime/lib/backend/null_qubit/null_qubit.toml Outdated Show resolved Hide resolved
frontend/test/pytest/test_preprocess.py Outdated Show resolved Hide resolved
frontend/test/pytest/test_preprocess.py Outdated Show resolved Hide resolved
frontend/test/pytest/test_custom_devices.py Outdated Show resolved Hide resolved
@AmintorDusko AmintorDusko merged commit 0d7f99a into main Oct 11, 2024
58 checks passed
@AmintorDusko AmintorDusko deleted the add_NullDevice branch October 11, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author:build-wheels Run the wheel building workflows on this Pull Request reviewer:require-wheels Pull Requests will need wheel building job successful before being merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants