qiskit.pulse.builder.inline
inline()
Inline all instructions within this context into the parent context, inheriting the scheduling policy of the parent context.
Examples:
from qiskit import pulse
d0 = pulse.DriveChannel(0)
d1 = pulse.DriveChannel(1)
d2 = pulse.DriveChannel(2)
with pulse.build() as pulse_prog:
# will be ignored due to internal grouping
with pulse.align_left():
pulse.play(pulse.Constant(10, 1.0), d0)
with pulse.inline():
with pulse.align_right():
# this pulse will start at t=0
pulse.play(pulse.Constant(100, 1.0), d1)
# this pulse will also start at t=0
pulse.play(pulse.Constant(20, 1.0), d2)
assert (pulse_prog.ch_start_time(d0) ==
pulse_prog.ch_start_time(d1) ==
pulse_prog.ch_start_time(d2))
Warning
This will cause all scheduling directives within this context to be ignored.
Return type
AbstractContextManager
[None
]
Was this page helpful?
Report a bug or request content on GitHub.