Skip to content

Commit

Permalink
fix construct and remove braidingtensor preprocessors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Jan 3, 2024
1 parent 8a2df70 commit fff1008
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 157 deletions.
2 changes: 1 addition & 1 deletion src/planar/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function _plansor(expr, kwargs...)

tparser = TO.tensorparser(expr, kwargs...)
pparser = planarparser(expr, kwargs...)
insert!(tparser.preprocessors, 5, _remove_braidingtensors)
insert!(tparser.preprocessors, 4, _remove_braidingtensors)
tensorex = tparser(expr)
planarex = pparser(expr)

Expand Down
2 changes: 2 additions & 0 deletions src/planar/planaroperations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function planarcontract!(C::AbstractTensorMap{S,N₁,N₂},
codB, domB = codomainind(B), domainind(B)
oindA, cindA = pA
cindB, oindB = pB
# @show codA, domA, codB, domB, oindA, cindA, oindB, cindB, pAB
oindA, cindA, oindB, cindB = reorder_indices(codA, domA, codB, domB, oindA, cindA,
oindB, cindB, pAB...)

Expand Down Expand Up @@ -91,6 +92,7 @@ _cyclicpermute(t::Tuple{}) = ()
function reorder_indices(codA, domA, codB, domB, oindA, oindB, p1, p2)
N₁ = length(oindA)
N₂ = length(oindB)
# @show codA, domA, codB, domB, oindA, oindB, p1, p2
@assert length(p1) == N₁ && all(in(p1), 1:N₁)
@assert length(p2) == N₂ && all(in(p2), N₁ .+ (1:N₂))
oindA2 = TupleTools.getindices(oindA, p1)
Expand Down
Loading

0 comments on commit fff1008

Please sign in to comment.