Quantum Numbers Sectors
The ed_sector
represents a key part of the ED code. Here the
symmetry sectors construction essentially consist in the determination of the
injective map \({\cal M}:{\cal S}(\vec{Q})\rightarrow{\cal F}\)
relating the states of the sectors \(|i\rangle\in{\cal
S}(\vec{Q})\) to the corresponding ones \(|I\rangle\in{\cal F}\) in
the Fock space.
The map is constructed iterating over the states of the Fock spaces while verified the quantum number conditions. If verified for a given state \(|I\rangle\) a new state is found and it is added to the list. The following code snippet illustrates the case for a system conserving the total magnetization \(S_z=N_\uparrow-N_\downarrow\)
dim=0
! Iterate over down spin configurations
do idw=0,2**Ns-1
! use bit operation to get :math:`N_\downarrow`
ndw_= popcnt(idw)
! Iterate over up spin configurations
do iup=0,2**Ns-1
! use bit operation to get :math:`N_\uparrow`
nup_ = popcnt(iup)
! Get :math:`S_z=N_\uparrow-N_\downarrow`
sz_ = nup_ - ndw_
! if the evaluated magnetization is the required one:
! increase counter and store the Fock state into the map
if(sz_ == self%Sz)then
dim=dim+1
self%H(1)%map(dim) = iup + idw*2**Ns
endif
enddo
enddo
The dimension of the symmetry sector, i.e. the size of the map \({\cal M}(\vec{Q})\), is determined by a simple combinatorial algorithm (\(N\) being the total number of electronic levels):
Quantum Numbers |
Sector Dimension |
|
---|---|---|
|
\([\vec{N}_\uparrow,\vec{N}_\downarrow]\) |
\(\prod_{\alpha}\binom{N}{N_{\alpha\uparrow}}\binom{N}{N_{\alpha\downarrow}}\) |
|
\(S_z=N_\uparrow-N_\downarrow\) |
\(\sum_i 2^{N-S_z-2i}\binom{N}{N-S_z-2i}\binom{S_z+2i}{i}\) |
|
\(N_{tot}=N_\uparrow+N_\downarrow\) |
\(\binom{2N}{N_{tot}}\) |
Description
Contains procedures to construct the symmetry sectors corresponding to a given set of quantum numbers \(\vec{Q}\), in particular it allocated and build the sector_map
connecting the states of a given sector with the corresponding Fock ones.
Quick access
- Routines:
map_allocate()
,get_sector()
,get_quantumnumbers()
,build_sector()
,get_dim()
Used modules
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_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 Hamiltonian-
mpi
Subroutines and functions
- interface ed_sector/map_allocate(h, n)
Allocate the map(s) connecting the states in the symmetry sector to thos in the Fock space.
- Parameters:
h (various shapes) [sector_map]
n (various shapes) [integer]
- interface ed_sector/get_sector(qn, n, isector, twojz)
Returns the index of
isector
of the symmetry sector given the quantum numbersqn
- Parameters:
qn (various shapes) [integer]
n [integer]
isector [integer]
twojz [integer]
- interface ed_sector/get_quantumnumbers(isector, n, qn)
Returns the quantum numbers
qn
given the index ofisector
of the symmetry sector- Parameters:
isector [integer]
n [integer]
qn (various shapes) [integer]
- subroutine ed_sector/build_sector(isector, self)
This procedure build the sector
sector
\({\cal S}(\vec{Q})\) given the indexisector
which univocally determines the quantum numbers \(\vec{Q}\). All the components of the data structuresector
are determined here. Moreover the map connecting the states of the sector to thos in the Fock space is constructed. To avoid integer overflow the loop over Fock space states is decomposed in spin up and down integer so that \(I = I_\uparrow + 2^{N}I_\downarrow\).- Parameters:
isector [integer, in]
self [sector]
- subroutine ed_sector/get_dim(isector, dim)
Returns the dimension of the symmetry sector with index
isector
- Parameters:
isector [integer]
dim [integer]