Setup single-qubit calibrations#114
Conversation
|
Overall this looks good and the calibration tutorial should be updated with this functionality. However this design should be more extendable.
Here you can define template generator against each basis gate. In current implementation X and SX gate template are generated at the same time, however, we might not want to calibrate X gate since this is not necessary for the universal gate set. If this library can initialize template per basis gate, we can design backend object more flexibly by combining arbitrary set of gate from library. We should be able to define library for different processor architectures, i.e.
This allows end-users to easily initialize template pulses. For example, cal = BackendCalibrations(
backend,
basis_gates=["x", "sx"],
library="ibm-quantum-default" # name TBD
)Then The entire workflow eventually would be |
nkanazawa1989
left a comment
There was a problem hiding this comment.
This is awesome. Couple of minor comments but overall this is almost good to go.
|
one more comment: perhaps you can add |
Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
…were not selected.
nkanazawa1989
left a comment
There was a problem hiding this comment.
Thanks Daniel. This is really close. Alternative option to set library would be
cals = BackendCalibrations(
backend,
basis_gates=["x", "sx"],
library=FixedFrequencyTransmon(duration=320),
)
i.e. give the library instance instead of class + init args separately. I don't see strong motivation to separate them for current implementation.
Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
…ments into calibrations_setup
nkanazawa1989
left a comment
There was a problem hiding this comment.
I all agree with @wshanks 's suggestions. However it looks good to me other than this. Please feel free to go forward with the suggestions.
|
|
||
| __default_values__ = {"duration": 160, "amp": 0.5, "β": 0.0} | ||
|
|
||
| def __init__(self, default_values: Optional[Dict] = None, use_drag: bool = True): |
There was a problem hiding this comment.
perhaps you can explicitly write duration_default, amp_default, beta_default here.
wshanks
left a comment
There was a problem hiding this comment.
Just one little thing to change.
* * Implemented method to setup single-qubit calibrations. * * Refactored cals setup to library style. * * Fix sigma in test. * Update qiskit_experiments/calibration_management/basis_gate_library.py Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com> * * Made library options kwargs. * * Added error raising. * * Added basis gates property. * * Renamed transmon library. * * Docs. * * Added better Drag optionality. * * Added y and sy gates to library. * * Add check to make sure we do not add default values for gates that were not selected. * Update qiskit_experiments/calibration_management/basis_gate_library.py Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com> * * Docs. * * Update the way the library is passed to BackendCalibrations. * * Lint. * * Added option to link parameters. * * Partial generation of basis gates. * * Added test. * * Fixed test issue and added in operator. Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
Summary
This PR implements a method to help users setup a Calibrations instance.
Details and comments
Setting up Calibrations instances when no previously saved data is available can be tedious. This PR is the start of a set of functions that can help users set-up a calibrations instances by populating it with typical pulse schedules and some parameter values. In this PR we implement a function to setup xp, xm, x90p, x90m, y90p, and y90m single-qubit rotations implemented with Drag pulses in a calibrations for transmon qubits. This library of functions will be extended in the future.