quantax.optimizer.lstsq_pinv_eig#

quantax.optimizer.lstsq_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]#

The SR branch of auto_pinv_eig, computing \(x = (A^† A)^{-1} A^† b\) via the pseudo-inverse of \(A^† A\) from its eigendecomposition. Suitable for overdetermined problems where the number of samples exceeds the number of parameters.

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\).