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

Faster canonization #1

Open
lxvm opened this issue Jun 8, 2021 · 0 comments
Open

Faster canonization #1

lxvm opened this issue Jun 8, 2021 · 0 comments

Comments

@lxvm
Copy link
Owner

lxvm commented Jun 8, 2021

For the future, anyone who wants to use the tensor module for intense calculations should probably optimize the canonization function. It currently assumes nothing and blindly canonizes starting from the left and moving right, then back from the right moving left. However, most operations only require moving the orthogonality center, if it exists. This could be tracked by adding a is_canonized boolean attribute to the tensor train and when this is true (i.e. certain operations will only act on and preserve the orthogonality center) then instead of recanonizing the whole train, just move the center the fewest number of sites to the desired location. Perhaps this could be a separate procedure, or a modification of the existing one by specifying it to canonize on only a slice of the sites in the train.

Update: this, along with mpo.expval and mps.inner (thus mpo.mel) are some of the bottlenecks in the code. As a matter of fact, my updates to the tensor module actually made my solution to assignment 2 slower because of all of this extra machinery which does a lot of canonization and contraction as often and safely as possible

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