Speed up Peierls phase calculation
The following discussion from !300 (merged) should be addressed:
I did some benchmarks (attached), with the following results:
cwg@neron:~/work/our/kwant% for f in qhe*.py; do echo '*' $f; time python3 $f; done * qhe-highlevel.py real 7.28s user 7.20s sys 0.08s * qhe-lowlevel.py real 7.00s user 6.93s sys 0.07s * qhe-manual.py real 1.46s user 1.39s sys 0.08s
The good news is that the new high-level interface is not slower than the low-level interface.
The bad news is that automatic Peierls phase computation dominates the running time.
Is this expected? What could we do about it?