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

Qiskit / qiskit-fermions / 30544761657
98%

Build:
DEFAULT BRANCH: main
Ran 30 Jul 2026 01:08PM UTC
Jobs 1
Files 102
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

30 Jul 2026 12:57PM UTC coverage: 98.108% (-0.001%) from 98.109%
30544761657

push

github

web-flow
refactor(circuit): make UCJ.__init__ take an explicit variant instead of inferring it (#236)

`nelec` was stored on `UCJ` only to infer the spin variant from its type
(int vs. tuple) and cross-check it against the tensor shapes, never read
for its actual particle-count value at construction time. This made
`__init__` inconsistent with `from_t_amplitudes`, which already takes
`variant` explicitly, and forced a shape-sniffing inference path
(`_infer_variant`) that only existed because `__init__` didn't ask for the
variant directly.

`__init__` now takes `variant` explicitly, mirroring `from_t_amplitudes`.
`nelec` is dropped from `self` entirely; it remains purely a call-time
argument to `_apply_unitary_placed_`/`_apply_unitary_`, which already
received it as a parameter.

This also drops the implicit "2-register spinless shortcut" (running
spinless-shaped tensors on a spinful sector by passing a tuple `nelec`),
which was never a deliberate feature -- just a side effect of keying off
`nelec`'s type -- and cannot be offered faithfully by a `Gate` with a
fixed `num_modes` anyway. The same physics remains fully expressible via
`Variant.BALANCED` with a zeroed alpha-beta block, which is now both
documented and covered by a dedicated equivalence test. Reworking that
test surfaced a latent test bug: `test_ucj_from_t_amplitudes_spinless_matches_ffsim`
was relying on this exact shortcut with a spinful `nelec`, so it now
exercises a genuinely spinless system instead.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

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

10422 of 10623 relevant lines covered (98.11%)

312.37 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30544761657.1 30 Jul 2026 01:08PM UTC 102
98.11
GitHub Action Run
Source Files on build 30544761657
  • Tree
  • List 102
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30544761657
  • dde97d12 on github
  • Prev Build on main (#30530363564)
  • Next Build on main (#30617730715)
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