quantax.optimizer.auto_pinv_eig#

quantax.optimizer.auto_pinv_eig(rtol: float | None = None, atol: float = 0.0, tol_snr: float = 0.0) Callable#

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 this paper.

Returns:

A solver function with two arguments A and b and one output x as the solution of \(A x = b\).