Exact Diagonalization
How Exact Diagonalization/Arpack/Lanczos is performed
Quick access
- Routines:
Used modules
-
-
-
sf_stat
sf_sp_linalg
ed_input_vars
: Contains all global input variables which can be set by the user through the input file. A specific preocedureed_read_input()
should be called to read the input file usingparse_input_variable()
procedure from SciFortran. All variables are automatically set to a default, looked for and updated by reading into the file and, sequentially looked for and updated from command line (std.input) using the notation variable_name=variable_value(s) (case independent).ed_vars_global
: Contains all variables, arrays and derived types instances shared throughout the code. Specifically, it contains definitions of theeffective_bath
, thegfmatrix
and thesector
data structures.ed_eigenspace
: A class implementing a data structure to efficiently store the low part of the Fock space spectrum, automatically spreading and retrieving the eigenstates among/from MPI threads.ed_aux_funx
: Hosts a number of auxiliary procedures required in different parts of the code. Specifically, it implements: creation/annihilation fermionic operators, binary decomposition of integer representation of Fock states and setup the local impurity Hamiltonianed_setup
: Contains procedures to set up the Exact Diagonalization calculation, executing all internal consistency checks and allocation of the global memory.ed_sector
: Contains procedures to construct the symmetry sectors corresponding to a given set of quantum numbers \(\vec{Q}\), in particular it allocated and build thesector_map
connecting the states of a given sector with the corresponding Fock ones.
Subroutines and functions
- subroutine ed_diag_superc/diagonalize_impurity_superc()
This procedure performs the diagonalization of the Hamiltonian in each symmetry sector for
ed_mode
=superc
, i.e. for quantum number \(\vec{Q}=S_{z}\).The diagonalization proceeds in three steps.
Setup the diagonalization of selected sectors only if the file
sectorfile
exists.Perform a cycle over all the symmetry sectors \({\cal S}(\vec{Q})\)
Decide if the sector should be diagonalized, i.e. if this is a twin sector and
ed_twin
is True.Setup the Arpack/Lanczos parameters
neigen
,nblock
,nitermax
Construct the sector Hamiltonian and/or just associate the correct matrix-vector product in
build_hv_sector_normal
call
sp_eigh
(Arpack) orsp_lanc_eigh
(Lanczos) oreigh
(Lapack) according to the dimension of the sector and the value oflanc_method
Retrieve the eigen-states and save them to
state_list
Analyze the
state_list
, find the overall groundstate \(|\psi_0\rangle\) , trim the list using thecutoff
\(\epsilon\) to that \(e^{-\beta E_{max}} < \epsilon\) , create an histogram of the states requested to each sector and use it to increase or decrease those number according to the contribution of each sector to the spectrum.