Exemplo n.º 1
0
def exitation_ration(U, tp):

    h_h2, oper = dimer.hamiltonian_diag(U, 0, tp)
    _, eig_vecs = LA.eigh(h_h2.todense())

    basis_create = np.dot(eig_vecs.T, oper[0].T.dot(eig_vecs))
    tmat = np.square(basis_create)

    return tmat[:, 0].sum() / tmat[0, :].sum()
Exemplo n.º 2
0
def test_hamiltonian_eigen_energies(u_int, mu, tp):
    """Test local basis and diagonal basis isolated dimer Hamiltonians
       have same energy spectrum"""
    h_loc, _ = dimer.hamiltonian(u_int, mu, tp)
    h_dia, _ = dimer.hamiltonian_diag(u_int, mu, tp)

    eig_e_loc, _ = op.diagonalize(h_loc.todense())
    eig_e_dia, _ = op.diagonalize(h_dia.todense())

    assert np.allclose(eig_e_loc, eig_e_dia)
Exemplo n.º 3
0
def plot_A_ev_utp(beta, urange, mu, tprange):
    w = np.linspace(-2, 3.5, 1500) + 1j * 1e-2
    Aw = []
    for u_int, tp in zip(urange, tprange):
        h_at, oper = dimer.hamiltonian_diag(u_int, mu, tp)
        eig_e, eig_v = op.diagonalize(h_at.todense())
        gf = op.gf_lehmann(eig_e, eig_v, oper[0].T, beta, w)
        aw = gf.imag / gf.imag.min()
        Aw.append(aw)
    return np.array(Aw)
Exemplo n.º 4
0
def plot_eigen_spectra(U, mu, tp):
    h_at, oper = dimer.hamiltonian_diag(U, mu, tp)
    eig_e = []
    eig_e.append(LA.eigvalsh(h_at[1:5, 1:5].todense()))
    eig_e.append(LA.eigvalsh(h_at[5:11, 5:11].todense()))
    eig_e.append(LA.eigvalsh(h_at[11:15, 11:15].todense()))

    plt.figure()
    plt.title('Many particle Energy Spectra U={} $t_\perp={}$'.format(U, tp))
    plt.plot(np.concatenate(eig_e), "o-")
    plt.ylabel('Energy')
    plt.xlabel('Eigenstate by N particle block')

    plt.axvline(x=3.5)
    plt.axvline(x=9.5)
Exemplo n.º 5
0
def molecule_sigma_d(omega, U, mu, tp, beta):
    """Return molecule self-energy in the given frequency axis"""

    h_at, oper = dimer.hamiltonian_diag(U, mu, tp)
    oper_pair = [[oper[0], oper[0]], [oper[1], oper[1]]]

    eig_e, eig_v = op.diagonalize(h_at.todense())
    gfsU = np.array([
        op.gf_lehmann(eig_e, eig_v, c.T, beta, omega, d) for c, d in oper_pair
    ])

    plt.plot(omega.real, -(gfsU[1]).imag, label='Anti-Bond')
    plt.plot(omega.real, -(gfsU[0]).imag, label='Bond')
    plt.xlabel(r'$\omega$')
    plt.ylabel(r'$A(\omega)$')
    plt.title(r'Isolated dimer $U={}$, $t_\perp={}$, $\beta={}$'.format(
        U, tp, beta))
    plt.legend(loc=0)

    return [omega + tp - 1 / gfsU[0], omega - tp - 1 / gfsU[1]]
Exemplo n.º 6
0
# In the next section I study the distribution of states in the
# molecule. How they relate to the shape of the Hamiltonian and the
# density matrix.
#
# First I start in the low temperature regime where the ground state
# dominates the behavior of the system. Taking :math:`\beta=200` and
# :math:`U=2.15,t_\perp=0.3` the Hamiltonian of the system and the
# density matrix look as follow.

basis_names = [r'AS\uparrow', r'S\uparrow', 'AS\downarrow', 'S\downarrow']
ind = np.array([0, 1, 2, 4, 8, 5, 10, 6, 9, 12, 3, 7, 11, 13, 14, 15])
chartlab = [r'$' + ket(i, basis_names) + r'$' for i in ind]

beta = 100

h_at, oper = dimer.hamiltonian_diag(2.15, 0, .3)
ev, evec = LA.eigh(h_at.todense())
Z = np.sum(np.exp(-beta * (ev - ev[0])))
wh_at = h_at.todense() - ev[0] * np.eye(16)

plt.figure()
plt.imshow(h_at.todense(), interpolation='none')
plt.colorbar()
plt.yticks(range(16), chartlab)
plt.title('Hamiltonian')
plt.tight_layout()

rho = LA.expm(-beta * wh_at) / Z
plt.figure()
plt.imshow(rho, interpolation='none')
plt.yticks(range(16), chartlab)