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

3 site tests #180

Merged
merged 12 commits into from
Oct 27, 2024
Merged

3 site tests #180

merged 12 commits into from
Oct 27, 2024

Conversation

Gertian
Copy link
Collaborator

@Gertian Gertian commented Oct 15, 2024

This PR adds tests for infinite MPS with a 3-site unit cell.

I ran this locally and found an almost unexciting additional cost to run these on my machine.

@Gertian Gertian requested a review from lkdvos October 15, 2024 14:33
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

see 3 files with indirect coverage changes

Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a great addition. My only comment on this one is that maybe instead of an additional testset which is separate, you could merge this in each of the testsets for the ground state algorithms above, which would then consist of:

  • test logging (1site)
  • test algorithm (1site)
  • repeat to 3sites
  • test logging (3 sites)
  • test algorithm (3 sites)

This would bundle things by algorithm, so for example if VUMPS contains an error it will fail sooner, and also reduce runtime even more because you start from something near converged.

(This is mostly just my preference/opinion, if you disagree I would be fine merging as-is)

Ps, I would probably merge this first, which would then resolve the codecov complaints of the other PRs

@Gertian
Copy link
Collaborator Author

Gertian commented Oct 15, 2024

I think this is a great addition. My only comment on this one is that maybe instead of an additional testset which is separate, you could merge this in each of the testsets for the ground state algorithms above, which would then consist of:

  • test logging (1site)
  • test algorithm (1site)
  • repeat to 3sites
  • test logging (3 sites)
  • test algorithm (3 sites)

This would bundle things by algorithm, so for example if VUMPS contains an error it will fail sooner, and also reduce runtime even more because you start from something near converged.

(This is mostly just my preference/opinion, if you disagree I would be fine merging as-is)

Ps, I would probably merge this first, which would then resolve the codecov complaints of the other PRs

Sure, I'll change this tomorrow :)

@Gertian
Copy link
Collaborator Author

Gertian commented Oct 16, 2024

All rightly @lkdvos, this is all done now :)

Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
In principle I am okay with merging this, but then we would have to port this over to the blocktensor2 branch. @VictorVanthilt , any opinions if we rather wait a bit for that?

@VictorVanthilt
Copy link
Contributor

I'm okay with adding this before the blocktensor refactor. If the tests pass here it's a good extra testset for the blocktensor2 branch to pass.

@Gertian
Copy link
Collaborator Author

Gertian commented Oct 26, 2024

@lkdvos as far as I understand the tests also don't consider ''parallelize_sites = true'' and ''false'' etc.

I agree that a user triggered test should obly trigger one config. But when PR are tested all permutations of the compilation flags should be considered no ?

@lkdvos
Copy link
Member

lkdvos commented Oct 26, 2024

Yeah, I agree there. What I had in mind was to change the entire current approach to work with OhMyThreads.jl instead, such that we can have schedulers instead of the Preferences.jl based mechanism, to allow for dynamic changing of the scheduler. The problem is that I wanted to put this off until blocktensor gets merged, and did not have too much time lately to really get into that. The idea is that the current implementation is quite unwieldy, and has too much code duplication, and it is really easy to circumvent that, but I havent gotten around to finding the time. I also don't want to halt progress, which is why I am trying to merge these things now before the blocktensor changes, as that still depends on TensorKit which is not yet finished.

@Gertian
Copy link
Collaborator Author

Gertian commented Oct 27, 2024

Yeah, I agree there. What I had in mind was to change the entire current approach to work with OhMyThreads.jl instead, such that we can have schedulers instead of the Preferences.jl based mechanism, to allow for dynamic changing of the scheduler. The problem is that I wanted to put this off until blocktensor gets merged, and did not have too much time lately to really get into that. The idea is that the current implementation is quite unwieldy, and has too much code duplication, and it is really easy to circumvent that, but I havent gotten around to finding the time. I also don't want to halt progress, which is why I am trying to merge these things now before the blocktensor changes, as that still depends on TensorKit which is not yet finished.

Ok great.
I think its very reasonable to put this off for now. I just wanted to make sure that you were aware of this.

In the future I'd be happy to help implementing this together with the other parallelizations that I made :)

@lkdvos lkdvos merged commit 48534cd into QuantumKitHub:master Oct 27, 2024
10 of 11 checks passed
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.

3 participants