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

Perform some simple preprocessing of contractions #114

Open
3 tasks
jcmgray opened this issue Nov 30, 2019 · 3 comments
Open
3 tasks

Perform some simple preprocessing of contractions #114

jcmgray opened this issue Nov 30, 2019 · 3 comments

Comments

@jcmgray
Copy link
Collaborator

jcmgray commented Nov 30, 2019

It might be sensible (#99 and #112) for opt_einsum to perform some simple universal pre-processing of contractions before sending them to the actual path optimizers. Including:

  • single index reduction e.g. abc->ab where the index c appears on no other terms
  • hadamard de-duplication e.g. ab,ab->ab

Some things to think about

  • make the pre-processing optional (but default on?)
  • might be useful to first have some generic way to combine bits of two paths
  • include other more complex but sensible steps - e.g. contract disjoint subgraphs separately?
@dgasmith
Copy link
Owner

dgasmith commented Nov 30, 2019

This does need to be optional and I would think a default off state to retain current functionality. I am a bit hesitant to make changes to current algorithms without discussing more with downstream programs.

Disjoint subgraphs seems like it would influence each algorithm differently and likely not able to be generalized. Similar to the path combination, each algorithm uses different internal structures at the moment and likely needs to remain that way for performance.

@dgasmith
Copy link
Owner

dgasmith commented Dec 1, 2019

@jcmgray I might try this today, are you working on any pieces currently?

@jcmgray
Copy link
Collaborator Author

jcmgray commented Dec 1, 2019

I'm adding a few tweaks to the 'dp' algorithm, (with an eye on it replacing the current 'optimal' implementation) but that's all pretty much self contained!

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

No branches or pull requests

2 participants