-
Notifications
You must be signed in to change notification settings - Fork 127
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
Allow backend cal to export instmap #185
Allow backend cal to export instmap #185
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach. A test or two would be nice.
The one thing that this methodology along with the terra PR will not allow us to do is inject calibrations for the custom gates we created in e.g. Rabi and Drag as, e.g., an |
qiskit_experiments/calibration/management/backend_calibrations.py
Outdated
Show resolved
Hide resolved
Thanks @eggerdj . In experiments that may use custom gate name you always need to backend = my_cal.export(basis_gates=["Rabi", "measure"])
exp = Rabi(qubit=0)
exp.set_transpile_options(basis_gates=["Rabi", "measure"]) # this can be overridden by self._default_transpile_options
exp.run(backend) and it might be dynamically updated by |
I agree with the need for backend = my_cal.export(basis_gates=["Rabi", "measure"], schedule_gate_map={"xp": "Rabi"})
exp = Rabi(qubit=0)
exp.set_transpile_options(basis_gates=["Rabi", "measure"]) # this can be overridden by self._default_transpile_options
exp.run(backend) and to use the backend = my_cal.export(basis_gates=["Rabi", "measure"], schedule_gate_map={"x90p": "Rabi"}) I don't see how we get around not using something like a backend = my_cal.export(basis_gates=["Rabi", "measure"], schedule_gate_map={"x90p": ["Rabi", "x90p"]}) in case we need, for example, |
@nkanazawa1989 Is this PR still relevant? |
Can we keep this open for a bit longer? There are some ideas in here that I may want to consult as I refactor the calibration experiments. |
Summary
This PR allows
BackendCalibrations
to override instruction schedule map.This requires Qiskit/qiskit#6759
Here is the expected usage.
Note that this framework doesn't require special logic to update calibration on experiment end.
Thus this can be applied to any kind of experiment we define.
If we want to apply custom gate
Again, this doesn't require any custom logic. For example, we can run QV experiment with custom gates without modifying the codebase. This will add more values to the calibration module in terms of smooth integration of pulse and algorithm-level experiment.
It is noteworthy that the backend exported by the
BackendCalibrations
is a standard backend object. This means we can calibrate specific backend, share the experiment with the team, and let other researchers use the custom gate in other qiskit algorithm modules.Details and comments