I'm trying to build a gaussian pulse in qiskit where I keep the amplitude as a parameter but for the followig code
theta = Parameter('θ') drive_amps=np.linspace(0.0,0.75,50) with pulse.build(backend, name='example') as program: pulse.set_frequency(fq1,pulse.drive_channel(0)) dur = 100 amp = theta sig = 20 gaussian_pulse = library.gaussian(dur, amp, sig) pulse.play(gaussian_pulse, pulse.drive_channel(0))
I get an error that ParametricExpression cannot be cast as complex. From the documentation it seems that
gaussian(duration, amp, sigma) takes the input
(Union[complex, ParameterExpression]) for amp but I have not been able to get the input to work. Has anyone found a way around this?