evanberkowitz / supervillain

MCMC for modified Villain constructions
https://supervillain.readthedocs.io/
Other
0 stars 0 forks source link

Ensemble.autocorrelation_time() #79

Closed evanberkowitz closed 9 months ago

evanberkowitz commented 9 months ago

It would be great to be able to just get the autocorrelation time of an ensemble. I've written code to loop over observables and take the max autocorrelation time a bunch of times, enough for it to deserve its own method.

In an ideal world probably we would just be able to do ensemble.autocorrelation_time() and have the autocorrelation computed. You could imagine specifying a cut parameter to allow for thermalization; non-thermalized samples skew the autocorrelation.

It would also be good to be able to say eg. ensemble.autocorrelation_time('InternalEnergyDensity', 'ActionDensity', 'SpinSusceptibility') and get the autocorrelation of those observables only.

There are a variety of puzzles / considerations:

This probably requires modifying the Observable class; and perhaps subclassing Scalar, TwoPoint, and other kinds of observables (though maybe we could just infer from the shape of a single observable).