qrisp.lanczos.build_S_H_from_Tk#
- build_S_H_from_Tk(expvals: ArrayLike) Tuple['ArrayLike', 'ArrayLike'][source]#
Construct the overlap matrix \(\mathbf{S}\) and the Krylov Hamiltonian matrix \(\mathbf{H}\) from Chebyshev polynomial expectation values.
Using Chebyshev recurrence relations, this function generates the matrix elements for both the overlap matrix (\(\mathbf{S}\)) and the Hamiltonian matrix (\(\mathbf{H}\)) in the Krylov subspace. The approach follows Equations (17) and (19) in Exact and efficient Lanczos method on a quantum computer.
- Parameters:
- expvalsArrayLike, shape (2D,)
The expectation values \(\langle T_k(H)\rangle_0\) for each Chebyshev polynomial order \(k\).
- Returns:
- SArrayLike, shape (D, D)
The (Gram) matrix \(\mathbf{S}\) for Krylov states.
- H_matArrayLike, shape (D, D)
The Hamiltonian matrix \(\mathbf{H}\) in Krylov subspace.