Skip to content

Conversation

@AFeuerpfeil
Copy link
Contributor

I am currently working on getting the algorithms to run for user-defined AbstractMPS types.
To this end, I will go through the algorithms (currently focussing on IDMRG and VUMPS) and implement the Style interface for the highest-level functions, which are called in these algorithms.

Examples for these are calc_galerkin, expectation_value, environments, recalculate!, (A)C(2)_hamiltonian, transfer_leftenv!, transfer_rightenv!.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

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

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/operators/lazysum.jl 50.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/algorithms/groundstate/find_groundstate.jl 76.92% <100.00%> (ø)
src/algorithms/groundstate/idmrg.jl 100.00% <100.00%> (ø)
src/algorithms/groundstate/vumps.jl 85.91% <100.00%> (+0.20%) ⬆️
src/operators/lazysum.jl 70.37% <50.00%> (-1.63%) ⬇️

... and 1 file with indirect coverage changes

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

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.

This looks great, I really like that we can relax the input types.

@AFeuerpfeil
Copy link
Contributor Author

AFeuerpfeil commented Dec 5, 2025

It definitely feels like it is going in the right direction.
In my current fork, it is not reducing the size of the code but is also not adding too much boilerplate.
One question I came up with is the following:
Do we at all want to restrict input types to AbstractMPS, AbstractMPO, AbstractMPSEnvironments or just leave that completely open to the user?
And if we want to restrict it, then at which level, only at the topmost function, which dispatches onto the function defined on Styles or in all levels?

An example, how the restriction only for the topmost function in the call tree looks like, is

function environments(above::AbstractMPS, op::AbstractMPO, below::AbstractMPS)
    return environments(GeometryStyle(above, op, below), OperatorStyle(op), above, op, below)
end

and then

function environments(::InfiniteChainStyle, ::HamiltonianStyle, above, op, below)
 ...
end

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