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

Implement simple symmetry #95

Closed
xiangjianqian opened this issue Sep 26, 2021 · 3 comments
Closed

Implement simple symmetry #95

xiangjianqian opened this issue Sep 26, 2021 · 3 comments

Comments

@xiangjianqian
Copy link

Can anyone show me an example of how to implement a library https://github.com/mhauru/abeliantensors with Quimb. Is it compatible with opt_einsum.

@jcmgray
Copy link
Owner

jcmgray commented Sep 27, 2021

I suspect it's not directly compatible right now, but would be very easy to incorporate as it supports all the core functions. The main thing is simply that the .shape attribute returns blocks rather than the 'effective' tensor shape, and its tensordot, svd implementations and friends might not be immediately discoverable by opt_einsum / autoray. To use it probably one would want to simply subclass whichever symmetry tensor class and override the shape attribute, then register backend functions with opt_einsum / autoray for the desired functions.

There might still be some issues if you need compression with cutoffs and that kind of thing however.

Note also that another symmetric backend will be available at some point as a byproduct of #88.

@xiangjianqian
Copy link
Author

Actually, The Tensor Network library https://github.com/google/TensorNetwork has a simple symmetry backend. And it has the .shape attribute that returns the acutal tensor shape. It also has tensordot,svd functions. I think it would be much easier to implement.

@jcmgray
Copy link
Owner

jcmgray commented Sep 28, 2021

Yes, though worth noting that the data structure they chose is quite different to abeliantensors I think, and might perform quite differently across settings. If I recall, it was chosen to benefit symmetric tensors with large ndim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants