-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Example:
print(len(bosonic.fock.basis(11,4)))
gives correct result
print(bosonic.fock.basis_size(11,4))
gives the following error:
File "bosonic\fock.pyx", line 109, in bosonic.fock.basis_size
OverflowError: Python int too large to convert to C long
Possible solution:
I forked the code, (converted to python 3) and changed bosonic.fock.basis_size to:
def basis_size(int n, int m):
cdef int res = scipy.special.binom(n+m-1,n)
return res
A more efficient solution should be possible.
Metadata
Metadata
Assignees
Labels
No labels