kwant.continuum.lambdify(expr, locals=None)[source]

Return a callable object for computing a continuum Hamiltonian.


This function uses eval (because it calls sympy.sympify), and thus should not be used on unsanitized input.

If necessary, the given expression is sympified using kwant.continuum.sympify. It is then converted into a callable object.


expr : str or SymPy expression

Expression to be converted into a callable object

locals : dict or None (default)

Additional definitions for sympify.

Previous topic


Next topic

4.5. kwant.wraparound – Wrapping around translational symmetries

This Page