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

Add controlled gate + matrix support to Lightning Kokkos #934

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

josephleekl
Copy link
Contributor

@josephleekl josephleekl commented Oct 7, 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:
Added support for multi-controlled gates and matrix for Lightning Kokkos, with an analogous interface to Lightning Qubit. Introduced NC{x}QubitOpFunctor for controlled-matrix operations and applyNC{x}Functor for controlled-gate operations.

Benefits:
Grover_ number of gates
Grover_ time (ms)
QPE n_estimate=8_ number of gates
QPE n_estimate=8_ time (ms)

num_gates (lk-control) num_gates (master) timing (ms) (lk-control) timing (ms) (master)
QSVT 30966 2379364 1594 133790
XAS(5,1,5) 4346 8756 309 598
XAS(5,2,5) 8641 17641 561 1324

Possible Drawbacks:

Related GitHub Issues:

@josephleekl josephleekl added the WIP Work-in-progress issue. Not for general fixing. label Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

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.

@josephleekl josephleekl marked this pull request as draft October 7, 2024 13:17
@josephleekl josephleekl changed the title initial commit Add controlled gate support to Lightning Kokkos Oct 7, 2024
@josephleekl josephleekl marked this pull request as ready for review October 17, 2024 12:57
@josephleekl josephleekl changed the title Add controlled gate support to Lightning Kokkos Add controlled gate + matrix support to Lightning Kokkos Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 9.09091% with 10 lines in your changes missing coverage. Please review.

Project coverage is 53.38%. Comparing base (7c43ed6) to head (35192c7).

Files with missing lines Patch % Lines
...nylane_lightning/lightning_kokkos/_state_vector.py 0.00% 10 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (7c43ed6) and HEAD (35192c7). Click for more details.

HEAD has 33 uploads less than BASE
Flag BASE (7c43ed6) HEAD (35192c7)
38 5
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #934       +/-   ##
===========================================
- Coverage   96.88%   53.38%   -43.51%     
===========================================
  Files         215       28      -187     
  Lines       29522     2497    -27025     
===========================================
- Hits        28603     1333    -27270     
- Misses        919     1164      +245     

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

@josephleekl josephleekl added ci:build_wheels Activate wheel building. urgent Mark a pull request as high priority ci:use-gpu-runner Enable usage of GPU runner for this Pull Request labels Oct 17, 2024
@josephleekl josephleekl marked this pull request as draft October 18, 2024 15:11
@josephleekl josephleekl removed ci:build_wheels Activate wheel building. urgent Mark a pull request as high priority ci:use-gpu-runner Enable usage of GPU runner for this Pull Request labels Oct 18, 2024
@josephleekl josephleekl added the do not merge Do not merge PR until this label is removed label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge PR until this label is removed WIP Work-in-progress issue. Not for general fixing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants