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

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

Build:
DEFAULT BRANCH: main
Ran 26 Jun 2024 01:34PM UTC
Files 841
Run time 24s
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

26 Jun 2024 12:06PM UTC coverage: 89.777% (-0.001%) from 89.778%
9680318090.1

push

github

web-flow
Simplify QuantumCircuit._from_circuit_data bit handling (#12661)

* Simplify QuantumCircuit._from_circuit_data bit handling

This commit simplifies the logic around bit handling in the
`QuantumCircuit._from_circuit_data()` constructor. Previously it was
calling `add_bits()` for each bit in the `CircuitData` object to update
the output circuit's accounting for each qubit. But this was needlessly
heavy as the `CircuitData` is already the source of truth for the bits
in a circuit and we just need to update the indices dictionary. The
`add_bits()` method attempts to add the bits to the `CircuitData` too
but this is wasted overhead because the `CircuitData` already has the
bits as that's where the came from. This changes the constructor to just
directly set the bit indices as needed and return the circuit.

* Use a dict comprehension instead of a for loop

63797 of 71062 relevant lines covered (89.78%)

307075.17 hits per line

Source Files on job 9680318090.1
  • Tree
  • List 841
  • Changed 36
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 9680318090
  • 4d3821b0 on github
  • Prev Job for on main (#9675550752.1)
  • Next Job for on main (#9680727079.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

© 2025 Coveralls, Inc