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

Qiskit / qiskit-fermions / 33368664568
98%

Build:
DEFAULT BRANCH: main
Ran 31 Aug 2026 07:34AM UTC
Jobs 1
Files 104
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

31 Aug 2026 07:30AM UTC coverage: 98.046% (+0.03%) from 98.021%
33368664568

push

github

web-flow
Use exact FCI traces for matrix exponentials (#279)

* Use exact FCI traces for matrix exponentials

* Update releasenotes/notes/exact-fci-trace-9d950da5d3abe256.yaml

* refactor: read the exact FCI trace from the kernel, not a patched attribute

The exact-trace change plumbed the trace to the matrix-exponential callers by
patching a private `_trace` attribute onto the SciPy `LinearOperator` returned by
`_linear_operator_`. That coupled a *public* protocol's return value to metadata
only this package's wrapper sets: `SupportsLinearOperator` promises nothing more
than a `scipy.sparse.linalg.LinearOperator`, so any other conforming operator
reaching `Evolution` raised `AttributeError` on the read. The `isinstance`
FermionOperator guard hid that today, but the comment above it records the intent
to remove the guard once `SupportsLinearOperator` folds into `OperatorTrait` --
at which point the crash goes live.

A SciPy `LinearOperator` is also simply the wrong carrier: it has nowhere to put
the value, and composing one drops any attached attribute (`scale * linop`
returns a bare `_ScaledLinearOperator`), so the metadata survived exactly one hop
by luck.

The trace does not need transporting at all. The internal
`_fci_linear_operator_` carrier already returns the native `FciLinearOperator`,
which exposes `trace` as a real, typed, documented getter next to the
matrix-vector action. Going through that carrier gives both pieces from one
object, so the private attribute, both `cast(Any, ...)` escapes and a stale
`type: ignore` all disappear, and the public wrapper goes back to returning an
unadorned operator.

This keeps the numerical win intact: still 82x faster and ~63000x more accurate
than `traceA=0.0` on a large-trace operator, measured against a dense `expm`
reference. Behaviour is unchanged -- the trace handed to SciPy is bit-identical.

The shared helper now takes the operator rather than a prebuilt operator/trace
pair, which also confines the FCI-kern... (continued)

113 of 113 new or added lines in 5 files covered. (100.0%)

12191 of 12434 relevant lines covered (98.05%)

523805.41 hits per line

Jobs
ID Job ID Ran Files Coverage
1 33368664568.1 31 Aug 2026 07:34AM UTC 104
98.05
GitHub Action Run
Source Files on build 33368664568
  • Tree
  • List 104
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33368664568
  • d564ef52 on github
  • Prev Build on main (#32979863509)
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