Пример #1
0
def loop_bandwidth(drange, tp, beta, seed='mott gap'):
    """Solves IPT dimer and return Im Sigma_AA, Re Simga_AB

    returns list len(betarange) x 2 Sigma arrays
"""

    s = []
    g = []
    w = np.linspace(-6, 6, 2**13)
    dw = w[1] - w[0]
    gssi = gf.semi_circle_hiltrans(w + 5e-3j - tp - 1)
    gsai = gf.semi_circle_hiltrans(w + 5e-3j + tp + 1)
    nfp = gf.fermi_dist(w, beta)
    for D in drange:
        print('D/U: ', D, 'tp/U: ', tp, 'Beta', beta)
        (gss, gsa), (ss, sa) = ipt.dimer_dmft(1,
                                              tp,
                                              nfp,
                                              w,
                                              dw,
                                              gssi,
                                              gssi,
                                              conv=1e-2,
                                              t=(D / 2))
        g.append((gss, gsa))
        s.append((ss, sa))

    return np.array(g), np.array(s), w, nfp
Пример #2
0
def ss_dmft_loop(gloc, w, u_int, beta, conv):
    """DMFT Loop for the single band Hubbard Model at Half-Filling


    Parameters
    ----------
    gloc : complex 1D ndarray
        local Green's function to use as seed
    w : real 1D ndarray
        real frequency points
    u_int : float
        On site interaction, Hubbard U
    beta : float
        Inverse temperature
    conv : float
        convergence criteria

    Returns
    -------
    gloc : complex 1D ndarray
        DMFT iterated local Green's function
    sigma : complex 1D ndarray
        DMFT iterated self-energy

"""

    dw = w[1] - w[0]
    eta = 2j * dw
    nf = gf.fermi_dist(w, beta)

    converged = False
    while not converged:

        gloc_old = gloc.copy()
        # Self-consistency
        g0 = 1 / (w + eta - .25 * gloc)
        # Spectral-function of Weiss field
        A0 = -g0.imag / np.pi

        # Second order diagram
        isi = ph_hf_sigma(A0, nf, u_int) * dw * dw
        isi = 0.5 * (isi + isi[::-1])

        # Kramers-Kronig relation, uses Fourier Transform to speed convolution
        hsi = -signal.hilbert(isi, len(isi) * 4)[:len(isi)].imag
        sigma = hsi + 1j * isi

        # Semi-circle Hilbert Transform
        gloc = gf.semi_circle_hiltrans(w - sigma)
        converged = np.allclose(gloc, gloc_old, atol=conv)

    return gloc, sigma
Пример #3
0
def optical_cond(ss, sa, tp, w, beta):
    E = np.linspace(-1, 1, 61)
    dos = np.exp(-2 * E**2) / np.sqrt(np.pi / 2)
    de = E[1] - E[0]
    dosde = (dos * de).reshape(-1, 1)
    nf = gf.fermi_dist(w, beta)

    lat_Aa = (-1 / np.add.outer(-E, w + tp - sa)).imag / np.pi
    lat_As = (-1 / np.add.outer(-E, w - tp - ss)).imag / np.pi

    a = optical_conductivity(lat_Aa, lat_Aa, nf, w, dosde)
    b = optical_conductivity(lat_As, lat_As, nf, w, dosde)
    c = optical_conductivity(lat_Aa, lat_As, nf, w, dosde)
    d = optical_conductivity(lat_As, lat_Aa, nf, w, dosde)

    return np.sum((a, b, c, d), axis=0)
Пример #4
0
def optical_conductivity(beta, ss, sa, omega, tp, eps_k, eta=4e-2, crop=True):
    """Calculate the contributions to the optical_conductivity in the dimer

    Parameters
    ----------
    beta : float - Inverse Temperature
    ss : 1D complex ndarray - SYM real-freq self-energy
    sa : 1D complex ndarray - ASYM real-freq self-energy
    omega : 1D float ndarray - real frequency grid (equispaced)
    tp : float - Dimer Hybridization
    eps_k : 1D float ndarray - Energy level bandwidth (equispaced)
    eta : float - broadening for A(eps_k, w)
    crop : bool - Return only positive frequencies

    Returns
    -------
    intra_band : Intra band Optical response
    inter_band : Inter band Optical response
    """

    nfp = gf.fermi_dist(omega, beta)
    pos_freq = omega > 0
    rho = np.exp(-2 * eps_k**2) / np.sqrt(np.pi / 2)
    de = eps_k[1] - eps_k[0]
    rhode = (rho * de).reshape(-1, 1)

    def lat_gf(eps_k, w_sig):
        return 1 / np.add.outer(-eps_k, w_sig)

    lat_As = -lat_gf(eps_k, omega - tp - ss + eta * 1j).imag / np.pi
    lat_Aa = -lat_gf(eps_k, omega + tp - sa + eta * 1j).imag / np.pi

    intra_band = opt_sig(lat_Aa, lat_Aa, nfp, omega, rhode)
    intra_band += opt_sig(lat_As, lat_As, nfp, omega, rhode)
    inter_band = opt_sig(lat_Aa, lat_As, nfp, omega, rhode)
    inter_band += opt_sig(lat_As, lat_Aa, nfp, omega, rhode)

    if crop:
        intra_band = intra_band[pos_freq]
        inter_band = inter_band[pos_freq]

    return intra_band, inter_band
def plot_optical_cond(sigma_iw, ur, tp, w_n, w, w_set, beta, seed):
    nuv = w[w > 0]
    zerofreq = len(nuv)
    dw = w[1] - w[0]
    E = np.linspace(-1, 1, 61)
    dos = np.exp(-2 * E**2) / np.sqrt(np.pi / 2)
    de = E[1] - E[0]
    dosde = (dos * de).reshape(-1, 1)
    nf = gf.fermi_dist(w, beta)
    eta = 0.8

    for U, (sig_d, sig_o) in zip(ur, sigma_iw):
        ss, sa = dimer.pade_diag(sig_d, sig_o, w_n, w_set, w)

        lat_Aa = (-1 / np.add.outer(-E, w + tp + 4e-2j - sa)).imag / np.pi
        lat_As = (-1 / np.add.outer(-E, w - tp + 4e-2j - ss)).imag / np.pi
        #lat_Aa = .5 * (lat_Aa + lat_As)
        #lat_As = lat_Aa

        a = optical_conductivity(lat_Aa, lat_Aa, nf, w, dosde)
        a += optical_conductivity(lat_As, lat_As, nf, w, dosde)
        b = optical_conductivity(lat_Aa, lat_As, nf, w, dosde)
        b += optical_conductivity(lat_As, lat_Aa, nf, w, dosde)

        #b *= tp**2 * eta**2 / 2 / .25

        sigma_E_sum_a = .5 * a[w > 0]
        plt.plot(nuv, sigma_E_sum_a, 'k--')
        sigma_E_sum_i = .5 * b[w > 0]
        plt.plot(nuv, sigma_E_sum_i, 'k:')
        sigma_E_sum = .5 * (a + b)[w > 0]
        plt.plot(nuv, sigma_E_sum)

        # To save data manually at some point
        np.savez('opt_cond{}'.format(seed), nuv=nuv, sigma_E_sum=sigma_E_sum)

        return sigma_E_sum_a, sigma_E_sum_i, sigma_E_sum, nuv
Пример #6
0
import numpy as np
import matplotlib.pylab as plt

from dmft.ipt_imag import dmft_loop
from dmft.common import greenF, tau_wn_setup, pade_continuation, fermi_dist
from dmft.utils import optical_conductivity

U = 2.7
BETA = 100.
tau, w_n = tau_wn_setup(dict(BETA=BETA, N_MATSUBARA=2**9))
omega = np.linspace(-4, 4, 600)
eps_k = np.linspace(-1, 1, 61)
dos = np.exp(-2 * eps_k**2) / np.sqrt(np.pi / 2)
de = eps_k[1] - eps_k[0]
dosde = (dos * de).reshape(-1, 1)
nf = fermi_dist(omega, BETA)

###############################################################################
# Insulator Calculations
# ----------------------

ig_iwn, is_iwn = dmft_loop(U,
                           0.5,
                           -1.j / (w_n - 1 / w_n),
                           w_n,
                           tau,
                           conv=1e-12)
igw = pade_continuation(ig_iwn, w_n, omega, np.arange(100))
isigma_w = pade_continuation(is_iwn, w_n, omega, np.arange(100))
lat_gf = 1 / (np.add.outer(-eps_k, omega + 4e-2j) - isigma_w)
lat_Aw = -lat_gf.imag / np.pi

def low_en_qp(ss):
    glp = np.array([0.])
    sigtck = splrep(w, ss.real, s=0)
    sig_0 = splev(glp, sigtck, der=0)[0]
    dw_sig0 = splev(glp, sigtck, der=1)[0]
    quas_z = 1 / (1 - dw_sig0)
    return quas_z, sig_0, dw_sig0


w = np.linspace(-4, 4, 2**12)
dw = w[1] - w[0]

BETA = 512.
nfp = gf.fermi_dist(w, BETA)


def plot_low_energy(u_int, tp):
    gss = gf.semi_circle_hiltrans(w + 5e-3j)
    gsa = gf.semi_circle_hiltrans(w + 5e-3j)

    (gss, _), (ss, _) = ipt_real.dimer_dmft(u_int,
                                            tp,
                                            nfp,
                                            w,
                                            dw,
                                            gss,
                                            gsa,
                                            conv=1e-3)
Пример #8
0
# author: Óscar Nájera

from __future__ import division, absolute_import, print_function

import numpy as np
import matplotlib.pyplot as plt

import dmft.common as gf
import dmft.ipt_real as ipt

w = np.linspace(-4, 4, 2**12)
dw = w[1] - w[0]

beta = 800.
nfp = gf.fermi_dist(w, beta)
###############################################################################
# The :math:`t_\perp/D=0.3` scenario
# ==================================
#

tp = 0.3
gss = gf.semi_circle_hiltrans(w + 5e-3j - tp)
gsa = gf.semi_circle_hiltrans(w + 5e-3j + tp)
urange = np.arange(0.2, 3.3, 0.3)
urange = [0.2, 1., 2., 3., 3.47, 3.5]
plt.close('all')
for i, U in enumerate(urange):
    (gss, gsa), (ss, sa) = ipt.dimer_dmft(U,
                                          tp,
                                          nfp,