qat.middleend.base module
- class BaseMiddleend(model)
Bases:
ABCBase class for a middle end that takes an intermediate representation (IR)
QatIRand alters it based on optimisation and/or validation passes.- Parameters:
model¶ (
None|QuantumHardwareModel) – The hardware model that holds calibrated information on the qubits on the QPU.
- abstract emit(ir, res_mgr=None, met_mgr=None, compiler_config=None, **kwargs)
Converts an IR
QatIRto an optimised IR.- Parameters:
ir¶ – The intermediate representation.
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.
- class CustomMiddleend(model, pipeline=None)
Bases:
BaseMiddleendMiddle end that uses a custom pipeline to convert the IR to an (optimised) IR.
- Parameters:
model¶ (
None|QuantumHardwareModel) – The hardware model that holds calibrated information on the qubits on the QPU.
- emit(ir, res_mgr=None, met_mgr=None, compiler_config=None, **kwargs)
Converts an IR
QatIRto an optimised IR with a custom pipeline.- Parameters:
ir¶ – The intermediate representation.
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.