GeneralizedDavidsonSolver

class GeneralizedDavidsonSolver(absolute_tolerance=None, relative_tolerance=None, maximum_number_of_restarts=None, initialization_method=None)

Iterative eigensolver that uses a blocked generalized Davidson algorithm to improve on an initial guess for the eigenstates of the Hamiltonian.

Parameters:
  • absolute_tolerance (float) – The absolute tolerance up to which the residuals have to be converged for the algorithm to end.

  • relative_tolerance (float) – The amount the residual of the states has to be reduced compared to the residual of the initial guess. The reduction factor must be between 0.0 and 1.0.
    Default: 0.3

  • maximum_number_of_restarts (int) – The maximum number of restarts in the Davidson algorithm. Must be a positive integer.
    Default: 0

  • initialization_method (RandomBlochWaveInitialization | BasisSetInitialization) – The method used to obtain the initial states for the Generalized Davidson algorithm, see Initialization methods.
    Default: BasisSetInitialization()

absoluteTolerance()
Returns:

The absolute tolerance up to which the residuals have to be converged for the algorithm to end.

Return type:

float

initializationMethod()
Returns:

The method used to obtain the initial states for the residual minimizer.

Return type:

RandomBlochWaveInitialization | BasisSetInitialization

maximumNumberOfRestarts()
Returns:

The maximum number of restarts in the Davidson algorithm.

Return type:

int

relativeTolerance()
Returns:

The amount the residual of the states has to be reduced compared to the residual of the initial guess.

Return type:

float

uniqueString()

Return a unique string representing the state of the object.

Usage Example

Define a density matrix method that uses the default GeneralizedDavidsonSolver:

algorithm_parameters = AlgorithmParameters(
   density_matrix_method=GeneralizedDavidsonSolver())

A more robust eigensolver can be defined by tightening the tolerances and increasing the maximum_number_of_restarts.

density_matrix_method = GeneralizedDavidsonSolver(
    relative_tolerance=0.001,
    absolute_tolerance=1.0e-7,
    maximum_number_of_restarts=4)

algorithm_parameters = AlgorithmParameters(
   density_matrix_method=density_matrix_method)

A different initial guess for the states can be chosen by setting the initialization_method:

density_matrix_method = GeneralizedDavidsonSolver(
    initialization_method=RandomBlochWaveInitialization(),
)

algorithm_parameters = AlgorithmParameters(
    density_matrix_method=density_matrix_method)

Notes

Algorithm

The class implements the blocked generalized Davidson algorithm [1], [2]. It is the default eigensolver for plane wave calculations.

One can increase the stability of the algorithm by lowering the relative_factor, which determines how much the residual of the current guess for the eigenstates has to be reduced in this SCF step. One can also use the absolute_tolerance keyword, which determines how small the norm of the residuals of the wave functions need to be. At the same time one should increase the maximum_number_of_restarts, which determines how many restarts are allowed. When a restart is performed, a new generalized Davidson optimization is started with the current best guess for the eigenstates as starting vectors.