xdiag

diagonal.xdiag(A, m=None, pdf='sphere', seed=None)

Estimates the diagonal of A using m / 2 matrix-vector multiplications.

Based originally on Program SM4.3, a MATLAB 2022b implementation for XDiag, by Ethan Epperly.