-
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
Skip registration of U gates in Default setting in pulse system #10805
Comments
You need to add more background for discussion. I had related discussion with @mtreinish but maybe it was offline and I don't remember the details. Currently you are updating circuit scheduler with #10564, and the legacy This will allow circuit-pulse scheduler to use # Create an empty Target
target = Target(meas_map=schedule_config.meas_map, dt=schedule_config.dt)
target.update_from_instruction_schedule_map(schedule_config.inst_map) Problems of using the update_from_instruction_schedule_map method are:
Current implementation of the method is (pseudo code):
This means, necessary gates such as We should properly handle three situations: Backend provided schedule, NOT in configuration.supported_instructions and configuration.basis_gatesThis is the case of U1, U2, U3. Entries are not reported in circuit domain thus not in the created Target. Backend provided, defined in configuration.supported_instructions or configuration.basis_gatesThis is the case of SX, RZ. Entries are created in the Target with calibration information. User providedCustom defined gate (not in basis gates) or basis gates with updated calibration. In the current implementation we cannot distinguish (1) and (2) only with the inst_map (i.e. without backend configuration), which is the situation of converting the legacy Roughly speaking, I think there are two approaches: (1) Permanently removing U1, U2, U3 from inst map. The approach you are proposing is one of the implementations for (1). I think there are several patterns to realize (1) and (2). Can you summarize the implementation and write pros/cons for each? @to24toro |
(1) Permanently removing U1, U2, U3 from inst map.If we can skip registering these U gate such as U1, U2, U3 in Pros:
Cons:
(2) Make update_from_instruction_schedule_map method basis gate aware, and let users provide basis gates.Pros:
Cons:
|
TBH, I don't have a super strong opinion on this. I'm still confused why the backend is returning calibrations for U1, U2, and U3 at all if they're not supported operations. This does seem like something that is backend specific, because if the That all being said, I'm not actually too concerned with adding a |
What should we add?
Previously, IBM provider used to offer U gates
u1
,u2
, andu3
as basis gates. Now, the target class includes information about backend instructions, properties and more. Additionally, the backend default is also included in the target and u gates are allowed to be registered to the default for the backward compatibility inqiskit/qiskit/providers/models/pulsedefaults.py
Line 205 in cd507ad
When creating the backend default, instruction names and theire qubit arguments are mapped to the schedule through
instruction_schedule_map
, resulting in the inclusion of U gate instructions in the target.We can exclude U gates from
inst_map
by skipping registering u gates.The text was updated successfully, but these errors were encountered: