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

Qiskit / qiskit-fermions / 34373221764
98%

Build:
DEFAULT BRANCH: main
Ran 09 Sep 2026 03:58PM UTC
Jobs 1
Files 113
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

09 Sep 2026 03:53PM UTC coverage: 97.895% (-0.6%) from 98.452%
34373221764

push

github

web-flow
feat(operators): order terms by group and exploit the resulting layout (#338)

Group indices are a per-term tag that says nothing about where those terms sit,
so a group's terms are in general scattered throughout an operator. The grouping
this repository ships makes that concrete: group_terms_by_electronic_structure
assigns indices in order of first encounter, which leaves a group's second term
arbitrarily far from its first. Nothing could exploit a grouping's locality
because no operation produced any.

group_order sorts the terms by group index alone, making each group one
contiguous run. The sort is stable, so terms keep their relative order within a
group: ordering canonically first and by group second refines the canonical
order rather than replacing it with an arbitrary permutation. An operator
tracking no groups has nothing to order by and comes back as an unchanged copy,
which keeps the function composable rather than forcing a guard at every step of
a pipeline.

That layout alone changes nothing, which is the point of the second half of this
commit: split_out_groups staged the requested groups in a HashMap and then
walked every term testing each against it, so a lookup cost the same whether one
group was requested or forty. It now binary-searches the group boundaries when
the group indices are sorted, making a lookup scale with the groups requested
rather than the terms held. Measured on an N2 Hamiltonian of 251,468 terms in
75,616 groups, a release-mode lookup drops from ~1.9 ms to ~0.02 ms.

Sortedness is detected per call rather than tracked on the operator. A cached
flag would be tractable now that #337 funnelled the whole-array writes through
one gate, but it would not help the callers that motivate this: the incremental
builders in library must keep writing the field directly, and neither FCIDump nor
group_terms_by_electronic_structure produces sorted indices, so the flag would
read "unknown" for exactly the operators being optimized. ... (continued)

263 of 283 new or added lines in 9 files covered. (92.93%)

51 existing lines in 3 files now uncovered.

11722 of 11974 relevant lines covered (97.9%)

550487.55 hits per line

Uncovered Changes

Lines Coverage ∆ File
14
50.0
crates/cext/src/operators/terms/ordering/group.rs
2
95.4
-1.34% crates/core/src/operators/edge_vertex_operator.rs
2
96.22
-1.72% crates/core/src/operators/majorana_operator.rs
2
96.23
-1.4% crates/core/src/operators/transfer_vertex_operator.rs

Coverage Regressions

Lines Coverage ∆ File
17
95.4
-1.34% crates/core/src/operators/edge_vertex_operator.rs
17
96.22
-1.72% crates/core/src/operators/majorana_operator.rs
17
96.23
-1.4% crates/core/src/operators/transfer_vertex_operator.rs
Jobs
ID Job ID Ran Files Coverage
1 34373221764.1 09 Sep 2026 03:58PM UTC 113
97.9
GitHub Action Run
Source Files on build 34373221764
  • Tree
  • List 113
  • Changed 7
  • Source Changed 7
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34373221764
  • 9baf61ff on github
  • Prev Build on main (#34364759259)
  • Next Build on main (#34473493707)
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