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

Qiskit / qiskit / 28779769983
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: truncate_label
DEFAULT BRANCH: main
Ran 06 Jul 2026 09:29AM UTC
Jobs 1
Files 951
Run time 2min
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 Jul 2026 08:55AM UTC coverage: 87.637% (+0.001%) from 87.636%
28779769983

push

github

web-flow
fixes #11393 sampled_expectation_value returning incorrect results for complex coefficients (gave 0.0 rather than 1j) (#16443)

* Fix sampled_expectation_value dropping imaginary part (#11393)

    sampled_expval_complex and sampled_expval_sparse_observable computed
    the full Complex64 result but returned only Ok(.re). Complex coefficients
    (e.g. SparsePauliOp with -1j) produced 0.0 instead of 1j.

    - crates/accelerate: return Complex64, not f64 (2 functions)
    - sampled_expval.py: return float | complex, updated docstring
    - bit_array.py: dtype=complex128, removed misleading note
    - test: 5 regression tests across both modules
    - releasenotes: release note

    Co-authored-by: zeb33n <zeb33n@users.noreply.github.com>
    Fixes #11393

* added np.real_if_close so real dont come back as complex. Added test and ammended one test verify real comes back real, and complex comes back complex.

* Apply suggestion from @Cryoris

changes to complex or float here, instead of waiting for the return

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Apply suggestion from @Cryoris

shorten release notes

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update qiskit/result/sampled_expval.py

complex->complex-valued for clarity

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Clarify fix for sampled expectation value functions

Updated the fix description for sampled expectation value functions to clarify the change in return types.

* Modify expectation_values return type to float64

Update expectation_values method to always return float64 dtype.
internal complex because gate blocks it anyway in ObservablesArray.coerce(observables)

* revert bit_array.py changes — allow_non_hermitian is a separate feature PR

* Simplify and reduce the tests

That floats/reals are returned is already
sufficiently tested in the existing tests,
we can reduce to only checking the
previously faulty behavior.

---------

Co-authored-by: Julien Gacon <gac... (continued)

6 of 6 new or added lines in 2 files covered. (100.0%)

12 existing lines in 3 files now uncovered.

112861 of 128783 relevant lines covered (87.64%)

998167.52 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
97.62
0.0% crates/qasm2/src/parse.rs
5
92.29
-0.26% crates/qasm2/src/lex.rs
1
90.33
0.0% crates/circuit/src/parameter/parameter_expression.rs
Jobs
ID Job ID Ran Files Coverage
1 28779769983.1 06 Jul 2026 09:29AM UTC 951
87.64
GitHub Action Run
Source Files on build 28779769983
  • Tree
  • List 951
  • Changed 6
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28779769983
  • 2cf97b58 on github
  • Prev Build on gh-readonly-queue/main/pr-16196-e9eb2a6540b07f2223a497ed92a901aadc747fab (#28779569944)
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