util.TDVP

class jVMC.util.tdvp.TDVP(sampler, snrTol=2, pinvTol=1e-14, pinvCutoff=1e-08, makeReal='imag', rhsPrefactor=1j, diagonalShift=0.0, crossValidation=False, diagonalizeOnDevice=True)

This class provides functionality to solve a time-dependent variational principle (TDVP).

With the force vector

\(F_k=\langle \mathcal O_{\theta_k}^* E_{loc}^{\theta}\rangle_c\)

and the quantum Fisher matrix

\(S_{k,k'} = \langle (\mathcal O_{\theta_k})^* \mathcal O_{\theta_{k'}}\rangle_c\)

and for real parameters \(\theta\in\mathbb R\), the TDVP equation reads

\(q\big[S_{k,k'}\big]\dot\theta_{k'} = -q\big[xF_k\big]\)

Here, either \(q=\text{Re}\) or \(q=\text{Im}\) and \(x=1\) for ground state search or \(x=i\) (the imaginary unit) for real time dynamics.

For ground state search a regularization controlled by a parameter \(\rho\) can be included by increasing the diagonal entries and solving

\(q\big[(1+\rho\delta_{k,k'})S_{k,k'}\big]\theta_{k'} = -q\big[F_k\big]\)

The TDVP class solves the TDVP equation by computing a pseudo-inverse of \(S\) via eigendecomposition yielding

\(S = V\Sigma V^\dagger\)

with a diagonal matrix \(\Sigma_{kk}=\sigma_k\) Assuming that \(\sigma_1\) is the smallest eigenvalue, the pseudo-inverse is constructed from the regularized inverted eigenvalues

\(\tilde\sigma_k^{-1}=\frac{1}{\Big(1+\big(\frac{\epsilon_{SVD}}{\sigma_j/\sigma_1}\big)^6\Big)\Big(1+\big(\frac{\epsilon_{SNR}}{\text{SNR}(\rho_k)}\big)^6\Big)}\)

with \(\text{SNR}(\rho_k)\) the signal-to-noise ratio of \(\rho_k=V_{k,k'}^{\dagger}F_{k'}\) (see [arXiv:1912.08828] for details).

Initializer arguments:
  • sampler: A sampler object.

  • snrTol: Regularization parameter \(\epsilon_{SNR}\), see above.

  • pinvTol: Regularization parameter \(\epsilon_{SVD}\) (see above) is chosen such that \(||S\dot\theta-F|| / ||F||<pinvTol\).

  • pinvCutoff: Lower bound for the regularization parameter \(\epsilon_{SVD}\), see above.

  • makeReal: Specifies the function \(q\), either ‘real’ for \(q=\text{Re}\) or ‘imag’ for \(q=\text{Im}\).

  • rhsPrefactor: Prefactor \(x\) of the right hand side, see above.

  • diagonalShift: Regularization parameter \(\rho\) for ground state search, see above.

  • crossValidation: Perform cross-validation check as introduced in [arXiv:2105.01054].

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

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

For given network parameters this function solves the TDVP equation.

This function returns \(\dot\theta=S^{-1}F\). Thereby an instance of the TDVP 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 TDVP equation, \(\dot\theta=S^{-1}F\).