• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit-ibm-runtime / 30253608390 / 5
89%
main: 89%

Build:
DEFAULT BRANCH: main
Ran 27 Jul 2026 09:27AM UTC
Files 334
Run time 9s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Jul 2026 09:15AM UTC coverage: 87.742%. Remained the same
30253608390.5

push

github

web-flow
Write tests to verify parameter-basis expansion performed in executor-based Estimator (#3088)

### Summary
When mapping a `pub = (circuit, observables, parameter_values)` into a
quantum program item, the various `prepare_*` functions used in
executor-based Estimator undertake the same steps:
- They pre-compute `evs.shape` as
`np.broadcast_shapes(observables.shape, parameter_values.shape)`.
- They create a map between elements of `parameter_values` and the
observables that need to be measured for each subset.
- They replace the observables in that map with the minimal set of Pauli
basis that can be used to measure all such observables.

As an example, consider the case where:
- `observables = ObservablesArray(["ZZZ", "XXX", "YYY",
"IYI"]).reshape((2, 2))` has shape `(2, 2)`.
- `parameter_values` has shape `(2, 2)` as well.

In this case, `evs` has shape `(2, 2)`, and such mapping amounts to:
- `((0, 0), "ZZZ")`, meaning that the "first" element in
`parameter_values`, indexed with `(0, 0)`, needs to be measured with
basis `"ZZZ"`
- `((0, 1), "XXX")`
- `((1, 0), "YYY")`
- `((1, 1), "IYI")`

This mapping is currently stored inside the passthrough data of the
quantum program.

This PR: 

- Add tests that demonstrate that every `prepare_*` function computes
this mapping correctly.
- Make these tests consistent across every `prepare_*` function

### Details and comments

Fixes #3087

### AI/LLM disclosure

- [x] I didn't use LLM tooling, or only used it privately.
- [ ] I used the following tool to help write this PR description:
- [ ] I used the following tool to generate or modify code:

9019 of 10279 relevant lines covered (87.74%)

0.88 hits per line

Source Files on job unit-tests_python3.12-ubuntu-latest - 30253608390.5
  • Tree
  • List 334
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 30253608390
  • ea9e13a7 on github
  • Prev Job for on main (#30195865124.5)
  • Next Job for on main (#30276493744.7)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc