qrisp.lanczos.regularize_S_H#
- regularize_S_H(S: ArrayLike, H_mat: ArrayLike, cutoff: float = 0.01) Tuple['ArrayLike', 'ArrayLike', 'ArrayLike'][source]#
Regularize the overlap matrix \(\mathbf{S}\) by retaining only eigenvectors with sufficiently large eigenvalues and project the Hamiltonian matrix \(\mathbf{H}\) accordingly.
This function applies a spectral cutoff: only directions in the Krylov subspace with eigenvalues above
cutoff * max_eigenvalueare kept. Both the overlap matrix (\(\mathbf{S}\)) and the Hamiltonian matrix (\(\mathbf{H}\)) are projected onto this reduced subspace, ensuring numerical stability for subsequent generalized eigenvalue calculations. The regularized matrices are caculated as \(\tilde{S} = V^TSV\) and \(\tilde{H}=V^THV\) for a projection matrix \(V\).- Parameters:
- SArrayLike, shape (D, D)
The overlap matrix.
- H_matArrayLike, shape (D, D)
The Hamiltonian matrix.
- cutofffloat
Eigenvalue threshold for regularizing \(\mathbf{S}\).
- Returns:
- S_regArrayLike, shape (D, D)
The regularized overlap matrix.
- H_regArrayLike, shape (D, D)
The regularized Hamiltonian matrix in Krylov subspace.
- VArrayLike, shape (D, D)
The projection matrix.