Skip to content

Refactor groundstate algorithms to use find_groundstate! and GeometryStyle dispatch#410

Draft
AFeuerpfeil wants to merge 4 commits intoQuantumKitHub:mainfrom
AFeuerpfeil:pr-groundstates
Draft

Refactor groundstate algorithms to use find_groundstate! and GeometryStyle dispatch#410
AFeuerpfeil wants to merge 4 commits intoQuantumKitHub:mainfrom
AFeuerpfeil:pr-groundstates

Conversation

@AFeuerpfeil
Copy link
Copy Markdown
Contributor

The find_groundstate algorithms previously dispatched on concrete MPS types (InfiniteMPS, AbstractFiniteMPS) and mixed mutating/non-mutating semantics. This PR refactors the interface to follow the conventions:

  • Introduce find_groundstate! variants for all algorithms (VUMPS, DMRG, DMRG2, IDMRG, IDMRG2, GradientGrassmann) that update ψ in-place, reusing its storage. The non-mutating find_groundstate now simply copies ψ and delegates to find_groundstate!.
  • Replace dispatch on concrete MPS types with dispatch on GeometryStyle (InfiniteChainStyle/FiniteChainStyle), making the algorithms more general and decoupled from specific state types.
  • Update the find_groundstate docstring to document both the ! and non-! variants together.

…dstate! on `GeometryStyle` instead of MPS type.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Your PR no longer requires formatting changes. Thank you for your contribution!

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.

1 participant