Hermitian¶
Kernel Polynomial Method¶
The kernel polynomial method is an algorithm to obtain an approximation for the spectral density of a Hermitian matrix. This algorithm combines expansion in polynomials of Chebyshev [1], the stochastic trace [2] and a kernel smothing techinique in order to obtain the approximation for the spectral density
Applications¶
- Hamiltonian matrices associated with quantum mechanics
- Laplacian matrix associated with a graph
- Magnetic Laplacian associated with directed graphs
- etc
References
[1] Wang, L.W., 1994. Calculating the density of states and optical-absorption spectra of large quantum systems by the plane-wave moments method. Physical Review B, 49(15), p.10154.
[2] Hutchinson, M.F., 1990. A stochastic estimator of the trace of the influence matrix for laplacian smoothing splines. Communications in Statistics-Simulation and Computation, 19(2), pp.433-450.
-
emate.hermitian.kpm.
pykpm
(H, num_moments=10, num_vecs=10, extra_points=2, precision=32, lmin=None, lmax=None, epsilon=0.01, device='/gpu:0', swap_memory_while=False)¶ Kernel Polynomial Method using a Jackson’s kernel.
Parameters: - H (scipy sparse matrix) – The Hermitian matrix
- num_moments (int) –
- num_vecs (int) – Number of random vectors in oder to aproximate the trace
- extra_points (int) –
- precision (int) – Single or double precision
- limin (float, optional) – The smallest eigenvalue
- lmax (float) – The highest eigenvalue
- epsilon (float) – Used to rescale the matrix eigenvalues into the interval [-1, 1]
- device (str) – ‘/gpu:ID’ or ‘/cpu:ID’
Returns: - ek (array of floats) – An array with num_moments + extra_points approximated “eigenvalues”
- rho (array of floats) – An array containing the densities of each “eigenvalue”
-
emate.hermitian.kpm.
cupykpm
(H, num_moments=10, num_vecs=10, extra_points=12, precision=32, lmin=None, lmax=None, epsilon=0.01)[source]¶ Kernel Polynomial Method using a Jackson’s kernel. CUPY version
Parameters: - H (scipy CSR sparse matrix) – The Hermitian matrix
- num_moments (int) –
- num_vecs (int) – Number of random vectors in oder to aproximate the trace
- extra_points (int) –
- precision (int) – Single or double precision
- limin (float, optional) – The smallest eigenvalue
- lmax (float) – The highest eigenvalue
- epsilon (float) – Used to rescale the matrix eigenvalues into the interval [-1, 1]
Returns: - ek (array of floats) – An array with num_moments + extra_points approximated “eigenvalues”
- rho (array of floats) – An array containing the densities of each “eigenvalue”
-
emate.hermitian.kpm.
tfkpm
(H, num_moments=10, num_vecs=10, extra_points=2, precision=32, lmin=None, lmax=None, epsilon=0.01, device='/gpu:0', swap_memory_while=False)[source]¶ Kernel Polynomial Method using a Jackson’s kernel.
Parameters: - H (scipy sparse matrix) – The Hermitian matrix
- num_moments (int) –
- num_vecs (int) – Number of random vectors in oder to aproximate the trace
- extra_points (int) –
- precision (int) – Single or double precision
- limin (float, optional) – The smallest eigenvalue
- lmax (float) – The highest eigenvalue
- epsilon (float) – Used to rescale the matrix eigenvalues into the interval [-1, 1]
- device (str) – ‘/gpu:ID’ or ‘/cpu:ID’
Returns: - ek (array of floats) – An array with num_moments + extra_points approximated “eigenvalues”
- rho (array of floats) – An array containing the densities of each “eigenvalue”