refactor: transfer_spectrum and correlation_length default to sector-centered implementation#452
Conversation
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
borisdevos
left a comment
There was a problem hiding this comment.
Minor comments, but looks good to me!
leburgel
left a comment
There was a problem hiding this comment.
Few minor comments, but looks good to me.
There was a problem hiding this comment.
This one seems to have changed quite drastically, was this expected?
There was a problem hiding this comment.
Yeah, this is the non-injective one so it is more or less numerical noise, the main point is that the dominant value is degenerate, which unfortunately was more visible on the previous plot because it accidentally got wrapped around the branch cut, but I don't really feel like playing whack-a-mole with the RNG...
Co-authored-by: Lander Burgelman <39218680+leburgel@users.noreply.github.com>
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 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.