util.MinSR

class jVMC.util.minsr.MinSR(sampler, pinvTol=1e-14, diagonalShift=0.0, diagonalizeOnDevice=True)

This class provides functionality for energy minimization via MinSR.

See [arXiv:2302.01941] for details.

Initializer arguments:
  • sampler: A sampler object.

  • pinvTol: Regularization parameter \(\epsilon_{SVD}\), see above.

  • diagonalSchift: Regularization parameter \(\lambda\), see below.

  • diagonalizeOnDevice: Choose whether to diagonalize \(S\) on GPU or CPU.

__call__(netParameters, t, *, psi, hamiltonian, **rhsArgs)

For given network parameters computes an update step using the MinSR method.

This function returns \(\dot\theta=\bar O^\dagger (\bar O\bar O^\dagger + \lambda\mathbb{I})^{-1}\bar E_{loc}\) (see [arXiv:2302.01941] for details). Thereby an instance of the MinSR class is a suited callable for the right hand side of an ODE to be used in combination with the integration schemes implemented in jVMC.stepper. Alternatively, the interface matches the scipy ODE solvers as well.

Arguments:
  • netParameters: Parameters of the NQS.

  • t: Current time.

  • psi: NQS ansatz. Instance of jVMC.vqs.NQS.

  • hamiltonian: Hamiltonian operator, i.e., an instance of a derived class of jVMC.operator.Operator. Notice: Current time t is by default passed as argument when computing matrix elements.

Further optional keyword arguments:
  • numSamples: Number of samples to be used by MC sampler.

  • outp: An instance of jVMC.OutputManager. If outp is given, timings of the individual steps are recorded using the OutputManger.

  • intStep: Integration step number of multi step method like Runge-Kutta. This information is used to store quantities like energy or residuals at the initial integration step.

Returns:

The solution of the MinSR equation, \(\dot\theta=\bar O^\dagger (\bar O\bar O^\dagger)^{-1}\bar E_{loc}\).

solve(eloc, gradients, holomorphic)

Uses the techique proposed in arXiv:2302.01941 to compute the updates. Efficient only if number of samples \(\ll\) number of parameters.