Skip to content

Commit

Permalink
pair approximation fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
lueckem committed Dec 13, 2024
1 parent 2e383a4 commit bae25b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sponet/cnvm/approximations/pair_approximation.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ def rhs(_, c_pa):
c, s = c_pa

dc = (
s * (params.r[0, 1] + params.r[1, 0])
- c * (params.r[1, 0] + params.r_tilde[0, 1] + params.r_tilde[1, 0])
s * (params.r[0, 1] - params.r[1, 0])
- c * (params.r_tilde[0, 1] + params.r_tilde[1, 0])
+ params.r_tilde[0, 1]
)

ds = -2 * (d - 1) / d * s * s / (1 - c) * (params.r[0, 1] + params.r[1, 0])
ds += c * (params.r[1, 0] + params.r_tilde[1, 0] - params.r_tilde[0, 1])
ds = -2 * (d - 1) / d * s * s / (1 - c) * params.r[0, 1]
ds += -2 * (d - 1) / d * s * s / c * params.r[1, 0]
ds += s * (
(d - 2) / d * params.r[0, 1]
- params.r[1, 0]
(d - 2) / d * (params.r[0, 1] + params.r[1, 0])
- 2 * params.r_tilde[0, 1]
- 2 * params.r_tilde[1, 0]
)
ds += c * (params.r_tilde[1, 0] - params.r_tilde[0, 1])
ds += params.r_tilde[0, 1]

return np.array([dc, ds])
Expand Down

0 comments on commit bae25b9

Please sign in to comment.