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

Fix contract tests #52

Merged
merged 2 commits into from
Jan 24, 2023
Merged

Fix contract tests #52

merged 2 commits into from
Jan 24, 2023

Conversation

leburgel
Copy link
Contributor

Fixes tests for contract(::AbstractTTN, ::AbstractTTN) by fixing a bug in inner(::AbstractTTN, ::AbstractTTN) and changing the initial states used in the tests. Aside from the bug making it it seem like the algorithm failed when it actually didn't, the updated behavior for the initial state always starts from a product state by default. So the nsite=2 case needs more sweeps to be able to grow the bond dimension enough, and the nsite=1 case couldn't work without explicitly supplying an initial state with a nontrivial bond dimension.

@mtfishman
Copy link
Member

Great, thanks @leburgel! Glad it was a simple fix and not even an issue with contract.

That is an issue with the current default for init, fundamentally it is a difficult issue for any of these algorithms (DMRG, TDVP, etc.) to choose general initial guesses and that's way we make people input initial guesses in DMRG. So we'll have to think carefully about that going forward, and maybe just force people to input an initial guess but give tools like forming a random TTN of a certain bond dimension to help with it and also provide tools for extracting the external indices in a form that works with this function, based on the input TTNs being contracted.

@mtfishman mtfishman merged commit 3d7342b into ITensor:main Jan 24, 2023
@leburgel leburgel deleted the contract_fix branch January 24, 2023 14:41
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

Successfully merging this pull request may close these issues.

2 participants