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

Qiskit / qiskit-fermions / 34598129675
98%

Build:
DEFAULT BRANCH: main
Ran 11 Sep 2026 12:21PM UTC
Jobs 1
Files 113
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

11 Sep 2026 12:17PM UTC coverage: 97.963% (+0.005%) from 97.958%
34598129675

push

github

web-flow
feat(transpiler): allow qDRIFT's sampling weights to be precomputed (#339)

Closes #328.

`QDriftTrotterization` derives its sampling weights from the evolved operator on
every call, reducing one value per Hamiltonian term down to one per group. Because
the pass is stateless it repeats that reduction for every randomization, even
though the result is identical every time, which is pure overhead for the ensemble
workflows the pass exists to serve.

A new keyword-only `weights` argument lets that array be computed once and handed
over. Its length is validated against the operator being sampled (one entry per group when the
operator is grouped, per term otherwise) and a circuit holding more than one
`Evolution` gate is rejected, since one array cannot describe several operators.
That check is the reason no metadata is handed back: with a single gate per run,
the caller already holds everything they supplied.

The entries must be non-negative, which is a property of the protocol rather than
a restriction imposed here. qDRIFT decomposes H = sum_j h_j H_j with positive h_j
and unit-norm H_j, so a coefficient's sign belongs to H_j, and this pass reads it
off the operator directly, per term even inside a sampled group. A weight has no
sign left to carry. Sampling from a signed quasi-probability distribution is a
separate feature, tracked separately: it additionally needs the accumulated sign
of the sampled entries reported back, because the sign has to be applied when
post-processing the measured outcomes and not to a gate. Folding it into the
emitted rotation would give exp(+i delta H) where a signed estimator weight needs
-exp(-i delta H), and those differ already at zeroth order, so no amount of
shrinking delta recovers the difference.

Deliberately framed as a performance option rather than a way to tune the
sampling. Since delta * p_j reduces to w_j * t / num_terms, the magnitudes are
absolute rather than relative: multiplying every entry by a constant s... (continued)

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

12119 of 12371 relevant lines covered (97.96%)

532827.18 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34598129675.1 11 Sep 2026 12:21PM UTC 113
97.96
GitHub Action Run
Source Files on build 34598129675
  • Tree
  • List 113
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34598129675
  • c8cc52dd on github
  • Prev Build on main (#34597204063)
  • Next Build on main (#34598424602)
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