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

Qiskit / qiskit-fermions / 30439919391
98%

Build:
DEFAULT BRANCH: main
Ran 29 Jul 2026 09:41AM UTC
Jobs 1
Files 102
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

29 Jul 2026 09:30AM UTC coverage: 97.997%. Remained the same
30439919391

push

github

web-flow
fix: make native operators and their circuits picklable (#228)

FermionicCircuit/FermionicDAGCircuit instances holding an Evolution gate
failed to pickle. Two independent causes:

1. FermionOperator, MajoranaOperator, EdgeVertexOperator, and
   TransferVertexOperator carried no pickle protocol, so pickle fell back to
   __reduce_ex__'s default handling and lost the `groups` field entirely.
   Each now implements __getnewargs__/__getstate__/__setstate__ to round-trip
   through their constructor plus `groups`.

2. Fixing (1) surfaced a second, independent bug: these classes (and
   FciLinearOperator, FCIDump) declare a public, logical `__module__` via
   `#[pyclass(module = "...")]` for user-facing repr()/error messages (per
   #186), but that path is never registered in sys.modules -- only the
   physical `_lib`-rooted path is. Pickle needs to resolve a class's
   `__module__` via importlib to serialize a reference to it, so this broke
   regardless of (1). qiskit_fermions/__init__.py's existing sys.modules
   registration loop now also aliases each pyclass's declared module to its
   real module object, leaving the public-facing repr()/__module__/error
   text untouched.

Adds pickle round-trip tests for all four operator types (with and without
`groups`), for a FermionicCircuit/FermionicDAGCircuit wrapping an Evolution
gate, and for RelabelModes' pyomo SolverResults metadata as requested by the
issue (that metadata was not actually the root cause, but is now guarded
against regressing).

Closes #225

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

3 of 3 new or added lines in 1 file covered. (100.0%)

10225 of 10434 relevant lines covered (98.0%)

317.6 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30439919391.1 29 Jul 2026 09:41AM UTC 102
98.0
GitHub Action Run
Source Files on build 30439919391
  • Tree
  • List 102
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30439919391
  • 1ab27160 on github
  • Prev Build on main (#30363137094)
  • Next Build on main (#30459320656)
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