You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ 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.qubit is a fully C++ backed simulator library that can be called from PennyLane, with optimal implementations of many highly-used gates. Implementing more optimized gates in the C++ backend would boost the performance of this simulator.
Requirements
The SX gate has to be implemented in the lightning.qubit C++ backend. For more information about the SX gate, please refer to PennyLane doc.
Explain how the SX C++ kernel can be updated to execute concurrently using C++ threads or OpenMP (you may look at the other gates implementation). What can you say about the performance factor here?
Add Python tests in tests/test_gates.py to check the correctness of this gate against PennyLane qml.SX. (you may reuse existing tests, but add some if coverage requires it)
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!
The text was updated successfully, but these errors were encountered:
Important Note
Context
PennyLane has support for many quantum gates natively at the Python level, but often we may require faster implementations.
lightning.qubit
is a fully C++ backed simulator library that can be called from PennyLane, with optimal implementations of many highly-used gates. Implementing more optimized gates in the C++ backend would boost the performance of this simulator.Requirements
The
SX
gate has to be implemented in thelightning.qubit
C++ backend. For more information about the SX gate, please refer to PennyLane doc.Add a method for the
SX
gate to the lightning_qubit/gates/cpu_kernels/GateImplementationsLM.hpp file. Update the source file accordingly.Add a
GateOpToMemberFuncPtr
struct in lightning_qubit/gates/OpToMemberFuncPtr.hpp similar to the struct added forHadamard
.Add C++ tests for the
SX
gate to Test_GateImplementations_Nonparam.cpp. You can follow the same style used for other gates in this test file.Explain how the
SX
C++ kernel can be updated to execute concurrently using C++ threads or OpenMP (you may look at the other gates implementation). What can you say about the performance factor here?Update the list of supported gates in pennylane_lightning/lightning_qubit/lightning_qubit.py.
Add Python tests in tests/test_gates.py to check the correctness of this gate against PennyLane
qml.SX
. (you may reuse existing tests, but add some if coverage requires it)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!
The text was updated successfully, but these errors were encountered: