quantax.optimizer.auto_pinv_eig#
- quantax.optimizer.auto_pinv_eig(rtol: float | None = None, atol: float = 0.0, tol_snr: float = 0.0, dtype: str | type[Any] | dtype | SupportsDType | None = None) Callable[[...], Array]#
Obtain the least-square minimum-norm solver for the linear equation \(Ax=b\) using pseudo-inverse. It automatically chooses between \(x = (A^†A)^{-1} A^†b\) and \(x = A^†(A A^†)^{-1} b\), which respectively correspond to SR and MinSR.
- Parameters:
rtol – The relative tolerance for pseudo-inverse. Default to be \(10^{-12}\) for double precision and \(10^{-6}\) for single precision.
atol – The absolute tolerance for pseudo-inverse, default to 0.
tol_snr – The tolerence of signal-to-noise ratio (SNR), default to 0 which means no regularization based on SNR. For details see Phys. Rev. Lett. 125, 100503.
dtype – The dtype used internally in the solver. By default, real-valued inputs use float64 and complex-valued inputs use complex128.
- Returns:
A solver function with two arguments A and b and one output x as the solution of \(A x = b\).