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.
- abstractmethod 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¶ (
ResultManager|None) – Collection of analysis results with caching and aggregation capabilities, defaults to None.met_mgr¶ (
MetricsManager|None) – Stores useful intermediary metrics that are generated during compilation, defaults to None.compiler_config¶ (
CompilerConfig|None) – 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¶ (
ResultManager|None) – Collection of analysis results with caching and aggregation capabilities, defaults to None.met_mgr¶ (
MetricsManager|None) – Stores useful intermediary metrics that are generated during compilation, defaults to None.compiler_config¶ (
CompilerConfig|None) – Compiler settings, defaults to None.