Coverage for kwant/physics/dispersion.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Copyright 2011-2013 Kwant authors. # # This file is part of Kwant. It is subject to the license terms in the file # LICENSE.rst found in the top-level directory of this distribution and at # http://kwant-project.org/license. A list of Kwant authors can be found in # the file AUTHORS.rst at the top-level directory of this distribution and at # http://kwant-project.org/authors.
""" Class of callable objects for the computation of energy bands.
Parameters ---------- sys : `kwant.system.InfiniteSystem` The low level infinite system for which the energies are to be calculated. args : tuple, defaults to empty Positional arguments to pass to the ``hamiltonian`` method. Mutually exclusive with 'params'. params : dict, optional Dictionary of parameter names and their values. Mutually exclusive with 'args'.
Notes ----- An instance of this class can be called like a function. Given a momentum (currently this must be a scalar as all infinite systems are quasi-1-d), it returns a NumPy array containing the eigenenergies of all modes at this momentum
Examples -------- >>> bands = kwant.physics.Bands(some_syst) >>> momenta = numpy.linspace(-numpy.pi, numpy.pi, 101) >>> energies = [bands(k) for k in momenta] >>> pyplot.plot(momenta, energies) >>> pyplot.show() """
# Note: Equation to solve is # (V^\dagger e^{ik} + H + V e^{-ik}) \psi = E \psi |