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

Automate InferenceLayer infer calls #115

Closed zaqqwerty closed 2 years ago

zaqqwerty commented 2 years ago

We gain the ability to memoize distribution construction in #111. However, now we need to manually call infer whenever we update the parameters of the underlying energy model. Instead, could we set up a structure where the InferenceLayer knows when the model variables have been changed, and automatically calls infer when another method is called?