The base output command for pulse is the SamplePulse and all other terra output pulses are eventually compiled to the SamplePulse. Internally the SamplePulse is a complex numpy array of samples. The SamplePulse should support being treated as a numpy array by implementing the proper numpy interface. See NEP 22 — Duck typing for NumPy arrays for more information on what must be implemented. This should also extend to DiscreteFunctionalPulses and AnalyticFunctionalPulses with delayed evaluation.
As a consequence pulse composition should be supported AnalyticFunctionPulses and DiscreteFunctionPulses.
What is the expected enhancement?
The base output command for pulse is the
SamplePulse
and all other terra output pulses are eventually compiled to theSamplePulse
. Internally theSamplePulse
is a complex numpy array of samples. TheSamplePulse
should support being treated as a numpy array by implementing the proper numpy interface. See NEP 22 — Duck typing for NumPy arrays for more information on what must be implemented. This should also extend toDiscreteFunctionalPulse
s andAnalyticFunctionalPulse
s with delayed evaluation.As a consequence pulse composition should be supported
AnalyticFunctionPulse
s andDiscreteFunctionPulse
s.