Dear all,
I'm trying out Kwant, and I've encountered a problem when investigating 1D leads.
The simplest minimal example would be to take your file "quantum_wire_revisited.py", set W=1 there, and change the energy window to
energies=[0.01 * i for i in xrange(1000)]
The lattice is plotted correctly, but the conductance calculation yields a "ValueError: expected square matrix".
Changing "kwant.lattice.square" to "kwant.lattice.chain" does not solve the problem. Can you reproduce the error, or could there be a problem with my Kwant installation?
Thanks! Regards,
Thomas
Hi Thomas,
Thomas Schmidt thomas.schmidt@unibas.ch writes:
I'm trying out Kwant, and I've encountered a problem when investigating 1D leads.
The problem that you encounter can be boiled down to the following program
import kwant, numpy kwant.physics.modes(numpy.array([[2]]), numpy.array([[1]]))
You are asking for modes exactly at an energy where a new mode opens. This is something that is illdefined. For now, to avoid this problem, you can simply add a small epsilon to your energies, like this:
energies=[0.01 * i + 1e6 for i in xrange(1000)]
I'm not sure why the same problem does not appear for wider systems. (I'm not the one who wrote that part of Kwant.)
Cheers, Christoph
On 12/17/2013 12:12 PM, christoph.groth@cea.fr wrote:
Hi Thomas,
Thomas Schmidt thomas.schmidt@unibas.ch writes:
I'm trying out Kwant, and I've encountered a problem when investigating 1D leads.
The problem that you encounter can be boiled down to the following program
import kwant, numpy kwant.physics.modes(numpy.array([[2]]), numpy.array([[1]]))
You are asking for modes exactly at an energy where a new mode opens. This is something that is illdefined. For now, to avoid this problem, you can simply add a small epsilon to your energies, like this:
energies=[0.01 * i + 1e6 for i in xrange(1000)]
I'm not sure why the same problem does not appear for wider systems.
For wider systems, the band edge energy is some irrational number typically, so much harder to hit exactly as is the case for the 1D system, where it is exactly at E=2t (for the 4t onsite energy used in the example).
Still, there should be a better error message  I had thought we had covered this case, but apparently not good enough ...
Best,
Michael
participants (3)

christoph.groth＠cea.fr

Michael Wimmer

Thomas Schmidt