Callback to perform operations on a sample before passing it to a model
Created by: VolodyaCO
In some paper of @gcarleo I saw that, in order to consider symmetries of a Hamiltonian/lattice, one can bring each sample to a canonical form (e.g. lexicographical order of all the equivalent configurations).
This approach is different from embedding equivariance into the model. Instead, the model has no symmetry awareness, but it learns the ground state/steady state on a symmetry sector, which essentially is completely equivalent to learning the ground state on the whole Hilbert space, because one would just bring an element from the Hilbert space to the aforementioned symmetry sector.
However, to do this I had to do some dirty coding inside the MCState
, so that when I sample, I bring the configurations into the symmetry sector. What do you guys think of exposing a way for the user to perform some transformation on the samples before feeding them to the model? Something like a callback?