Skip to content

Conversation

MPMPMPMPMPMPMP
Copy link
Contributor

@MPMPMPMPMPMPMP MPMPMPMPMPMPMP commented Oct 14, 2025

I fixed typos.
For the svd I introduced a check when on GPU the argument "only_u_or_vh" gets ignored since this is not implemented.

if random_noise_retries == varipeps_config.optimizer_random_noise_max_retries
Because it would stop directly if the CTMRG didn't converge.

varipeps_global_state.ctmrg_projector_method = None

if random_noise_retries == 0:
if random_noise_retries == varipeps_config.optimizer_random_noise_max_retries:
Copy link
Member

Choose a reason for hiding this comment

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

That is not a bug but intended. The other case is handled by another else statement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But doesn't the code directly terminate if the first CTMRG of the optimizer doesn't converge? Intuitively, I would have thought that it retries with another random state or should one do that in the actual program which runs the optimizer.
Check the success return value for true ?
if not, try with another unitcell?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, exactly, the code terminates if the first CTMRG/gradient does not converge. Since the first unit cell is user-supplied I do not want to make any assumption about it. My design idea was that the user can iterate over the result of the optimizer (as success=False is set) and can decide if they wants to restart or terminate the program. An example, where this could be sensible, is if the start unit cell was designed in some specific way and the non-convergence of the CTMRG has some meaning (and not only numerical reasons).

@JanLuca
Copy link
Member

JanLuca commented Oct 16, 2025

I included all bug fixes on the main branch with just some typos fixed.

@JanLuca JanLuca closed this Oct 16, 2025
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