Restructure the optimization driver interface for v2.0
Created by: gcarleo
Version 2.0 calls for a re-thinking of the way we handle the output. At the moment, this is done in the (excellent) json output writer developed by @femtobit.
I think that in 2.0 we should go beyond the json output.
As a first goal, I propose to go for something similar to what is done in Keras , where the training history is saved in python dictionaries.
import matplotlib.pyplot as plt
... construct various objects here ...
history = vmc.run(n_iter=300,n_samples=1000,save_every=10)
# Plot energies
plt.plot(history.history['energy'].mean) #or something similar for plot with error bars
plt.show()
As a second (slightly more ambitious) goal, it would be really cool to have callbacks à la Keras as well. One can use these callback to print each step on a file, or, even better, to visualise the results dynamically. Once the callbacks are in place, live streaming of the results in a browser can be easily achieved using Bokeh (see here for an example). This would be really cool to have.
@femtobit what do you think about goal 1 for example? Does it look like an easy modification of your output handlers?