qiskit.pulse.ScheduleBlock.get_parameters¶
- ScheduleBlock.get_parameters(parameter_name)[source]¶
Get parameter object bound to this schedule by string name.
Note that we can define different parameter objects with the same name, because these different objects are identified by their unique uuid. For example,
from qiskit import pulse, circuit amp1 = circuit.Parameter("amp") amp2 = circuit.Parameter("amp") with pulse.build() as sub_prog: pulse.play(pulse.Constant(100, amp1), pulse.DriveChannel(0)) with pulse.build() as main_prog: pulse.call(sub_prog, name="sub") pulse.play(pulse.Constant(100, amp2), pulse.DriveChannel(0)) main_prog.get_parameters("amp")
This returns a list of two parameters
amp1
andamp2
.- Parameters
parameter_name (
str
) – Name of parameter.- Return type
List
[Parameter
]- Returns
Parameter objects that have corresponding name.