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

Qiskit / qiskit-ibm-runtime / 30253170079
88%
main: 89%

Build:
Build:
LAST BUILD BRANCH: sim
DEFAULT BRANCH: main
Ran 27 Jul 2026 09:20AM UTC
Jobs 8
Files 334
Run time 1min
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
30253170079

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%)

6.96 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit-tests_python3.12-ubuntu-latest - 30253170079.1 27 Jul 2026 09:20AM UTC 334
87.74
GitHub Action Run
2 unit-tests_python3.12-windows-latest - 30253170079.2 27 Jul 2026 09:20AM UTC 334
86.26
GitHub Action Run
3 unit-tests_python3.11-ubuntu-latest - 30253170079.3 27 Jul 2026 09:20AM UTC 334
87.74
GitHub Action Run
4 unit-tests_python3.13-windows-latest - 30253170079.4 27 Jul 2026 09:22AM UTC 334
86.26
GitHub Action Run
5 unit-tests_python3.10-windows-latest - 30253170079.5 27 Jul 2026 09:21AM UTC 334
86.26
GitHub Action Run
6 unit-tests_python3.10-ubuntu-latest - 30253170079.6 27 Jul 2026 09:20AM UTC 334
87.74
GitHub Action Run
7 unit-tests_python3.13-ubuntu-latest - 30253170079.7 27 Jul 2026 09:20AM UTC 334
87.74
GitHub Action Run
8 unit-tests_python3.11-windows-latest - 30253170079.8 27 Jul 2026 09:21AM UTC 334
86.26
GitHub Action Run
Source Files on build 30253170079
  • Tree
  • List 334
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30253170079
  • ea9e13a7 on github
  • Prev Build on gh-readonly-queue/main/pr-3104-cdc519975d567ccf3197ea3d6c8c2ca79c8dcabf (#30195865124)
  • 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