-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix the LK+Windows and Catalyst+Lightning latest/latest failures #758
Conversation
…the decomposition of ctrl(LQ) and hardcode of expanded controlled matrices in the IR. LightningKokkos zero-qubit device initialization is not supported on Windows.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #758 +/- ##
==========================================
- Coverage 95.57% 95.10% -0.47%
==========================================
Files 109 92 -17
Lines 15694 13796 -1898
==========================================
- Hits 14999 13121 -1878
+ Misses 695 675 -20 ☔ View full report in Codecov by Sentry. |
pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question to be clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @maliasadi!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I left a small suggestion, but not a blocker.
Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, thanks and cheers @maliasadi !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one! Thanks @maliasadi !
ControlledQubitUnitary is present in the Python device but not the TOML (since #758 removed it from native gates), added it back to the decomposition gates since it can be implemented in its alternate form of C(QubitUnitary). Required for PennyLaneAI/catalyst#785 --------- Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai>
This PR aims to remove obsolete TOML related code and also resolve incompatibilities with the latest lightning device versions. - The verifier is relaxed to only test agreement of basic gates (no adjoint/control) between the toml and python device spec. - This is needed to resolve the overlapping gate issue introduced by PennyLaneAI/pennylane-lightning#743 - and also allows removing the patch for Lightning Kokkos that exists solely to satisfy the verifier. - The obsolete toml files in the catalyst repo for lightning devices is also removed. - MCMs are marked as un-invertible and un-controllable, since they are non-unitary. Requires: PennyLaneAI/pennylane-lightning#758 [sc-65114]
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 thechange, 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:
ControlledQubitUnitary
in favour ofC(QubitUnitary)
from the list of supported operations and the device toml file. Thestopping_condition
method guarantees the consistency of decompositions. This change also reduces the size of the generated IR and impact the performance of Catalyst for the computation ofC(QubitUnitrary)
as this controlled gate is currently decomposed toQubitUnitary
, hardcoding the expanded controlled-unitary-matrix into the IR.lightning.kokkos
with zero-qubit on Windows. Allocating 0-size Kokkos vectors not supported on Windows. Required to Pass LK+Windows CI.