Input / Output Functions

These functions pass to the userspace the observables and response functions calculated and stored within the EDIpack2 library.

edipy2.global_env.build_gimp(zeta, ilat=None, ishape=None, typ='n')

This function generates the Green’s function for a user-chosen set of frequencies in the complex plane

Parameters:
  • zeta (complex or [complex] or np.array(dtype=complex)) – user-defined array of frequencies in the whole complex plane.

  • 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.

  • ishape (int) –

    this variable determines the shape of the returned array. Possible values:

    • None: the same shape as Hloc plus one axis for frequency

    • 3: 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. If ilat 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) ]. Nlat will be determined from the module by assessing the shape of Hloc. If ilat 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. If ilat is set, the output will have one dimension less.

  • typ (str) – whether to return the normal or anomalous Green’s function (for the superconducting case). Can be n for normal or a for anomalous.

Raises:
  • ValueError – If ishape is incompatible woth ilat or not in the previous list.

  • ValueError – If axis is not in the previous list.

Returns:

An array of floats that contains the Green’s function along the specific axis, with dimension set by ishape and zeta.

Return type:

np.array(dtype=float)

edipy2.global_env.build_sigma(zeta, ilat=None, ishape=None, typ='n')

This function generates the self-energy for a user-chosen set of frequencies in the complex plane

Parameters:
  • zeta (complex or [complex] or np.array(dtype=complex)) – user-defined array of frequencies in the whole complex plane.

  • 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 as Hloc plus one axis for frequency

    • 3: 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. If ilat 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. If ilat 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. If ilat is set, the output will have one dimension less.

  • typ (str) – whether to return the normal or anomalous self-energy (for the superconducting case). Can be n for normal or a for anomalous.

Raises:
  • ValueError – If ishape is incompatible woth ilat 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 and zeta.

Return type:

np.array(dtype=float)

edipy2.global_env.get_dens(ilat=None, iorb=None)

This function returns the value of the charge density

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.

  • iorb (int) – the orbital index. If none is provided, the whole density vector is returned

Returns:

the full charge density tensor has dimensions [ Nlat ,Norb]. Depending on which keyworod 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)

This function returns the value of the double occupation

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.

  • iorb (int) – the orbital index. If none is provided, the whole density vector is returned

Returns:

the full double-occupation tensor has dimensions [ Nlat ,Norb]. Depending on which keyworod 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)

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 interaction

    • 2: ed_Eint: ed-Epot - ed_Ehartree (? it is not assigned)

    • 3: ed_Ehartree: Hartree part of interaction energy

    • 4: ed_Eknot: on-site part of the kinetic term

Returns:

the full local energy tensor has dimensions [ Nlat ,4]. Depending on which keyworod 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)

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 keyworod arguments are (or not) provided, this is sliced on the corresponding axis.

Return type:

float or np.array(dtype=float)

edipy2.global_env.get_gimp(ilat=None, ishape=None, axis='m', typ='n')

This function gets from the EDIpack2 library the value of the Green’s function calculated on the Matsubara or real-frequency axis, with parameters specified in the input file.

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.

  • ishape (int) –

    this variable determines the shape of the returned array. Possible values:

    • None: the same shape as Hloc plus one axis for frequency

    • 3: in the single-impurity case, it will return an array of the shape [ Nspin \(\cdot\) Norb , Nspin \(\cdot\) Norb , Lmats / Lreal ]. In the real-space DMFT case, it will return an array of the shape [ Nlat \(\cdot\) Nspin \(\cdot\) Norb , Nlat \(\cdot\) Nspin \(\cdot\) Norb , Lmats / Lreal ]. Nlat will be determined from the module by assessing the shape of Hloc. If ilat 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 , Lmats / Lreal ]. Nlat will be determined from the module by assessing the shape of Hloc. If ilat 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 , Lmats / Lreal ].

    • 6: in the real-space DMFT case, it will return an array of the shape [ Nlat , Nspin , Nspin , Norb , Norb , Lmats / Lreal ]. Nlat will be determined from the module by assessing the shape of Hloc. If ilat is set, the output will have one dimension less.

  • axis (str) – the axis along which to return the Green’s functio. Can be m for Matsubara or r for real. In the first case, the number of frequencies will be given by ed.Lmats, in the second by ed.Lreal.

  • typ (str) – whether to return the normal or anomalous Green’s function (for the superconducting case). Can be n for normal or a for anomalous.

Raises:
  • ValueError – If ishape is incompatible woth ilat or not in the previous list.

  • ValueError – If axis is not in the previous list.

Returns:

An array of floats that contains the Green’s function along the specific axis, with dimension set by ishape and axis.

Return type:

np.array(dtype=float)

edipy2.global_env.get_sigma(ilat=None, ishape=None, axis='m', typ='n')

This function gets from the EDIpack2 library the value of the self-energy calculated on the Matsubara or real-frequency axis, with parameters specified in the input file.

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 as Hloc plus one axis for frequency

    • 3: in the single-impurity case, it will return an array of the shape [ Nspin \(\cdot\) Norb , Nspin \(\cdot\) Norb , Nfrequencies=ed.Lmats/ed.Lreal]. In the real-space DMFT case, it will return an array of the shape [ Nlat \(\cdot\) Nspin \(\cdot\) Norb , Nlat \(\cdot\) Nspin \(\cdot\) Norb , Lmats / Lreal ]. Nlat will be determined from the module by assessing the shape of Hloc. If ilat 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 , Lmats / Lreal ]. Nlat will be determined from the module by assessing the shape of Hloc. If ilat 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 , Lmats / Lreal ].

    • 6: in the real-space DMFT case, it will return an array of the shape [ Nlat , Nspin , Nspin , Norb , Norb , Lmats / Lreal ]. Nlat will be determined from the module by assessing the shape of Hloc. If ilat is set, the output will have one dimension less.

  • axis (str) – the axis along which to return the self-energy. Can be m for Matsubara or r for real. In the first case, the number of frequencies will be given by ed.Lmats, in the second by ed.Lreal.

  • typ (str) – whether to return the normal or anomalous self-energy (for the superconducting case). Can be n for normal or a for anomalous.

Raises:
  • ValueError – If ishape is incompatible woth ilat 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 and axis.

Return type:

np.array(dtype=float)