Input / Output Functions
These functions pass to the userspace the observables and response functions calculated and stored within the EDIpack2 library.
- edipy2.global_env.get_dens(ilat=None, iorb=None)[source]
This function returns the value of the charge density
- Parameters:
- Returns:
the full charge density tensor has dimensions [
Nlat
,Norb]. Depending on which keyword arguments are (or not) provided, this is sliced on the corresponding axis.- Return type:
float or np.array(dtype=float)
- edipy2.global_env.get_docc(ilat=None, iorb=None)[source]
This function returns the value of the double occupation
- Parameters:
- Returns:
the full double-occupation tensor has dimensions [
Nlat
,Norb]. Depending on which keyword arguments are (or not) provided, this is sliced on the corresponding axis.- Return type:
float or np.array(dtype=float)
- edipy2.global_env.get_eimp(ilat=None, ikind=None)[source]
This function returns the value of the local energy components
- Parameters:
ilat (int) – if the case of real-space DMFT, if only the Green’s function of a specific inequivalent site is needed, this can be specified.
ikind (int) –
index of the component. It is
1
: ed_Epot: the potential energy from interaction2
: ed_Eint: ed-Epot - ed_Ehartree (? it is not assigned)3
: ed_Ehartree: Hartree part of interaction energy4
: ed_Eknot: on-site part of the kinetic term
- Returns:
the full local energy tensor has dimensions [
Nlat
,4]. Depending on which keyword arguments are (or not) provided, this is sliced on the corresponding axis.- Return type:
float or np.array(dtype=float)
- edipy2.global_env.get_mag(icomp=None, ilat=None, iorb=None)[source]
This function returns the value of the magnetization
- Parameters:
icomp (str) – the component of the magnetization,
"x"
,"y"
or"z"
(default).ilat (int) – if the case of real-space DMFT, if only the Green’s function of a specific inequivalent site is needed, this can be specified.
iorb (int) – the orbital index. If none is provided, the whole density vector is returned
- Returns:
the full magnetization tensor has dimensions [
Nlat
,3,Norb]. Depending on which keyword arguments are (or not) provided, this is sliced on the corresponding axis.- Return type:
float or np.array(dtype=float)
- edipy2.global_env.get_phi(ilat=None, iorb=None, jorb=None)[source]
This function returns the value of the superconductive order parameter \(\phi = \langle c_{\uparrow} c_{\downarrow} \rangle\)
- edipy2.global_env.get_gimp(ilat=None, ishape=None, axis='m', typ='n', zeta=None)[source]
This function generates the impurity Green’s function for a user-chosen set of frequencies in the complex plane
- Parameters:
ilat (int) – if the case of real-space DMFT, if only the self-energy of a specific inequivalent site is needed, this can be specified.
ishape (int) –
this variable determines the shape of the returned array. Possible values:
None
: the same shape asHloc
plus one axis for frequency3
: in the single-impurity case, it will return an array of the shape [Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,len(zeta)
]. In the real-space DMFT case, it will return an array of the shape [Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, ValueError is returned.4
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,len(zeta)
. :code:`Nlat will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.5
: in the single-impurity case, it will return an array of the shape [Nspin
,Nspin
,Norb
,Norb
,len(zeta)
].6
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
,Nspin
,Norb
,Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.
axis (str) – if
zeta
is not provided, return the self-energy on the Matsubara or Real axis with parameters set in the input file. Can bem
for Matsubara(default) orr
for real.typ (str) – whether to return the normal or anomalous self-energy (for the superconducting case). Can be
n
for normal (default) ora
for anomalous.zeta (complex or [complex] or np.array(dtype=complex)) – user-defined array of frequencies in the whole complex plane. If none is provided, according to
axis
the Matsubara or real axis is chosen
- Raises:
ValueError – If
ishape
is incompatible wothilat
or not in the previous list.ValueError – If
axis
is not in the previous list.
- Returns:
An array of floats that contains the impurity Green’s function along the specific axis, with dimension set by
ishape
andzeta
, if present.- Return type:
np.array(dtype=float)
- edipy2.global_env.get_sigma(ilat=None, ishape=None, axis='m', typ='n', zeta=None)[source]
This function generates the self-energy for a user-chosen set of frequencies in the complex plane
- Parameters:
ilat (int) – if the case of real-space DMFT, if only the self-energy of a specific inequivalent site is needed, this can be specified.
ishape (int) –
this variable determines the shape of the returned array. Possible values:
None
: the same shape asHloc
plus one axis for frequency3
: in the single-impurity case, it will return an array of the shape [Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,len(zeta)
]. In the real-space DMFT case, it will return an array of the shape [Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,Nlat
\(\cdot\)Nspin
\(\cdot\)Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, ValueError is returned.4
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
\(\cdot\)Norb
,Nspin
\(\cdot\)Norb
,len(zeta)
. :code:`Nlat will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.5
: in the single-impurity case, it will return an array of the shape [Nspin
,Nspin
,Norb
,Norb
,len(zeta)
].6
: in the real-space DMFT case, it will return an array of the shape [Nlat
,Nspin
,Nspin
,Norb
,Norb
,len(zeta)
].Nlat
will be determined from the module by assessing the shape of Hloc. Ifilat
is set, the output will have one dimension less.
axis (str) – if
zeta
is not provided, return the self-energy on the Matsubara or Real axis with parameters set in the input file. Can bem
for Matsubara(default) orr
for real.typ (str) – whether to return the normal or anomalous self-energy (for the superconducting case). Can be
n
for normal (default) ora
for anomalous.zeta (complex or [complex] or np.array(dtype=complex)) – user-defined array of frequencies in the whole complex plane. If none is provided, according to
axis
the Matsubara or real axis is chosen
- Raises:
ValueError – If
ishape
is incompatible wothilat
or not in the previous list.ValueError – If
axis
is not in the previous list.
- Returns:
An array of floats that contains the self-energy along the specific axis, with dimension set by
ishape
andzeta
, if present.- Return type:
np.array(dtype=float)
- edipy2.global_env.get_g0and(zeta, bath, ishape=None, typ='n')[source]
This function calculates the value of the Anderson Impurity Model’s noninteracting Green’s function on a given frequency array.
- Parameters:
zeta (complex) – the array of frequencies (only frequencies on the real and imaginary axes are supported)
bath (float) – the user-accessible bath array
ishape (int) –
this variable determines the shape of the returned array. Possible values:
typ (str) – whether to return the normal or anomalous Green’s function (for the superconducting case). Can be
n
for normal ora
for anomalous.
- Raises:
ValueError – If
zeta
is not completely real or completely imaginaryValueError – If
ishape
is not 3 or 5.
- Returns:
An array of complex that contains \(G^{And}_{0}(z)\) function along the specific frequency array, with dimension set by
ishape
andzeta
.- Return type:
np.array(dtype=complex)
- edipy2.global_env.get_delta(zeta, bath, ishape=None, typ='n')[source]
This function calculates the value of the Anderson Impurity Model’s hybridization function on a given frequency array.
- Parameters:
zeta (complex) – the array of frequencies (only frequencies on the real and imaginary axes are supported)
bath (float) – the user-accessible bath array
ishape (int) –
this variable determines the shape of the returned array. Possible values:
typ (str) – whether to return the normal or anomalous Green’s function (for the superconducting case). Can be
n
for normal ora
for anomalous.
- Raises:
ValueError – If
zeta
is not completely real or completely imaginaryValueError – If
ishape
is not 3 or 5.
- Returns:
An array of complex that contains \(\Delta(z)\) along the specific frequency array, with dimension set by
ishape
andzeta
.- Return type:
np.array(dtype=complex)
- edipy2.global_env.get_chi(chan='spin', zeta=None, axis=None, ilat=None)[source]
This function calculates the value of the Anderson Impurity Model’s response functions \(\chi\) in the spin, density, pairing and exciton channels.
- Parameters:
chan (str) – the channel of the response function. Possible values are
spin
(s
),dens
(c
),pair
(p
),exct
(e
). Default isspin
.zeta (complex) – the array of frequencies or times (only frequencies on the real imaginary axes and imaginary times are supported). If no array is provided, depending on the value of
axis
, an array will be generated on the positive Matsubara axis (Lmats
values ), on the real axis (Lreal
values between0
andwfin
) or on the imaginary time axis (Ltau
values between 0 andbeta
)axis (str) – the axis on which to calculate \(\chi\). Possible values
matsubara
(m
),real
(r
),time
(t
). This parameter has to be specificed.ilat (int) – for real-space DMFT, if this flag is specified only the susceptibility for the relative inequivalent atom is returned specified.
- Raises:
ValueError – If
ed_mode
is notnormal
ValueError – If
axis
not provided or invalidValueError – If
chan
is invalid
- Returns:
An array of complex that contains \(\chi\) along the chosen axis. The dimension of the array depends on the chosen channel:
[
3
,Norb
,Norb
,len(zeta)
] for channelexct
, corresponding to singlet, triplet(xy) and triplet(z)
One dimension corresponding to the number of inequivalent sites is added at the beginning for the case of real-space DMFT and if ilat is None.
- Return type:
np.array(dtype=complex)