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

Qiskit / qiskit-addon-sqd / 37474451770
83%

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

06 Oct 2026 01:53PM UTC coverage: 82.878% (+3.9%) from 78.955%
37474451770

push

github

web-flow
Add trim SQD (#369)

* Add trim SQD

Trim SQD screens more configurations than it diagonalizes. Where standard
SQD diagonalizes each subsampled batch independently and keeps the best
result, trim SQD treats the batches as candidates: each is diagonalized
and trimmed down to the CI strings carrying the largest weight, and the
survivors of all the batches are merged and diagonalized together. The
merged diagonalization is what the iteration reports, and its own trimmed
strings seed the next configuration recovery iteration.

Screening is cheaper than diagonalizing well. Each batch is roughly the
size of the merged subspace, so a candidate pool several times larger than
the affordable subspace can be ranked for the cost of a few extra
diagonalizations of that size. An iteration costs num_batches + 1
diagonalizations rather than num_batches.

The technique comes from joint research by the Cleveland Clinic
Foundation, RIKEN, and IBM, arXiv:2605.01138. Note that the paper's
workflow also extends the surviving subspace by adding excitations before
a final diagonalization; that step is not implemented here.

Trim SQD is selected through a new `policy` argument of
diagonalize_fermionic_hamiltonian:

    result = diagonalize_fermionic_hamiltonian(
        hcore, eri, bit_array,
        samples_per_batch=300, norb=norb, nelec=nelec, num_batches=5,
        policy=TrimPolicy(trim_ratio=0.1),
        sci_solver=my_distributed_solver,
    )

A policy selects the schedule an iteration follows: how sampled
configurations become subspaces, whether one round of diagonalizations
leads to another, which result the iteration reports, and which CI strings
seed the next one. It is described by the SubspacePolicy protocol;
it returns the subspaces and the loop calls sci_solver with
them, so the schedule and the eigensolver are chosen independently and any
combination works. `policy` defaults to StandardPolicy, the behavior this
function has always had, so omitting it changes ... (continued)

206 of 207 new or added lines in 3 files covered. (99.52%)

668 of 806 relevant lines covered (82.88%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
73.01
7.78% qiskit_addon_sqd/fermion.py
Jobs
ID Job ID Ran Files Coverage
1 37474451770.1 06 Oct 2026 01:54PM UTC 7
82.88
GitHub Action Run
Source Files on build 37474451770
  • Tree
  • List 7
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37474451770
  • b4ba0cca on github
  • Prev Build on main (#36911045625)
  • Next Build on main (#37832577170)
  • Delete
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