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

fix lightning interpreter with for, while, and cond #1051

Merged
merged 5 commits into from
Jan 27, 2025
Merged

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Jan 27, 2025

Context:

In PL PR #6786, I added additional kwargs for the for, while, and cond primitives for handling inputs with abstract shapes. Those inputs broken the custom registrations for the lightning interpreter.

Description of the Change:

Import the FlattenedHigherOrderPrimitives to get default behavior for for, while, and cond. These should better stay updated with changes to the primitives and the base class.

Benefits:

Lightning works again.

Possible Drawbacks:

Related GitHub Issues:

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.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

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 33.25%. Comparing base (975bd1b) to head (3301a22).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pennylane_lightning/core/lightning_interpreter.py 0.00% 3 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (975bd1b) and HEAD (3301a22). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (975bd1b) HEAD (3301a22)
7 6
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1051       +/-   ##
===========================================
- Coverage   94.27%   33.25%   -61.02%     
===========================================
  Files         233       29      -204     
  Lines       39067     2607    -36460     
===========================================
- Hits        36830      867    -35963     
+ Misses       2237     1740      -497     

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

Copy link
Contributor

@josephleekl josephleekl left a comment

Choose a reason for hiding this comment

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

Thanks @albi3ro! Could you also add a line in the changelog?

@albi3ro albi3ro requested a review from josephleekl January 27, 2025 20:31
Copy link
Contributor

@josephleekl josephleekl left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@albi3ro albi3ro merged commit e1572f5 into master Jan 27, 2025
68 of 70 checks passed
@albi3ro albi3ro deleted the capture-fix branch January 27, 2025 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.

4 participants