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

Qiskit / qiskit / 22320333535 / 1
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: mergify/bp/stable/2.3/pr-15725
DEFAULT BRANCH: main
Ran 23 Feb 2026 07:26PM UTC
Files 898
Run time 28s
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

23 Feb 2026 06:54PM UTC coverage: 87.866% (+0.01%) from 87.856%
22320333535.1

push

github

web-flow
Fix linear dependency on base bit count in `QuantumCircuit.compose` (#15696)

Up to Qiskit 2.3, the bit-remapping mechanism of
`QuantumCircuit.compose` was to produce a temporary `CircuitData`
instance with its Python-space bit-tracker fields expanded to that of
remapping values, using the list of the full circuit base if no
remapping was to be done.  It then would run through the data of the
source, re-interning the `qubits` and `clbits` keys of each instruction
by re-indexing from the `ShareableQubit` and `ShareableClbit` trackers.
This was a spiritual successor to how the remapping would originally
have been done in Python space.

However, this has the downside that for each call to `compose`, if
`qubits=None` or `clbits=None`, there was a cost linear in the number of
bits just to set up temporary bit tracking information that would never
be used.  This is illustrated below in the simple exploratory QEC
script:

```python
from qiskit import QuantumCircuit, transpile

def build_quadratic(qubits: list[int], cycles: int, backend):
    data_qubits = qubits[::2]
    meas_qubits = qubits[1::2]
    num_meas_qubits = len(meas_qubits)

    unit_cell = QuantumCircuit(backend.num_qubits)
    for q_i in range(num_meas_qubits):
        unit_cell.cx(data_qubits[q_i], meas_qubits[q_i])
    for q_i in range(num_meas_qubits):
        unit_cell.cx(data_qubits[q_i + 1], meas_qubits[q_i])
    isa_unit_cell = transpile(unit_cell, backend, optimization_level=1)

    qc = QuantumCircuit(backend.num_qubits, num_meas_qubits * cycles)
    for i in range(cycles):
        # As of Qiskit 2.3, this `compose` call has a cost linear in the
        # number of clbits of `qc`, _not_ `isa_unit_cell`, which makes
        # the total cost of the build quadratic in cycle count.
        qc.compose(isa_unit_cell, inplace=True)
        qc.measure(
            meas_qubits,
            [i*num_meas_qubits + j for j in range(num_meas_qubits)],
        )
    return qc

def build_linear(qubits:... (continued)

100249 of 114093 relevant lines covered (87.87%)

1150035.37 hits per line

Source Files on job 22320333535.1
  • Tree
  • List 898
  • Changed 7
  • Source Changed 3
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22320333535
  • 2df6c20d on github
  • Prev Job for on gh-readonly-queue/main/pr-15696-1813978ba80da2a9616f10ee2e6ff2fd2837cdf2 (#22318797987.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc