Closed lkdvos closed 10 months ago
Attention: 3 lines
in your changes are missing coverage. Please review.
Comparison is base (
518e520
) 80.25% compared to head (f9c7108
) 81.19%.
Files | Patch % | Lines |
---|---|---|
src/planar/preprocessors.jl | 92.30% | 3 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
MPSKit.jl doesn't compile against this.
I think the reason is that contractions such as :
@planar contractcheck = true opt=true d[f;g] := T[f;a]*B[c;d]*τ[d b;c e]*τ[e b;a g]
result in ERROR: AssertionError: could not figure out all spaces
Can you explain this bit?
Previously, this constructed an indexmap, but this is ambiguous if an index appears on multiple braidingtensors.
The indexmap is always ambiguous, even when having a single braidingtensor between two regular tensors. You can find out the space by calling space(t,...) on either on the tensors, but that is not a real problem. I don't follow why chaining multiple braidingtensors together would make the indexmap more ambiguous.
The problem is mostly that you need to know if the connection will be made between the codomain of the braidingtensor and the domain of the regular tensor, or the other way around, in order to determine if the space needs to be dual or not. However, keeping a single indexmap for multiple braidingtensors can lead to mismatches in that regards.
if you imagine an expression tau[a b; c d] * tau[b d; e f], you would construct two braidingtensors with space V in the codomain, which leads to a space mismatch when connecting them. (V \= V')
In other words, you cannot create a global indexmap, but should really create one per braidingtensor. The way I get around this is by just going through, creating as many braidingtensors as possible, and then really instantiating them into the expression as if they were tensors, and repeating this until all indices have been resolved
Closed in favor of #95
Previously, this constructed an indexmap, but this is ambiguous if an index appears on multiple braidingtensors. This should now be fixed by contructing braidingtensors independently. Also adds a test for the case that was not caught. Fixes #93