Exemplo n.º 1
0
def CalculateBerryConnectGraphene(k, params, n0, n1):
    
    h = 0.0001;

    H = HaldaneHamiltonianPaulis(k, params)
    
    d0,v0 = GetEvalsAndEvecsGen(H)
    
    #first eigenvector
    u0=v0[:,n0]
    u1=v0[:,n1]
    
    #dx direction
    kxx = k + np.array([h,0])
    H = HaldaneHamiltonianPaulis(kxx, params)
    dx,vx = GetEvalsAndEvecsGen(H)
    ux1 = vx[:,n1]
    
    #dy direction
    kyy = k+np.array([0,h])
    H = HaldaneHamiltonianPaulis(kyy, params)
    dy,vy = GetEvalsAndEvecsGen(H)
    uy1=vy[:,n1]

    xder = (ux1-u1)/h
    yder = (uy1-u1)/h
    
    berryconnect = 1j*np.array([np.dot(np.conj(u0),xder),np.dot(np.conj(u0),yder)])

    return berryconnect
Exemplo n.º 2
0
def BerryCurvature(Hamiltonian, k, n0, n1, params):
    
    h = 0.0001
    
    H = Hamiltonian(k,params)
    
    d0,v0 = GetEvalsAndEvecsGen(H)
                
    #first eigenvector
    u0bx=v0[:,n0]
    u0by=v0[:,n1]
    
    #eigenvalues
    lowerband = d0[0]
    upperband = d0[1] 
    
    #dx direction
    kxx = k + np.array([h,0])
    H = Hamiltonian(kxx, params)
    dx,vx = GetEvalsAndEvecsGen(H)
    ux = vx[:,n0] # first eigenvector
    
    ux = AlignGaugeBetweenVecs(u0bx, ux)
    
    #dy direction
    kyy = k+np.array([0,h])
    H = Hamiltonian(kyy, params)
    dy,vy = GetEvalsAndEvecsGen(H)
    uy=vy[:,n1] # first eigenvector
    
    uy = AlignGaugeBetweenVecs(u0by, uy)

    xder = (ux-u0bx)/h
    yder = (uy-u0by)/h
    
    berrycurve = 2*np.imag(np.dot(np.conj(xder), yder))
    
    return berrycurve, lowerband, upperband
# centres = [24, 25]
centres = [24]
# funcs = [Cosine, Cosine]
funcs = [Cosine]
# paramss = [[a, omega1, phi1, onsite1], [a, omega2, phi2, onsite2]]
paramss = [[a, omega1, phi1, onsite1]]
# form = "SS-p"; hamiltonianString="$H(t)=H_0 + a \> \hat{n}_b \cos (\omega t + \phi) $"; paramsString = r"$a="+str(a)+r", \omega = "+"{:.2f}".format(omega)+", \phi = "+PhiString(phi)+r"$"
# form = "DS-p"; hamiltonianString = "$H(t)=H_0 + a \> \hat{n}_b \cos (\omega_1 t + \phi_1)  + a \> \hat{n}_{b+1} \cos (\omega_2 t + \phi_2)]$"; paramsString = r"$a=$"+str(a)+", "+r"$\omega_1="+"{:.2f}".format(omega1)+", \omega_2 = "+str(omegaMultiplier)+" \omega_1, \phi_1 = "+PhiString(phi1)+", \phi_2 = \phi_1 + \pi/2, N = "+str(N)+", b = "+str(centre)+"$ "
# form = "SSDF-p"; hamiltonianString = "$H(t)=H_0 + a \> \hat{n}_b [\cos (\omega_1 t + \phi_1)  +  \cos (\omega_2 t + \phi_2)]$"; paramsString = r"$a=$"+str(a)+", "+r"$\omega_1="+ "{:.2f}".format(omega1)+", \omega_2 = "+str(omegaMultiplier)+" \omega_1, \phi_1 ="+PhiString(phi1)+", \phi_2 = \phi_1 + \pi/2, N = "+str(N)+", b = "+str(centre)+"$ "
# form = "H0_PhasesNNHop"; hamiltonianString = "$H_0$"; paramsString=""


UT, HF = CreateHFGeneral(N, centres, funcs, paramss, T, circleBoundary)

# HF = H0_PhasesNNHop(N, centres, phases )
evals, evecs = GetEvalsAndEvecsGen(HF)
# evecs = OrderEvecs(evecs, N)

func = np.real
colour = "dodgerblue"

# title = ("real(evecs); "
#              + form +r";  "+hamiltonianString+"\n"
#              +paramsString)
title = ""
sz=8
fig, ax = plt.subplots(figsize=(sz*1.4,sz))
ax.plot(range(N), func(evals), '.', color=colour, markersize=20)
ax.set_ylabel("e-value")
ax.set_xlabel("eval index")
# fig.suptitle(r"evals;  "+ form +r";  "+hamiltonianString+"\n"
Exemplo n.º 4
0
omega12 = random()
omega23 = random()
omega31 = random()

print(omega12, omega23, omega31)

N = 100
evals = np.empty((100, 3))
evec0s = np.empty((100, 3))
evec1s = np.empty((100, 3))
evec2s = np.empty((100, 3))
delta3s = np.linspace(-0.1, 0.1, 100)
for i, delta3 in enumerate(delta3s):
    H = Gen3Ham(delta1, delta2, delta3, omega12, omega23, omega31)
    dx, vx = GetEvalsAndEvecsGen(H)
    evals[i] = dx
    evec0s[i] = vx[:, 0]
    evec1s[i] = vx[:, 1]
    evec2s[i] = vx[:, 2]

fig, ax = plt.subplots()
ax.plot(delta3s, evals[:, 0], '.', ms=10, color="#090446", label="e0")
ax.plot(delta3s, evals[:, 1], '.', ms=6, color="#F71735", label="e1")
ax.plot(delta3s, evals[:, 2], '.', ms=2, color="#FA9F42", label="e2")
plt.legend()
plt.show()

fig, ax = plt.subplots()
ax.plot(delta3s, evec0s[:, 0], '.', ms=10, label="a")
ax.plot(delta3s, evec0s[:, 1], '.', ms=6, label="b")
Exemplo n.º 5
0
    _, evecs0 = GetEvalsAndEvecsEuler(H)
    evecsOld = evecs0

    # go through and align vecs until the end
    for k_vec in kline[1:]:
        H = Euler2Hamiltonian(k_vec)
        _, evecs = GetEvalsAndEvecsEuler(H)

        evecs = SetGaugeSVG(evecs, evecsOld)
        # evecs = SetGaugeByBand( evecsOld, evecs)

        evecsOld = evecs

    #calculate overlap
    WilsonLine = CalcOverlapEvecs(evecsOld, evecs0)
    WLevals, _ = GetEvalsAndEvecsGen(WilsonLine)

    wilsonLineEvalsByPathWidth[i] = WLevals

wilsonevals0 = np.angle(wilsonLineEvalsByPathWidth[:, 0])

wilsonevals0newphase = np.where(wilsonevals0 < 0, np.abs(wilsonevals0),
                                wilsonevals0)

plt.plot(np.linspace(0, 1, Nw), wilsonevals0)
plt.show()

#%%
"""
Calculate Wilson Line - 
    Calculate half baked wilson lines around a circle
omega = a / jn_zeros(0, 1)[0]
phi = 0

form = "SS-p"
hamiltonianString = "$H(t)=H_0 + a \> \hat{n}_b \cos (\omega t + \phi) $"
paramsString = r"$a=" + str(a) + r", \omega = " + "{:.2f}".format(
    omega) + ", \phi = " + PhiString(phi) + r"$"
# form = "DS-p"; hamiltonianString = "$H(t)=H_0 + a \> \hat{n}_b \cos (\omega_1 t + \phi_1)  + a \> \hat{n}_{b+1} \cos (\omega_2 t + \phi_2)]$"; paramsString = r"$a=$"+str(a)+", "+r"$\omega_1="+"{:.2f}".format(omega1)+", \omega_2 = "+str(omegaMultiplier)+" \omega_1, \phi_1 = "+PhiString(phi1)+", \phi_2 = \phi_1 + \pi/2, N = "+str(N)+", b = "+str(centre)+"$ "
# form = "SSDF-p"; hamiltonianString = "$H(t)=H_0 + a \> \hat{n}_b [\cos (\omega_1 t + \phi_1)  +  \cos (\omega_2 t + \phi_2)]$"; paramsString = r"$a=$"+str(a)+", "+r"$\omega_1="+ "{:.2f}".format(omega1)+", \omega_2 = "+str(omegaMultiplier)+" \omega_1, \phi_1 ="+PhiString(phi1)+", \phi_2 = \phi_1 + \pi/2, N = "+str(N)+", b = "+str(centre)+"$ "
# form = "H0_PhasesNNHop"; hamiltonianString = "$H_0$"; paramsString=""

# UT, HF = CreateHF(form, rtol, N, centre, a, omega, phi, onsite)
UT, HF = CreateHFGeneral(N, centre, funcs, paramss, T, circleBoundary)
# HF = H0_PhasesNNHop(N, centres, phases )
evals, evecs = GetEvalsAndEvecsGen(HF)
# evecs = OrderEvecs(evecs, N)

func = np.real
colour = "dodgerblue"

# title = ("real(evecs); "
#              + form +r";  "+hamiltonianString+"\n"
#              +paramsString)
title = ""

plotevecs(evecs, N, func, colour, title, ypos=0.955)

sz = 5
fig, ax = plt.subplots(figsize=(sz * 1.4, sz))
ax.plot(range(N), func(evals), 'x', color=colour)
phases2 = [0, 0, 0, 0, 0, 0]


# phases with non trivial loops and NNN hopping


aSiteStart1 = 20; 
# aSiteStart2 = 110
psi01 = np.zeros(N, dtype=np.complex_); psi01[aSiteStart1] = 1;
# psi02 = np.zeros(N, dtype=np.complex_); psi02[aSiteStart2] = 1;
# p0 = pi/7; p1 = pi/3; p2 = pi/2; p3 = pi/4
HPhases1 = H0_PhasesNNHop(N, centres, phases1)
HPhases2 = H0_PhasesNNHop(N, centres, phases2)


evals1, evecs1 = GetEvalsAndEvecsGen(HPhases1)
evals2, evecs2 = GetEvalsAndEvecsGen(HPhases1)
# psi01 = evecs2[:,0]
# HPhasesFlip = np.flip(np.flip(HPhases, 0).T, 0)

#parameters for ODE solver
nOscillations = 10
#how many steps we want. NB, this means we will solve for nTimesteps+1 times (edges)
nTimesteps = nOscillations*100
n_osc_divisions = 2
tspan = (0,nOscillations*T)
t_eval = np.linspace(tspan[0], tspan[1], nTimesteps)


#solve differential equation
psi1 = SolveSchrodingerTimeIndependent(HPhases1, tspan, nTimesteps, psi01)