-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to twist and docstrings #46
Conversation
src/fusiontrees/manipulations.jl
Outdated
permutation is then decomposed into elementary swaps between neighbouring indices, where the | ||
swaps are applied as braids such that if `i` and `j` cross, ``τ_{i,j}`` is applied if | ||
`levels[p[i]] < levels[p[j]]` and ``τ_{j,i}^{-1}`` if `levels[p[i]] > levels[p[j]]`. This | ||
does not allow to encode the most general braid, but a general braid can be obtained by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole explanation is not very accurate (not in the original formulation, but still not in the current formulation I think). It depends on how you interpret i
and j
, are they labels for the indices which remain associated with particular indices during the process of elementary swaps, or are they a counting of the indices as they appear in the order of the tensor at any point in time. I mixed both conventions, but I don't think it's completely resolved with the new formulation either. Do you think it is more clear? Maybe something like:
The braiding is determined by specifying that the new sector at position `k` corresponds to the sector that was originally at the position `i = p[k]`, and assigning to every index `i` of the original fusion tree a distinct level or depth `levels[i]`. This permutation is
then decomposed into elementary swaps between neighbouring indices, where the swaps are
applied as braids such that if `i` and `j` cross, ``τ_{i,j}`` is applied if
`levels[i] < levels[j]` and ``τ_{j,i}^{-1}`` if `levels[i] > levels[j]`. This does not
allow to encode the most general braid, but a general braid can be obtained by
combining such operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that formulation work as well, and avoids the ugliness of levels[p[i]]
. As long as it makes clear whether levels
is in the order of the indices before or after braiding I'm happy, since I previously couldn't figure that out/got the wrong impression until I just tried it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See commit below
I made
twist
check that the index being twisted actually exists (it used to just silently do nothing), and to do nothing for bosonic tensors (it used to error).I also fixed the docstring for
permute!
(it was just the docstring forpermute
) and forbraid
. Please double check the new docstring forbraid
to make sure I got it right.