Skip to content
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

deepcopy(Instruction) to use Instruction.copy. #3802

Merged

Conversation

kdk
Copy link
Member

@kdk kdk commented Feb 6, 2020

Summary

To partially address the regression introduced in #3773 and the issue raised in #3800 , updates deepcopy(Instruction) to return Instruction.copy() which shallow copies the instruction instance and its params.

Details and comments

@kdk kdk added this to the 0.12 milestone Feb 6, 2020
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM given our offline discussion. I do have some concerns that this could break end user expectations (because we're not really returning a true deepcopy). But it does address the performance regression, and at least as far as our testing goes doesn't break any behavior we've encoded in the tests. We'll probably address this issue more thoroughly as part of #3800 in the future.

@mergify mergify bot merged commit fc56689 into Qiskit:master Feb 6, 2020
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants