-
Notifications
You must be signed in to change notification settings - Fork 41
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
Finalize the LM kernel #212
Conversation
Hello. You may have forgotten to update the changelog!
|
Hi all, the benchmark of gate operations between kernels can be found here: https://github.com/PennyLaneAI/pennylane-lightning-compare-kernels. Even though the result is not that impressive for some gates, I see dramatic speed-up when parallelizing the new kernel gate operations (with OpenMP + loop unrolling). I will make a document on this when this PR is merged. |
…-lightning into finalize_lm_kernel
…-lightning into finalize_lm_kernel
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.
Great work on this 🥇 Do we know when it is likely to be merged?
Hi @maliasadi, I want to merge this when @mlxd also approves this. I also thank you for reviewing this huge PR. As most of the components I wanted are settled, I will not make a vast PR anymore (at least for a while 😉 ). |
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.
Amazing PR @chaeyeunpark !
Very happy to see this merged in. Though, for the record, is it possible to have a before and after comparison plot in the PR comments (Comparing v0.21 and this PR)?
Note, I expect this may also impact the external package work, but I think the sooner the better for this.
}; | ||
|
||
const std::vector<size_t> wires = {0, 1, 2, 3}; | ||
std::vector<ComplexPrecisionT> matrix{ |
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.
This is a big one!
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.
Yes, I generated a test example using python. Still, if we are able to use constexpr JSON parser, it would be possible to define all test cases in a JSON file. That would be the best.
…-lightning into finalize_lm_kernel
Co-authored-by: Lee James O'Riordan <[email protected]>
…ennylane-lightning into finalize_lm_kernel
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: This is the second part of adding a new gate implementation
Description of the Change:
DynamicDispatcher
.Benefits: Adjoint method works for all gates.
Possible Drawbacks:
Related GitHub Issues:
As most of the +lines are from the test files (auto-generated using
default.qubit
), I hope that it will not make you fear...