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

QMHL #189

Closed zaqqwerty closed 2 years ago

zaqqwerty commented 2 years ago

Implements QMHL for the new QHBM structure.

Part of #140.

@farice one thing I couldn't resolve was the following: as I increase the number of samples at line 46 of qmhl_loss_test.py, line 269 starts to fail; for example, going from 1e6 to 1e7 samples causes the relative error to go to 0.065, whereas the tolerance is 0.02; and for 1e8 samples, relative error goes to 0.75

farice commented 2 years ago

what you describe could mean we over-flow somewhere, I think if things LG with a reasonable number of samples (<=1e6) then we can consider the PR WAI imo. However, we should open an issue to track down the specific cause post-release. I'll review the PR now

zaqqwerty commented 2 years ago

Added #190. Also, what does WAI mean?

farice commented 2 years ago

WAI = working as intended!