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

Qiskit / qiskit-fermions / 30745841200
98%

Build:
DEFAULT BRANCH: main
Ran 02 Aug 2026 11:39AM 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 11:29AM UTC coverage: 98.149% (+0.01%) from 98.135%
30745841200

push

github

web-flow
fix(operators): reverse the operator string in Edge/Transfer adjoint (#254)

`adjoint()` only conjugated the coefficients for `EdgeVertexOperator` and
`TransferVertexOperator`, leaving the operator string untouched. That is wrong
because `(AB)† = B†A†` and these generators anticommute when they share an
index, so `BA = -AB != AB`. Both docstrings justified the omission by noting
that the individual generators are Hermitian, but individual Hermiticity does
not license dropping the reversal.

`is_hermitian()` is built from `self - self.adjoint()` and so inherited the
bug in its dangerous direction: over 600 random operators per type it claimed
19 (edge) and 25 (transfer) non-Hermitian operators were Hermitian. `V(0)E(0,1)`
was a concrete false positive. Verified against Jordan-Wigner matrix ground
truth built from arXiv:2512.11418v2, the fix takes both types to 0 wrong out of
4368 terms (checked at 3, 4 and 5 modes) and removes every false positive.

The transfer definition also had a typo that made the two halves of one
equation contradict each other: `T_jk = (i/2) V_j E_jk = (1/2) γ_2j γ_2k-1`
dropped the `i` from the Majorana form. The paper has `i/2` in both, and only
that form is Hermitian -- the `1/2` reading suggests the off-diagonal transfer
generators are anti-Hermitian, which they are not.

`FermionOperator` and `MajoranaOperator` were audited the same way and are
correct as they stand, so they are left alone.

The `is_hermitian` checks stay conservative for a separate, pre-existing
reason: `normal_ordered` does not contract repeated generators into scalars
(`V_j V_j = 1`, `E_jk E_kj = -1`), so a genuinely Hermitian operator can still
report `False`. That is now documented rather than fixed.

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

104 of 104 new or added lines in 2 files covered. (100.0%)

11083 of 11292 relevant lines covered (98.15%)

294.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30745841200.1 02 Aug 2026 11:39AM UTC 103
98.15
GitHub Action Run
Source Files on build 30745841200
  • Tree
  • List 103
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30745841200
  • 58230b5c on github
  • Prev Build on main (#30744562503)
  • Next Build on main (#30746828464)
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