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

(LK-C-1) Add controlled 1-qubit named-gate (e.g. NCPauliX) support to Lightning Kokkos #952

Open
wants to merge 24 commits into
base: lk-control-base
Choose a base branch
from

Conversation

josephleekl
Copy link
Contributor

@josephleekl josephleekl commented Oct 18, 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:
This PR adds support for named controlled 1-qubit gates (e.g. PauliX / RX / PhaseShift / Hadamard / Rot / GlobalPhase). These are defined in BasicGateFunctors.hpp, and are applied through applyNC1Functor defined in the same file.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

[sc-76773]

@josephleekl josephleekl added the WIP Work-in-progress issue. Not for general fixing. label Oct 18, 2024
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.

@josephleekl josephleekl added ci:build_wheels Activate wheel building. ci:use-gpu-runner Enable usage of GPU runner for this Pull Request and removed WIP Work-in-progress issue. Not for general fixing. labels Oct 18, 2024
@josephleekl josephleekl marked this pull request as ready for review October 18, 2024 23:57
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 97.52852% with 13 lines in your changes missing coverage. Please review.

Project coverage is 97.44%. Comparing base (035bea0) to head (3367a4b).
Report is 3 commits behind head on lk-control-base.

Files with missing lines Patch % Lines
...nylane_lightning/lightning_kokkos/_state_vector.py 0.00% 9 Missing ⚠️
...ators/lightning_kokkos/gates/BasicGateFunctors.hpp 98.97% 2 Missing ⚠️
...c/simulators/lightning_kokkos/utils/UtilKokkos.hpp 96.15% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           lk-control-base     #952      +/-   ##
===================================================
+ Coverage            95.41%   97.44%   +2.03%     
===================================================
  Files                   98      215     +117     
  Lines                12982    30880   +17898     
===================================================
+ Hits                 12387    30092   +17705     
- Misses                 595      788     +193     

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

@josephleekl josephleekl marked this pull request as draft October 19, 2024 02:27
@josephleekl josephleekl marked this pull request as ready for review October 21, 2024 15:31
@josephleekl josephleekl added the urgent Mark a pull request as high priority label Oct 21, 2024
@josephleekl josephleekl requested review from LuisAlfredoNu and a team October 22, 2024 14:35
@josephleekl josephleekl changed the title Add controlled 1-qubit gate support to Lightning Kokkos Add controlled 1-qubit named-gate support to Lightning Kokkos Oct 22, 2024
@josephleekl josephleekl changed the title Add controlled 1-qubit named-gate support to Lightning Kokkos Add controlled 1-qubit named-gate (e.g. NCPauliX) support to Lightning Kokkos Oct 22, 2024
@josephleekl josephleekl changed the title Add controlled 1-qubit named-gate (e.g. NCPauliX) support to Lightning Kokkos (LK-C-1) Add controlled 1-qubit named-gate (e.g. NCPauliX) support to Lightning Kokkos Oct 23, 2024
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 @josephleekl ! Nice work. A few Q for the 1st round.

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. ci:use-gpu-runner Enable usage of GPU runner for this Pull Request urgent Mark a pull request as high priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants