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 gates or templates in the C++ backend can boost their performance.
Requirements
The QFT template has to be implemented in the lightning.qubit C++ backend as a gate.
Add Python tests in tests/test_gates.py to check the correctness of this gate against PennyLane qml.QFT. (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 steps outlined in the PR template. Please keep the checklist at the top of the PR description.
Create a script defining a basic circuit that uses qml.QFT.compute_matrix() passed to QubitUnitary, and benchmark this against the qml.QFT that you have just implemented for different number of qubits. 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 gates or templates in the C++ backend can boost their performance.Requirements
The QFT template has to be implemented in the
lightning.qubit
C++ backend as a gate.Add a method for the
QFT
gate to the lightning_qubit/gates/cpu_kernels/GateImplementationsLM.hpp file. Implement by using the decomposition approach outlined incompute_decomposition()
in pennylane/templates/subroutines/qft.py.Add a
GateOpToMemberFuncPtr
struct in lightning_qubit/gates/OpToMemberFuncPtr.hpp.Add C++ tests for the
QFT
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.QFT
. (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 steps outlined in the PR template. Please keep the checklist at the top of the PR description.
Create a script defining a basic circuit that uses
qml.QFT.compute_matrix()
passed toQubitUnitary
, and benchmark this against theqml.QFT
that you have just implemented for different number of qubits. 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: