-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
No in-place dunder methods on QuantumCircuitData
can lead to slow performance
#9555
Comments
No code outside of Ideally, we'd move to |
I think this is the rub. |
Hi, I would love to work on this issue. |
Hey @mustapha-saad-codeStar, are you still working on this? If not I would like to take on this issue. Or we can work together to get a solution? |
@mustapha-saad @yusharth Hi all, you've expressed interest in this issue previously but it slipped through the cracks. If you are still interested in and available to contribute to this issue please ping me here and I will assign the issue to the first responder. |
This issue is probably not a good candidate to work on right now, because of other work going on in #10827 that will have serious ramifications for it. |
Hey, @AngeloDanducci I would love to contribute but it seems there was some confusion regarding this issue. Is there any other issue on which I can lend you hands or might be appropriate to work on? |
What should we add?
As came up in #9491 ,
QuantumCircuitData
has no implementations of in-place dunder methods like__iadd__
, but does have implementations of corresponding "normal" methods like__add__
. (ref. https://docs.python.org/3/reference/datamodel.html#object.__iadd__ ) This can cause unexpected performance problems when writing code that attempts to perform in-place modifications ofcircuit.data
ends up generating a lot of unnecessary copies.We should either add the corresponding in-place implementations or raise an error re-directing users to the corresponding method on
QuantumCircuit
.The text was updated successfully, but these errors were encountered: