netket.nn.apply_operator.make_logpsi_op_afun#
- netket.nn.apply_operator.make_logpsi_op_afun(logpsi_fun, operator, variables)[source]#
Wraps an apply_fun into another one that multiplies it by an operator.
This wrapper is made such that the operator is passed as the model_state of the new wrapped function, and therefore changes to the angles/coefficients of the operator should not trigger recompilation.
- Parameters:
logpsi_fun – a function that takes as input variables and samples
operator – a {class}`nk.operator.JaxDiscreteOperator`
variables – The variables used to call logpsi_fun
- Returns:
A tuple, where the first element is a new function with the same signature as the original logpsi_fun and a set of new variables to be used to call it.