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

Qiskit / qiskit / 34478805115
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: patch-lcov-errors
DEFAULT BRANCH: main
Ran 10 Sep 2026 01:10PM UTC
Jobs 1
Files 966
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

10 Sep 2026 12:48PM UTC coverage: 87.881% (+0.04%) from 87.846%
34478805115

push

github

web-flow
Implement `SparseObservable.to_matrix` (#16809)

* sparse observable matrix using compressed pauli and regular projector terms

* accumulate fns

* change error message

* fix wrong coefficient sign in accumulate paulis

* accumulate projector

* make matrix public and preserve qubit indexes

* write helper function for creating single term sparse observable (tests only)

* negate instead of mul -1

* correct tests

* mul imaginary or negate

* break into count phase function

* parse observable with multiple terms for tests

* rely on as_paulis so that dense path can be used

* fix phase accumulation and add yy test

* add header and remove old impl from mod.rs

* rustdoc comment for SparseObservable::to_matrix

* update to_matrix comment

* invert row and term loop, use local kron if term has projectors

* more accurate error message

* get bit term matrix

* write add_term_kron

* get bit term matrix static

* write tests and remove matrix old

* add header and write tests

* reorganize module and rustdoc

* write python api, test success and error case

* write python api, test success and error case

* update error messages and docs

* add release note

* fix release note typo

* update python test doc strings

* update error variants

* clear naming and docstring for non-trivial PauliTerm

* add projector test 2

* second pauli only test

* remove sort indices during kron

* add third pauli only test, remove unused

* use const tol 1e-8

* test 3 qubit matrix

* test 3 qubit matrix for projector case

* python test if sparse observable matrix matches sparse pauli op

* fmt python

* Update test/python/quantum_info/test_sparse_observable.py

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

---------

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

391 of 397 new or added lines in 2 files covered. (98.49%)

17 existing lines in 4 files now uncovered.

117797 of 134041 relevant lines covered (87.88%)

977101.42 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
98.43
crates/quantum_info/src/sparse_observable/matrix.rs

Coverage Regressions

Lines Coverage ∆ File
6
97.65
0.94% crates/qasm2/src/parse.rs
5
81.64
-0.17% crates/circuit/src/parameter/symbol_expr.rs
5
91.77
-0.51% crates/qasm2/src/lex.rs
1
90.3
0.0% crates/circuit/src/parameter/parameter_expression.rs
Jobs
ID Job ID Ran Files Coverage
1 34478805115.1 10 Sep 2026 01:10PM UTC 966
87.88
GitHub Action Run
Source Files on build 34478805115
  • Tree
  • List 966
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34478805115
  • 475a0a17 on github
  • Prev Build on gh-readonly-queue/main/pr-16696-cec6f667a552bad5a53e42c2586093721346f0f2 (#34468795271)
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