Template Class nrgcore¶
Defined in File nrgcore.hpp
Class Documentation¶
-
template<typename im_type, typename bath_type>
class nrgcore¶ We use this class solve the NRG problem of a bath and an Impurity. This class take two template parameter one for the impurity and one for the bath. The bath and impurity are the should have the same quantum number.
The bath and impurity Hamiltonian is diagonalized in the block basis of the quantum numbers. These eigenvales are zero for a metallic bath and non-zero for a superconductor bath.
We assume that the impurity and bath are connected by a few interactions terms.
\[ H_{inter} = \sum_{i} (\lambda_i a_{i}^{\dagger}b_{i} + h.c ) \]where \( a_{i}^{\dagger} \) is the creation operator of the impurity and \( b_{i}^{\dagger} \) is the creation operator of the bath. The \( \lambda_i \) are the coupling constants.The number of operator for the bath and impurity should be the same. If this is the case (i.e., Anderson Model) then we can pass the impurity class and bath class to the nrgcore class as a template parameter. If this is not the case (i.e., Kondo Model )then we create the impurity class out of the impurity site and the first Wilson site. Then we pass this combined impurity class and bath class to the nrgcore class.
- Template Parameters:
im_type – Type of Impurity class.
bath_type – Type of bath class.
- Param im_hamilt:
Impurity class Hamiltonian.
- Param bt_hamilt:
Bath class Hamiltonian.
- Return:
[TODO:return]
Public Functions
-
inline nrgcore(im_type &im_hamilt, bath_type &bt_hamilt)¶
[TODO:description]
- Parameters:
im_hamilt – [TODO:parameter]
bt_hamilt – [TODO:parameter]
-
inline void add_bath_site(const std::vector<double> &thopping, double rescale)¶
This function is called to add a bath site. This is done for each iteration of the simulation. This function create a full Hamiltonian from the impurity and bath class and diagonalize it. The eigenvalues are stored in eigenvaluesQ.
- Parameters:
thopping – This a array for the \f \lambda_i \f
rescale – This is the rescaling factor \f \sqrt{\Lambda} \f
-
inline void update_internal_state()¶
This function is called to discard the higher energy state and update some the internal state of the nrgcore class. This function should be called after add_bath_site. If we need to update some bath or impurity operators (i.e., f_dag_operator) then we should call this function after the update is done.
-
inline void test()¶
[TODO: We have added few basic test for the impurity and bath class here.]
-
inline void create_next_hamiltonians(const std::vector<double> &t_hopping, double rescale)¶
-
inline void create_next_basis()¶
-
inline void discard_higher_energies()¶
-
inline void set_parameters(size_t n = 1024)¶
Set the maximum numbers of states to be kept states. The actual number of states is determined by adding few more degenarete states.
- Parameters:
n – maximum number of states to be kept
-
inline std::vector<std::vector<int>> get_basis_nQ()¶
Get the current Basis vector.
- Returns:
std::vector<std::vector<int>>
-
inline std::vector<std::vector<double>> get_eigenvaluesQ()¶
This function returns the eigenvalues of the Hamiltonian in the current basis.
- Returns:
std::vector<std::vector<double>>
-
inline auto get_f_dag_operator()¶
Returns the \f f^{\dagger} \f operator in the current basis current wilson site. This
qOperator
is used to construct the Hamiltonian for the next iteration.- Returns:
std::vector<qOperator>
-
inline bool checkHigherEnergyDiscarded()¶
Check whether any states are discarded in the current iteration.
- Returns:
bool
Public Members
-
std::vector<double> all_eigenvalue¶
-
std::vector<double> relativeGroundStateEnergy¶
-
std::vector<std::vector<size_t>> eigenvaluesQ_kept_indices¶
-
std::vector<std::vector<int>> current_sysmQ¶
-
std::vector<std::vector<int>> pre_sysmQ¶
-
std::vector<std::vector<double>> eigenvaluesQ¶
-
std::vector<std::vector<size_t>> coupled_nQ_index¶
-
int nrg_iterations_cnt = {}¶
-
int nrg_iterations_min = {}¶
-
std::vector<std::vector<double>> bath_eigenvaluesQ¶
-
std::vector<std::vector<int>> nq_bath¶