Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

lkdvos
Copy link
Collaborator

@lkdvos lkdvos commented Nov 28, 2023

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

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
@lkdvos lkdvos requested a review from Jutho November 28, 2023 15:09
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

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 ⚠️
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.
📢 Have feedback on the report? Share it here.

@Gertian
Copy link
Contributor

Gertian commented Nov 28, 2023

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

@maartenvd
Copy link
Contributor

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.

@lkdvos
Copy link
Collaborator Author

lkdvos commented Nov 28, 2023

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

@lkdvos
Copy link
Collaborator Author

lkdvos commented Jan 4, 2024

Closed in favor of #95

@lkdvos lkdvos closed this Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing/bugged? index convention for braiding tensors.
3 participants