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

Qiskit / qiskit-addon-utils / 24525358175
94%

Build:
DEFAULT BRANCH: main
Ran 16 Apr 2026 05:50PM 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

16 Apr 2026 05:49PM UTC coverage: 90.244% (-0.4%) from 90.633%
24525358175

push

github

web-flow
Simpler exp val (#156)

* merge twirl-averaging into shot-averaging

Previously, first averaged over shots, then averaged over twirls (or other specified axes).

This was complicated, because we needed to keep track of how many shots were accepted by postselection in order to propagate uncertainty properly later when averaging over twirls. Likewise we needed to keep track of PEC signs (`pauli_signs`).

Now, we first flatten `avg_axis` (typically the twirl axis) into the shots axis, then do all averaging + postselection at once. This avoids needing to work with `weights`. This also avoids the situation where postselection rejects all shots on a single twirl, resulting in `nan` for the average of all twirls (particularly problematic when approaching the theoretically-optimal case of 1 shot per twirl).

* small simplifications

`np.any` seems like a more readable version of `np.logical_or.reduce` here.

The `np.asarray` call seems to be vestigial.

* slightly simpler bit logic

* move `isfinite` checks after division by `shots`

* another small logic simplification

* remove stale comment

* lint

* more lint

* finish changing variable name

* lint (undo uncessary name change)

* lint again

* retry lint

* another small simplification

Replace a few lines in the optional, empirical estimate of `gamma` with a single equivalent line.

Reminder that this empirical estimate of `gamma` is still unreliable as it can diverge or be negative.

20 of 23 new or added lines in 1 file covered. (86.96%)

740 of 820 relevant lines covered (90.24%)

0.9 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
93.71
-1.94% qiskit_addon_utils/exp_vals/expectation_values.py
Jobs
ID Job ID Ran Files Coverage
1 24525358175.1 16 Apr 2026 05:50PM UTC 32
90.24
GitHub Action Run
Source Files on build 24525358175
  • 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 #24525358175
  • a4d93329 on github
  • Prev Build on main (#23866211211)
  • Next Build on main (#24691140158)
  • 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