-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Important Note
Context
Compressed Sparse Row (CSR) matrix-vector product quickly computes the resulting vector entry-by-entry by ignoring the zero entries in a matrix. In Lightning, CSR matrix-vector products are used when computing the expectation value or variance of SparseHamiltonian
observables. The core routine apply_Sparse_Matrix
is implemented in the SparseLinAlg.hpp header file.
The goal of this task is to parallelize apply_Sparse_Matrix
with C++ threads or OpenMP.
Requirements
The multi-threading support for the apply_Sparse_Matrix
method has to be implemented in the lightning.qubit
C++ backend, see pennylane_lightning/core/src/simulators/lightning_qubit/utils/SparseLinAlg.hpp
A PR must satisfy the following:
- Create a draft pull-request in PennyLane Lightning that you can use for questions and further communication.
- Parallelize
apply_Sparse_Matrix
with C++ threads or OpenMP. - Validate your implementation with C++ and Python tests (you may reuse existing tests, but add some if coverage requires it).
- Benchmark the new C++ implementation (depending on number of qubits and number of threads) and upload the results to the pull-request for further discussions.
- Ensure to complete all the steps outlined in the PR template and 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!