qat.frontend.fallthrough module

class FallthroughFrontend(model=None)

Bases: BaseFrontend

A frontend that passes through an input InstructionBuilder and does not modify it.

Used in situations where a frontend is not required, but is used to make a pipeline complete.

Parameters:

model (Union[None, QuantumHardwareModel, PhysicalHardwareModel]) – The hardware model that holds calibrated information on the qubits on the QPU.

check_and_return_source(src)

All source files are valid for the FallthroughFrontend.

emit(src, res_mgr=None, met_mgr=None, compiler_config=None, **kwargs)

Compiles an input QatInput down to QatIR and emits it.

Parameters:
  • src (InstructionBuilder) – The high-level input.

  • res_mgr (Optional[ResultManager]) – Collection of analysis results with caching and aggregation capabilities, defaults to None.

  • met_mgr (Optional[MetricsManager]) – Stores useful intermediary metrics that are generated during compilation, defaults to None.

  • compiler_config (Optional[CompilerConfig]) – Compiler settings, defaults to None.

Return type:

InstructionBuilder

Returns:

An intermediate representation as an InstructionBuilder which holds a list of instructions to be executed on the QPU.