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

Qiskit / qiskit-fermions / 29744510891
98%

Build:
DEFAULT BRANCH: main
Ran 20 Jul 2026 01:13PM UTC
Jobs 1
Files 87
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

20 Jul 2026 01:01PM UTC coverage: 97.586% (-0.1%) from 97.734%
29744510891

push

github

web-flow
ffsim-based simulation engine (#187)

* feat: apply FermionicCircuit evolutions via ffsim's SupportsApplyUnitary

Implement ffsim's `_apply_unitary_` protocol for `FermionicCircuit` and its
`Evolution` gate so circuits can be simulated with ffsim as the engine. An
`Evolution` gate applies `exp(-i * time * operator)` to an ffsim CI state
vector by converting the (spinless) `FermionOperator` to an
`ffsim.FermionOperator` and applying `ffsim.linear_operator` via
`scipy.sparse.linalg.expm_multiply`. The conversion maps mode `m` to ffsim
`(orb=m % norb, spin=m // norb)`, matching the spin convention of the
`from_1body/2body_*_spin*` constructors. ffsim is an optional dependency
(new `simulation` extra, gated by `HAS_FFSIM`), so its imports are lazy.

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

* feat: support spinless (integer nelec) FermionicCircuit evolutions

The FermionicCircuit apply-unitary path previously returned NotImplemented
for a spinless system (integer nelec). ffsim represents a spinless system as
the (nelec, 0) spinful sector, so mapping every operator mode onto an alpha
orbital keeps the operator within that sector and lets ffsim.linear_operator
build the correct C(norb, nelec)-dimensional operator.

to_ffsim_operator now takes nelec (int | tuple[int, int]) instead of a
norb-only signature, selecting the mode interpretation by its type: an integer
maps the operator's norb modes onto alpha orbitals (spinless), while a pair
keeps the existing (orb=m % norb, spin=m // norb) split over 2*norb modes
(spinful). This mirrors ffsim's own norb/nelec convention and a future
_linear_operator_ interface.

The spinless equivalence test cross-checks against an independent
exact-diagonalization oracle (dense H in the cistring-addressed determinant
basis) rather than ffsim's own FermionOperator, to avoid a tautological check.

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

* refactor: fold ffsim evolution glue into Evolution._apply_u... (continued)

1526 of 1577 new or added lines in 12 files covered. (96.77%)

9539 of 9775 relevant lines covered (97.59%)

335.43 hits per line

Uncovered Changes

Lines Coverage ∆ File
19
92.52
python/qiskit_fermions/circuit/library/ucj.py
17
98.45
crates/core/src/linalg/fci.rs
12
97.01
-0.97% crates/core/src/operators/fermion_operator.rs
2
92.86
1.43% python/qiskit_fermions/circuit/fermionic_circuit.py
1
97.5
-2.5% python/qiskit_fermions/circuit/library/initialize_modes.py
Jobs
ID Job ID Ran Files Coverage
1 29744510891.1 20 Jul 2026 01:13PM UTC 87
97.59
GitHub Action Run
Source Files on build 29744510891
  • Tree
  • List 87
  • Changed 10
  • Source Changed 10
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29744510891
  • fcbebbbe on github
  • Prev Build on main (#29585572550)
  • Next Build on main (#29744608424)
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