QiskitSpecStage

class QiskitSpecStage[source]

Bases: CircuitSpecStage

SpecStage that converts Qiskit QuantumCircuit(s) into MetaCircuit(s).

Accepts three input shapes:

  • A single QuantumCircuit → one-element batch

  • A Sequence[QuantumCircuit] → indexed by position

  • A Mapping[str, QuantumCircuit] → indexed by key name

Qiskit measure instructions are converted to probs() on the measured wires. If the circuit has no measurements, all wires are measured by default (with a warning).

Qiskit Parameter objects flow through directly — the migrated pipeline is Qiskit-native, so there’s no sympy detour. ParameterExpression objects (e.g. 2 * theta) are preserved on the resulting DAG, and resolved by ParameterBindingStage at bind time.

Methods Summary

expand(batch, env)

Convert QuantumCircuit(s) to MetaCircuit(s) and build a keyed batch.

Methods Documentation

expand(batch, env)[source]

Convert QuantumCircuit(s) to MetaCircuit(s) and build a keyed batch.

Return type:

tuple[dict[tuple[tuple[str, Hashable], ...], MetaCircuit], Any]