bloqade.qasm3.emit.target.QASM3Emitter
← Module overview
class
method
source
classQASM3Emitter¶source
bloqade.qasm3.emit.target.QASM3Emitter
Emit OpenQASM 3.0 strings from QASM3 dialect IR.
Signature
class QASM3Emitter(include_files: list[str] = (lambda: ['stdgates.inc'])())Uses abstract interpretation via EmitABC with method tables, following the same pattern as the QASM2 emitter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
include_files | list[str] | (lambda: ['stdgates.inc'])() |
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
include_files | list[str] | field(default_factory=(lambda: ['stdgates.inc'])) |
methodemit¶source
bloqade.qasm3.emit.target.QASM3Emitter.emit
def emit(entry: ir.Method) -> strConvert an ir.Method in QASM3 dialect to an OpenQASM 3.0 string.
Parameters
| Name | Type | Description |
|---|---|---|
entry | ir.Method | The IR method to emit. Must be in the QASM3 dialect. |
Returns
strA syntactically valid OpenQASM 3.0 string.