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

Qiskit / qiskit-fermions / 30617730715
98%

Build:
DEFAULT BRANCH: main
Ran 31 Jul 2026 09:01AM 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

31 Jul 2026 08:50AM UTC coverage: 98.095% (-0.01%) from 98.108%
30617730715

push

github

web-flow
Variational UCJ (#237)

* feat(circuit): add num_parameters/from_parameters/to_parameters to UCJ

VQE and other classical optimizers need to treat the UCJ ansatz as a flat
real-valued parameter vector. Port ffsim's n_params/from_parameters
(UCJOpSpinBalanced/Unbalanced/Spinless) convention onto UCJ's single-class
design, with variant threaded through explicitly like from_t_amplitudes
already does. Named num_parameters (rather than ffsim's n_params) to match
this package's existing nomenclature.

The underlying orbital-rotation parametrization matches ffsim's
antihermitian-generator layout bit-for-bit, so a parameter vector produced
by ffsim's own to_parameters() round-trips through UCJ.from_parameters
unmodified (covered by a new cross-check test).

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

* docs(guides): add how-to guide for the outer VQE optimization loop

Add a How-To guide showing how to drive the VQE outer loop -- proposing
a flat real parameter vector, unpacking it into a fresh ansatz gate via
UCJ.from_parameters, and evaluating the resulting state/energy -- with
both a generic scipy optimizer and ffsim's minimize_linear_method. Uses
UCJ as a concrete example throughout, deferring to the LUCJ guide for
the classical calculation and ansatz construction details, since the
num_parameters/from_parameters/to_parameters interface driving this
guide applies to any ansatz gate exposing it, not just UCJ.

Filed under a new "Circuits" How-Tos subsection in the guide index.

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

* refactor(circuit): make UCJ's parameter constructors classmethods returning Self

The new num_parameters/from_parameters were staticmethods hardcoding the UCJ
class internally, so a subclass calling from_parameters got a plain UCJ back
rather than an instance of itself, and any private helper it overrode was
bypassed. Switch both to classmethods and route the internals through cls,
matching InitializeModes.from_... (continued)

157 of 161 new or added lines in 1 file covered. (97.52%)

10555 of 10760 relevant lines covered (98.09%)

308.4 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
98.92
-1.08% python/qiskit_fermions/circuit/library/ucj.py
Jobs
ID Job ID Ran Files Coverage
1 30617730715.1 31 Jul 2026 09:01AM UTC 102
98.09
GitHub Action Run
Source Files on build 30617730715
  • 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 #30617730715
  • 48819b35 on github
  • Prev Build on main (#30544761657)
  • Next Build on main (#30623756194)
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