Note
This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.
Calibrations.get_schedule¶
- Calibrations.get_schedule(name, qubits, assign_params=None, group='default', cutoff_date=None)[source]¶
Get the template schedule with parameters assigned to values.
All the parameters in the template schedule block will be assigned to the values managed by the calibrations unless they are specified in assign_params. In this case the value in assign_params will override the value stored by the calibrations. A parameter value in assign_params may also be a
ParameterExpression
.# Get an xp schedule with a parametric amplitude sched = cals.get_schedule("xp", 3, assign_params={"amp": Parameter("amp")}) # Get an echoed-cross-resonance schedule between qubits (0, 2) where the xp echo gates # are referenced schedules but leave their amplitudes as parameters. assign_dict = {("amp", (0,), "xp"): Parameter("my_amp")} sched = cals.get_schedule("cr", (0, 2), assign_params=assign_dict)
- Parameters:
name (
str
) – The name of the schedule to get.qubits (
Union
[int
,Tuple
[int
,...
]]) – The qubits for which to get the schedule.assign_params (
Optional
[Dict
[Union
[str
,ParameterKey
],Union
[ParameterExpression
,float
,int
,complex
]]]) – The parameters to assign manually. Each parameter is specified by a ParameterKey which is a named tuple of the form (parameter name, qubits, schedule name). Each entry in assign_params can also be a string corresponding to the name of the parameter. In this case, the schedule name and qubits of the corresponding ParameterKey will be the name and qubits given as arguments to get_schedule.group (
Optional
[str
]) – The calibration group from which to draw the parameters. If not specified this defaults to the ‘default’ group.cutoff_date (
Optional
[datetime
]) – Retrieve the most recent parameter up until the cutoff date. Parameters generated after the cutoff date will be ignored. If the cutoff_date is None then all parameters are considered. This allows users to discard more recent values that may be erroneous.
- Returns:
A copy of the template schedule with all parameters assigned.
- Return type:
schedule
- Raises:
CalibrationError – If the name of the schedule is not known.
CalibrationError – If a parameter could not be found.