Skip to content

Conversation

@AFeuerpfeil
Copy link
Contributor

@AFeuerpfeil AFeuerpfeil commented Nov 6, 2025

In this PR, I refactor IDMRG to follow the IterativeSolver interface (as VUMPS).
This allows to share more code between IDMRG and IDMRG2 and also simplifies overloading some parts of the algorithm for e.g. different MPO types.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

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

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/algorithms/groundstate/idmrg.jl 100.00% <100.00%> (+1.44%) ⬆️
src/utility/iterativesolvers.jl 88.88% <100.00%> (ø)

... and 17 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AFeuerpfeil
Copy link
Contributor Author

AFeuerpfeil commented Dec 2, 2025

@lkdvos: I have implemented the points we discussed today.
One slight issue I had with making the energy typestable is that if mps or mpo are complex, the energy obtained from fixedpoint is real, iff ishermitian. Therefore, I added the constructor IDMRGState{T}. An alternative solution would be to directly call

it.state = IDMRGState(mps, state.operator, envs, state.iter + 1, ϵ, T(E_new))

I am not sure, which way I prefer.

@AFeuerpfeil AFeuerpfeil changed the title Refactor of IDMRG Refactor of IDMRG with IterativeSolver Dec 2, 2025
@AFeuerpfeil
Copy link
Contributor Author

PS: The one-line change in IterativeSolver is the bugfix that was already merged some time ago.

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.

Overall looks great, thank you!

@lkdvos lkdvos enabled auto-merge (squash) December 2, 2025 14:31
@lkdvos lkdvos merged commit 898de3a into QuantumKitHub:main Dec 2, 2025
27 checks passed
@AFeuerpfeil AFeuerpfeil deleted the pr-idmrg branch December 4, 2025 21:48
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