google / qhbm-library

Quantum Hamiltonian-Based Models built on TensorFlow Quantum
https://qhbm-library.readthedocs.io/en/latest/
Apache License 2.0
40 stars 15 forks source link

Refactor delta expectation function #210

Closed zaqqwerty closed 2 years ago

zaqqwerty commented 2 years ago

Resolves #205

The function delta_expectation was being defined in several places, each slightly differently. Here I define the new perturb_function function to cover these multiple use cases.