qat.runtime.simple module

class SimpleRuntime(engine, results_pipeline=None, connection_mode=<ConnectionMode.DEFAULT: 3>)

Bases: BaseRuntime

A Runtime for the complete execution of packages without sweeps.

The SimpleRuntime handles the complete execution for simple programs that are free from sweeps (with exceptions of sweeps that have been lowered to the hardware). This includes batching of shots, executing the program on the target machine, and any software post-processing that cannot be achieved in the target machine. The runtime must be provided with a NativeEngine that is capable of executing the desired programs.

Parameters:
  • engine (NativeEngine) – The execution engine for a target machine.

  • results_pipeline (Optional[PassManager]) – Optionally provided a pipeline for results processing. If not provided, a default pipeline is provided.

  • connection_mode (ConnectionMode) – Specifies how the connection is maintained.

execute(package, res_mgr=None, met_mgr=None, **kwargs)

Fully execute a package against the hardware with batching of shots and results post-processing.

Parameters:
  • package (Executable) – The executable program.

  • res_mgr (Optional[ResultManager]) – Optionally provide a results manager to save pass information.

  • met_mgr (Optional[MetricsManager]) – Optionally provide a metric manager to save pass information.

Returns:

Execution results.