Replica bath setup
Description
In these module we implement the functions to set the matrix basis \(\{ \hat{O}_i \}_{i=1,\dots,N_{sym}}\) and the initial variational parameters \(\vec{\lambda}\) used to decompose each local bath hamiltonian for the replica
and general
bath types. Note that the two bath types share the very same matrix basis, yet for consistency we provide distinct interfaces to the two for each procedure.
Quick access
- Routines:
allocate_hgeneral()
,allocate_hreplica()
,build_hgeneral()
,build_hreplica()
,deallocate_hgeneral()
,deallocate_hreplica()
,hgeneral_mask()
,hreplica_mask()
,print_hreplica()
,read_hgeneral()
,read_hreplica()
,save_hgeneral()
,save_hreplica()
,set_hgeneral()
,set_hreplica()
,set_hsym_hgeneral()
,set_hsym_hreplica()
,set_linit_hgeneral()
,set_linit_hreplica()
Used modules
ed_input_vars
: User-accessible input variablesed_vars_global
: Global variable accessible throughout the codeed_aux_funx
: Assortment of auxiliary procedures required throughout the codeed_bath_aux
: Auxiliary routines for bath creation and manipulation
External modules
Subroutines and functions
- interface ed_bath_replica/set_hreplica(hvec, lvec)
This function sets the matrix basis \(\{ \hat{O}_i \}_{i=1,\dots,N_{sym}}\) used to decompose the single bath hamiltonian \(h^p\). It also sets the initial values of the variational parameters \(\vec{\lambda}\) in the
replica
ath type.- Parameters:
hvec (various shapes) [complex] – [Nnambu*Nspin,Nnambu*Nspin,Norb,Norb,Nsym]
lvec (various shapes) [real] – [Nbath,Nsym]
- interface ed_bath_replica/allocate_hgeneral(nsym)
A clone of
allocate_hreplica
for theGENERAL
bath- Parameters:
nsym [integer] – Number of elements in the matrix decomposition
- interface ed_bath_replica/deallocate_hgeneral()
A clone of
deallocate_hreplica
for theGENERAL
bath
- interface ed_bath_replica/save_hgeneral(file)
A clone of
save_hreplica
for theGENERAL
bath- Parameters:
file [character(len=*)] – Name of the file to store
Hb
- interface ed_bath_replica/read_hgeneral(file)
A clone of
read_hreplica
for theGENERAL
bath- Parameters:
file [character(len=*)] – Name of the file to store
Hb
- interface ed_bath_replica/set_hgeneral(hvec, lvec)
A clone of
set_hreplica
for theGENERAL
bath- Parameters:
hvec (various shapes) [complex] – [Nnambu*Nspin,Nnambu*Nspin,Norb,Norb,Nsym]
lvec (various shapes) [real] – [Nbath,Nsym]
- interface ed_bath_replica/set_linit_hgeneral(lvec)
A clone of
set_linit_hreplica
for theGENERAL
bath- Parameters:
lvec (•, •) [real] – the input vector of bath parameters [Nsym,Nbath]
- interface ed_bath_replica/set_hsym_hgeneral(isym, hsym)
A clone of
set_hsym_hreplica
for theGENERAL
bath- Parameters:
isym [integer]
hsym (•, •, •, •) [complex] – [Nambu*Nspin,Nambu*Nspin,Norb,Norb]
- interface ed_bath_replica/build_hgeneral([lvec])
A clone of
build_hreplica
for theGENERAL
bath
- interface ed_bath_replica/hgeneral_mask([wdiag, uplo])
A clone of
hreplica_mask()
for theGENERAL
bath
- subroutine ed_bath_replica/allocate_hreplica(nsym)
Allocate global basis for
Hb
and the initial vector coefficient.- Parameters:
nsym [integer] – Number of elements in the matrix decomposition
- subroutine ed_bath_replica/deallocate_hreplica()
Deallocate the global
Hb
as well as the initial vector coefficient.
- subroutine ed_bath_replica/save_hreplica(file)
Save
Hb
to file.- Parameters:
file [character(len=*)] – Name of the file to store
Hb
- Use :
- subroutine ed_bath_replica/read_hreplica(file)
Read
Hb
from specified file.- Parameters:
file [character(len=*)] – Name of the file to store
Hb
- Use :
- subroutine ed_bath_replica/set_linit_hreplica(lvec)
This function is used to set the initial value of \(\lambda\) parameters in the bath Hamiltonian matrix decomposition
- Parameters:
lvec (•, •) [real] – the input vector of bath parameters [Nsym,Nbath]
- Use :
ed_input_vars
(nspin
,norb
,nbath
)
- subroutine ed_bath_replica/set_hsym_hreplica(isym, hsym)
This function is used to set a matrix element in the basis of the bath Hamiltonian matrix decomposition
- Parameters:
isym [integer]
hsym (•, •, •, •) [complex] – [Nambu*Nspin,Nambu*Nspin,Norb,Norb]
- Use :
ed_input_vars
(nspin
,norb
,nbath
)
- function ed_bath_replica/build_hreplica([lvec])
This function is used to reconstruct the local bath Hamiltonian from basis expansion given the vector of \(\vec{\lambda}\) parameters \(h^p=\sum_i \lambda^p_i O_i\). The resulting Hamiltonian has dimensions [
nspin
,nspin
,norb
,norb
]
- subroutine ed_bath_replica/print_hreplica(h[, file])
Prints the replica Hamiltonian to a file or to standard output
- function ed_bath_replica/hreplica_mask([wdiag, uplo])
Creates a logical matrix
Hmask
which isTrue
where the bath replica matrix is nonzero. Ifwdiag
isTrue
the major diagonal is set toTrue
- Ifuplo
isTrue
only the upper triangular part is kept, the rest is set toFalse