Pipeline¶
The divi.pipeline module provides the circuit pipeline engine that orchestrates
circuit generation, transformation, execution, and result reduction.
Core¶
Functions¶
Measure the seed's cost observable as expectation values (identity transform). |
|
|
Analyze a pipeline trace and compute per-stage factor. |
|
Extract the param_set index from a pipeline result KEY. |
|
Print dry-run reports as rich trees with stage metadata. |
|
Print the full pipeline expansion tree to the terminal. |
|
Group child results by base key (label with axis stripped). |
|
Reduce grouped values by averaging (e.g. Trotter ham samples). |
|
Reduce grouped probability dicts by averaging across groups. |
|
Reduce grouped index->value dicts by sorting by index and calling a postprocess function. |
Sample the prepared state in the computational basis (clears the observable). |
|
|
Remove the (axis_name, value) pair from a child label to get the base key. |
Classes¶
|
Abstract stage that transforms a keyed MetaCircuit batch. |
|
Single ordered pipeline: one spec stage, then bundle stages. |
Raised when a stage's positional requirements are not met. |
|
Emitted when a pipeline configuration is known to be slow. |
|
|
Complete dry-run report for a single pipeline. |
|
Bundle-stage expansion output. |
|
A named seed transform and the readout it targets. |
|
Per-run context for the circuit pipeline. |
Pipeline result dict with convenience access for single-result pipelines. |
|
|
Forward-pass pipeline trace for fan-out verification before execution. |
|
First stage in every pipeline: converts an arbitrary spec into a keyed MetaCircuit batch. |
|
Abstract base for pipeline stages. |
|
Per-stage dry-run report. |
|
Complete, cacheable output of one stage expansion. |
Canonical format that raw backend results should be converted into. |
Variables¶
Built-in immutable sequence. |
Built-in Stages¶
Functions¶
|
Resolve a |
|
Resolve a |
Classes¶
SpecStage that wraps one or more pre-built MetaCircuits into a batch. |
|
|
Bind a classical feature batch into a parametric circuit. |
|
Unified measurement stage for all circuit measurement types. |
Bind |
|
|
Fan out each DAG body into Pauli-twirled copies and average on reduce. |
|
Pipeline stage that emits a single Z-basis measurement and computes nonlinear binary-polynomial energy from shot histograms. |
SpecStage that converts PennyLane circuits into MetaCircuit(s). |
|
|
Apply a |
|
BundleStage that applies a QEM protocol to each circuit body. |
SpecStage that converts Qiskit QuantumCircuit(s) into MetaCircuit(s). |
|
|
SpecStage that turns a Hamiltonian into a batch of MetaCircuits via a TrotterizationStrategy. |