PipelineEnv¶
- class PipelineEnv(backend, param_sets=(), feature_batch=None, labels=None, artifacts=<factory>, result_format=None, reporter=None, cancellation_event=None, rng=None)[source]¶
Bases:
objectPer-run context for the circuit pipeline.
The client passes the backend and any stage-specific data when constructing the env for a pipeline run.
Attributes Summary
Mutable output dict populated during execution (e.g.
circuit_count).Backend used to run circuits (e.g. simulator or cloud service).
Threading event signalling cancellation (set by ProgramEnsemble).
Classical feature batch for the data axis, shape
(n_samples, n_data).Optional per-sample supervised targets, shape
(n_samples,), aligned withfeature_batch.Parameter sets for binding — strictly 2D (list-of-lists or 2D ndarray).
Progress reporter for async polling feedback.
Canonical result format, set by the measurement stage during expand.
Random generator for stochastic stage decisions (e.g.
weighted_randomshot allocation).Attributes Documentation
- artifacts: dict = <dataclasses._MISSING_TYPE object>¶
Mutable output dict populated during execution (e.g.
circuit_count).
- backend: CircuitRunner = <dataclasses._MISSING_TYPE object>¶
Backend used to run circuits (e.g. simulator or cloud service).
- cancellation_event: Event | None = None¶
Threading event signalling cancellation (set by ProgramEnsemble).
- feature_batch: ndarray[tuple[Any, ...], dtype[floating]] | None = None¶
Classical feature batch for the data axis, shape
(n_samples, n_data). Read byDataBindingStage;Noneotherwise.
- labels: ndarray[tuple[Any, ...], dtype[floating]] | None = None¶
Optional per-sample supervised targets, shape
(n_samples,), aligned withfeature_batch. Read byDataBindingStage.
- param_sets: Sequence[Sequence[float]] | ndarray[tuple[Any, ...], dtype[floating]] = ()¶
Parameter sets for binding — strictly 2D (list-of-lists or 2D ndarray).
- reporter: ProgressReporter | None = None¶
Progress reporter for async polling feedback.
- result_format: ResultFormat | None = None¶
Canonical result format, set by the measurement stage during expand.