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

Remove deprecated qfunc decorator #679

Merged
merged 8 commits into from
Apr 25, 2024
Merged

Remove deprecated qfunc decorator #679

merged 8 commits into from
Apr 25, 2024

Conversation

dime10
Copy link
Collaborator

@dime10 dime10 commented Apr 24, 2024

As part of the Frontend refactor this PR removes the deprecated @qfunc decorator that has remained in use for internal testing (specifically lit testing). However, its use is actually very misleading since it bypasses a lot of the new infrastructure around devices and decomposition. Tests have been updated or removed.

[sc-59509]

The test has been skipped because the CI does not always build the
dummy device. Additionally, the test no longer works since it has gone
out of date with device infrastructure changes in Catalyst & Lightning.

Changes include:
- inherit most properties from the lightning device rather than
  the dummy device
- modify the supported gate set on the fly both in the device
  & a temporary toml file
- eliminate use of the qfunc decorator
- re-enable the test
.. as it is testing outdated infrastructure:
- using the qfunc primitive to bypass the QJITDevice logic
- bypasses the TOML logic

An end-to-end test of fully unknown operation support would require
the removal of the fixed runtime gate-set limitation.
.. to use new device infrastructure. Tests have also been updated to
expect MultiControlledX to QubitUnitary decomposition instead of
Toffoli gate sequences.
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 99.17%. Comparing base (bb7d033) to head (946b656).

Files Patch % Lines
frontend/catalyst/pennylane_extensions.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #679      +/-   ##
==========================================
+ Coverage   99.14%   99.17%   +0.03%     
==========================================
  Files          59       59              
  Lines        9207     9201       -6     
  Branches      718      718              
==========================================
- Hits         9128     9125       -3     
+ Misses         53       50       -3     
  Partials       26       26              

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

Prevent the class from being instantiated.
Pylint warnings about missing members are silenced since those members
are coming from the QNode class.
@dime10 dime10 merged commit 745ce68 into main Apr 25, 2024
35 of 36 checks passed
@dime10 dime10 deleted the remove-qfunc branch April 25, 2024 13:11
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.

None yet

2 participants