wilsonmr / anvil

Repository containing code related to flow based generative model
https://wilsonmr.github.io/anvil/
GNU General Public License v3.0
0 stars 2 forks source link

Spin observables #36

Closed jmarshrossney closed 4 years ago

jmarshrossney commented 4 years ago

Observables for the O(N) spin models for N = 2, 3.

The main hoop to jump through is that the way the correlation function is calculated depends on the theory. However, once we have the two point function everything becomes generic.

So, I've moved the correlation function calculations into 'field ensemble' classes, but everything else has pretty much stayed put.

Topological observables have also been implemented for the O(3) model. This amounts to calculating the topological charge in the 'field ensemble' class (it's a different calculation for O(3) v.s. CPN-1), after which moments can be calculated in a theory-independent way.

I've also added a test to check that the topological charge is as expected for minimal 4x4 configurations: one with no topological defect, and two with a positive/negative 'hedgehog' skyrmion.

The results of this test are as expected, with the caveats that

  1. Certain "exceptional" spin configurations - where three adjacent lattice sites contain spins which lie on the same great circle - cause problems, though this is probably more of an issue for setting up test cases than in practice.
  2. Periodic boundary conditions means we often measure fractional topological charge, rather than integer as it would be for an infinite lattice. This is probably a bigger issue but may not be crucial if we're just measuring the autocorrelation time.