davidson_solver¶

psi4.driver.p4util.davidson_solver(engine, guess, *, nroot, r_convergence=0.0001, max_ss_size=100, maxiter=60, verbose=1)[source]

Solves for the lowest few eigenvalues and eigenvectors of a large problem emulated through an engine.

If the large matrix A has dimension {NxN} and N is very large, and only a small number of roots, k are desired this algorithm is preferable to standard methods as uses on the order of N * k memory. One only needs to have the ability to compute the product of a times a vector.

For non-hermitan A the basis of the algorithm breaks down. However in practice, for strongly diagonally-dominant A such as the similarity-transformed Hamiltonian in EOM-CC this algorithm is commonly still used.

Parameters:
Return type:
Returns:

• best_values (numpy.ndarray) – (nroots, ) The best approximation of the eigenvalues of A, computed on the last iteration of the solver

• best_vectors (List[vector]) – (nroots) The best approximation of the eigenvectors of A, computed on the last iteration of the solver

• stats (List[Dict]) – Statistics collected on each iteration

• count : int, iteration number

• res_norm : np.ndarray (nroots, ), the norm of residual vector for each roots

• val : np.ndarray (nroots, ), the eigenvalue corresponding to each root

• delta_val : np.ndarray (nroots, ), the change in eigenvalue from the last iteration to this ones

• collapse : bool, if a subspace collapse was performed

• product_count : int, the running total of product evaluations that was performed

• done : bool, if all roots were converged

Notes

The solution vector is normalized to 1/2

The solver will return even when maxiter iterations are performed without convergence. The caller must check stats[-1]['done'] for failure and handle each case accordingly.