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

return energy/4. or return energy/2. when calculating energy of Ising model? #3

Closed
WhymustIhaveaname opened this issue Sep 22, 2021 · 1 comment

Comments

@WhymustIhaveaname
Copy link

WhymustIhaveaname commented Sep 22, 2021

I just found your Ising model blog, which is very good and helped me a lot. However, I think the return energy/4 in function def calcEnergy(config) should be divided by 2 because every link between sites is summed 2 times, not four.

@WhymustIhaveaname WhymustIhaveaname changed the title return energy/4. or ` return energy/4. or return energy/2. when calculating energy of Ising model? Sep 22, 2021
rajeshrinet added a commit that referenced this issue Sep 22, 2021
@rajeshrinet
Copy link
Owner

rajeshrinet commented Sep 22, 2021

@WhymustIhaveaname thanks very much for your interest and suggesting a fix. I agree with you that the factor should be 2 instead of 4. I have now fixed the factor.

Best wishes,
Rajesh

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

No branches or pull requests

2 participants