quantax.optimizer.minnorm_shift_eig#
- quantax.optimizer.minnorm_shift_eig(rshift: float | None = None, ashift: float = 1e-06, dtype: str | type[Any] | dtype | SupportsDType | None = <class 'jax.numpy.float64'>) Callable[[...], Array]#
The MinSR branch of
auto_shift_eig, computing \(x = A^†(A A^†+ \epsilon I)^{-1} b\) by directly forming the shifted matrix and solving it with a Cholesky solver. Suitable for underdetermined problems where the number of parameters exceeds the number of samples.- Parameters:
rshift – The relative diagonal shift, entering the shift as \(\epsilon = \mathrm{Tr}(A A^†) \times \mathrm{rshift} / \sqrt{d} + \mathrm{ashift}\), with \(d\) the smaller one of the numbers of rows and columns of \(A\), i.e. the number of samples for an underdetermined problem. Default to \(10^{-12}\) for double precision and \(10^{-6}\) for single precision.
ashift – The absolute diagonal shift, default to 1e-6.
dtype – The dtype used internally in the solver, default to float64. Complex inputs use the complex counterpart, e.g. complex128 for float64.
Nonekeeps the dtype of the inputs.
- Returns:
A solver function with two arguments A and b and one output x as the solution of \(A x = b\).