refactor: transfer_spectrum and correlation_length default to sector-centered implementation#452
Open
lkdvos wants to merge 7 commits into
Open
refactor: transfer_spectrum and correlation_length default to sector-centered implementation#452lkdvos wants to merge 7 commits into
transfer_spectrum and correlation_length default to sector-centered implementation#452lkdvos wants to merge 7 commits into
Conversation
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
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!
| # Keyword arguments | ||
|
|
||
| - `num_vals=20`: the number of eigenvalues to compute. This can either be a single `Int`, which is used for every sector of the transfer space, | ||
| or an `AbstractDict`/iterable of `sector => count` pairs to restrict the computation to specific sectors and request a different number of values per sector. |
Member
There was a problem hiding this comment.
Just messing around with different iterables of pairs, I feel like the only one that behaves as expected is a dictionary. Calling pairs on a vector or tuple behaves different to what I expected at least, and just gives the dictionary back in that case.
Member
Author
There was a problem hiding this comment.
Woops, that was my bad - should just iterate the thing that was handed to me, not actually iterate the pairs specifically
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.