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

Set default tol_max in gauging eigsolver #227

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

leburgel
Copy link
Member

Sets the default maximal tolerance in the solver used in the gauging eigsolve steps. I was having stability issues, where for a slowly converging orthogonalization the eigsolve step used a tolerance so high that it was messing up convergence altogether since the error kept increasing after each inaccurate eigsolve.

I don't have a minimal working example, but I think restricting the tol_max here can't hurt either way. Setting it at Inf seems a bit dangerous...

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/states/ortho.jl 86.56% <ø> (ø)

... and 2 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.

Yeah, that's probably way more sensible.

I'm okay with merging this as is, but if you have the time it would be even better to actually move this to the Defaults section.

@leburgel
Copy link
Member Author

I'm okay with merging this as is, but if you have the time it would be even better to actually move this to the Defaults section.

I could just move the _GAUGE_ALG_EIGSOLVE definition to the Defaults module, rename it and then call that. But I think it's actually easier to just call Defaults.alg_eigsolve with the appropriate kwargs. I'll give that a go.

@leburgel
Copy link
Member Author

I think it makes sense to still define a constant within ortho.jl but use Defaults.alg_eigsolve to construct it. In the end the only non-default part was ishermitian=false and tol_factor=1, so it's a bit cleaner.

It didn't make sense to me to move this specific definition to Defaults and then call it from there. I don't think this would be cleaner, and I don't see a more general use case for these specific settings.

@lkdvos lkdvos merged commit 38848e6 into QuantumKitHub:master Jan 16, 2025
28 checks passed
@leburgel leburgel deleted the lb/ortho_eig_tolmax branch January 16, 2025 15:19
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