refactor: transfer_spectrum and correlation_length default to sector-centered implementation - #452
Merged
Conversation
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
lkdvos
marked this pull request as ready for review
July 6, 2026 23:12
borisdevos
reviewed
Jul 7, 2026
borisdevos
approved these changes
Jul 8, 2026
borisdevos
left a comment
Member
There was a problem hiding this comment.
Minor comments, but looks good to me!
leburgel
approved these changes
Jul 9, 2026
leburgel
left a comment
Member
There was a problem hiding this comment.
Few minor comments, but looks good to me.
Co-authored-by: Lander Burgelman <39218680+leburgel@users.noreply.github.com>
lkdvos
enabled auto-merge (squash)
July 9, 2026 22:30
lkdvos
disabled auto-merge
July 10, 2026 00:51
lkdvos
added a commit
that referenced
this pull request
Jul 11, 2026
After rebasing onto main (#452, sector-centered transfer spectrum): - transfer_spectrum keyword `num_vals` was renamed to `howmany` - correlation_length now returns a per-sector `SectorDict`; take the largest entry (`maximum(values(...))`) to recover the scalar correlation length the prose describes Fixes the two @example blocks (convergence_troubleshooting, statmech) that used the pre-#452 API. Full Documenter build is green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lkdvos
added a commit
that referenced
this pull request
Jul 27, 2026
After rebasing onto main (#452, sector-centered transfer spectrum): - transfer_spectrum keyword `num_vals` was renamed to `howmany` - correlation_length now returns a per-sector `SectorDict`; take the largest entry (`maximum(values(...))`) to recover the scalar correlation length the prose describes Fixes the two @example blocks (convergence_troubleshooting, statmech) that used the pre-#452 API. Full Documenter build is green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the
transfer_spectrumfunction to be more in line with theentanglement_spectrumfunction, and return aSectorVectorfor the different sectors that may appear.This also gives us the opportunity to actually compute the correlation length in the dominant sector, rather than defaulting to the trivial sector instead, which is something that had surfaced before: See also QuantumKitHub/PEPSKit.jl#216
Something else that had been bothering me for a long time is that the krylov dimension is selected once up front, and then never changed, so it really required quite a bit of manual scripting to actually get a reasonable set of transfer values for all different sectors.
Here i've introduced
oversamplingandoversampling_factoras ways to set the krylov dimension from the requested values instead, which might be a bit more ergonomic?Finally, this is in preparation of improving the plotting functionality, see also #428, which I'd like to give similar interfaces so it might be useful to think about this a bit.