Dear Ali,
The determinant of G matrix is always zero, since if you apply the
same voltage to all leads, no current should flow. I am unsure why it
is only zero for some energies for you.
Best,
Anton
On Wed, Feb 15, 2017 at 7:56 PM, Ali Asgharpour
<asgharpour@sabanciuniv.edu> wrote:
> Thanks. By the way, I want to find voltage difference in a system but, for
> some Fermi energies, the determinant of G matrix is zero and obviously I
> have a singular matrix error. Is there any way not to encounter this error
> except adding "if statements"?
>
> Best regards,
>
> Ali
>
> On Wed, Feb 15, 2017 at 8:02 PM, Anton Akhmerov
> <anton.akhmerov+kd@gmail.com> wrote:
>>
>> Hi Ali,
>>
>> We subtract the sums because that is the definition of the conductance
>> matrix. However this complete function really should be written as
>> kwant.smatrix(syst, args=[p]).conductance_matrix() (see also the
>> documentation of the conductance_matrix from Kwant).
>>
>> Best,
>> Anton
>>
>> On Wed, Feb 15, 2017 at 3:43 PM, Ali Asgharpour
>> <asgharpour@sabanciuniv.edu> wrote:
>> > Hello all,
>> >
>> > I have a question about one of the functions in this link:
>> >
>> > https://nbviewer.jupyter.org/url/topocondmat.org/notebooks/ w3_pump_QHE/Laughlinargument. ipynb
>> >
>> > For plotting Hall conductance and longitudinal one, there is a section
>> > where
>> > you defined a G function, which I put it below:
>> >
>> > def G(syst, p):
>> > smatrix = kwant.smatrix(syst, args=[p])
>> > G = [[smatrix.transmission(i, j) for i in range(num_leads)] for j in
>> > range(num_leads)]
>> > G -= np.diag(np.sum(G, axis=0))
>> > return calculate_sigmas(G)
>> >
>> >
>> > I want to know why we need this line " G -= np.diag(np.sum(G, axis=0)) "
>> > since G matrix is already calculated in the previous line?
>> >
>> > Your time and consideration are greatly appreciated.
>> >
>> > Best regards,
>> >
>> > Ali
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>
>