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

Qiskit / qiskit-fermions / 31029560411
98%

Build:
DEFAULT BRANCH: main
Ran 05 Aug 2026 05:32PM UTC
Jobs 1
Files 103
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

05 Aug 2026 05:20PM UTC coverage: 98.021% (-0.001%) from 98.022%
31029560411

push

github

web-flow
Speed up loading a `FermionOperator` from an FCIDump file (#262)

* perf(operators): stop deriving group indices per integral in FCIDump builders

The `add_{1,2}body_tril_spin[_sym]` builders derived the next group index by
calling `num_groups()` once per integral, and that is a full scan over every
group index accumulated so far. Building an operator was therefore quadratic in
its term count: loading a 36-orbital FCIDUMP (6.7M terms) spent 216s in
`from_fcidump`, against 0.34s to parse the file.

The builders now take the starting group index and return the next free one, so
the caller keeps the running index in its own scope and no builder consults the
operator's accumulated groups. That drops the same load to ~0.47s total.

`num_groups()` itself is unchanged — it is public API on all four operator
types, and only its use inside these loops was the problem. The builders are
internal to the core crate, so there is no Python or C API change.

Output is unchanged: coeffs, actions, modes, boundaries and groups are all
bit-identical to before on the 6.7M-term operator.

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

* perf(operators): parse FCIDUMP integral lines without allocating

Each integral line was matched with a capturing regex, and every one of its five
captures was then copied into an owned `String` (via a `replace` that only the
header fields need) before being parsed. On a 220k-line file that is over a
million allocations spent on data that could be read straight out of the line.

`split_integral_line` now parses all five fields from the borrowed line, which
takes parsing of a 36-orbital FCIDUMP from 0.25s to 0.02s.

The replaced regex opened with a greedy group, so on a line carrying more than
five fields the *last* four became the indices rather than the first four
following the coefficient. That is preserved, and the skip-the-line behaviour
for records that do not match is unchanged; both are now pinned by tests.

Co-Authored-By: C... (continued)

208 of 210 new or added lines in 2 files covered. (99.05%)

2 existing lines in 1 file now uncovered.

12084 of 12328 relevant lines covered (98.02%)

525463.82 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
99.13
-0.58% crates/core/src/operators/library/electronic_integrals.rs

Coverage Regressions

Lines Coverage ∆ File
2
99.13
-0.58% crates/core/src/operators/library/electronic_integrals.rs
Jobs
ID Job ID Ran Files Coverage
1 31029560411.1 05 Aug 2026 05:32PM UTC 103
98.02
GitHub Action Run
Source Files on build 31029560411
  • Tree
  • List 103
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31029560411
  • c25e3b51 on github
  • Prev Build on main (#30895438733)
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