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

Improve the stopping condition method #386

Merged
merged 7 commits into from
Nov 22, 2022

Conversation

AmintorDusko
Copy link
Contributor

@AmintorDusko AmintorDusko commented Nov 17, 2022

Context:
Improve the stopping_condition method, and expand tests to cover tape execution.

Description of the Change:

  • Refactor stopping_condition to rely on the supports_operation method.
  • Expand tests, to cover tape execution.

Benefits:
Operations will only be decomposed if not supported by Lightning.

Possible Drawbacks:

Related GitHub Issues:

@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Merging #386 (d691e1e) into master (c4604e5) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #386      +/-   ##
==========================================
- Coverage   99.88%   99.88%   -0.01%     
==========================================
  Files          49       49              
  Lines        4471     4469       -2     
==========================================
- Hits         4466     4464       -2     
  Misses          5        5              
Impacted Files Coverage Δ
pennylane_lightning/_version.py 100.00% <100.00%> (ø)
pennylane_lightning/lightning_qubit.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@AmintorDusko AmintorDusko changed the title Improve stopping condition Improve stopping condition method Nov 17, 2022
@AmintorDusko AmintorDusko changed the title Improve stopping condition method Improve the stopping condition method Nov 17, 2022
@AmintorDusko AmintorDusko marked this pull request as ready for review November 17, 2022 21:09
@multiphaseCFD
Copy link
Member

Hi @AmintorDusko , Nice work! Just leave two minor comments. One general question is if there is any other benefit we can get from this refactor except what you mentioned above.

@AmintorDusko
Copy link
Contributor Author

Hi @AmintorDusko , Nice work! Just leave two minor comments. One general question is if there is any other benefit we can get from this refactor except what you mentioned above.

The benefits are essentially what I already said.
This change of paradigm is more sensible with how Lightning works.

@AmintorDusko
Copy link
Contributor Author

[sc-29679]

Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

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

Nice work @AmintorDusko
Just 2 comments, then happy to approve

pennylane_lightning/lightning_qubit.py Outdated Show resolved Hide resolved
tests/test_execute.py Show resolved Hide resolved
@mlxd mlxd requested a review from multiphaseCFD November 21, 2022 14: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.

3 participants