# Symmetry transformations that are self-inverse and global symmetries of the Hamiltonian

I have the simplified Ising model. The Hamiltonian is given by $$\mathcal{H} = -\mathrm{J}\sum_{} \sigma_{ij} \sigma_{i'j'}.$$ Where the sum over $$$$ means just the sum over nearest neighbors and $$\mathrm{J}$$ is a constant.

I am trying to recreate the algorithm described in the paper 'Geometric cluster Monte Carlo simulation'. To do this I need a 'symmetry transformation' that is self-inverse and a global symmetry of $$\mathcal{H}$$. The paper says these can be 'relfections, inversions, translations, ..'. I wrote a Python implementation of this algorithm and it didn't work. I am worried I am misunderstanding what this transformation has to be.

Suppose I have $$L\times L$$ spins (with periodic boundary) on a square lattice. Spin $$\sigma_{ab}$$ is placed in the position $$(a,b)$$ in the lattice. Let $$T$$ be the following transformation $$T:\{0,1,..,L-1\}^2\rightarrow\{0,1,..,L-1\}^2, \\T(a,b)=(L-1-a, L-1-b).$$

So $$T$$ is a point inversion through the center of the lattice.

To me self-inverse means $$f(f(x))=x.$$ This is satisfied by $$T$$, since $$T(T(a,b))=T(L-1-a,L-1-b)=(L-1-(L-1-a),L-1-(L-1-b))=(a,b).$$ Global symmetry of $$\mathcal{H}$$, I thought is $$\mathcal{H}$$(original latice) $$= \mathcal{H}$$(transformed lattice). Meaning I should get the same value for the Hamiltonian if I compute it with the original spin configuration as when I compute it with the $$T$$ transformed spin configuration. $$T$$ satisfies this condition since the spin $$\sigma_{ab}$$ affects $$\mathcal{H}$$ only in four terms, the terms with its neighbors. The neighbors of $$\sigma_{ab}$$ are the same after the transformation, they just swap positions with opposing neighbors of $$\sigma_{ab}.$$ So the contribution of $$\sigma_{ab}$$ to $$\mathcal{H}$$ before and after the transformation is the same.

Is this correct? Is this what is meant by 'self-inverse and global symmetry of the Hamiltonian'?

EDIT: I contacted the author and he was kind enough to look at my code. I simply made an error in the code. $$T$$ from above is indeed an example to what was meant by such transforms.

"There exist n $$\in \mathbb{N}$$ such that $$f(f(...f(x)...) = f^{(n)}(x) = x$$." $$\hspace{1cm}$$('normal' self-inverse case being n=2)