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

Qiskit / qiskit-addon-sqd / 39037980262
91%

Build:
DEFAULT BRANCH: main
Ran 17 Oct 2026 01:47PM 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

17 Oct 2026 01:46PM UTC coverage: 83.009%. Remained the same
39037980262

push

github

web-flow
Pin the amplitudes elementwise against a recorded subspace eigenvector (#402)

* Document SCIState's amplitude sign convention

SCIState.rdm() and spin_square() hand the amplitudes to PySCF, which assumes
a determinant orders its creation operators with every alpha operator before
every beta one. However, this has gone undocumented in this package. The
amplitudes docstring was precise about which determinant each amplitude
belongs to and silent about its sign, and the sci_solver contract --
otherwise thorough, down to multi-process collective semantics -- did not
mention it either.

A solver that orders them differently therefore gets wrong values from both
methods with no error raised, while its energies, RDMs, occupancies and any
selection by amplitude magnitude stay correct. That happened: SBD
interleaves the spins orbital by orbital and the Python wrapper saw
spin_square() of 0.036 for an exact singlet, with an energy rebuilt from
rdm() 89 mHa off. Fixed downstream in
https://github.com/Qiskit/sbd-eigensolver-python/pull/62,
which is also where the reordering phase is derived.

Documents the convention on SCIState.amplitudes, where the attribute lives,
and points the sci_solver output contract at it.

The three existing spin_square() tests cannot catch this. Each expands
sci_state.amplitudes into an FCI vector with a plain scatter, then compares
PySCF's spin_square of that against sci_state.spin_square() -- both sides
consume the amplitudes under the same assumed convention, so the test agrees
with itself either way. Applying the reordering phase to a random state
makes both sides move together, from 1.358 to 1.729.

Adds a test that compares against physics instead. Over a full determinant
space the eigenvector is a spin eigenstate, so spin_square() must be exactly
S(S+1); and the energy rebuilt from the RDMs must equal the eigenvalue the
solver itself returned. Neither reference is a recorded number, so the same
body suits any eigensolver. Full ... (continued)

640 of 771 relevant lines covered (83.01%)

0.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 39037980262.1 17 Oct 2026 01:47PM UTC 7
83.01
GitHub Action Run
Source Files on build 39037980262
  • Tree
  • List 7
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39037980262
  • bf0d5940 on github
  • Prev Build on main (#38995185906)
  • Next Build on main (#39493954754)
  • 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