qat.experimental.frontend.importer.pulse.purr module
- class PurrImporter
Bases:
objectTakes a PuRR builder and produces a module representing that program.
From a high-level, the module consists of two objects:
A kernel that contains the pulse instructions and any acquisition instructions, embedded within the shot loop. This kernel returns a results collection.
A main function that calls the kernel and applies any post-processing to the results through a
results.mapoperation. The main function returns the results collection after post-processing has been applied.
The importer does not currently support sweeps, or general device updates and parameterised operation operands.
The importer starts by doing an analysis walk through the builder, understanding what results processing operations happen, and collecting unique pulse channels (frames). This allows us to structure the program in a way that does not necessarily map onto the builder in a linear fashion, but instead allows us to produce the structure described above.
- build(purr_ir)
Translate purr_ir into a module containing a kernel and a main function.
- Return type:
ModuleOp
- translate(instruction, builder)
- Return type:
None