quantax.optimizer.block_pinv_eig#

quantax.optimizer.block_pinv_eig(state: Variational, 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 layerwise least-square minimum-norm solver for the linear equation \(Ax=b\) using pseudo-inverse. See LayerSR or block QGT for details.

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:
  • state – The variational state, used to identify the parameter blocks.

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