bloqade.stim.rewrite.set_observable_partial.SetObservablePartial
← Module overview
class
method
sourcemethod
source
classSetObservablePartial¶source
bloqade.stim.rewrite.set_observable_partial.SetObservablePartial
Bases: RewriteRule
Rewrite SetObservable using GetRecIdxFromMeasurement placeholders.
class SetObservablePartial(obs_idx_frame: ObservableIdxFrame)Instead of computing record indices from analysis results immediately, this injects GetRecIdxFromMeasurement statements that will be resolved post-analysis. Observable indices come from ObservableIdxAnalysis so partial and resolve rewrites share a single namespace.
Parameters
| Name | Type | Description |
|---|---|---|
obs_idx_frame | ObservableIdxFrame |
Attributes
| Name | Type | Description |
|---|---|---|
obs_idx_frame | ObservableIdxFrame |
methodrewrite_Statement¶source
bloqade.stim.rewrite.set_observable_partial.SetObservablePartial.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
RewriteResult
methodrewrite_SetObservable¶source
bloqade.stim.rewrite.set_observable_partial.SetObservablePartial.rewrite_SetObservable
def rewrite_SetObservable(node: SetObservable) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | SetObservable |
Returns
RewriteResult