Dear Joe, I guess it should be [1] instead of [0] in your correction. We need not Id , but a unit shift. By the way, I am modelling the system with 3 symmetry vectors and do that by hand, moving all the k-phase to the hopping between edges. Best wishes, Sergey On 31/07/15 09:47, Joseph Weston wrote:
Hi,
Thank you, Joe! For others to understand, your answer was: "define hopping not only for the sites that are present, but also between the present and shifted by lead symmetry sites." Yes, that's correct.
Your example code had some misprints: it.prod -> it.product and acting on zero was incorrect: (ValueError: Expecting a 1-tuple group element, but got `0` instead.)
Unfortunately, I could not find the documentation for "act" function. How should I correct your
id = ft.partial(T.act, 0)
function?
Yeah, sorry about the misprints. I've realized now that the "act" method is not actually documented. The symmetry actually expects a *sequence* as its first argument. In our case of a 1-parameter group the sequence only needs *one* element (but it still needs to be a sequence!). The reason it is this way is because Kwant may want to support N-parameter groups in the future (e.g. 2D translational symmetries).
So we need to change
id = ft.partial(T.act, 0)
to
id = ft.partial(T.act, [0])
`TranslationalSymmetry.act` is a method which expects 2 arguments. The first argument is a sequence which is a representation of the element of the symmetry group with which to act. The second argument is a site to which to apply the group element.
In the above code snippet I bind `[0]` to the first parameter of `act`. The function which I get back, `id`, then can take a site as an argument and will apply the group element to it.
I will add some better documentation to the `act` method when I get a moment over the weekend.
Thanks,
Joe