qat.engines.waveform.echo module
- class EchoEngine(*args, **kwargs)
Bases:
NativeEngine[WaveformProgram]The
EchoEngineis a minimal execution engine primarily used for testing the compilation pipeline.It is not connected to any target machine such as live hardware or a simulator, and just simply “echos” back the buffers. It only accepts
WaveformProgramprograms.It checks the shape of the results generated match the expected shapes from codegen, to test consistency across the compilation and execution pipeline.
- execute(program, **kwargs)
Execute a
WaveformProgram.- Parameters:
program¶ (
WaveformProgram) – The compiled program.- Return type:
dict[str,ndarray]- Returns:
The execution results.
- process_readout(readout, shots, mode)
Processes a single readout into the expected format for a given acquire mode.
For
AcquireMode.RAW, this means repeating the readout for a given number of shots. TheAcquireMode.INTEGRATORemulates the averaging on hardware by taking the mean; note that this does not currently include down scaling. Finally, theAcquireMode.SCOPEsimply returns the readout back in its current form.