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 PSWAP gate has to be implemented in the lightning.qubit C++ backend. For more information about the PSWAP gate, please refer to PennyLane doc.
Add Python tests in tests/test_gates.py to check the correctness of this gate against PennyLane qml.PSWAP. (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 in the PR template. Please keep the checklist at the top of the PR description.
Compare the performance of both PSWAP implementations for varying number of qubits and upload the results to the pull-request for further discussions.
Mark the PR ready for review.
Don't hesitate to ask for clarification 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
PSWAP
gate has to be implemented in thelightning.qubit
C++ backend. For more information about the PSWAP gate, please refer to PennyLane doc.Add a method for the
PSWAP
gate to the lightning_qubit/gates/cpu_kernels/GateImplementationsLM.hpp file. Implement 2 variants:PSWAP
to the state vectorapplySWAP()
inGateImplementationsLM.hpp
Add a
GateOpToMemberFuncPtr
struct in lightning_qubit/gates/OpToMemberFuncPtr.hpp similar to the struct added forSWAP
.Add C++ tests for the
PSWAP
gate to Test_GateImplementations_Nonparam.cpp. You can follow the same style used for other gates in this test file.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.PSWAP
. (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 in the PR template. Please keep the checklist at the top of the PR description.
Compare the performance of both
PSWAP
implementations for varying number of qubits and upload the results to the pull-request for further discussions.Don't hesitate to ask for clarification 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: