qiskit.pulse.ScheduleBlock.search_parameters¶
- ScheduleBlock.search_parameters(parameter_regex)[source]¶
Search parameter with regular expression.
This method looks for the scope-aware parameters. 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.search_parameters("root::sub::amp")
This finds
amp1
with scoped name “root::sub::amp”.- Parameters
parameter_regex (
str
) – Regular expression for scoped parameter name.- Return type
List
[Parameter
]- Returns
Parameter objects that have corresponding name.