exception netket.errors.HolomorphicUndeclaredWarning[source]#

Complex-to-Complex model detected. Defaulting to holomorphic = False for the calculation of its jacobian.

However, holomorphic = False might lead to slightly increased computational cost, some disabled features and/or worse quality of solutions found with iterative solvers. If your model is actually holomorphic, you should specify holomorphic = True to unblock some extra, possibly more performant algorithms.

If you are unsure whether your variational function is holomorphic or not, you should check if it satisfies the Cauchy-Riemann equations.

To check numerically those conditions on a random set of samples you can use the function netket.utils.is_probably_holomorphic(). If this function returns False then your ansatz is surely not holomorphic, while if it returns True your ansatz is likely but not guaranteed to be holomorphic.

To check those conditions numerically, you can check by following this example:

hi = nk.hilbert.Spin(0.5, 2)
sa = nk.sampler.MetropolisLocal(hi)
ma = nk.models.RBM(param_dtype=complex)
# construct the variational state
vs = nk.vqs.MCState(sa, ma)

                                 model_state = vs.model_state)

To suppress this warning correctly specify the keyword argument holomorphic.


a detailed discussion, explaining how to easily check those conditions analitically is found in the documentation of netket.utils.is_probably_holomorphic()).