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

Qiskit / qiskit-fermions / 30749101080
98%

Build:
DEFAULT BRANCH: main
Ran 02 Aug 2026 01:14PM UTC
Jobs 1
Files 103
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

02 Aug 2026 01:02PM UTC coverage: 98.022% (-0.1%) from 98.163%
30749101080

push

github

web-flow
feat(operators): contract generators in Edge/Transfer normal_ordered (#257)

`normal_ordered` only ever *reordered* generators, so its result was not a
canonical form: `V_j V_j`, `E_jk E_kj` and friends survived as-is. Two
representations of one operator could therefore normal-order to different terms,
and `is_hermitian` -- which tests `self - self.adjoint()` against zero --
reported false negatives whenever that cancellation needed a contraction first.

Both families now contract to a fixed point, gated behind a `reduce` flag that
defaults to `true`, mirroring `MajoranaOperator::normal_ordered(reduce=true)`.
`FermionOperator` deliberately gains no such flag: there the
`a_i a^dag_j = delta_ij - a^dag_j a_i` contraction is what *permits* each swap
rather than a separable cleanup pass, so disabling it would return an operator
not equal to the input.

The rules were derived from dense matrices built straight from the Majorana
definitions rather than from Eq. (5)/(7) of arXiv:2512.11418v1, which are stated
only for pairwise-distinct indices and so say nothing about the coinciding-index
cases that contraction is entirely about -- the same blind spot that produced the
two preceding sign bugs. That oracle is committed alongside as
`majorana_matrix_oracle.py` so the derivation stays reproducible.

Edge additionally gains `ascending` to fix the `E_kj = -E_jk` orientation
convention, closing the TODO that asked for exactly this. It is not merely
cosmetic: recognizing `E_10 E_21 -> E_20` requires matching on indices
independently of which orientation happens to be stored, so canonicalizing is
what makes fusion findable at all. Both directions fuse identically.

The two families end up deliberately asymmetric, because the algebra is:

- Edge fuses. `E_ab E_bc = -i E_ac` collapses two generators into one, and
  together with `E_kj = -E_jk` that single rule generates all 96 shared-mode
  products.
- Transfer does not. Writing `T_jk = (i/2) gamma_2j gamma_2k-1`, can... (continued)

253 of 266 new or added lines in 2 files covered. (95.11%)

125 existing lines in 5 files now uncovered.

11940 of 12181 relevant lines covered (98.02%)

276.44 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
96.22
-0.98% crates/core/src/operators/edge_vertex_operator.rs

Coverage Regressions

Lines Coverage ∆ File
34
96.22
-0.98% crates/core/src/operators/edge_vertex_operator.rs
34
97.09
-0.03% crates/core/src/operators/transfer_vertex_operator.rs
30
97.54
-0.09% crates/core/src/operators/fermion_operator.rs
23
97.29
-0.11% crates/core/src/operators/majorana_operator.rs
4
97.42
0.0% crates/core/src/linalg/givens.rs
Jobs
ID Job ID Ran Files Coverage
1 30749101080.1 02 Aug 2026 01:14PM UTC 103
98.02
GitHub Action Run
Source Files on build 30749101080
  • Tree
  • List 103
  • Changed 7
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30749101080
  • 0a989ee1 on github
  • Prev Build on main (#30746828464)
  • Next Build on main (#30895438733)
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