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

Qiskit / qiskit-bosons / 44314335937
93%

Build:
DEFAULT BRANCH: main
Ran 18 Nov 2026 01:33PM UTC
Jobs 1
Files 69
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

18 Nov 2026 01:30PM UTC coverage: 92.539% (-0.07%) from 92.607%
44314335937

push

github

web-flow
Fix the equivalence checks of `Evolution` gates (#17)

* fix(circuit): compare evolutions by their operators, with equiv

Evolution inherited Qiskit's equality of instructions, which compares the parameters and the
definitions. The operator is no parameter, so two evolutions of different operators for the same time
compared equal (always for atomic gates, which have no definition), while the definitions made the
result depend on how the operator is written and on the synthesis method.

Evolution now defines __eq__, __hash__ and equiv. They compare the number of modes, the time and the
operator, the latter with BosonOperator.equiv, in normal order: a bosonic circuit lives in the
untruncated algebra, and the truncation only enters when it is lowered to qubits, so b b^dagger and
b^dagger b + 1 are the same operator. The synthesis and the atomic flag are not compared. The
docstring of BosonOperator.equiv now says that it normal-orders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(transpiler)!: merge evolutions whose operators are equiv

MergeEvolutions merged two neighboring evolutions only when their operators were the same products
of ladder operators as written, so that a merge never changed the lowered circuit. But a bosonic
circuit lives in the untruncated algebra, and there b b^dagger and b^dagger b + 1 are the same
operator, so the merge is exact for operators that are equiv. That the truncation then maps them
differently on the highest level of a mode is an artifact of the cutoff, with or without the
merge. The pass now compares the operators with BosonOperator.equiv, like Evolution itself, and the
docs say how to keep the lowered circuit unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

15 of 20 new or added lines in 2 files covered. (75.0%)

3 existing lines in 3 files now uncovered.

3349 of 3619 relevant lines covered (92.54%)

42.16 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
83.87
-16.13% python/qiskit_bosons/circuit/library/evolution.py

Coverage Regressions

Lines Coverage ∆ File
1
59.88
-1.48% crates/core/src/mappers/library/occupation.rs
1
0.0
0.0% crates/core/src/mappers/qk_obs.rs
1
96.57
-0.16% crates/core/src/operators/boson_operator.rs
Jobs
ID Job ID Ran Files Coverage
1 44314335937.1 18 Nov 2026 01:33PM UTC 69
92.54
GitHub Action Run
Source Files on build 44314335937
  • Tree
  • List 69
  • Changed 15
  • Source Changed 2
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #44314335937
  • e4c54134 on github
  • Prev Build on main (#42014490802)
  • Next Build on main (#44533222473)
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