LandauLattice(grid_spacing, offset=None, name='', norbs=None)¶
Monatomic lattice with a Landau level index per site.
Site tags (see
SiteFamily) are pairs of integers, where
the first integer describes the real space position and the second the
Landau level index.
The real space Bravais lattice is one dimensional, oriented parallel to the magnetic field. The Landau level index represents the harmonic oscillator basis states used for the Landau quantization in the plane normal to the field.
grid_spacing (float) – Real space lattice spacing (parallel to the magnetic field).
offset (float (optional)) – Displacement of the lattice origin from the real space coordinates origin.
Find the lattice coordinates of the site closest to position
n_closest(pos, n=1, group_by_length=False, rtol=1e-09)¶
Find n sites closest to position
sites – An array with sites coordinates.
Return n-th nearest neighbor hoppings.
n (integer) – Order of the hoppings to return. Note that the zeroth neighbor is the site itself or any other sites with the same position.
eps (float) – Tolerance relative to the length of the shortest lattice vector for when to consider lengths to be approximately equal.
hoppings – The n-th nearest neighbor hoppings.
list of kwant.builder.HoppingKind objects
The hoppings are ordered lexicographically according to sublattice from which they originate, sublattice on which they end, and their lattice coordinates. Out of the two equivalent hoppings (a hopping and its reverse) only the lexicographically larger one is returned.
Return a normalized version of the tag.
Raises TypeError or ValueError if the tag is not acceptable.
Return a normalized version of the tags.
Raises TypeError or ValueError if the tags are not acceptable.
Return the real-space position of the site with a given tag.
Return the real-space positions of the sites with the given tags.
Return a key for all the lattice sites inside a given shape.
The object returned by this method is primarily meant to be used as a
key for indexing
Builder instances. See example below.
function (callable) – A function of real space coordinates that returns a truth value: true for coordinates inside the shape, and false otherwise.
start (1d array-like) – The real-space origin for the flood-fill algorithm.
When the function returned by this method is called, a flood-fill algorithm finds and yields all the lattice sites inside the specified shape starting from the specified position.
Builder may be passed as
sole argument when calling the function returned by this method. This
will restrict the flood-fill to the fundamental domain of the symmetry
(or the builder’s symmetry). Note that unless the shape function has
that symmetry itself, the result may be unexpected.
>>> def circle(pos): ... x, y = pos ... return x**2 + y**2 < 100 ... >>> lat = kwant.lattice.honeycomb() >>> syst = kwant.Builder() >>> syst[lat.shape(circle, (0, 0))] = 0 >>> syst[lat.neighbors()] = 1
Return the coordinates of a Bravais lattice vector in real space.
vec (integer vector) –
Return a key for all the lattice sites inside an infinite cylinder.
This method makes it easy to define cylindrical (2d: rectangular) leads
that point in any direction. The object returned by this method is
primarily meant to be used as a key for indexing
instances. See example below.
center (1d array-like of floats) – A point belonging to the axis of the cylinder.
radius (float) – The radius of the cylinder.
The function returned by this method is to be called with a
TranslationalSymmetry instance (or a
Builder instance whose symmetry is used then) as sole
argument. All the lattice sites (in the fundamental domain of the
symmetry) inside the specified infinite cylinder are yielded. The
direction of the cylinder is determined by the symmetry.
>>> lat = kwant.lattice.honeycomb() >>> sym = kwant.TranslationalSymmetry(lat.a.vec((-2, 1))) >>> lead = kwant.Builder(sym) >>> lead[lat.wire((0, -5), 5)] = 0 >>> lead[lat.neighbors()] = 1
(sequence of vectors) Primitive vectors
prim_vecs[i]` is the i-th primitive basis vector of the lattice displacement of the lattice origin from the real space coordinates origin.