build(backend=None, schedule=None, name=None, default_alignment='left', default_transpiler_settings=None, default_circuit_scheduler_settings=None)¶
Create a context manager for launching the imperative pulse builder DSL.
To enter a building context and starting building a pulse program:
from qiskit import execute, pulse from qiskit.test.mock import FakeOpenPulse2Q backend = FakeOpenPulse2Q() d0 = pulse.DriveChannel(0) with pulse.build() as pulse_prog: pulse.play(pulse.Constant(100, 0.5), d0)
While the output program
pulse_progcannot be executed as we are using a mock backend. If a real backend is being used, executing the program is done with:
Schedule]) – a mutable pulse Schedule in which your pulse program will be built.
str]) – Name of pulse program to be built. Only used if schedule is not
str) – Default scheduling alignment for builder. One of
sequentialor an alignment contextmanager.
Any]]) – Default settings for the transpiler.
Any]]) – Default settings for the circuit to pulse scheduler.
- 반환 형식
A new builder context which has the active builder initialized.