-
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
Label and name gate should be merged and QasmQobjInstruction take name as identifier #2393
Comments
The plan would be:
|
I would rather not couple (even with names) the qobj and the circuits. |
You think |
From #2395 (comment), we are moving towards a class attribute name for the gate names as a way to join the type and the name of the gates. I'm removing the |
@taalexander seemed to suggest this approach will not be good for pulse |
The issue for pulse is the way pulse's are represented in the Qobj. Each pulse in a pulse instruction references a unique pulse in the As pulse instance creation is a much more common pattern than basis gate creation in circuits it would be a very inconvenient and confusing pattern to have to derive a new class for each new pulse with a different name. In my mind creating a SamplePulse with a given set of samples is more akin to creating an instance of a Gate with a set of arguments (such as the angles for If we were set on this model we could provide a constructor function that would automatically derive and name a new class for each new set of pulse samples, but this seems clunky. |
I'm going to close this as stale now - the Please feel free to re-open if there's more to discuss. |
In PR #2173 we introduced the notion of "label" for gates. I hope I could make a compelling argument in Qiskit/qiskit-aer#207 that "label" should not be used as identifier. In the same spirit, I think "name" should not be used as identifier in
Instruction.assemble
(the type should be used).We do also agree that a display-as argument in conviant for #2286 . For this purpose, I think a name/label (just one of them) is useful.
For assemble purposes
instruction = QasmQobjInstruction(name=self.qobj_name)
and each gate should set a class attributeqobj_name
.The text was updated successfully, but these errors were encountered: