Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labeling of the free parameters in a model #344

Open
kbarros opened this issue Dec 11, 2024 · 0 comments
Open

Labeling of the free parameters in a model #344

kbarros opened this issue Dec 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kbarros
Copy link
Member

kbarros commented Dec 11, 2024

When fitting a spin model, it is conceptually helpful to track the free parameters. Sunny could make this easier by allowing optional label attachment to each coupling. For example,

set_exchange!(sys, J1, bond; label=:J1)

This would enable quick modification to a model:

get_model_parameter(sys, :J1)         # Initially 1.0
set_model_parameter!(sys, :J1, 2.0)   # sys is updated so that the exchange J1 becomes 2*J1
get_model_parameter(sys, :J1)         # Returns 2.0

This, in turn, would facilitate an interface for future model fitting tools. Updating the strength of an interaction will not need symmetry analysis. This abstraction is also needed for gradient based optimization methods, where the free model parameters must be clearly identified at the System level. See also #292.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant