-
Notifications
You must be signed in to change notification settings - Fork 131
Setup single-qubit calibrations #114
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome. Couple of minor comments but overall this is almost good to go.
qiskit_experiments/calibration_management/backend_calibrations.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/calibration_management/backend_calibrations.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/calibration_management/backend_calibrations.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/calibration_management/basis_gate_library.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/calibration_management/basis_gate_library.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/calibration_management/basis_gate_library.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/calibration_management/basis_gate_library.py
Outdated
Show resolved
Hide resolved
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
qiskit_experiments/calibration_management/basis_gate_library.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/calibration_management/basis_gate_library.py
Outdated
Show resolved
Hide resolved
qiskit_experiments/calibration_management/basis_gate_library.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
…ments into calibrations_setup
qiskit_experiments/calibration_management/backend_calibrations.py
Outdated
Show resolved
Hide resolved
nkanazawa1989
left a comment
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps you can explicitly write duration_default, amp_default, beta_default here.
wshanks
left a comment
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.
Just one little thing to change.
…ments into calibrations_setup
* * 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.