Hi Anant,

You wrote:

Is there any way in KWANT that I can plot a 3-d graph of dispersion relation? In the tutorial it is given that the infinite system is quasi 1-d system.

Indeed, in Kwant 1.x low-level systems (e.g. finalized builders) can only be either finite or quasi-1-d. This is because we added the concept of symmetries to Kwant only after the basic low-level design was already fixed. We plan to remove this restriction in the next major version of Kwant.

For now, you can use a variant of the trick mentioned in http://article.gmane.org/gmane.comp.science.kwant.user/39. As an example, I attach a script that calculates and plots the band structure of graphene. The 6 k-points are clearly visible. With Kwant 2, an equivalent script will be less “hacky”.

that means is it only giving values for Kx momentum.I guess not. I guess it is the values of energies for momentum K = -sqrt(Kx*Kx + Ky*Ky) and K = +sqrt(Kx*Kx + Ky*Ky).

I’m not sure what you mean by this.

Best
Christoph

import cmath
From collections import defaultdict
import kwant
import tinyarray as ta
import numpy as np

From mpl_toolkits.mplot3d import axes3d
From matplotlib import pyplot, cm


lat = kwant.lattice.honeycomb()
a, b = lat.sublattices


# Make an ancillary system with two symmetries.  With current Kwant 1, this
# system cannot by finalized.
sym = kwant.TranslationalSymmetry(a.vec((1, 0)), a.vec((0, 1)))
anc = kwant.Builder(sym)
anc[a(0, 0)] = anc[b(0, 0)] = None
anc[lat.neighbors()] = None


# Make an equivalent Kwant system without explicit symmetries that can be
# finalized.  The k vector will be a parameter to this system.  We have to be a
# bit careful as different hoppings in the periodic system correspond to the
# same hopping in the pseudo-periodic system.
sys = kwant.Builder()
sys[anc.sites()] = 0

shifts = defaultdict(list)
for a, b in anc.hoppings():
    # a is always in the fundamental domain.
    b_fd = sym.to_fd(b)
    shifts[a, b_fd].append(b.pos - b_fd.pos)

def hopping(a, b, k):
    return sum(cmath.exp(1j * ta.dot(shift, k)) for shift in shifts[a, b])

sys[shifts.keys()] = hopping
sys = sys.finalized()


# Calculate and plot the bands.
momenta = np.linspace(-5, 5, 111)
energies = []
for kx in momenta:
    col = []
    energies.append(col)
    for ky in momenta:
        H = sys.hamiltonian_submatrix(args=[(kx, ky)])
        col.append(np.linalg.eigvalsh(H).real)
energies = np.array(energies)

ax = pyplot.figure().add_subplot(111, projection='3d')
ax.plot_surface(momenta[:, None], momenta[None, :], energies[..., 0],
                rstride=3, cstride=3, cmap=cm.coolwarm)
ax.plot_wireframe(momenta[:, None], momenta[None, :], energies[..., 1],
                  rstride=3, cstride=3)
pyplot.show()

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to