2.6. The ConstantPulseTemplateΒΆ
The ConstantPulseTemplate
(or short ConstantPT
) can be used to define pulse templates with all channels a constant value. The template is easy to define and allows backends to optimize the waveforms on an AWG.
[4]:
%matplotlib inline
from qupulse.pulses import ConstantPT
constant_template = ConstantPT(10, {'A': 1., 'B': .2})
print(constant_template.defined_channels)
print(constant_template.integral)
{'A', 'B'}
{'A': Expression('10.0000000000000'), 'B': Expression('2.00000000000000')}
The pulse template has two channels.
[5]:
from qupulse.pulses.plotting import plot
_ = plot(constant_template, sample_rate=100)
c:\projects\qupulse\qupulse\pulses\plotting.py:236: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
axes.get_figure().show()
[ ]: