qat.runtime.base module

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

Bases: ABC

Provides a Base class to build on for runtimes of varying complexities.

A runtime provides the means to execute quantum programs. It can take on various responsibilities, including interfacing the execution engine and post-processing of results. Runtimes are designed to fit a specific purpose. For example, the SimpleRuntime provides the means to execute already compiled programs Executable. In the future, there will be support for hybrid runtimes that take on both compilation and execution responsibilities.

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.

connect_engine(flag)

Connect the engine according to the connection mode.

Return type:

bool | None

default_pipeline(target_data=None)
disconnect_engine(flag)

Disconnect the engine according to the connection mode.

Return type:

bool | None

abstract execute(*args, **kwargs)