Closed king-p3nguin closed 4 months ago
thanks for the nice contribution. could you also include an example script in /examples
to both check the correctness and compare the efficiency of the sparse Hamiltonian generation for different backends? (say generate Hamiltonian for several typical systems in O(20) qubits). I can also utilize the same script to benchmark the efficiency between previous impl. and the current one in case any performance degradation.
I noticed that examples/hamiltonian_building.py
does the benchmark for the numpy
backend, so I also added the jax
and tensorflow
backends in the script.
LGTM, I have further added jit for these functions to improve the efficiency
@all-contributors please add @king-p3nguin for example
@refraction-ray
I've put up a pull request to add @king-p3nguin! :tada:
(I am contributing to this project as a unitaryHACK participant)