Template Class Hamiltonian_Dense¶
Defined in File Hamiltonian_Dense.hpp
Inheritance Relationships¶
Base Type¶
public Hamiltonian< HilbertField >(Template Class Hamiltonian)
Class Documentation¶
-
template<typename HilbertField>
class Hamiltonian_Dense : public Hamiltonian<HilbertField>¶ Public Functions
constructor
-
virtual void mult_add(vector<HilbertField> &x, vector<HilbertField> &y)¶
Applies the Hamiltonian: y = y +H.x.
- Parameters:
y – vector to which H.x is added to
x – input vector
-
virtual void diag(vector<double> &d)¶
provides the diagonal d of H Used by the Davidson method
- Parameters:
d – the diagonal of H (pre-allocated)
-
virtual double GS_energy()¶
Momber function for dense Hamiltionain that use LAPACK routine to find the lowest energy.
- Parameters:
alpha – : first diagonal of the tridiagonal representation (returned by reference)
beta – : second diagonal of the tridiagonal representation (returned by reference) returns the GS energy.
-
virtual vector<shared_ptr<state<HilbertField>>> states(double &GS_energy)¶
Applies the Lanczos or Davidson-Liu algorithm for the lowest-energy states and energies.
returns a vector of pointers to states, to be treated by the parent model_instance.
- Parameters:
GS_energy – : current ground-state energy of the model_instance, to be updated
-
virtual void print(ostream &fout)¶
Prints the dense form of the Hamiltonian Mostly for debugging purposes on very small systems.
-
matrix<HilbertField> dense_form()¶
Puts a dense form of the Hamiltonian matrix in the matrix H_dense Mostly for debugging purposes, but also for small dimensions.
-
virtual Q_matrix<HilbertField> build_Q_matrix(vector<vector<HilbertField>> &phi)¶
Constructs the Q_matrix (Lehmann representation) from full diagonalization.
- Parameters:
phi – the initial vectors
Public Members
-
matrix<HilbertField> H_dense¶
dense form of the Hamiltonian (used when the dimension is small)