neuralqx.optimizer.solvers.types module

class SolverConfig

Bases: object

class ConjugateGradient(name='Conjugate Gradient')

Bases: SolverConfig

Use Conjugate Gradient iteration to solve Ax = b.

name: str = 'Conjugate Gradient'
class PseudoInverseSmooth(name='Pseudo-Inverse Smooth Solver')

Bases: SolverConfig

NetKet Doc:

Solve the linear system by building a pseudo-inverse from the eigendecomposition obtained from jax.numpy.linalg.eigh().

The eigenvalues \(\lambda_i\) smaller than \(r_\textrm{cond} \lambda_\textrm{max}\) are truncated (where \(\lambda_\textrm{max}\) is the largest eigenvalue).

The eigenvalues are further smoothed with another filter, originally introduced in Medvidovic, Sels arXiv:2212.11289 (2022), given by the following equation

\[\tilde\lambda_i^{-1}=\frac{\lambda_i^{-1}}{1+\big(\epsilon\frac{\lambda_\textrm{max}}{\lambda_i}\big)^6}\]
name: str = 'Pseudo-Inverse Smooth Solver'
class PseudoInverse(name='Pseudo-Inverse Solver')

Bases: SolverConfig

Solve the linear system using jax’s implementation of the pseudo-inverse.

name: str = 'Pseudo-Inverse Solver'
class SingularValueDecomposition(name='Singular Value Decomposition')

Bases: SolverConfig

Solve the linear system using Singular Value Decomposition.

name: str = 'Singular Value Decomposition'
class Cholesky(name='Cholesky')

Bases: SolverConfig

Solve the linear system using a Cholesky Factorisation.

name: str = 'Cholesky'
class LU(name='LU')

Bases: SolverConfig

Solve the linear system using a LU Factorisation.

name: str = 'LU'
class DefaultSolver(name='Default Solver')

Bases: SolverConfig

Solve the linear system. Internally uses jax.numpy.solve().

name: str = 'Default Solver'