QMSamplerV2¶
- class QMSamplerV2(backend: QMBackend, options: QMSamplerOptions | dict | None = None)[source][source]¶
Bases:
BaseSamplerV2QOP-aware Qiskit V2 Sampler for
QMBackend.Compiles sampler pubs to QUA programs, executes them on QOP, and returns classified measurement counts. Only
meas_level="classified"is supported end-to-end today.Create a sampler bound to a QM backend.
- Parameters:
backend – Target backend with QuAM-derived
Target.options –
QMSamplerOptionsinstance or options dict.
- property options: QMSamplerOptions¶
Return the options
- run(pubs: Iterable[SamplerPub | QuantumCircuit | tuple[QuantumCircuit] | tuple[QuantumCircuit, Mapping[Parameter | str | tuple[Parameter | str, ...], _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]]] | tuple[QuantumCircuit, Mapping[Parameter | str | tuple[Parameter | str, ...], _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]], Integral | None]], *, shots: int | None = None) QMSamplerJob[source][source]¶
Run the sampler on the given pubs.
- Parameters:
pubs – Sampler pubs (circuits with optional parameter values).
shots – Number of shots per pub. Defaults to
default_shots.
- Returns:
QMSamplerJob(or IQCC variant) after submission.