qat.purr.backends.qblox.codegen module
- class AbstractContext(alloc_mgr=None)
Bases:
ABC
- clear()
- create_package(target)
- 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
- shift_frequency(inst, target)
- class AllocationManager(_reg_pool=<factory>, _lbl_counters=<factory>, registers=<factory>, labels=<factory>)
Bases:
object
- label_gen(name)
-
labels:
Dict
[str
,str
]
- reg_alloc(name)
- Return type:
str
- reg_borrow(name)
Short-lived register allocation
- reg_free(register)
- Return type:
None
-
registers:
Dict
[str
,str
]
- class NewQbloxContext(alloc_mgr, scoping_result, rw_result, iter_bounds)
Bases:
AbstractContext
- delay(inst)
- device_update(du_inst)
- property durations
- static enter_repeat(inst, contexts)
- static enter_sweep(inst, contexts)
- static epilogue(contexts)
- static exit_repeat(inst, contexts)
- static exit_sweep(inst, contexts)
- measure_acquire(measure, acquire, target)
- static prologue(contexts)
- static reset_phase(inst, contexts)
- shift_phase(inst)
- static synchronize(inst, contexts)
Potential presence of dynamic time render static time padding method inviable. In such case, we simply revert to the wait_sync instruction (although it may limit muxing capabilities).
- waveform(waveform, target)
- class NewQbloxEmitter
Bases:
InvokerMixin
- build_pass_pipeline(*args, **kwargs)
- emit_packages(ir, res_mgr, met_mgr)
- Return type:
List
[QbloxPackage
]
- class PreCodegenPass
Bases:
AnalysisPass
- run(ir, res_mgr, *args, **kwargs)
Precedes assembly codegen. Performs a naive register allocation through a manager object. Computes useful information in the form of attributes.
- class PreCodegenResult(alloc_mgrs=<factory>)
Bases:
object
-
alloc_mgrs:
Dict
[PulseChannel
,AllocationManager
]
-
alloc_mgrs:
- class QbloxCFGWalker(contexts)
Bases:
DfsTraversal
- enter(block)
- exit(block)
- walk(cfg)
- class QbloxContext(repeat)
Bases:
AbstractContext
- create_package(target)
- delay(inst)
- property duration
- measure_acquire(measure, acquire, target)
- static reset_phase(inst, contexts)
- shift_phase(inst)
- static synchronize(inst, contexts)
- waveform(waveform, target)
- class QbloxEmitter
Bases:
object
- emit(qat_file)
- Return type:
List
[QbloxPackage
]
- optimize(qblox_contexts)
- Return type:
Dict
- class QbloxPackage(target=None, sequence=None, sequencer_config=<factory>, timeline=None)
Bases:
object
-
sequencer_config:
SequencerConfig
-
target:
PulseChannel
= None
-
timeline:
ndarray
= None
-
sequencer_config: