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

Qiskit / qiskit-fermions / 36869250772
98%

Build:
DEFAULT BRANCH: main
Ran 01 Oct 2026 01:35PM UTC
Jobs 1
Files 116
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

01 Oct 2026 01:31PM UTC coverage: 98.005% (+0.02%) from 97.987%
36869250772

push

github

web-flow
feat: support `measure` instructions on `FermionicCircuit` (#368)

* fix: preserve classical bits through the transpilation stages

Three optimization passes rebuilt their output DAG by calling
`apply_operation_back` with `qargs` only. `DAGCircuit` defaults `cargs` to an
empty tuple and does not complain when it is omitted, so any copied-through
instruction carrying classical bits silently lost them: a one-clbit measurement
became a zero-clbit one, and the circuit was corrupted rather than rejected.

`MergeSlaterDeterminantPreparation` is the one that matters most, because it
runs in the default Jordan-Wigner preset. The resulting failure surfaces far
from its cause -- a bare `StopIteration` from inside a simulator iterating the
(now empty) `clbits` of a measurement -- so this had to be fixed before any
measurement instruction could be trusted through the pipeline.

Separately, `F2QSynthesis` builds its output DAG from scratch (deliberately, to
keep the wire graph consistent) and copied only the classical *registers*. A
clbit outside any register was therefore dropped, and emitting an operation onto
it failed with an opaque `KeyError` naming an anonymous bit. The clbits are now
copied in the input's own order before the registers are re-added, which also
pins the clbit indices -- those indices are what the positions of a sampled
bitstring mean.

None of this was reachable through the public API before, since nothing could
put a classical instruction on a `FermionicCircuit`; it is fixed first so the
measurement support built on top starts from a working base.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* refactor: introduce FermionicInstruction as the base fermionic op

`FermionicGate` extends `qiskit.circuit.Gate`, whose `__init__` fixes the
classical-bit count at zero. That makes it structurally impossible for a
measurement to be a `FermionicGate`, so the two places that decide whether an
operation belongs on a fermionic circuit -- `Fermi... (continued)

78 of 78 new or added lines in 11 files covered. (100.0%)

1 existing line in 1 file now uncovered.

12231 of 12480 relevant lines covered (98.0%)

522217.93 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
99.89
-0.11% crates/core/src/mappers/library/jordan_wigner.rs
Jobs
ID Job ID Ran Files Coverage
1 36869250772.1 01 Oct 2026 01:35PM UTC 116
98.0
GitHub Action Run
Source Files on build 36869250772
  • Tree
  • List 116
  • Changed 15
  • Source Changed 13
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36869250772
  • 00031fcc on github
  • Prev Build on main (#36868152459)
  • Next Build on main (#36971858826)
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