def B(matriz): E = mp.eig(matriz, left=False, right=False) E = mp.eig_sort(E) bd = matriz a = 0 for y in range(5): a = a + 1 d = np.identity(100) d[d == 1.0] = np.abs(mp.re(E[y])) d1 = mp.matrix(d) bd = bd + d1 o = mp.eig(bd, left=False, right=False) o = mp.eig_sort(o) if mp.re(o[0]) > 0.001: break B1 = mp.cholesky(bd) return B1, a
print("L=" + str(L)) print(v) print("................................") #the following cicle takes care of the staggered hopping for i in range(END): j = (i + 1) % L if i % 2 == 0: H[i, j] = -v H[j, i] = H[i, j] elif j % 2 == 0: H[i, j] = -1 H[j, i] = H[i, j] #find its eigenvalues and vectors eigval, eigvec = mp.eigsy(H) eigval, eigvec = mp.eig_sort(eigval, eigvec) Cij = Cij_0(eigvec, Np) #From now on I will use the Free Fermions technique to calculate the entanglement entropies of the subsistems in units of log2 SB = FreeFermions(B, Cij) / mp.log(mp.mpf(2.0)) SAB = FreeFermions(A + B, Cij) / mp.log(mp.mpf(2.0)) SBC = FreeFermions(B + C, Cij) / mp.log(mp.mpf(2.0)) SABC = FreeFermions(D, Cij) / mp.log(mp.mpf(2.0)) #In the end I calculate Sqtopo ad proposed by Wen Sq = (SAB + SBC - SB - SABC)
# estimar M0 yM1 M0_act = ((Y * Y.T) / 100) M0_in = (M0_act**-1) MP = (M0_act * M0_in) o = MP[0:5, 0:5] o0 = M0_in[0:5, 0:5] M1_act = ((Y * X.T) / 100) M0_ant = ((X * X.T) / 100) A = M1_act * (M0_ant**-1) BBT = M0_act - (A * M1_act.T) #### E = mp.eig(BBT, left=False, right=False) E = mp.eig_sort(E) # reajuste 0 d = np.identity(100) d[d == 1.0] = abs(-24.7174268506955680247383180094514) d1 = mp.matrix(d) BBT0 = BBT + d1 E0 = mp.eig(BBT0, left=False, right=False) E0 = mp.eig_sort(E0) # reajuste 0 d0 = np.identity(100) d0[d0 == 1.0] = abs(-0.00000062521499573893501604735293439538) d2 = mp.matrix(d0) BBT1 = BBT0 + d2 E1 = mp.eig(BBT1, left=False, right=False)