bloqade.lanes.transform.pipeline.transversal_rewrites
← Module overview
function
source
functiontransversal_rewrites¶source
bloqade.lanes.transform.pipeline.transversal_rewrites
Signature
def transversal_rewrites(mt: Method, rewrite_logical_initialize: bool = True) -> MethodApply transversal rewrite rules to a squin method.
Expands logical operations into their transversal (physical qubit) equivalents using the Steane [[7,1,3]] transversal map. The method is rewritten in place.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
mt | Method | required | The squin method to rewrite. |
rewrite_logical_initialize | bool | True | Whether to rewrite the logical initialize statements. |
Returns
MethodMethod: The rewritten method (same object, mutated in place).