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

CircuitInstruction qarg type changed without communication #12626

Closed
nkanazawa1989 opened this issue Jun 21, 2024 · 1 comment · Fixed by #12630
Closed

CircuitInstruction qarg type changed without communication #12626

nkanazawa1989 opened this issue Jun 21, 2024 · 1 comment · Fixed by #12630
Labels
bug Something isn't working
Milestone

Comments

@nkanazawa1989
Copy link
Contributor

Environment

  • Qiskit version: main
  • Python version:
  • Operating system:

What is happening?

CircuitInstruction qarg type is suddenly changed.

image

image

This can cause problem in unittest if one is testing instruction qubits without typecast.

How can we reproduce the issue?

See above screenshot

What should happen?

Data type must be preserved, or change must be mentioned in the release note

Any suggestions?

No response

@nkanazawa1989 nkanazawa1989 added the bug Something isn't working label Jun 21, 2024
@jakelishman
Copy link
Member

Can you test data[0].qubits? Hopefully the type of that is still tuple. Even so, we should fix this.

Fwiw, treated CircuitInstruction as a 3-tuple with list elements (rather than using the attribute accessors) is a legacy backwards-compatible behaviour that comes with a runtime penalty. It was added during the switch of the type of the circuit data 2 years ago. We probably should have deprecated and removed it for 1.0, but forgot.

Either way, the type shouldn't have changed while it is supported,band we can get that fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants