Hi Tibor,


> Hi all!
>
> I would like to plot bandstructure of a graphene lead with electron
> and hole structure (i.e. norbs=2),
> while distinguishing (e.g. with color) between electron and hole bands.
>
> ...
>
> Is there an easy way to get the bands just for electrons? Something like
>
> "bands = kwant.physics.Bands(lead0.finalized(), orbital = 0)"
>
> or for holes
>
> "bands = kwant.physics.Bands(lead0.finalized(), orbital = 1)"

Unfortunately Kwant does not do this for you out of the box. While in
principle this would be cool,
for this to be well defined the lead modes need to also be eigenstates
of the projection operator(s)
onto the states that you care about (if you had some coupling between
your spin bands, what would
you define to be "orbital 0" or "orbital 1" near the avoided crossings?)

In the case (and basis) your described above the k-space Hamiltonian is
already diagonal, so you don't even
need to do a diagonalization! You just need to read off the diagonal
elements of the k-space Hamiltonian.
For example:

    from cmath import exp  # complex exponential
    import numpy as np
    import matplotlib.pyplot as plt

    def H_k(lead):
        H0 = lead.cell_hamiltonian()
        # get inter-cell hopping and make it a square matrix
        _V = lead.inter_cell_hopping()
        V = np.empty(H0.shape, dtype=complex)
        V[:, :_V.shape[1]] = _V
        V[:, _V.shape[1]:] = 0
        # return a function that, given 'k', calculates H(k)
        return lambda k: H0 + exp(-1j * k) * V + exp(1j * k) *
V.conjugate().transpose()

    ...

    H = H_k(lead.finalized())

    ks = np.linspace(-np.pi, np.pi)
    bands = np.array([H(k).diagonal() for k in ks])
    bands = bands.transpose()

    plt.plot(ks, bands[0])  # mode 0
    plt.plot(ks, bands[1])  # mode 1
   

For the more general case you would have to do the diagonalization, and
would have to properly "identify"
the modes that you care about (probably by looking at the eigenvectors).

Anton recently wrote a blog post [1] about the related problem of
properly colouring the bands (at the moment
Kwant just colours the bands in order of ascending energy, which looks
wrong when there are band crossings).
Basically it just amounts to taking the inner product of the mode
wavefunctions at a given k value with the basis
states that you care about.

Happy Kwanting,

Joe


[1]: https://quantumtinkerer.tudelft.nl/blog/connecting-the-dots/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to