Re: [Kwant] How to caculate hall resistance
Thank you very much for your help. But I have two questions about your advice. One question is why we need to correct digonal element to make rows and columns sum to zero? Do you mean digonal element of conductance matrix is not well defined?
The transmission, as returned by Kwant is just the norm of the corresponding block of the scattering matrix. In order to get the conductance matrix from that, one needs to subtract the number of modes from the diagonal entries. This is achieved by the line cond -= np.diag(cond.sum(axis=0)) in the code snippet that I sent.
Another question is why we need to eliminate one row and one column? Can we just solve np.linalg.solve(cm, [1, 0, -1,0]) to get V_1,V_2,V_3,V_4, where cm is 4x4 conductance matrix.
The conductance matrix has a zero eigenvalue, so the solution to the full problem is not unique (you can add a constant to every potential, and currents won't change). On the other hand, the currents are not independent, since the total current has to equal to zero. Eliminating a row and a column takes care of both constraints. Best, Anton
Best Regards, Zhang Bing
on 2014/4/27 21:03, Anton Akhmerov wrote:
Dear Zhang Bing,
Please take a look at the following bit of code that calculates nonlocal resistance in a 4-terminal device from a Kwant scattering matrix. (Taken from the Kwant example to appear with the revised version of Kwant paper.)
# First we calculate the conductance matrix given the scattering matrix S. cond = np.array([[s.transmission(i, j) for j in xrange(n)] for i in xrange(n)]) # Correct the reflection blocks, so that rows and columns sum to zero. cond -= np.diag(cond.sum(axis=0))
# In order to calculate the nonlocal conductance we eliminate one row and # one column from the condutcance matrix. This amounts to setting the # corresponding voltage to zero and using current conservation to calculate # the current through the last terminal. cm = conductance_matrix(sys, energy, [args])[:-1, :-1] # We then set the current to be 1 in the lead 0, -1 in lead 2, and # calculate the voltage in lead 1 (so V_1 - V_3 since V_3 = 0). nonlocal_resistance = np.linalg.solve(cm, [1, 0, -1])[1]
Generalization to a 6-terminal case should be straightforward.
Best regards, Anton Akhmerov
On Sat, Apr 26, 2014 at 6:14 AM, ZHANG Bing
wrote: Dear Sir,
I am a PhD student of Hong Kong University of Science and Technology. I want to use KWANT to caculate Hall resistance of a Hall bar structure.We can get the conductance between 6 electrodes, but how to get hall resistance? Can you give me some help? Thank you very much.
Best Regards, Zhang Bing
participants (1)
-
Anton Akhmerov