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

Qiskit / qiskit-fermions / 33646103237
98%

Build:
DEFAULT BRANCH: main
Ran 02 Sep 2026 03:09PM UTC
Jobs 1
Files 108
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 Sep 2026 03:03PM UTC coverage: 98.184% (+0.07%) from 98.114%
33646103237

push

github

web-flow
Implement Jordan-Wigner natively for other operator representations (#307)

* feat: add Jordan-Wigner mappers for Majorana, edge-vertex and transfer-vertex operators

Until now `fermion_jordan_wigner` was the only mapper producing a qubit
operator, so the only route from a Majorana, edge-vertex or transfer-vertex
operator to a `SparseObservable` was to convert it to a `FermionOperator`
first. That detour is needlessly expensive: under Jordan-Wigner every
generator of these three algebras maps onto a *single* Pauli string, whereas
a fermionic action maps onto a two-term sum. Routing a length-L word through
the fermionic representation therefore inflates one Pauli string into up to
4^L terms, only to merge them back down again.

The images are, with `lo`/`hi` the smaller/larger index and the Z-string
surviving only strictly between the endpoints:

    gamma_m  ->  Z_0 ... Z_{idx-1} (X or Y)_idx,   idx = m / 2
    V_l      ->  Z_l
    E_lr     ->  Y_lo (Z ...) X_hi     sign flips with the index order
    T_lr     ->  P_lo (Z ...) P_hi     coefficient -1/2 either way, P = X or Y

Note the asymmetry between the last two: reversing the indices of an edge
operator keeps the string and flips the sign (this is E_lr = -E_rl), while for
a transfer operator the coefficient is unchanged and the Pauli letters swap
instead. Both are covered by dedicated tests, since the instinct to expect a
sign flip in the transfer case is exactly the plausible-looking error.

These conventions differ from Eq. (10) of arXiv:2512.11418v2 by an exchange of
X and Y on the endpoints -- a single-qubit basis choice which that paper notes
itself. Both satisfy every defining relation of the algebra, but only the one
used here agrees with this crate's `*_to_fermion` converters and its `gamma'`
sign, so that mapping an operator directly gives the same result as converting
it first. That equality is asserted by the cross-validation tests, which are
the load-bearing check on the algebra: the t... (continued)

568 of 568 new or added lines in 3 files covered. (100.0%)

13412 of 13660 relevant lines covered (98.18%)

482880.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 33646103237.1 02 Sep 2026 03:09PM UTC 108
98.18
GitHub Action Run
Source Files on build 33646103237
  • Tree
  • List 108
  • Changed 8
  • Source Changed 8
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33646103237
  • 6e492314 on github
  • Prev Build on main (#33626627795)
  • Next Build on main (#33761644645)
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