In master the integer that represents a product state is converted to a string. Then either remove or create an electron by operating on that string. Finally convert back to an integer.
In this MR instead stay in the integer representation. Remove and create electrons using bit-operators and the function .bit_count() . This is faster and more similar to a fast low-level language implementation. The nice thing with using Python is that the total number of spin-orbitals can be bigger than 64 without overflow.
.bit_count() requires at least python3.10.
pytype does not support python3.11. Since people might want to use that version remove pytype from requirements.in. pytype is not so important anyway.
In
master
the integer that represents a product state is converted to a string. Then either remove or create an electron by operating on that string. Finally convert back to an integer.In this MR instead stay in the integer representation. Remove and create electrons using bit-operators and the function
.bit_count()
. This is faster and more similar to a fast low-level language implementation. The nice thing with using Python is that the total number of spin-orbitals can be bigger than 64 without overflow..bit_count()
requires at least python3.10.pytype
does not support python3.11. Since people might want to use that version removepytype
fromrequirements.in
.pytype
is not so important anyway.closes: https://github.com/JohanSchott/impurityModel/issues/46