TeamGraphix / graphix

measurement-based quantum computing (MBQC) compiler and simulator
https://graphix.readthedocs.io
Apache License 2.0
55 stars 20 forks source link

Use JIT compiler for `StatevectorBackend` #110

Open king-p3nguin opened 6 months ago

king-p3nguin commented 6 months ago

Before submitting, please check the following:

Then, please fill in below:

Context (if applicable):

Description of the change: Use JIT for faster simulation using StatevectorBackend.

Related issue:

also see that checks (github actions) pass. If lint check keeps failing, try installing black==22.8.0 as behavior seems to vary across versions.

king-p3nguin commented 6 months ago

Currently, I am using numba, but I am going to change it to jax because jax seems to support more functions in numpy. (functions like np.tensordot and np.moveaxis is not supported in numba) I will make the installation of jax optional.

king-p3nguin commented 6 months ago

It seems like jaxlib does not support Python 3.8 on Windows, so some tests involving Jax are skipped. Also, since there are many optional dependent libraries, I added a new requirements-dev.txt file.