-
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
Rewrite the deduction of braidingtensor spaces #94
Conversation
previously constructed indexmap, but this is ambiguous if an index appears on multiple braidingtensors. This should now be fixed by contructing braidingtensors independently. Fixes #93
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #94 +/- ##
==========================================
+ Coverage 80.25% 81.19% +0.93%
==========================================
Files 42 42
Lines 5288 5265 -23
==========================================
+ Hits 4244 4275 +31
+ Misses 1044 990 -54 ☔ View full report in Codecov by Sentry. |
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 |
Can you explain this bit?
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 |
9a17dfb
to
f9c7108
Compare
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