OpenFermion
OpenFermion copied to clipboard
Fix: Ensure QubitOperator is simplified before sparse conversion
#880
This PR fixes an issue where get_sparse_operator fails when given a non-simplified QubitOperator
Please let me know if my approach or fix needs any improvements . I’m open to feedback and happy to make changes based on suggestions. Thankyou !
Thanks for this contribution. This is currently failing CI tests because the function simplify() does not seem to exist on the object. Could you please investigate?
Also, I highly recommend running tests locally before submitting a PR, to catch problems like this.
Sure, Thanks! I will look into it .