You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import hafnian as haf
import numpy as np
n = 16
A = np.array([[0.308549, 0.350677], [0.350677, 0.398558]])
Atot = haf.kron_reduced(A,[n,n])
print(haf.perm(Atot))
it produces 0.0 as an outcome almost instantaneously. The same code with n=15 provides an output ~5e16 after a few seconds. The zero outcome with n=16 doesn't look right...
The text was updated successfully, but these errors were encountered:
Note that the unsigned long int ctype c goes all the way to 2^32-1. Thus basically the variable that contains the number of iterations is being overflowed. For this problem one can either change the variable type or embed the permanent into the hafnian and use Kan's formula (which will be much faster for a system with so many repetitions). Also note that for general permanents of that size the accuracy of the computation is compromised. Thanks for the report @benkj !
Consider the following code with hafnian++
it produces 0.0 as an outcome almost instantaneously. The same code with
n=15
provides an output ~5e16 after a few seconds. The zero outcome withn=16
doesn't look right...The text was updated successfully, but these errors were encountered: