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

"Multiplicity" parameter to unambiguously select Tensors with same indices #68

Closed
mofeing opened this issue Jun 29, 2023 · 1 comment
Closed
Labels
question Further information is requested
Milestone

Comments

@mofeing
Copy link
Member

mofeing commented Jun 29, 2023

There is a non-solved semantic issue with the refactor and it's that there can be (actually, are) Tensors within a TensorNetwork that are connected by the same indices. This case always appears in the contraction of a closed TN, since the last 2 tensors will forcibly have the same indices.

In other cases, this behavior is more strange but it still can happen.

The way mathematicians have solved it in graph theory is adding a "multiplicity" parameter to the edges. Since a TensorNetwork can represent both the nominal graph of TN and its inverse graph, it is easy mathematically to add a multiplicity paramater on functions that access Tensors.

In Tenet, calling select with "multiplicity" of $i$ should select the tensors that matches all the indices and choose the $i$-th element in the list. But does this function always computes the list in the same order? There should be some order but I'm still undecided about what order should it be.

@bsc-quantic/software @bsc-quantic/tensor-networks I'm invoking you to give your opinion on this.

@mofeing mofeing added the question Further information is requested label Jun 29, 2023
@mofeing mofeing added this to the 0.4 milestone Jul 22, 2023
@mofeing
Copy link
Member Author

mofeing commented Nov 11, 2023

Fixed in 5b3e11b

@mofeing mofeing closed this as completed Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant