Yes, this problem is still relevant. T hank you for your help -- Tatsiana Matusevich
Hi Tatsiana, The error message that your script produces (when one uncomments the line that finalizes 'sys') is not helpful (we'll try to improve it), but it is justified. Your script does not work because you are attaching builders without any symmetry as leads. You have to declare a translational symmetry for the lead builders. However, this means that you can no longer use your site family 'RealSpace' for the sites in the leads, because 'kwant.TranslationalSymmetry' won't work with it, since it only knows about sites that belong to Bravais lattices. Implementing an alternative translational symmetry class that would work with 'RealSpace' won't work because of floating point rounding errors. The easiest solution for you is to simply multiply all your real space coordinates by 10^5 or so, round to integers, and then use a plain square lattice. A solution that doesn't involve rounding would be to use 'kwant.lattice.honeycomb()' (or any other lattice defined with 'kwant.lattice.general()') for the leads. Then, howerver, you will also need sites of the same family in the central region. This is because the sites that are passed as 'interface' to 'BuilderLead' must be present both in the lead and in the central region to which the lead is attached. You can continue to use 'RealSpace' sites in the central region (in fact you have to if you want to keep your "warp"), but you would have to manually connect 'RealSpace' and 'honeycomb' sites by hoppings. Or you can simply use 'kwant.lattice.honeycomb()' everywhere and "hide" the warping from Kwant. You can take the warping into account when plotting the system and/or when calculating the Hamiltonian values. Do not hesitate to ask if the above is not clear. Christoph PS. (for people interested in Kwant development) Kwant could support attaching leads in an arbitrary way. It's only that in right now BuilderLead has the signature BuilderLead(builder, interface) and used 'interface' both as the interface (at the side of the central-region) and as its counterpart (at the side of the lead). We could extend the above to BuilderLead(builder, interface, counterpart=None) to allow attaching leads in arbitrary ways. (Not providing 'couterpart' would mean 'counterpart=interface'.)
participants (2)
-
Christoph Groth
-
Татьяна Матусевич