Repository navigation
Add a v1 to v2 migration guide to README.md and llms.txt - #162
Merged
Merged
Conversation
Code written for v1 fails on names that v2 no longer has, such as SparseIR.default_sampling_points(basis.sve_result.u, L) (#161). The guide maps each such call to its v2 replacement. The replacements of the SVE sampling points were checked against v1.1.4 (agreement to 1e-9 or better), and a test item checks them against the roots of the next basis function. Co-Authored-By: Claude Opus 5.5 (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.
Closes #161.
Fermions.jlfails on v2 withUndefVarError: default_sampling_points not defined in SparseIR. It callsSparseIR.default_sampling_points(basis.sve_result.u, length(basis)), a v1 internal. In v2 it cannot be restored: anSVEResultholds only the singular values (libsparseir does not return the SVE functions), sobasis.sve_result.ufails as well. The fix therefore goes into the caller, and this PR documents it.Changes
README.md: a "Migrating from SparseIR.jl v1" section. A table maps each v1 call that no longer runs to its v2 replacement (requiredε,SVEResult,default_sampling_points,uhat_full,roots/sign_changes/find_extrema,factorize,.τ,TauSampling64, custom kernels), followed by the two behavior changes that raise no error (the order of given Matsubara points is kept;basis.u(τ)acceptsτ < 0).llms.txt(new): a short v2 API overview for LLM agents, plus the same migration list.test/spir/migration_tests.jl: checks that the documented replacement ofdefault_sampling_points(sve.u, L)/(sve.v, L)givesLascending points in(-1, 1)at whichU_L/V_Lof a larger basis vanish.Verification
2 .* SparseIR.default_tau_sampling_points(basis) ./ β .- 1matches v1'sdefault_sampling_points(basis.sve_result.u, length(basis))to ≤ 1e-9 (the SVE accuracy for ε = 1e-8) for F/B, Λ = 1, 40, 1000. Thebasis[1:L]variants for τ, ω and Matsubara points (incl.positive_only) match v1 for L = 5, 7, 12, 25.src/Propagators/model.jl:prop_model(7),lehmann(18),gauss(35),prop(964),prop_schedule(10) pass.🤖 Generated with Claude Code