def plot_spectral(u_int, tp, BETA, seed, w, w_set, pole, sty, ax):

    siw_d, siw_o, w_n = ipt_u_tp(u_int, tp, BETA, seed)
    ss, _ = dimer.pade_diag(siw_d, siw_o, w_n, w_set, w)
    gst = gf.semi_circle_hiltrans(w - tp - (ss.real - 1j * np.abs(ss.imag)))

    plot_pole_eq(w, gst, ss, pole, sty, ax)
def calculate_Aw(sig_d, sig_o, w_n, w_set, w, eps_k, tp):
    ss, sa = dimer.pade_diag(1j * sig_d.imag, sig_o.real, w_n, w_set, w)

    lat_gfs = 1 / np.add.outer(-eps_k, w - tp + 7e-3j - ss)
    lat_gfa = 1 / np.add.outer(-eps_k, w + tp + 7e-3j - sa)
    Aw = -.5 * (lat_gfa + lat_gfs).imag / np.pi

    return Aw, ss, sa
Example #3
0
def plot_dispersions(giw_s, sigma_iw, ur, tp, w_n, w, w_set):

    for U, (giw_d, giw_o), (sig_d, sig_o) in zip(ur, giw_s, sigma_iw):
        gs, ga = dimer.pade_diag(giw_d, giw_o, w_n, w_set, w)
        ss, sa = dimer.pade_diag(sig_d, sig_o, w_n, w_set, w)
        gst = gf.semi_circle_hiltrans(w - tp -
                                      (ss.real - 1j * np.abs(ss.imag)))

        lat_gfs = 1 / np.add.outer(-eps_k, w - tp + 5e-3j - ss)
        lat_gfa = 1 / np.add.outer(-eps_k, w + tp + 5e-3j - sa)
        #Aw = np.clip(-.5 * (lat_gfa + lat_gfs).imag / np.pi, 0, 2)

        Aw = np.clip(-lat_gfs.imag / np.pi, 0, 2)

        title = r'IPT lattice dimer $U={}$, $t_\perp={}$, $\beta={}$'.format(
            U, tp, BETA)
        ax = plot_greenfunct(w, gs, title, r'$G$')
        plot_greenfunct(w, gst, title, r'$G$', ax)
        plot_greenfunct(w, 1 / (w - tp - .25 * gst), title, r'$G0$', ax)
        ax = plot_greenfunct(w, ss, title, r'$\Sigma$')

        plot_pole_eq(w, gst, ss, title)
        plot_band_dispersion(w, Aw, title, eps_k)
Example #4
0
def estimate_gap_U_vs_tp(tpr, u_range, beta, phase):
    w_n = gf.matsubara_freq(beta, max(2**ceil(log(6 * beta) / log(2)), 256))

    gaps = []
    for tp in tpr:
        filestr = 'disk/phase_Dimer_ipt_{}_B{}/tp{:.3}/giw.npy'.format(
            phase, beta, tp)
        gfs = np.load(filestr)

        for i, u_int in enumerate(u_range):
            gf_aa, gf_ab = 1j * gfs[i][0], gfs[i][1]
            gr_ss, gr_sa = dimer.pade_diag(
                gf_aa, gf_ab, w_n, np.arange(0, beta + 100, 9, dtype=np.int),
                w)
            gloc = (gr_ss + gr_sa) / 2

            gaps.append(measure_gap(gloc, rw))
            #plt.plot(w, -gloc.imag + i * 0.1)
            #plt.plot(gaps[-1] / 2, i * 0.1, 'o')

    gaps = np.array(gaps).reshape(len(tpr), len(u_range)).T

    return gaps
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
Example #6
0
tau, w_n = gf.tau_wn_setup(dict(BETA=BETA, N_MATSUBARA=2**12))
nfp = gf.fermi_dist(w, BETA)

U, tp = 3.4, 0.3

# Matsubara
giw_d, giw_o = dimer.gf_met(w_n, 0., tp, 0.5, 0.)
giw_d, giw_o, _ = dimer.ipt_dmft_loop(BETA, U, tp, giw_d, giw_o, tau, w_n,
                                      5e-4)
g0iw_d, g0iw_o = dimer.self_consistency(1j * w_n, 1j * giw_d.imag, giw_o.real,
                                        0., tp, 0.25)
siw_d, siw_o = ipt_imag.dimer_sigma(U, tp, g0iw_d, g0iw_o, tau, w_n)

# Continuate sigma with Padé
w_set = np.array([0, 3] + list(range(5, 761, 7)))
ss, _ = dimer.pade_diag(1j * siw_d.imag, siw_o.real, w_n, w_set, w + 0.0005j)

###############################################################################
# Low Energy in Sigma matsubara
# -----------------------------

fig, ax = plt.subplots(2, 1, sharex=True)
plot_spectral(w, tp, ss, ax, (-7, 5), zero_f_meas_mat(siw_d, siw_o))
# ax[1].set_title('Low Energy Matsubara sigma + Padé Sigma for plot')
# fig.savefig('IPT_comp_mat_lowe.pdf')

###############################################################################
# Low Energy in continuated sigma
# -------------------------------

fig, ax = plt.subplots(2, 1, sharex=True)