You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 64430c5
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/src/man/indexmanipulations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ removeunit(::AbstractTensorMap, ::Val{i}) where {i}
67
67
These operations reorder indices and/or move them between domain and codomain by applying the transposing or braiding isomorphisms of the underlying category.
68
68
They form a hierarchy from most general to most restricted:
69
69
70
-
-[`braid`](@ref) is the most general: it accepts any permutation and requires a `levels` argument — a tuple of heights, one per index — that determines whether each index crosses over or under the others it has to pass.
70
+
-[`braid`](@ref) is the most general: it accepts any permutation and requires a `levels` argument — a tuple of depths, one per index — that determines whether each index crosses over or under the others it has to pass. In particular, duplicate levels are not allowed when the braiding is anyonic (`BraidingStyle(I) isa Anyonic`), and the length of `levels` must match the number of indices in the tensor.
71
71
-[`permute`](@ref) is a simpler interface for sector types with a symmetric braiding (`BraidingStyle(I) isa SymmetricBraiding`), where over- and under-crossings are equivalent and `levels` is therefore not needed.
72
72
-[`transpose`](@ref) is restricted to *cyclic* permutations (indices do not cross).
73
73
-[`repartition`](@ref) only moves the codomain/domain boundary without reordering the indices at all.
err_str ="ambiguous braid: two indices with equal level 1 have to cross"
180
+
181
+
@test TensorKit.braid(src, (ntuple(identity, N), ntuple(i -> i + N, N)), (eq, eq)) isa Pair # equal levels are fine when the indices never meet
182
+
@test_throwsArgumentError(err_str) TensorKit.braid(src, ((2, 1, ntuple(i -> i +2, N -2)...), ntuple(i -> i + N, N)), (eq, eq)) # and rejected when they do
0 commit comments