Skip to content

Add BackendEstimatorV2 interface for issue #145#149

Open
rosspeili wants to merge 1 commit into
Qiskit:mainfrom
rosspeili:implement-estimator-interface-145
Open

Add BackendEstimatorV2 interface for issue #145#149
rosspeili wants to merge 1 commit into
Qiskit:mainfrom
rosspeili:implement-estimator-interface-145

Conversation

@rosspeili

@rosspeili rosspeili commented Jun 4, 2026

Copy link
Copy Markdown

Summary

Adds a C++ Estimator V2 interface parallel to the existing sampler stack, addressing #145.

  • EstimatorPub, ISA circuit + Pauli observables ((label, coefficient) pairs), with to_json()
  • EstimatorPubResult / EstimatorResult, expectation value and standard deviation per pub
  • BackendEstimatorV2::run()BackendEstimatorJob (same pattern as BackendSamplerJob)
  • Estimation via basis rotations + BackendSamplerV2 (client-side, no native estimator backend API yet)
  • samples/estimator_test.cpp (Bell state + ZZ / XI), CMake target, reno note, README mention

Closes #145

Details and comments

  • Mirrors sampler file layout and IBM license headers as in other files, and does not extend BasePrimitiveJob (estimator pubs differ from sampler pubs).
  • Skips adding measurements if the ISA circuit already has them.
  • estimator_test requires the same runtime setup as sampler_test (QISKIT_IBM_RUNTIME_C_ROOT / QRMI / SQC + credentials).

Testing: Setting up the local Qiskit C build to run test/ and compile estimator_test, but it takes some time on my machine, will also rely on CI on this PR for the standard test_circuit / test_transpiler / test_parameter suite (same bar as upstream). No new test/ cases, just sample integration.

  • I have read the CONTRIBUTING document
  • Release note: releasenotes/notes/add-backend-estimator-v2-145.yaml
  • Sample program added (estimator_test.cpp)
  • README updated for estimator build/run
  • Unit tests under test/

@CLAassistant

CLAassistant commented Jun 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@doichanj doichanj self-assigned this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implementing estimator interface

4 participants