Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend agnostic implementation of quantum Hamiltonian generation #216

Merged

Conversation

king-p3nguin
Copy link
Contributor

@king-p3nguin king-p3nguin commented May 30, 2024

(I am contributing to this project as a unitaryHACK participant)

@refraction-ray
Copy link
Contributor

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.

@king-p3nguin king-p3nguin marked this pull request as ready for review May 30, 2024 06:15
@king-p3nguin
Copy link
Contributor Author

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.

@refraction-ray refraction-ray merged commit 313ddd3 into tencent-quantum-lab:master May 30, 2024
0 of 2 checks passed
@refraction-ray
Copy link
Contributor

LGTM, I have further added jit for these functions to improve the efficiency

@refraction-ray
Copy link
Contributor

@all-contributors please add @king-p3nguin for example

Copy link
Contributor

@refraction-ray

I've put up a pull request to add @king-p3nguin! 🎉

@king-p3nguin king-p3nguin deleted the backend-agnostic-h-gen branch May 30, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend agnostic implementation of quantum Hamiltonian generation
2 participants