Hi again,

> I had already tried that, but I get extra bands that I would like to get
> rid of.

You could try using Christoph Groth's "wraparound" module [1] (just
download the "wraparound.py" module and put it next to your script to
be able to "import wraparound"). This will convert your Builder with
a 1D translational symmetry to a Builder with no translational symmetry,
but which takes an extra parameter, k, which corresponds to the lattice
momentum. You can then calculate and plot the bands yourself:

    import numpy as np
    import wraparound
    import matplotlib.pyplot as plt

    syst_with_sym = make_system()  # *unfinalized* system (i.e. a Builder)
    syst_no_sym = wraparound.wraparound(syst_no_sym).finalized()


    # assumes that "syst_with_sym" took no parameters
    def poor_man_bands(k):
        H_k = syst_no_sym.hamiltonian_submatrix(args=(k,), sparse=False)
        return sorted(np.eigvalsh(H_k))

    momenta = np.linspace(-np.pi, np.pi, 53)
    E_k = [poor_man_bands(k) for k in momenta]

    plt.plot(momenta, E_k)


Internally all that "wraparound" does is converts hoppings between
unit cells in a translationally invariant system to onsites/hoppings
in a finite system multiplied by the appropriate phase factors which
depend on the lattice momentum.


Happy Kwanting,

Joe

[1]: https://gitlab.kwant-project.org/cwg/wraparound

Attachment: signature.asc
Description: PGP signature

Reply via email to