OpenFermion icon indicating copy to clipboard operation
OpenFermion copied to clipboard

Fix: Ensure QubitOperator is simplified before sparse conversion

Open Aniketsy opened this issue 3 months ago • 2 comments

#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 !

Aniketsy avatar Sep 21 '25 04:09 Aniketsy

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.

mhucka avatar Oct 13 '25 05:10 mhucka

Sure, Thanks! I will look into it .

Aniketsy avatar Oct 13 '25 06:10 Aniketsy