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

Downstream LightningSimulator C++ API to the pennylane-lightning repository #960

Merged
merged 67 commits into from
Nov 12, 2024

Conversation

rauletorresc
Copy link
Contributor

@rauletorresc rauletorresc commented Oct 24, 2024

Context: Catalyst needs to build a class wrapping the Lightning Qubit class. Here we are moving the logic from Catalyst to the Lightning repository.

Description of the Change: Moving code from Catalyst to this repository and updating the build system to build against Catalyst.

Benefits: Catalyst wheels will build faster.

Possible Drawbacks: Our build system now relies on headers coming from Catalyst. It is unclear if this may cause a deadlock in the future because of our cyclic dependencies (PennyLane, PennyLane Lightning, Catalyst). Chances are small because we don't rely on Catalyst wheels or build it from scratch.

[sc-70316]
[sc-70318]
[sc-70317]

@rauletorresc rauletorresc self-assigned this Oct 24, 2024
@rauletorresc rauletorresc marked this pull request as ready for review October 28, 2024 16:03
@rauletorresc rauletorresc requested a review from a team October 28, 2024 16:03
Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 98.76017% with 32 lines in your changes missing coverage. Please review.

Project coverage is 91.76%. Comparing base (b491a37) to head (d338851).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ylane_lightning/lightning_qubit/lightning_qubit.py 20.00% 16 Missing ⚠️
...rs/lightning_qubit/catalyst/LightningSimulator.cpp 94.87% 14 Missing ⚠️
...rs/lightning_qubit/catalyst/LightningSimulator.hpp 96.15% 1 Missing ⚠️
...htning_qubit/catalyst/StateVectorLQubitDynamic.hpp 99.03% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (b491a37) and HEAD (d338851). Click for more details.

HEAD has 30 uploads less than BASE
Flag BASE (b491a37) HEAD (d338851)
38 8
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #960      +/-   ##
==========================================
- Coverage   97.97%   91.76%   -6.21%     
==========================================
  Files         221      179      -42     
  Lines       33726    24889    -8837     
==========================================
- Hits        33043    22840   -10203     
- Misses        683     2049    +1366     

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

@maliasadi maliasadi mentioned this pull request Oct 29, 2024
5 tasks
@rauletorresc rauletorresc force-pushed the raultorres/catalyst_LQ branch from 4c54c9f to 497f0e3 Compare October 29, 2024 16:12
@rauletorresc rauletorresc force-pushed the raultorres/catalyst_LQ branch 4 times, most recently from 3e05dbf to 00bf076 Compare October 30, 2024 11:05
@rauletorresc rauletorresc requested review from paul0403 and a team November 6, 2024 20:16
@maliasadi maliasadi added ci:build_wheels Activate wheel building. urgent Mark a pull request as high priority labels Nov 6, 2024
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

Thanks @rauletorresc! I'm concerned about the new dependencies on runtime/capi and runtime/tests. Let's resolve the remaining comments before merging the PR :)

cmake/support_catalyst.cmake Outdated Show resolved Hide resolved
cmake/support_catalyst.cmake Outdated Show resolved Hide resolved
cmake/support_catalyst.cmake Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

Thanks @rauletorresc! Happy to approve 🥳

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.

LGTM! We might come back to refactor catalyst integration code once there is feature parity across all sv backends

@rauletorresc rauletorresc merged commit 4659093 into master Nov 12, 2024
110 of 111 checks passed
@rauletorresc rauletorresc deleted the raultorres/catalyst_LQ branch November 12, 2024 20:51
rauletorresc added a commit to PennyLaneAI/catalyst that referenced this pull request Nov 15, 2024
**Context:** Catalyst needs to build a class wrapping the Lightning
Qubit class. Here we are moving the logic from Catalyst to the Lightning
repository.

**Description of the Change:** Moving code from Catalyst to this
repository and updating the build system to build against Catalyst.

**Benefits:** Catalyst wheels will build faster.

**Note:** We need the PR in lightning to be merged first
PennyLaneAI/pennylane-lightning#960

[sc-70319]
[sc-70317]
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.

7 participants