Dear Christoph, Thanks a lot for help solving this out. I can run your attached QHE code without problem though a bit slow (I am running Python3.7/Kwant1.4 on Win10 Pro and still can't figure a way to install and use MUMPS resolver yet) The code has no difference. It looks Notepad++ indent issue and it is resolved after installing Python indent plugin. I still can't run most APS tutorial converted into .py from ipython. It would be nice that APS tutorial has python example codes download for Kwant 1.4 in the future. Anyway by now, it is good enough for me. Thanks again. Clement -----Original Message----- From: Christoph Groth <christoph.groth@cea.fr> Sent: Thursday, March 21, 2019 4:23 AM To: WONG, Sheung Chuen <clement@link.cuhk.edu.hk> Cc: kwant-discuss@kwant-project.org Subject: Re: [Kwant] Updating Kwant paper and APS tutorials code WONG, Sheung Chuen wrote:
I am just a beginner on Kwant and downloaded Kwant 1.4.
It is quite frustrated on getting syntax errors using full sample code from Kwan paper or APS tutorial
which themselves provide very good introduction.
For example, in Kwant paper Appendix D.5,
smatrix = kwant.smatrix(sys, energy, args=[phi, ""]) doesn’t work.
Dear Clement, what kind of (syntax) error do you get with this example (qhe.py) and Kwant 1.4.0? I tried all examples from the Kwant paper [1], and they all except "molecule.py" do work with 1.4.0. (We might be able to fix the regression for molecule.py.) Note that these examples were written for Python 2, so for two of them I had to change 'print ...' to 'print(...)', but that was all. Could it be that you are simply not waiting long enough until the qhe.py finishes? It takes about two minutes on my machine. You may ignore the KwantRegressionWarning messages, these are not errors. Christoph [1] https://downloads.kwant-project.org/examples/kwant-examples-njp.zip