Skip to content

windowhamiltonian poc#417

Open
maartenvd wants to merge 9 commits intomainfrom
mvd/windowham
Open

windowhamiltonian poc#417
maartenvd wants to merge 9 commits intomainfrom
mvd/windowham

Conversation

@maartenvd
Copy link
Copy Markdown
Collaborator

draft pr for a windowhamiltonian type, resolving some pain points from #411

It wasn't possible in the past to correctly create a windowmps environments. The window uses a finitehamiltonian, but then the boundaries require an infinite hamiltonian. This new windowhamiltonian would keep track of the "bath" hamiltonian, and the finite hamiltonian for the window.

Misses full support for the abstractmpo interface, and I think a propagator+window test would be nice to have.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/MPSKit.jl 100.00% <ø> (ø)
src/algorithms/expval.jl 87.35% <100.00%> (+47.35%) ⬆️
src/algorithms/propagator/corvector.jl 95.40% <ø> (+95.40%) ⬆️
src/environments/finite_envs.jl 98.24% <100.00%> (+19.29%) ⬆️
src/operators/mpohamiltonian.jl 90.37% <100.00%> (+46.95%) ⬆️
src/operators/windowhamiltonian.jl 100.00% <100.00%> (ø)
src/states/windowmps.jl 69.04% <100.00%> (+2.79%) ⬆️

... and 63 files with indirect coverage changes

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

@maartenvd maartenvd marked this pull request as ready for review April 29, 2026 08:08
Copy link
Copy Markdown
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! I left some minor comments but otherwise I'm happy to merge this and go from there

Comment thread src/algorithms/propagator/corvector.jl Outdated
Comment thread src/operators/windowhamiltonian.jl Outdated
Comment thread src/operators/windowhamiltonian.jl
@maartenvd
Copy link
Copy Markdown
Collaborator Author

I added a windowmps constructor that takes in a unitrange, similar to windowmpohamiltonian.

@lkdvos
Copy link
Copy Markdown
Member

lkdvos commented May 1, 2026

Looks good to me! I rebased on the latest main to hopefully resolve the errors in the tests, but if it works I'll just merge this so it is included in the next release, which I hope to get out today.

@maartenvd
Copy link
Copy Markdown
Collaborator Author

I forgot that I still want to write some docstring referencing exactly what propagator returns, I wouldn't merge just yet

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