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

Qiskit / qiskit-addon-utils / 19122675903
72%

Build:
DEFAULT BRANCH: main
Ran 06 Nov 2025 02:20AM UTC
Jobs 1
Files 32
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

06 Nov 2025 02:19AM UTC coverage: 72.359% (-27.6%) from 100.0%
19122675903

push

github

web-flow
Add new functions for post-processing error-mitigated samples (#122)

* copy `measurement_bases.py` from expval branch

* add `apply_postselect_mask()`

* add `apply_pec_signs`

* add `expectation_values` function

* remove `qubit_wise` kwarg

This should always be `True`.

* pauli convention in meas-basis subroutine

Update to match the "numeric values" column of the table in the `SparseObservable` docs:
https://quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.quantum_info.SparseObservable#mathematics

* update pauli convention in docstrings

* lint

* cleanup output type

return floats instead of numpy floats

* fix bug (min of empty tuple)

* fix/standardize arg ordering

* fix off-by-one indexing

* fix docstring

* cosmetic edits

* use `ddof=1` when averaging shots

* for now, replace incorrect variance with `nan`

* minor formatting

* fix broadcasting

* fix processing of zero observable

* fix ordering, and (for now) revert IZXY to IXZY

* fix case of no twirling axis

* Update expectation_values.py

* Fix typo bug (`meas_basis_idx` -> `meas_basis_axis`)

Co-authored-by: dekelmeirom <33314493+dekelmeirom@users.noreply.github.com>

* add `gamma_from_noisy_boxes` function

Takes a dict of noise models, a dict mapping boxes to noise models, and a dict containing the "local scales" info, and returns gamma for the noisy circuit.

* add kwarg `pec_gamma`

For now, `pec_gamma` can be either an `int` or `None`, as described in the docstring.

Eventually should probably allow passing an array, in case the value varies for different circuit configurations in the job.

* allow `meas_basis_axis = None`

For convenience, let default behavior handle case where there is only 1 measurement basis, and the input `bool_array` correspondingly does not have a measurement basis axis.

* "Raises" section in docstring

* fix: lint

* fix: also reshape optional arrays if meas_basis_axis=0

* update paulis sum

make sure paulis not being dropped if coefficients cancel ... (continued)

34 of 259 new or added lines in 7 files covered. (13.13%)

589 of 814 relevant lines covered (72.36%)

0.72 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
9
25.0
qiskit_addon_utils/noise_management/trex_factors.py
10
28.57
qiskit_addon_utils/noise_management/gamma_factor.py
28
17.65
qiskit_addon_utils/exp_vals/measurement_bases.py
33
15.38
qiskit_addon_utils/exp_vals/observable_mappings.py
145
5.84
qiskit_addon_utils/exp_vals/expectation_values.py
Jobs
ID Job ID Ran Files Coverage
1 19122675903.1 06 Nov 2025 02:20AM UTC 32
72.36
GitHub Action Run
Source Files on build 19122675903
  • Tree
  • List 32
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19122675903
  • 63a7b21c on github
  • Prev Build on main (#18995925533)
  • Next Build on main (#19122980614)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc