Exemplo n.º 1
0
    keystr += " E "
    outpstr += (" %25.15E" % (eig[iopstate]))

    keystr += " Eex "
    outpstr += (" %25.15E" % (eig[iopstate] - eig[0]))

    mean_num = np.zeros(nsites, dtype=np.double)
    mean_dble_occ = np.zeros(nsites, dtype=np.double)
    mean_sdots = np.zeros((nsites, nsites), dtype=np.double)

    for isite in range(0, nsites):
        tmp_mean_num = 0.e0
        for iflv in range(0, Mf):
            num = [fermion.Number(Mf, 1 + 0j, isite, iflv, 'N')]
            tmp_mean_num += np.real(
                fermion.ExpectationValue(num, fockspace, mat_idx, gs))
        mean_num[isite] = tmp_mean_num

        dble_occ = [fermion.DoubleOcc(Mf, 1 + 0j, isite, 'D')]
        mean_dble_occ[isite] = np.real(
            fermion.ExpectationValue(dble_occ, fockspace, mat_idx, gs))
        for jsite in range(isite, nsites):
            sdots_oper = fermion.SdotS(Mf, 1 + 0j, isite, jsite, 'S')
            tmp_mean_sdots = np.real(
                fermion.ExpectationValue(sdots_oper, fockspace, mat_idx, gs))
            mean_sdots[isite, jsite] = tmp_mean_sdots
            if jsite > isite:
                mean_sdots[jsite, isite] = tmp_mean_sdots

    for isite in range(0, nsites):
        keystr += (" N" + "%0d" % (isite))
Exemplo n.º 2
0
    keystr += " E "
    outpstr += (" %25.15E"%(eig[iopstate]))

    keystr += " Eex "
    outpstr += (" %25.15E"%(eig[iopstate]-eig[0]))
    
    mean_num =  np.zeros(nsites,dtype=np.double)
    mean_dble_occ = np.zeros(nsites,dtype=np.double)
    mean_sdots = np.zeros((nsites, nsites),dtype=np.double)

    for isite in range(0,nsites):
        tmp_mean_num = 0.e0
        for iflv in range(0,Mf):
            num = [fermion.Number(Mf,1+0j,isite,iflv,'N')]
            tmp_mean_num += np.real(fermion.ExpectationValue(num, fockspace, mat_idx, gs))
        mean_num[isite] = tmp_mean_num
            
        dble_occ = [fermion.DoubleOcc(Mf,1+0j,isite,'D')]
        mean_dble_occ[isite] =  np.real(fermion.ExpectationValue(dble_occ,
                                                         fockspace, mat_idx, gs))
        for jsite in range(isite,nsites) :
            sdots_oper = fermion.SdotS(Mf,1+0j,isite,jsite,'S')
            tmp_mean_sdots = np.real(fermion.ExpectationValue(sdots_oper,
                                                               fockspace,
                                                               mat_idx, gs))
            mean_sdots[isite,jsite] = tmp_mean_sdots
            if jsite > isite :
                mean_sdots[jsite,isite] = tmp_mean_sdots