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 PI gates implementation #925

Merged
merged 9 commits into from
Oct 2, 2024
Merged

Remove PI gates implementation #925

merged 9 commits into from
Oct 2, 2024

Conversation

maliasadi
Copy link
Member

@maliasadi maliasadi commented Sep 25, 2024

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    tests directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the .github/CHANGELOG.md file, summarizing the
    change, and including a link back to the PR.

  • Ensure that code is properly formatted by running make format.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context:

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:
[sc-73507]

@maliasadi maliasadi added the urgent Mark a pull request as high priority label Sep 27, 2024
@maliasadi maliasadi marked this pull request as ready for review September 27, 2024 19:45
Copy link
Member

@multiphaseCFD multiphaseCFD left a comment

Choose a reason for hiding this comment

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

Thanks @maliasadi ! LGTM.

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.22%. Comparing base (8796bab) to head (3ffa46e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #925      +/-   ##
==========================================
- Coverage   94.98%   94.22%   -0.76%     
==========================================
  Files          95      165      +70     
  Lines       13175    20533    +7358     
==========================================
+ Hits        12514    19348    +6834     
- Misses        661     1185     +524     

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

Copy link
Contributor

@AmintorDusko AmintorDusko left a comment

Choose a reason for hiding this comment

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

WOW beautiful!

@AmintorDusko
Copy link
Contributor

Please test also the wheels.

Copy link
Contributor

@LuisAlfredoNu LuisAlfredoNu left a comment

Choose a reason for hiding this comment

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

Looks very nice, this will speed up the compilation time. Thank you @maliasadi
Just a couple of comments

Copy link
Contributor

@LuisAlfredoNu LuisAlfredoNu left a comment

Choose a reason for hiding this comment

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

Thank you @maliasadi
Nice work!

Just one question. Why do we remove the GateImplementationsPI?

@LuisAlfredoNu
Copy link
Contributor

Another question. Do the other devices (LK and LGPU) have the GateImplementationsPI? 🤔

Copy link
Member

@multiphaseCFD multiphaseCFD left a comment

Choose a reason for hiding this comment

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

Nice job! Thanks @maliasadi.

@maliasadi maliasadi added the ci:build_wheels Activate wheel building. label Oct 2, 2024
@maliasadi
Copy link
Member Author

Thanks for your review @LuisAlfredoNu!

Just one question. Why do we remove the GateImplementationsPI?

The PI gates were the first implementation of gate kernels in "lightning.qubit" using pre-computed indices, prior to the development of LM (less memory) and AVX kernels. We shouldn't use these kernels, as LM kernels are faster than PI gates for all 'supported' gates and are now our base kernels across different platforms or they should be on macOS ;) thus, we can deprecate them without any performance penalty in favour of reducing compilation time and ensuring that we only rely on LM kernels in the dynamic dispatcher across all platforms.

Another question. Do the other devices (LK and LGPU) have the GateImplementationsPI? 🤔

No, LK follows LM kernel design and LGPU is backed by custatevec.

@maliasadi maliasadi merged commit 3e9b4be into master Oct 2, 2024
121 of 122 checks passed
@maliasadi maliasadi deleted the rm_pi_gates branch October 2, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:build_wheels Activate wheel building. urgent Mark a pull request as high priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants