Skip to content

Conversation

@VictorVanthilt
Copy link
Member

This PR makes the braille function usable again for MPOHamiltonians, which are no longer considered SparseMPOs. Additionally it adds some hard-coded tests to ensure is keeps working in the future.

I had to add a new file src/operators/utility.jl which is included after all the other operator code, to make sure the SparseMPO and MPOHamiltonian structs are defined before the braille function. If someone comes up with a better solution, please share.

@VictorVanthilt VictorVanthilt requested a review from leburgel May 20, 2025 14:03
@codecov
Copy link

codecov bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 46.15385% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/operators/show.jl 46.15% 28 Missing ⚠️
Files with missing lines Coverage Δ
src/MPSKit.jl 100.00% <ø> (ø)
src/operators/abstractmpo.jl 85.92% <ø> (+23.89%) ⬆️
src/operators/show.jl 46.15% <46.15%> (ø)
🚀 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.

Definitely makes sense to have a separate file, this is a good solution. Maybe it might be reasonable to simply define a operators/show.jl file and move all of this there?

I'm also okay with leaving it as it is now.

@VictorVanthilt
Copy link
Member Author

I moved the abstract mpo show methods, together with braille method to operators/show.jl. I also added a docstring to the braille function to make it less of a secret to the users.

@VictorVanthilt VictorVanthilt requested a review from lkdvos May 21, 2025 11:06
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.

Good for me if tests pass

@VictorVanthilt VictorVanthilt merged commit 84f9b80 into master May 21, 2025
27 of 28 checks passed
@VictorVanthilt VictorVanthilt deleted the vv-braillefix branch May 21, 2025 12:21
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.

3 participants