コード例 #1
0
p = {}
p["n_warmup_cycles"] = 10000  # Number of warmup cycles to equilibrate
p["n_cycles"] = 100000  # Number of measurements
p["length_cycle"] = 500  # Number of MC steps between consecutive measures
p["move_double"] = True  # Use four-operator moves

# Block structure of Green's functions
# gf_struct = {'up':[0,1,2,3,4], 'down':[0,1,2,3,4]}
# This can be computed using the TRIQS function as follows:
gf_struct = op.set_operator_structure(spin_names, orb_names, off_diag=off_diag)

# Construct the 4-index U matrix U_{ijkl}
# The spherically-symmetric U matrix is parametrised by the radial integrals
# F_0, F_2, F_4, which are related to U and J. We use the functions provided
# in the TRIQS library to construct this easily:
U_mat = op.U_matrix(l=l, U_int=U, J_hund=J, basis='spherical')

# Set the interacting part of the local Hamiltonian
# Here we use the full rotationally-invariant interaction parametrised
# by the 4-index tensor U_{ijkl}.
# The TRIQS library provides a function to build this Hamiltonian from the U tensor:
H = op.h_int_slater(spin_names, orb_names, U_mat, off_diag=off_diag)

# Construct the solver
S = Solver(beta=beta, gf_struct=gf_struct)

# Set the hybridization function and G0_iw for the Bethe lattice
delta_iw = GfImFreq(indices=[0], beta=beta)
delta_iw << (half_bandwidth / 2.0)**2 * SemiCircular(half_bandwidth)
for name, g0 in S.G0_iw:
    g0 << inverse(iOmega_n + mu - delta_iw)
コード例 #2
0
#!/usr/bin/env python

import h5py
import numpy as np

# We use pytriqs package for coulomb matrix calculation
import pytriqs.operators.util as U_matrix

# Coulomb matrix
U = np.real(U_matrix.U_matrix(2, U_int=6.6, J_hund=0.9, basis='cubic'))
# Chemical potential
xmu = 44.44

# Impurity energies
Eps0 = np.array([[-0.70, -0.70], [-0.8, -0.8], [-0.50, -0.50], [-0.8, -0.8],
                 [-0.70, -0.70]])
# Hybridization between impurity and bath
Vk = [
    np.array([[0.56434, 0.56434], [0.68392, 0.68392], [0.29519, 0.29519]]),
    np.array([[0.81892, 0.81892], [0.99136, 0.99136]]),
    np.array([[0.77347, 0.77347], [0.79785, 0.79785]]),
    np.array([[0.81892, 0.81892], [0.99136, 0.99136]]),
    np.array([[0.56434, 0.56434], [0.68392, 0.68392], [0.29519, 0.29519]])
]
# Bath energies
Epsk = [
    np.array([[-2.37325, -2.37325], [-0.87328, -0.87328], [2.01265, 2.01265]]),
    np.array([[-3.15496, -3.15496], [-1.69066, -1.69066]]),
    np.array([[-5.59842, -5.59842], [-2.95325, -2.95325]]),
    np.array([[-3.15496, -3.15496], [-1.69066, -1.69066]]),
    np.array([[-2.37325, -2.37325], [-0.87328, -0.87328], [2.01265, 2.01265]])