WIP: AbstractVariationalState
Created by: gcarleo
This is to start a discussion on a concrete possible interface for AbstractVariationalState
Essentially, this encapsulates a quantum state (either pure or mixed) depending on a set of parameters, and that supports operations such as computing quantum expectation values and their gradients.
Notice that this is broader concept than AbstractMachine
, since it allows also computing expectation values.
This is somehow in the spirit of #404 but a bit more general, so that this could be used in all applications we have. Notice that specific implementations of this relying on MCMC might want to implement a caching mechanism, such that samples to compute expectation values are not recomputed unless variational parameters in the state are changed.
Other families of states can also derive from this interface, and implement their own strategy (possibly non-stochastic) to compute expectation values and gradients.