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

Qiskit / qiskit / 20745572695
88%

Build:
DEFAULT BRANCH: main
Ran 06 Jan 2026 11:25AM UTC
Jobs 1
Files 885
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 Jan 2026 10:04AM UTC coverage: 88.316% (+0.003%) from 88.313%
20745572695

push

github

web-flow
Add SparseObservable support to evolved_operator_ansatz (#15442)

* Add SparseObservable support to evolved_operator_ansatz

- Add conditional import and handling for SparseObservable
- Extend Rust fast path to accept SparseObservable (in addition to SparsePauliOp)
- Enhance _is_pauli_identity() to handle SparseObservable with coefficient checks
- Fix edge cases: return empty circuit when all operators filtered, handle string/list parameter_prefix
- Add comprehensive test coverage for SparseObservable support

* Fix import after removing try

* Address PR review comments for SparseObservable support

- Use direct import of SparseObservable (no try-except)
- Simplify identity check: use num_terms == 1 and len(bit_labels()) == 0
- Fix empty circuit handling: return circuit with correct num_qubits when all operators are identities
- Add SparseObservable support to fast Rust path
- Fix prefix handling to support both string and list types
- Add comprehensive test cases for all changes

* Optimize evolved_operator_ansatz and clean up tests

- Move num_operators update inside remove_identities block for optimization
- Return early with empty circuit when all operators are identities
- Remove num_operators > 0 checks since we guarantee it after identity removal
- Replace try-except import pattern with direct SparseObservable import in tests
- Remove test for private _is_pauli_identity function
- Update all test references to use SparseObservable directly

* Update qiskit/circuit/library/n_local/evolved_operator_ansatz.py

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

* Update qiskit/circuit/library/n_local/evolved_operator_ansatz.py

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

* Combined SparseObservable tests into TestEvolvedOperatorAnsatz

* Add release note for SparseObservable support in evolved_operator_ansatz

* Update reno

* Apply black formatting

---------

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

11 of 11 new or added lines in 1 file covered. (100.0%)

20 existing lines in 5 files now uncovered.

96729 of 109526 relevant lines covered (88.32%)

1209725.82 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
93.82
-0.24% crates/qasm2/src/expr.rs
1
93.32
-0.09% crates/transpiler/src/passes/unitary_synthesis.rs
2
92.54
0.26% crates/qasm2/src/lex.rs
4
73.23
0.12% crates/circuit/src/parameter/symbol_expr.rs
12
97.09
0.0% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 20745572695.1 06 Jan 2026 11:25AM UTC 885
88.32
GitHub Action Run
Source Files on build 20745572695
  • Tree
  • List 885
  • Changed 6
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20745572695
  • a412ed48 on github
  • Prev Build on gh-readonly-queue/main/pr-15507-1627a258dcf351963255f053868e0b21bd41d7b4 (#20723337157)
  • Next Build on main (#20748263922)
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