qat.engines.zero module
- class ZeroEngine
Bases:
NativeEngine
An engine primarily used for testing that simply returns zero readout.
The engine is designed to be generally applicable to most executables. It looks into the executable to retrieve all acquisitions, and creates appropiate readout data that is just filled with zeros.
- execute(package)
Execute an
Executable
, returning zeros for all readouts.- Parameters:
package¶ (
Executable
) – The compiled executable containing acquisitions.- Return type:
dict
[str
,ndarray
]- Returns:
The zero readout results.
- readout_shape(acquire, shots)
Generates the shape of the readout given the acquire information and number of shots.
- Parameters:
acquire¶ (
AcquireData
) – The acquisition information.shots¶ (
int
) – The number of shots being executed.
- Raises:
NotImplementedError – Only AcquireMode.RAW, AcquireMode.INTEGRATOR and AcquireMode.SCOPE are supported.
- Return type:
tuple
[int
,...
]- Returns:
The shape of the returned array.