qbraid_qir.squin.SquinVisitor
- class SquinVisitor(dialects, module)[source]
convert a pyqir module to a squin kernel
Initialize the SquinVisitor.
- Parameters:
dialects (
DialectGroup) – The dialects to use for lowering.module (
Module) – The PyQIR module to convert.
- __init__(dialects, module)[source]
Initialize the SquinVisitor.
- Parameters:
dialects (
DialectGroup) – The dialects to use for lowering.module (
Module) – The PyQIR module to convert.
Methods
__init__(dialects, module)Initialize the SquinVisitor.
lower_global(state, node)lower_literal(state, value)run(module, *[, globals, file, ...])Run the visitor on a PyQIR module.
visit(state)Visit a PyQIR module.
visit_basic_block(state, block)Visit a PyQIR basic block.
visit_call(state, call)Visit a PyQIR Call instruction.
visit_constant(state, value)Visit a PyQIR Constant instruction.
visit_gate(state, gate_name, args)Visit a PyQIR gate and convert it to a Squin gate.
visit_node(state, node)Visit a PyQIR node.