Skip to content

use real numbers for the position_operators and momentum_operators in continuum

Bas Nijholt requested to merge basnijholt/kwant:sympy_use_reals into master

This MR will ensure that momentum_operators and position_operators are real symbols.

Currently, I am running into problems because I take hamiltonian.conugate() and it will try to take the conjugate of real numbers.

It will work but unnecessary operations will be performed in the functions that discretizer generates:

def hopping_1(site1, site2, B_z, alpha, conjugate, exp, phi_0):
    (x, y, z, ) = 1 * site1.tag
    _const_0 = (conjugate(y))
    ...

Merge request reports