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

Instruction shallow copy #2214

Merged
merged 3 commits into from
Apr 26, 2019

Conversation

ajavadia
Copy link
Member

This PR changes the instruction.copy() to return a shallow copy. This works because after #1816, the instruction no longer has recursive references.

So it simplifies the duplication of instructions found in converters.circuit_to_dag/dag_to_circuit, which hardcoded special cases to handle special instructions.

@chriseclectic chriseclectic merged commit 7b2a1c6 into Qiskit:master Apr 26, 2019
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
* shallow copy instead of custom duplicate_instruction method
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.

3 participants