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

Qiskit / qiskit-fermions / 29497777470
98%

Build:
DEFAULT BRANCH: main
Ran 16 Jul 2026 12:31PM UTC
Jobs 1
Files 83
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

16 Jul 2026 12:20PM UTC coverage: 97.731% (-0.05%) from 97.785%
29497777470

push

github

web-flow
Term ordering (#183)

* feat: add generic term iteration and construction to OperatorTrait

Promote the term-iteration and term-construction surface onto the
`OperatorTrait` protocol so that generic, operator-agnostic term
transforms can be written once against the trait rather than per
operator. For every operator the trait now exposes:

  - `iter` / `iter_with_groups` — borrowed views over the stored terms
    (`iter_with_groups` moves here from an inherent method, unchanged; it
    still panics when `groups` is `None`, documented as a precondition)
  - `from_terms` / `from_terms_with_groups` — their inverses, rebuilding
    an owned operator from an iterator of (group) term views

The view types are named as generic associated types bounded only by
`PartialEq`, so the trait declaration and every impl spell the `iter`
item type identically (`Self::TermView<'_>`) and no impl refines the
signature — the `refining_impl_trait` lint stays quiet without any
`#[allow]`. Implementers must keep spelling the associated type.

The pyext `from_terms*` classmethods, which previously hand-rolled the
CSR field-pushing, now share the core `_append_term` primitive (promoted
to `pub`) so the sparse boundary bookkeeping lives in one place per
operator. They intentionally do not route through the core `from_terms*`:
those borrow term views tied to a single lifetime, whereas Python hands
over owned tuples, so delegating would force materializing every term
up front (a full extra copy). Appending directly keeps construction
streaming.

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

* feat: add a canonical term-ordering module

`operators::terms::ordering::canonical::canonical_order` sorts an
operator's terms into a canonical, coefficient-independent order and
rebuilds it via `OperatorTrait::from_terms`.

The ordering key is a new `TermSortKey` trait implemented on each
`*TermView`, and `OperatorTrait::TermView` is bounded by it so the sort
is generic over every... (continued)

447 of 476 new or added lines in 8 files covered. (93.91%)

8010 of 8196 relevant lines covered (97.73%)

155.69 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
96.22
-0.75% crates/core/src/operators/edge_vertex_operator.rs
11
96.34
-0.73% crates/core/src/operators/transfer_vertex_operator.rs
5
97.02
0.19% crates/core/src/operators/majorana_operator.rs
2
97.98
0.72% crates/core/src/operators/fermion_operator.rs
Jobs
ID Job ID Ran Files Coverage
1 29497777470.1 16 Jul 2026 12:31PM UTC 83
97.73
GitHub Action Run
Source Files on build 29497777470
  • Tree
  • List 83
  • Changed 9
  • Source Changed 9
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29497777470
  • 92fd04df on github
  • Prev Build on main (#29487220436)
  • Next Build on main (#29499706546)
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