Open hsgyc opened 6 months ago
In Hafnian evaluation function, including _calc_hafnian and _calc_loop_hafnian, there is a weird factor multiplication.
_calc_hafnian
_calc_loop_hafnian
if glynn and kept_edges[0] == 0: prefac *= 0.5
However, when glynn method is invoked, keps_deges has value in {-1, 1} and will never be zero. So this code block makes no sense.
keps_deges
Could you make a PR removing that line, to see if the tests pass?
In Hafnian evaluation function, including
_calc_hafnian
and_calc_loop_hafnian
, there is a weird factor multiplication.However, when glynn method is invoked,
keps_deges
has value in {-1, 1} and will never be zero. So this code block makes no sense.