pasqal-io / horqrux

Jax-based quantum state vector simulator.
https://pasqal-io.github.io/horqrux/latest/
Apache License 2.0
24 stars 2 forks source link

[Feature] Allow parameter shifting on all parametric gates #31

Open atiyo opened 2 months ago

atiyo commented 2 months ago

The previous PR (https://github.com/pasqal-io/horqrux/pull/27) implements the parameter shift rule (PSR) for parameters defined in the values argument of expectations. However, it suffered from some limitations:

This MR addresses the two above points. It also adds tests that the above can be jit-compiled and give the correct answers.

Some noteworthy points:

Closes #29