qat.backend.qblox.codegen module
- class AbstractQbloxBackend(model, pipeline=None)
Bases:
AllocatingBackend[QbloxProgram]- Parameters:
model¶ (
QuantumHardwareModel) – The hardware model that holds calibrated information on the qubits on the QPU.
- class QbloxBackend1(model, pipeline=None)
Bases:
AbstractQbloxBackend- Parameters:
model¶ (
QuantumHardwareModel) – The hardware model that holds calibrated information on the qubits on the QPU.
- emit(ir, res_mgr, met_mgr, ignore_empty=True, **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:
Executable[QbloxProgram]
- class QbloxBackend2(model, pipeline=None)
Bases:
AbstractQbloxBackend- Parameters:
model¶ (
QuantumHardwareModel) – The hardware model that holds calibrated information on the qubits on the QPU.
- emit(ir, res_mgr, met_mgr, ignore_empty=True, **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:
Executable[QbloxProgram]
- class QbloxCFGWalker(contexts)
Bases:
DfsTraversal- enter(block)
- exit(block)
- class QbloxContext(rw_result, iter_bounds, alloc_mgr=None)
Bases:
ABC- clear()
- create_package(target, seq_idx, slot_idx)
- Return type:
- delay(inst)
- device_update(du_inst)
- property duration
- property durations
- static enter_repeat(inst, contexts)
- static enter_sweep(inst, contexts)
- static exit_repeat(inst, contexts)
- static exit_sweep(inst, contexts)
- id()
- is_empty()
Masks away yet-to-be-supported second-state, cancellation, and cross cancellation targets This is temporary and criteria will change with more features coming in
- ledger(duration, pulse=None)
A helper method to keep track of the durations and phase as the codegen runs.
Every little bit of time is accounted for and a timeline object (in static cases) is also kept up-to-date for debugging and visualisation purposes.
- measure_acquire(measure, acquire, target)
Regarding HW thresholding, acquire.rotation is in radians and acquire.threshold is uncorrected. (Exactly as they’ve been computed during measure block construction)
- Here at configuration time, we “legalise” these parameters to what Qblox requires:
rotation as degrees
threshold to be corrected by the integration length
- property phase
- reset_phase()
- shift_frequency(inst, target)
- shift_phase(inst)
- static synchronize(inst, contexts)
Favours static time padding whenever possible, or else uses SYNC. TODO - Default to SYNC when Qblox supports finer grained SYNC groups
- wait_imm(duration)
Waits for duration nanoseconds expressed as an immediate.
duration must be positive
- wait_reg(duration)
A mere wait RX in general has undefined runtime behaviour.
This is a useful helper to dynamically wait for a duration nanoseconds expressed as a register. iter_reg is a short-lived register only used as an interator. Customer is responsible for (de)allocation.
- waveform(waveform, target)