kwant.continuum.
discretize
(hamiltonian, coords=None, *, grid=None, locals=None, grid_spacing=None)[source]¶Construct a tightbinding model from a continuum Hamiltonian.
If necessary, the given Hamiltonian is sympified using
kwant.continuum.sympify
. It is then discretized symbolically and turned
into a Builder
instance that may be used with
fill
.
This is a convenience function that is equivalent to first calling
discretize_symbolic
and feeding its result into
build_discretized
.
Warning
This function uses eval
(because it calls sympy.sympify
), and
thus should not be used on unsanitized input.
Parameters:  hamiltonian : str or SymPy expression
coords : sequence of strings, optional
grid : scalar or kwant.lattice.Monatomic instance, optional
locals : dict, optional
grid_spacing : int or float, optional


Returns:  model :
