Build stand-alone lightning binary for gate aggregate performance tests
mlxd opened this issue · 0 comments
Issue description
Benchmarking lightning directly without the Python interface can help in isolating performance regressions between the bindings and the underlying kernels. The purpose of this task is to create a PennyLane Lightning binary without the Python interface, and test the aggregate gate performance.
Your task will be the following:
- Build a quantum circuit simulation binary directly in C++ using PennyLane Lightning in the new
examples
directory. You can make use of the classStateVectorManaged
to create and allocate the required memory for your simulation. Examples of use are located within thesrc/tests/Test_StateVectorManaged_*.cpp
files. You can use either the dispatcher (gate-string call) or direct gate call to make use of gates. You can also use CMake to assist with the build process (see the JET guide for an example of how this may be achieved).
Your simulation binary should make a user-defined number of calls to a user-defined number of qubits for the following built-in parametric and non-parametric gates:
- Non-parametric: (PauliX, PauliY, PauliZ, Hadamard, CNOT, CZ)
- Parametric: (RX, RY, RZ, CRX, CRY, CRZ)
- User-defined call number can be read from a command-line argument (eg ./binary 10 6
will run each gate ten times in the circuit per qubit, with 6 qubits overall).
Run your simulation for qubit counts ranging from 6 - 22 in steps of 2, and plot the timing results, noting your compiler type, and optimization level. Wall-clock time will be sufficient here.