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

Qiskit / qiskit-addon-sqd / 39046910527
91%
main: 91%

Build:
Build:
LAST BUILD BRANCH: fix-max-dim-truncation-ranking
DEFAULT BRANCH: main
Ran 17 Oct 2026 03:52PM 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 03:51PM UTC coverage: 83.747%. Remained the same
39046910527

push

github

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

* 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... (continued)

675 of 806 relevant lines covered (83.75%)

0.84 hits per line

Jobs
ID Job ID Ran Files Coverage
1 39046910527.1 17 Oct 2026 03:52PM UTC 7
83.75
GitHub Action Run
Source Files on build 39046910527
  • 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 #39046910527
  • d4933cf6 on github
  • Prev Build on stable/0.14 (#38999191217)
  • Next Build on stable/0.14 (#39501904806)
  • 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