  Gutzwiller functions are popular variational wavefunctions for correlated
electrons in Hubbard models. Following the variational principle, we are
interested in the Gutzwiller parameters that minimize e.g. the expectation
value of the energy. Rewriting the expectation value as a rational function in
the Gutzwiller parameters, we find a very efficient way for performing that
minimization. The method can be used to optimize general Gutzwiller-type
wavefunctions both, in variational and in fixed-node diffusion Monte Carlo.
