Dear all, I am facing a problem when it comes to parametrize a system in Kwant : I am using the same "trick" as in the example on closed system (closed_system.py) where the parameter B is defined in a subfunction of make_system. This seems not to always work ; do you have a better alternative which avoids to finalize the system with different magnetic fields ? Regards, Anil
Dear Anli, In Kwant there are two ways to alter the values of matrix elements of the Hamiltonian after the system have been finalized. The first one, and also the preferred one is to use the 'args' argument to the value functions. The other option is to use the fact that the functions can access e.g. global variables. However both methods have exactly the same scope, and there is hence no reason to not use the 'args' argument. Can you be more specific with what you mean by "This seems not to always work", perhaps the problem is with the way you used the extra parameter for the functions? Best, Anton On Sun, Jan 19, 2014 at 11:38 PM, Anil Murani <anil.murani@u-psud.fr> wrote:
Dear all,
I am facing a problem when it comes to parametrize a system in Kwant : I am using the same "trick" as in the example on closed system (closed_system.py) where the parameter B is defined in a subfunction of make_system. This seems not to always work ; do you have a better alternative which avoids to finalize the system with different magnetic fields ?
Regards,
Anil
participants (2)
-
Anil Murani
-
Anton Akhmerov