Dear Ian,
None of us are really available right now, so I will just drop a couple of lines, if it is not enough please re-ask in a couple of weeks.
Yes you should probably add the magnetic field in the leads: if you don't the abrupt change of field will induce back scattering.
You can do it locally it is always safer than globally. Gauge invariance on a lattice takes the following form: the pase accumulated on any given loop should be equal to the total flux through the corresponding surface. Any hopping that gives you that is ok. Beware that for BDG Hamiltonian,
Holes are time reversed with respect to electrons.
All the best,
Xavier
________________________________________
De : Kwant-discuss [kwant-discuss-bounces@kwant-project.org] de la part de Ian George [iangeorge@utexas.edu]
Envoyé : mardi 12 août 2014 11:20
À : kwant-discuss@kwant-project.org
Objet : Re: [Kwant] Help on a basic issue
Ian R George

Hello, I messaged a coupled months back on a basic question. I have another one.

KWANT has been very useful to me so far, and I like to think I've made some progress with it, however, I still occasionally am tripping up on basic things. I'm sorry if the answer to this is obvious.

I am trying to create an SNS junction to study helical ABSs in a magnetic

field, but I'm having some basic problems implementing the magnetic field in the code along with the Bogliubov de-Gennes equation. Using the tutorials and paper as my guide, I'm defining a global method for the hopping and have tried to use it in the system, without success. How would I implement it with the hoppings with the superconductor formalism, with separate leads for electrons and holes? Is there something I'm missing on how to do it-you can't just use the magentic field as the hopping, as in the examples. Would I just subtract it as a gauge from the Hamiltonian diagonal entries, as you do analytically? Is there an example out there for that?

At the moment, as a side question, when I try to simply to multiply the

magnetic field with 4t-mu, I'm getting a ValueError: that the hoppings then do not match the dimensions of the onsite Hamiltonian. So I'm guessing that's not the way of going about it.

Thank you.

I forgot to ask this in the previous message. My apologies. Is it generally
OK to define the magnetic field inside the make_system routine as opposed to
a global method, if it works for your purposes, or are their risks to this.
________________________________________
De : Kwant-discuss [kwant-discuss-bounces@kwant-project.org] de la part de Ian George [iangeorge@utexas.edu]
Envoyé : mardi 12 août 2014 11:20
À : kwant-discuss@kwant-project.org
Objet : Re: [Kwant] Help on a basic issue
Ian R George

Hello, I messaged a coupled months back on a basic question. I have another one.

KWANT has been very useful to me so far, and I like to think I've made some progress with it, however, I still occasionally am tripping up on basic things. I'm sorry if the answer to this is obvious.

I am trying to create an SNS junction to study helical ABSs in a magnetic

field, but I'm having some basic problems implementing the magnetic field in the code along with the Bogliubov de-Gennes equation. Using the tutorials and paper as my guide, I'm defining a global method for the hopping and have tried to use it in the system, without success. How would I implement it with the hoppings with the superconductor formalism, with separate leads for electrons and holes? Is there something I'm missing on how to do it-you can't just use the magentic field as the hopping, as in the examples. Would I just subtract it as a gauge from the Hamiltonian diagonal entries, as you do analytically? Is there an example out there for that?

At the moment, as a side question, when I try to simply to multiply the

magnetic field with 4t-mu, I'm getting a ValueError: that the hoppings then do not match the dimensions of the onsite Hamiltonian. So I'm guessing that's not the way of going about it.

Thank you.

I forgot to ask this in the previous message. My apologies. Is it generally OK to define the magnetic field inside the make_system routine as opposed to a global method, if it works for your purposes, or are their risks to this.