Skip to content

Commit

Permalink
Implement clock model (#13)
Browse files Browse the repository at this point in the history
* clock_model

* format and remove notebook junk

---------

Co-authored-by: dartsushi <[email protected]>
  • Loading branch information
VictorVanthilt and dartsushi authored Feb 8, 2025
1 parent e862531 commit 797ddb2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/models/ising.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,21 @@ function classical_Potts(q::Int64, β::Float64)
end
return A_potts
end

function classical_Clock(q::Int64, β::Float64)
V =^q
A_clock = TensorMap(zeros, V V V V)
clock(i, j) = -cos(2π / q * (i - j))

for i in 1:q
for j in 1:q
for k in 1:q
for l in 1:q
E = clock(i, j) + clock(j, k) + clock(k, l) + clock(l, i)
A_clock[i, j, k, l] = exp(-β * E)
end
end
end
end
return A_clock
end

0 comments on commit 797ddb2

Please sign in to comment.