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

ISWAP gate implementation for lightning.kokkos #740

Open
tomlqc opened this issue May 23, 2024 · 0 comments
Open

ISWAP gate implementation for lightning.kokkos #740

tomlqc opened this issue May 23, 2024 · 0 comments

Comments

@tomlqc
Copy link
Contributor

tomlqc commented May 23, 2024

Important Note

⚠️ This issue is part of an internal assignment and not meant for external contributors

Context

PennyLane has support for many quantum gates natively at the Python level, but often we may require faster implementations. lightning.kokkos is a Kokkos-based backed simulator library that can be called from PennyLane, with optimal implementations of many highly-used gates. As Kokkos implements a programming model in C++ for writing performance portable applications targeting various HPC platforms, lightning.kokkos can be compiled to run on multi-core CPUs, NVIDIA GPUs and AMD GPUs alike. Implementing more optimized gates in the C++ backend would boost the performance of this simulator.

Requirements

The ISWAP gate has to be implemented in the lightning.kokkos C++ backend. For more information about the ISWAP gate, please refer to PennyLane doc.

  • Implement and register the ISWAP gate in lightning_kokkos/gates/BasicGateFunctors.hpp.

  • Add C++ tests for the ISWAP gate to Test_StateVectorKokkos_NonParam.cpp. You can follow the same style used for other gates in this test file.

  • Explain how the ISWAP C++ Kokkos kernel will be executed concurrently. What can you say about the performance factors?

  • Update the list of supported gates in pennylane_lightning/lightning_kokkos/lightning_kokkos.py.

  • Add Python tests in tests/test_gates.py to check the correctness of this gate against PennyLane qml.ISWAP. (you may reuse existing tests, but add some if coverage requires it)

  • Compare the performance of the ISWAP gate on lightning.kokkos when building Kokkos with SERIAL and OpenMP backends. Please find the installation guideline for building Lightning-Kokkos with different backend kernels.

  • Create a pull-request in the PennyLane Lightning repository and ensure to complete all the necessary steps outlined for creating the PR before marking it ready for review.

Feel free to ask any questions or raise any concerns regarding the issue. We'll be happy to discuss with you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant