  We study randomized matrix-free quadrature algorithms for spectrum and
spectral sum approximation. The algorithms studied are characterized by the use
of a Krylov subspace method to approximate independent and identically
distributed samples of $\mathbf{v}^{\mathsf{H}} f(\mathbf{A}) \mathbf{v}$,
where $\mathbf{v}$ is an isotropic random vector, $\mathbf{A}$ is a Hermitian
matrix, and $f(\mathbf{A})$ is a matrix function. This class of algorithms
includes the kernel polynomial method and stochastic Lanczos quadrature, two
widely used methods for approximating spectra and spectral sums. Our analysis,
discussion, and numerical examples provide a unified framework for
understanding randomized matrix-free quadrature algorithms and sheds light on
the commonalities and tradeoffs between them. Moreover, this framework provides
new insights into the practical implementation and use of these algorithms,
particularly with regards to parameter selection in the kernel polynomial
method.

Numerical Analysis;Data Structures and Algorithms;Numerical Analysis