-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue with contract
handling EinExpr
with multiple unconnected tensors
#16
Comments
@mofeing What do you think of this? Should we modify |
Currently, So probably we need to write a method of |
But this reduction maybe could be done directly in |
Then this should be implemented as an |
Summary
The
contract
function is encountering issues when processingEinExpr
structures containing more than two unconnected tensors. In a tensor network with interconnected tensors, the optimizer produces a binary tree of contractions executed byTensors.contract
. However, unconnected tensors are overlooked by the optimizer, resulting in more than two tensors being passed to thecontract
function. Since thecontract
function currently only supports pairwise contractions, this leads to an error.Example
To illustrate this issue, consider the following scenario where we are creating an
EinExpr
with three tensors that are not interconnected:Upon running
contract(expr)
, we observe an error as the function does not support contractions involving more than two tensors. A potential resolution may be to enhance thecontract
function's capability to manage multiple tensors.The text was updated successfully, but these errors were encountered: