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

Null qubit supports any operation without a decomposition #5582

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Apr 26, 2024

Context:

Description of the Change:

null.qubit will now automatically support any operation that doesn't have a decomposition.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

[sc-61258] Fixes #5508

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.

Copy link
Contributor

@DSGuala DSGuala left a comment

Choose a reason for hiding this comment

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

Tested this with qml.QuantumPhaseEstimation, qml.TrotterProduct, the code from issue #5508, the qml.resource documentation example, and the error estimation demo draft.

Looks like it's working as intended. Defining a decomposition for an ErrorOperation destroys the error information in qml.Tracker. But that's according to plan. We can decide how to address this in the next release and users who want to define decompositions for error ops can use default.qubit in the meantime.

👍 👍

Copy link

codecov bot commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.69%. Comparing base (9151477) to head (af75b2c).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5582      +/-   ##
==========================================
- Coverage   99.69%   99.69%   -0.01%     
==========================================
  Files         410      412       +2     
  Lines       38278    38237      -41     
==========================================
- Hits        38161    38119      -42     
- Misses        117      118       +1     

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

@astralcai astralcai added this to the v0.36 milestone Apr 26, 2024
@albi3ro albi3ro added the merge-ready ✔️ All tests pass and the PR is ready to be merged. label Apr 26, 2024
@astralcai astralcai enabled auto-merge (squash) April 26, 2024 21:27
@astralcai astralcai merged commit 742cb12 into master Apr 26, 2024
37 checks passed
@astralcai astralcai deleted the null-qubit-fix branch April 26, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-ready ✔️ All tests pass and the PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] null.qubit no longer plays nicely with custom operations
5 participants