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

Qiskit / qiskit-fermions / 30623756194
98%

Build:
DEFAULT BRANCH: main
Ran 31 Jul 2026 10:41AM UTC
Jobs 1
Files 103
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 10:30AM UTC coverage: 98.114% (+0.02%) from 98.095%
30623756194

push

github

web-flow
Variational UCC (#238)

* feat(circuit): add a UCC ansatz gate

UCJ was the circuit library's only variational ansatz. Add the unitary
coupled-cluster ansatz exp(T - T^dagger) alongside it, with T the 1- and
2-body fermionic excitation operator, in the same three spin variants UCJ
offers (restricted, unrestricted, spinless) and exposing the same
num_parameters/from_parameters/to_parameters interface, so the existing VQE
outer-loop guide applies unchanged.

Expressed as a single Evolution of the Hermitian generator H = i(T - T^dag)
-- anti-Hermiticity of T - T^dag is what makes that rewrite legal -- which
lets the simulation path exponentiate the generator exactly while leaving
the product formula to the transpiler.

The generator assigns each excitation and its Hermitian conjugate a *shared*
group. This is load-bearing, not an optimization: Evolution splits its
operator term-by-term when no groups are present, which would separate every
excitation from its conjugate and leave the individual factors exp(-i H_k)
non-Hermitian, hence non-unitary -- the synthesized circuit would not even
preserve the norm. Grouping by conjugate pairs makes every Trotter factor a
genuine unitary, and as a side benefit collapses the terms into roughly a
third as many groups. A regression test asserts each group is individually
Hermitian.

Deliberately omits the final_orbital_rotation that UCJ carries. For UCJ that
rotation is load-bearing -- it is where the singles amplitudes go, since UCJ
only factorizes t2 -- whereas UCC already has t1 as its singles operator, so
it would be redundant variational freedom. Users wanting it can append an
OrbitalRotation themselves.

The doubles amplitudes always obey the exchange symmetry
t2[i,j,a,b] == t2[j,i,b,a], which is forced because the excitation operator
is invariant under relabeling the (i,a)/(j,b) pairs. The stricter separate
antisymmetry of standard coupled cluster -- antisymmetric in i<->j and a<->b
independently -- is a proper... (continued)

318 of 322 new or added lines in 2 files covered. (98.76%)

10873 of 11082 relevant lines covered (98.11%)

299.47 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
98.75
python/qiskit_fermions/circuit/library/ucc.py
Jobs
ID Job ID Ran Files Coverage
1 30623756194.1 31 Jul 2026 10:41AM UTC 103
98.11
GitHub Action Run
Source Files on build 30623756194
  • Tree
  • List 103
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30623756194
  • 33df2b7e on github
  • Prev Build on main (#30617730715)
  • Next Build on main (#30624978477)
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