netket.optimizer.solver.pinv#
- netket.optimizer.solver.pinv(A, b, rcond=1e-12, x0=None)[source]#
Solve the linear system using jax’s implementation of the pseudo-inverse.
Internally it calls
pinv()
which uses asvd()
decomposition with the same value of rcond.Note
In general, we found that our custom implementation of the pseudo-inverse
netket.optimizer.solver.pinv_smooth()
(which internally uses hermitian diagonaliation) outperform jax’spinv()
.For that reason, we suggest to use
pinv_smooth()
instead ofpinv
.The diagonal shift on the matrix can be 0 and the rcond variable can be used to truncate small eigenvalues.
- Parameters:
A – the matrix A in Ax=b
b – the vector b in Ax=b
rcond – The condition number