Esempio n. 1
0
g2_n_wb = 5

# Number of fermionic Matsubara frequencies for G^2 calculations
g2_n_wf = 5

# GF structure
gf_struct = {'up' : [0], 'dn' : [0]}

# Conversion from TRIQS to Pomerol notation for operator indices
index_converter = {}
index_converter.update({(sn, 0) : ("loc", 0, "down" if sn == "dn" else "up") for sn in spin_names})
index_converter.update({("B%i_%s" % (k, sn), 0) : ("bath" + str(k), 0, "down" if sn == "dn" else "up")
                        for k, sn in product(range(len(epsilon)), spin_names)})

# Make PomerolED solver object
ed = PomerolED(index_converter, verbose = True)

# Local Hamiltonian
H_loc = e_d*(n('up', 0) + n('dn', 0)) + h*(n('up', 0) - n('dn', 0))

# Bath Hamiltonian
H_bath = sum(eps*n("B%i_%s" % (k, sn), 0)
             for sn, (k, eps) in product(spin_names, enumerate(epsilon)))

# Hybridization Hamiltonian
H_hyb = Operator()
for k, v in enumerate(V):
    H_hyb += sum(        v   * c_dag("B%i_%s" % (k, sn), 0) * c(sn, 0) +
                 np.conj(v)  * c_dag(sn, 0) * c("B%i_%s" % (k, sn), 0)
                 for sn in spin_names)
Esempio n. 2
0
# Block index combinations for G^2 calculations
g2_blocks = set([("up", "up"), ("dn", "dn"), ("up", "dn")])

# GF structure
gf_struct = {'up': [0], 'dn': [0]}

# Conversion from TRIQS to Pomerol notation for operator indices
index_converter = {}
index_converter.update({(sn, 0): ("loc", 0, "down" if sn == "dn" else "up")
                        for sn in spin_names})
index_converter.update({("B%i_%s" % (k, sn), 0):
                        ("bath" + str(k), 0, "down" if sn == "dn" else "up")
                        for k, sn in product(range(len(epsilon)), spin_names)})

# Make PomerolED solver object
ed = PomerolED(index_converter, verbose=True)

# Number of particles on the impurity
H_loc = -mu * (n('up', 0) + n('dn', 0)) + U * n('up', 0) * n('dn', 0)

# Bath Hamiltonian
H_bath = sum(eps * n("B%i_%s" % (k, sn), 0)
             for sn, (k, eps) in product(spin_names, enumerate(epsilon)))

# Hybridization Hamiltonian
H_hyb = Operator()
for k, v in enumerate(V):
    H_hyb += sum(v * c_dag("B%i_%s" % (k, sn), 0) * c(sn, 0) +
                 np.conj(v) * c_dag(sn, 0) * c("B%i_%s" % (k, sn), 0)
                 for sn in spin_names)
Esempio n. 3
0
# Conversion from TRIQS to Pomerol notation for operator indices
# TRIQS: block_name, inner_index
# Pomerol: site_label, orbital_index, spin_name
index_converter = {}

# Local degrees of freedom
index_converter.update({(sn, 0): ("loc", 0, "down" if sn == "dn" else "up")
                        for sn in spin_names})
# Bath degrees of freedom
index_converter.update({("B%i_%s" % (k, sn), 0):
                        ("bath" + str(k), 0, "down" if sn == "dn" else "up")
                        for k, sn in product(range(len(epsilon)), spin_names)})

# Make PomerolED solver object
ed = PomerolED(index_converter, verbose=True)

# Number of particles on the impurity
H_loc = -mu * (n('up', 0) + n('dn', 0)) + U * n('up', 0) * n('dn', 0)

# Bath Hamiltonian
H_bath = sum(eps * n("B%i_%s" % (k, sn), 0)
             for sn, (k, eps) in product(spin_names, enumerate(epsilon)))

# Hybridization Hamiltonian
H_hyb = Operator()
for k, v in enumerate(V):
    H_hyb += sum(v * c_dag("B%i_%s" % (k, sn), 0) * c(sn, 0) +
                 np.conj(v) * c_dag(sn, 0) * c("B%i_%s" % (k, sn), 0)
                 for sn in spin_names)
Esempio n. 4
0
# Number of frequency points for real frequency GF calculation
n_w = 1000

# GF structure
gf_struct = {'up': [0], 'dn': [0]}

# Conversion from TRIQS to Pomerol notation for operator indices
index_converter = {}
index_converter.update({(sn, 0): ("loc", 0, "down" if sn == "dn" else "up")
                        for sn in spin_names})
index_converter.update({("B%i_%s" % (k, sn), 0):
                        ("bath" + str(k), 0, "down" if sn == "dn" else "up")
                        for k, sn in product(range(len(epsilon)), spin_names)})

# Make PomerolED solver object
ed = PomerolED(index_converter, verbose=True)

# Number of particles on the impurity
H_loc = -mu * (n('up', 0) + n('dn', 0)) + U * n('up', 0) * n('dn', 0)

# Bath Hamiltonian
H_bath = sum(eps * n("B%i_%s" % (k, sn), 0)
             for sn, (k, eps) in product(spin_names, enumerate(epsilon)))

# Hybridization Hamiltonian
H_hyb = Operator()
for k, v in enumerate(V):
    H_hyb += sum(v * c_dag("B%i_%s" % (k, sn), 0) * c(sn, 0) +
                 np.conj(v) * c_dag(sn, 0) * c("B%i_%s" % (k, sn), 0)
                 for sn in spin_names)
Esempio n. 5
0
def make_calc():

    # ------------------------------------------------------------------
    # -- Hubbard atom with two bath sites, Hamiltonian

    params = dict(
        beta=2.0,
        V1=2.0,
        V2=5.0,
        epsilon1=0.00,
        epsilon2=4.00,
        mu=2.0,
        U=5.0,
        ntau=40,
        niw=15,
    )

    # ------------------------------------------------------------------

    class Dummy():
        def __init__(self):
            pass

    d = Dummy()  # storage space
    d.params = params

    print '--> Solving SIAM with parameters'
    for key, value in params.items():
        print '%10s = %-10s' % (key, str(value))
        globals()[key] = value  # populate global namespace

    # ------------------------------------------------------------------

    up, do = 'up', 'dn'
    docc = c_dag(up, 0) * c(up, 0) * c_dag(do, 0) * c(do, 0)
    nA = c_dag(up, 0) * c(up, 0) + c_dag(do, 0) * c(do, 0)
    nB = c_dag(up, 1) * c(up, 1) + c_dag(do, 1) * c(do, 1)
    nC = c_dag(up, 2) * c(up, 2) + c_dag(do, 2) * c(do, 2)

    d.H = -mu * nA + epsilon1 * nB + epsilon2 * nC + U * docc + \
        V1 * (c_dag(up,0)*c(up,1) + c_dag(up,1)*c(up,0) + \
              c_dag(do,0)*c(do,1) + c_dag(do,1)*c(do,0) ) + \
        V2 * (c_dag(up,0)*c(up,2) + c_dag(up,2)*c(up,0) + \
              c_dag(do,0)*c(do,2) + c_dag(do,2)*c(do,0) )

    # ------------------------------------------------------------------
    # -- Exact diagonalization

    # Conversion from TRIQS to Pomerol notation for operator indices
    # TRIQS:   block_name, inner_index
    # Pomerol: site_label, orbital_index, spin_name
    index_converter = {
        (up, 0): ('loc', 0, 'up'),
        (do, 0): ('loc', 0, 'down'),
        (up, 1): ('loc', 1, 'up'),
        (do, 1): ('loc', 1, 'down'),
        (up, 2): ('loc', 2, 'up'),
        (do, 2): ('loc', 2, 'down'),
    }

    # -- Create Exact Diagonalization instance
    ed = PomerolED(index_converter, verbose=True)
    ed.diagonalize(d.H)  # -- Diagonalize H

    gf_struct = {up: [0], do: [0]}

    # -- Single-particle Green's functions
    G_iw = ed.G_iw(gf_struct, beta, n_iw=niw)
    G_tau = ed.G_tau(gf_struct, beta, n_tau=ntau)
    G_w = ed.G_w(gf_struct,
                 beta,
                 energy_window=(-2.5, 2.5),
                 n_w=100,
                 im_shift=0.01)

    d.G_iw = G_iw['up']
    d.G_tau = G_tau['up']
    d.G_w = G_w['up']

    # -- Particle-particle two-particle Matsubara frequency Green's function
    opt = dict(block_order='AABB',
               beta=beta,
               gf_struct=gf_struct,
               blocks=set([("up", "dn")]),
               n_iw=niw,
               n_inu=niw)

    G2_iw = ed.G2_iw_inu_inup(channel='AllFermionic', **opt)
    d.G2_iw = G2_iw['up', 'dn']

    G2_iw_pp = ed.G2_iw_inu_inup(channel='PP', **opt)
    d.G2_iw_pp = G2_iw_pp['up', 'dn']

    G2_iw_ph = ed.G2_iw_inu_inup(channel='PH', **opt)
    d.G2_iw_ph = G2_iw_ph['up', 'dn']

    # ------------------------------------------------------------------
    # -- Store to hdf5

    filename = 'data_pomerol.h5'
    with HDFArchive(filename, 'w') as res:
        for key, value in d.__dict__.items():
            res[key] = value
Esempio n. 6
0
g2_n_wf = 10
# Number of Legendre coefficients for G^2 calculations
# g2_n_l = 10

gf_struct = {"up": orb_names, "dn": orb_names}
print "Block structure of single-particle Green's functions:", gf_struct

# Conversion from TRIQS to Pomerol notation for operator indices
# TRIQS: block_name, inner_index
# Pomerol: site_label, orbital_index, spin_name
index_converter = {(sn, o): ("loc", o, "down" if sn == "dn" else "up")
                   for sn, o in product(spin_names, orb_names)}
print "index_converter:", index_converter

# Make PomerolED solver object
ed = PomerolED(index_converter, verbose=True)

# Number of particles on the impurity
N = sum(n(sn, o) for sn, o in product(spin_names, orb_names))

# Hamiltonian
H = h_int_kanamori(spin_names, orb_names,
                   np.array([[0, U - 3 * J], [U - 3 * J, 0]]),
                   np.array([[U, U - 2 * J], [U - 2 * J, U]]), J, True)
H -= mu * N

# Diagonalize H
ed.diagonalize(H)

# save data
ed.save_quantum_numbers("quantum_numbers.dat")
Esempio n. 7
0
# Number of fermionic Matsubara frequencies for G^2 calculations
g2_n_wf = 3

# GF structure
gf_struct = {'up': [0], 'dn': [0]}

# Conversion from TRIQS to Pomerol notation for operator indices
index_converter = {}
index_converter.update({(sn, 0): ("loc", 0, "down" if sn == "dn" else "up")
                        for sn in spin_names})
index_converter.update({("B%i_%s" % (k, sn), 0):
                        ("bath" + str(k), 0, "down" if sn == "dn" else "up")
                        for k, sn in product(range(len(epsilon)), spin_names)})

# Make PomerolED solver object
ed = PomerolED(index_converter, verbose=True)

# Number of particles on the impurity
H_loc = -mu * (n('up', 0) + n('dn', 0)) + U * n('up', 0) * n('dn', 0)

# Bath Hamiltonian
H_bath = sum(eps * n("B%i_%s" % (k, sn), 0)
             for sn, (k, eps) in product(spin_names, enumerate(epsilon)))

# Hybridization Hamiltonian
H_hyb = Operator()
for k, v in enumerate(V):
    H_hyb += sum(v * c_dag("B%i_%s" % (k, sn), 0) * c(sn, 0) +
                 np.conj(v) * c_dag(sn, 0) * c("B%i_%s" % (k, sn), 0)
                 for sn in spin_names)
Esempio n. 8
0
energy_window = (-5, 5)
# Number of frequency points for real frequency GF calculation
n_w = 1000

# GF structure
gf_struct = set_operator_structure(spin_names, orb_names, False)

mkind = get_mkind(False, None)
# Conversion from TRIQS to Pomerol notation for operator indices
index_converter = {
    mkind(sn, bn): ("atom", bi, "down" if sn == "dn" else "up")
    for sn, (bi, bn) in product(spin_names, enumerate(orb_names))
}

# Make PomerolED solver object
ed = PomerolED(index_converter, verbose=True)

# Hamiltonian
H = h_int_slater(spin_names, orb_names, U_mat, False)

# Number of particles
N = N_op(spin_names, orb_names, False)

# z-component of spin
Sz = S_op('z', spin_names, orb_names, False)

# z-component of angular momentum
Lz = L_op('z', spin_names, orb_names, off_diag=False, basis='spherical')

# Double check that we are actually using integrals of motion
h_comm = lambda op: H * op - op * H
Esempio n. 9
0
# Double check that we are actually using integrals of motion
h_comm = lambda op: H * op - op * H
str_if_commute = lambda op: "= 0" if h_comm(op).is_zero() else "!= 0"

print "Check integrals of motion:"
print "[H, N]", str_if_commute(N)
print "[H, Sz]", str_if_commute(Sz)
print "[H, Lz]", str_if_commute(Lz)
print "[H, Jz]", str_if_commute(Jz)

#####################
# Pomerol ED solver #
#####################

# Make PomerolED solver object
ed = PomerolED(index_converter, verbose=True)

# Diagonalize H
if ls_coupling == 0:
    ed.diagonalize(H, [N, Sz, Lz])
else:
    ed.diagonalize(H, [N, Jz])

# Do not split H into blocks (uncomment to generate reference data)
# ed.diagonalize(H, ignore_symmetries=True)

# ed.diagonalize(H)  # block diagonalize using N, Sz (default)
# ed.diagonalize(H, [N,])  # only N

# save data
ed.save_quantum_numbers("quantum_numbers.dat")