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

Qiskit / qiskit-fermions / 36868152459
98%

Build:
DEFAULT BRANCH: main
Ran 01 Oct 2026 01:25PM UTC
Jobs 1
Files 113
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

01 Oct 2026 01:21PM UTC coverage: 97.987% (+0.02%) from 97.968%
36868152459

push

github

web-flow
feat: add `FermionicCircuit.repeat` (#366)

* feat: add FermionicCircuit.compose

Building a circuit out of smaller circuits had no sanctioned route. `append`
takes a FermionicGate and rejects a circuit, and there is no `to_gate`, so the
only way to join two circuits was to iterate the private `_inner.data` of one
and re-append its instructions, which the guides and tests were already doing.

Only a FermionicCircuit is accepted. Qiskit's `QuantumCircuit.compose` inlines
whatever it is handed without a type check, so accepting a bare QuantumCircuit
here would quietly bypass the FermionicGate guard that `append` enforces, which
is the reason this class keeps a reduced API in the first place. Validating the
operand type alone is enough and stays O(1): every FermionicCircuit is populated
through that guard, so its contents are already fermionic.

The `wrap` argument is deliberately not re-exposed. It would produce a plain
Gate, which `append` rejects and for which F2QSynthesis has no plugin, so a
wrapped circuit could neither be re-composed nor transpiled. `clbits`, `copy`,
`var_remap` and `inline_captures` are likewise omitted as meaningless here.

The out-of-place form has to re-sync `register`, as `decompose` does: Qiskit's
`compose` returns a circuit carrying a fresh register object, and without the
re-sync the returned circuit's modes would not be this circuit's modes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* feat: add FermionicCircuit.repeat

Building a repeated circuit meant writing the loop by hand, and doing it well
meant knowing which redundancy to fold away. A second-order Trotter step ends
and begins with half-duration orbital rotations, so the idiomatic construction
carried a `dt if step < reps - 1 else dt / 2` to fuse each boundary pair, which
is arithmetic about the circuit's shape rather than about the physics.

`repeat` flattens instead of wrapping, and that is the load-bearing choice.
Qiskit's `QuantumCircuit.repeat` wra... (continued)

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

12171 of 12421 relevant lines covered (97.99%)

524698.47 hits per line

Jobs
ID Job ID Ran Files Coverage
1 36868152459.1 01 Oct 2026 01:25PM UTC 113
97.99
GitHub Action Run
Source Files on build 36868152459
  • Tree
  • List 113
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36868152459
  • 0ce2c1d6 on github
  • Prev Build on main (#36866772315)
  • Next Build on main (#36869250772)
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