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

Qiskit / qiskit-fermions / 39914000349
98%

Build:
DEFAULT BRANCH: main
Ran 23 Oct 2026 06:54AM UTC
Jobs 1
Files 124
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

23 Oct 2026 06:50AM UTC coverage: 98.222% (+0.01%) from 98.212%
39914000349

push

github

web-flow
feat(operators): add min_num_modes to the operator types (#395)

Call sites kept deriving the number of modes an operator needs by
building the support set or scanning the index buffers by hand, each
with its own handling of the edge and Majorana cases. The mappers, for
instance, bound-checked a term against `num_qubits` through a helper
that only the vertex operators could use, and the Majorana mappers
each divided by two on their own.

Core gains `max_mode` as a required `OperatorTrait` method, a single
allocation-free scan instead of a `HashSet` build and sort, and a
provided `min_num_modes` on top of it. The latter is deliberately the
public quantity: it is what sizes a register, it is 0 for an operator
acting on no mode (no Option or out-pointer needed in Python and C),
and it is not confused with `num_support`, which counts distinct modes.
`max_mode` stays core-only to keep the public API small.

`max_mode` is always a fermionic mode. Majorana index `m` belongs to
mode `m / 2`, so `MajoranaOperator::max_mode` applies that map itself
rather than leaving it to every caller. This is the one place where it
differs from the maximum of `get_support`, and it is documented there
alone. As a result `min_num_modes` is `max_mode + 1` for every type, a
Majorana operator can never overflow it, and for the others an index of
`u32::MAX` makes the count unrepresentable and panics, which is
acceptable for an absurd operator.

The Jordan-Wigner and ternary-tree mappers now use `max_mode`, which
makes the `max_paired_index` helper redundant.

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

93 of 93 new or added lines in 12 files covered. (100.0%)

14031 of 14285 relevant lines covered (98.22%)

457552.32 hits per line

Jobs
ID Job ID Ran Files Coverage
1 39914000349.1 23 Oct 2026 06:54AM UTC 124
98.22
GitHub Action Run
Source Files on build 39914000349
  • Tree
  • List 124
  • Changed 13
  • Source Changed 13
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39914000349
  • 42afbe9a on github
  • Prev Build on main (#39767609940)
  • Next Build on main (#40201457226)
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