N3PDF / vegasflow

VegasFlow: accelerating Monte Carlo simulation across multiple hardware platforms
https://vegasflow.readthedocs.io
Apache License 2.0
34 stars 9 forks source link

Add examples of using VegasFlow as a "clever" random number generator. #66

Closed scarlehoff closed 3 years ago

scarlehoff commented 3 years ago

Even though it is designed as an integrator, there is an use case for which VegasFlow can be "abused" which is using it as a random number generator following a certain distribution.

In order to do that one has to train the integrator with a target function and then just call .make_random() or whatever. This might be particularly relevant as we add more integration algorithms to the framework.