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

Optimize QDense(IndexSet,QN) constructor #305

Open
mtfishman opened this issue Nov 27, 2019 · 0 comments
Open

Optimize QDense(IndexSet,QN) constructor #305

mtfishman opened this issue Nov 27, 2019 · 0 comments

Comments

@mtfishman
Copy link
Member

In ITensor v3 the QDense(IndexSet,QN) is slower than the v2 version because QN addition now needs to check that all of the indices in the IndexSet have the same QNs. That means that constructor is quite slow when constructing QDense with many blocks from the divergence (so it affects constructors like randomITensor(QN(0),i,j,k) when the indices have many blocks, and gets worse with the order of the tensor). We should be able to optimize that constructor by first checking that the indices all have the same QNs, and then call a specialized QN addition and comparison function that assumes the QNs are all the same.

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

1 participant