Template Class Hamiltonian

Inheritance Relationships

Derived Types

Class Documentation

template<typename HilbertField>
class Hamiltonian

Subclassed by Hamiltonian_CSR< HilbertField >, Hamiltonian_Dense< HilbertField >, Hamiltonian_Eigen< HilbertField >, Hamiltonian_Factorized< HilbertField >, Hamiltonian_OnTheFly< HilbertField >, Hamiltonian_Operator< HilbertField >

Public Functions

inline Hamiltonian()
inline virtual ~Hamiltonian()
inline virtual void mult_add(vector<HilbertField> &x, vector<HilbertField> &y)
inline virtual void diag(vector<double> &d)
virtual double GS_energy()

Applies the Lanczos algorithm for the lowest energy.

Common with Hamiltonian in CSR and Factorized format.

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.

Common with Hamiltonian in CSR and Factorized format. 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

inline virtual void print(ostream &fout)
virtual Q_matrix<HilbertField> build_Q_matrix(vector<vector<HilbertField>> &phi)

Constructs the Q_matrix (Lehmann representation) from the band Lanczos method, or full diagonalization if the dimension is small enough.

Parameters:

phi – the initial vectors

Public Members

void *H_ptr
size_t dim

dimension of the HS sector on which the Hamiltonian acts

sector sec

sector of the HS on which the Hamiltonian acts

shared_ptr<ED_mixed_basis> B

pointer to basis of the space on which the Hamiltonian is defined

shared_ptr<model> the_model

backtrace to the cluster model