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

Investigate QMHL test sample sensitivity #190

Open zaqqwerty opened 2 years ago

zaqqwerty commented 2 years ago

As the number of samples at line 46 of qmhl_loss_test.py is increased, 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. Faris mentioned this could be coming from an overflow somewhere.