qat.backend.base module
- class AllocatingBackend(model, pipeline=None)
Bases:
CustomBackend[Program],Generic[Program],ABCA backend that’s responsible for allocating FPGA card and sequencers AOT.
- Parameters:
model¶ (
QuantumHardwareModel) – The hardware model that holds calibrated information on the qubits on the QPU.
- allocate(target)
For a given target, allocate an FPGA card and a sequencer.
- Return type:
tuple[int,int]
- class BaseBackend(model)
Bases:
Generic[Program],ABCBase class for a backend that takes an intermediate representation (IR)
QatIRand lowers it to machine code that can be executed on a given target.- 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, **kwargs)
Converts an IR
QatIRto machine instructions of a given target architecture.How targets convert the IR is at their discretion but they mostly follow macro-expansion techniques where target instructions are selected for each instruction in the IR.
- Return type:
- class CustomBackend(model, pipeline=None)
Bases:
BaseBackend[Program],Generic[Program],ABCBackends may need to run pre-codegen passes on the IR
QatIRas emitted from the middle end. These passes are specified via a custom pipeline.- Parameters:
model¶ (
QuantumHardwareModel) – The hardware model that holds calibrated information on the qubits on the QPU.