qiskit_noise_learning.analysis.AnalysisStage
class qiskit_noise_learning.analysis.AnalysisStage
Bases: ABC
Abstract base for a stage in the analysis pipeline.
Each stage declares the data level it consumes (input_level) and produces (output_level). Stages may skip intermediate levels, e.g. going directly from RawData to DecayData.
To implement a stage, subclass this and override _run(). The public run() method handles shallow-copying the Fit container and marking skipped levels; _run() receives the copy and may mutate it in place.
input_level and output_level can be declared as class attributes:
class MyStage(AnalysisStage):
input_level = RawData
output_level = ObservableData
def _run(self, fit):
fit[ObservableData] = compute(fit[RawData])__init__
__init__()
Methods
Column 1 | Column 2 |
|---|---|
__init__() | |
run(fit) | Run this stage, returning a new Fit with the output level populated. |
Attributes
Column 1 | Column 2 |
|---|---|
input_level | The data level this stage reads. |
output_level | The data level this stage writes. |
input_level
output_level
run
run(fit: Fit | LeveledData) → Fit
Run this stage, returning a new Fit with the output level populated.
Shallow-copies fit, marks any Absent intermediate levels as Skipped, calls _run() on the copy, and returns it. The original fit is not modified.