Squin2native
SquinToNative
A Target that converts Squin gates to native gates.
emit
emit(mt: Method, *, no_raise=True) -> ir.Method
Convert Squin gates to native gates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mt
|
Method
|
The method to convert. |
required |
no_raise
|
bool
|
Whether to suppress errors. Defaults to True. |
True
|
Returns:
| Type | Description |
|---|---|
Method
|
ir.Method: The converted method. |
Source code in .venv/lib/python3.12/site-packages/bloqade/native/upstream/squin2native.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
UpdateDialectsOnCallGraph
dataclass
UpdateDialectsOnCallGraph()
Bases: Pass
Update All dialects on the call graph to a new set of dialects given to this pass.
Usage
pass_ = UpdateDialectsOnCallGraph(rule=rule, dialects=new_dialects) pass_(some_method)
Note: This pass does not update the dialects of the input method, but copies all other methods invoked within it before updating their dialects.