Template Class Hamiltonian¶
Defined in File Hamiltonian_base.hpp
Inheritance Relationships¶
Derived Types¶
public Hamiltonian_CSR< HilbertField >(Template Class Hamiltonian_CSR)public Hamiltonian_Dense< HilbertField >(Template Class Hamiltonian_Dense)public Hamiltonian_Eigen< HilbertField >(Template Class Hamiltonian_Eigen)public Hamiltonian_Factorized< HilbertField >(Template Class Hamiltonian_Factorized)public Hamiltonian_OnTheFly< HilbertField >(Template Class Hamiltonian_OnTheFly)public Hamiltonian_Operator< HilbertField >(Template Class Hamiltonian_Operator)
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
-
inline Hamiltonian()¶