Interpolated Waveforms¶
Run the offline example:
python3 examples/user/analog_interpolated_waveform.py
Use Waveform.interpolated() when measured or designed control samples should form a smooth curve rather than straight piecewise-linear segments:
from cascaqit import AHSProgram, AtomRegister, MockNeutralAtomTarget, Waveform
program = AHSProgram(AtomRegister.line(count=1, spacing=5.0))
target = MockNeutralAtomTarget.v0_2()
omega = program.parameter("omega", default=3.0)
program.drive(
rabi=Waveform.interpolated(
times=(0.0, 0.2, 0.7, 1.0),
values=(0.0, omega, omega / 3.0, 0.0),
),
detuning=Waveform.constant(0.0, duration=1.0),
phase=0.0,
).measure()
result = program.bind({}).run(
target=target,
shots=32,
seed=31,
time_steps=256,
)
The interpolation is fixed to PCHIP: it passes through every declared sample, preserves the local shape without unconstrained cubic overshoot, and clamps execution to the declared endpoints. Times must start at 0.0, contain at least two finite strictly increasing samples, and end at the waveform duration. Values may use canonical Parameter and Expression objects and become numeric during bind(). Select MockNeutralAtomTarget.v0_2() explicitly; the frozen v0.1 target does not claim this capability.
Validation, discretization, offline compilation, pulse visualization, scalable ideal simulation, exact density evolution, trajectory evolution, and Hybrid execution preserve kind="interpolated" and metadata["interpolation_method"] == "pchip". Runtime caches interpolation coefficients, so solver steps do not rebuild the curve.
concat() rejects interpolated segments because re-fitting across a new seam would change the original slopes. Build one interpolated waveform over the complete time domain instead. The optional Pulser reference adapter does not currently claim this native interpolation semantic and rejects it before execution. No hardware payload, cloud submission, or production schedule is created.