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.inst_map_add¶
- Calibrations.inst_map_add(instruction_name, qubits, schedule_name=None, assign_params=None)[source]¶
Update a single instruction in the instruction schedule map.
This method can be used to update a single instruction for the given qubits but it can also be used by experiments that define custom gates with parameters such as the
Rabi
experiment. In a Rabi experiment there is a gate named “Rabi” that scans a pulse with a custom amplitude. Therefore we would docals.inst_map_add("Rabi", (0, ), "xp", assign_params={"amp": Parameter("amp")})
to temporarily add a pulse for the Rabi gate in the instruction schedule map. This then allows calling
transpile(circ, inst_map=cals.default_inst_map)
.- Parameters:
instruction_name (
str
) – The name of the instruction to add to the instruction schedule map.qubits (
Tuple
[int
]) – The qubits to which the instruction will apply.schedule_name (
Optional
[str
]) – The name of the schedule. If None is given then we assume that the schedule and the instruction have the same name.assign_params (
Optional
[Dict
[Union
[str
,ParameterKey
],Union
[ParameterExpression
,float
,int
,complex
]]]) – An optional dict of parameter mappings to apply. See for instanceget_schedule()
ofCalibrations
.