OpenFermion
OpenFermion copied to clipboard
smbolic_operator.py::_issmall() could (should?) be a static member of SymbolicOperator
smbolic_operator.py defines the function _issmall(). Unfortunately it is defined in the file but not part of the class, which is why derived classes cannot overwrite it.
I would like to request that _issmall() is made part of the class as a @staticmethod.
Background: I would like to implement a "vector valued" (numpy.ndarray values to be precise) subclass of QubitOperator. This is almost trivial, just the _issmall() check needs to compare the norm instead of abs(val) to tol.
I can't see any potential issues with this. Do you want to make the change?
OK. PR opened under #703 .