New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed-up SparsePauliOp.simplify
#7122
Conversation
@ikkoham Could you review this PR? |
Thank you @t-imamichi . The first part is the performance regression I introduced in #6826. LGTM. |
|
aa134b0
to
3b2fbc4
Compare
3b2fbc4
to
7dfb6f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and a great speed up! I learned about np.packbits
too, which I'd not come across before.
Summary
SparsePauliOp.simplify
is very slow if there are so many Pauli strings. I optimized some numpy codes.Details and comments
micro benchmark
main (06795bf)
this PR v1 (418c55b6)
this PR v2 (8492a26e)
this PR v3 (aa134b0)
this PR v4 (f09d662) thanks to @jakelishman