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

Qiskit / qiskit / 15415328831
88%

Build:
DEFAULT BRANCH: main
Ran 03 Jun 2025 11:15AM UTC
Jobs 1
Files 820
Run time 201min
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

03 Jun 2025 10:21AM UTC coverage: 87.862% (-0.001%) from 87.863%
15415328831

push

github

web-flow
Improve efficiency of QkCircuitInstruction in C API (#14404)

* Improve efficiency of QkCircuitInstruction in C API

This commit adjusts the decleration and usage of the
QkCircuitInstruction struct in the circuits C API. The larger change is
around the interface for the `qk_circuit_get_instruction` function which
has changed from returning a struct by value to writing it to a
user provided pointer. From a strictly ergonomics PoV the normal use
case of `qk_circuit_get_instruction()` function will typically be used
while iterating over the circuit or getting the details of multiple
instructions, so being able to reuse a single allocation is quite
useful.

Fixes #14390

* Update crates/cext/src/circuit.rs

* Apply suggestions from code review

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update crates/cext/src/circuit.rs

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Use std::ptr::write instead of *ptr =

* Update unitary gate tests to use new get_instruction syntax

* Rename qk_circuit_instruction_free to qk_circuit_instruction_clear

This commit renames the qk_circuit_instruction_free() function to
qk_circuit_instruction_clear(). The function isn't freeing the
allocation for the QkCircuitInstruction object but instead is clearing
out internal allocations. This rename makes it clear that the behavior
here is eparate from the convention on what we're using for qk_*_free()
functions.

* Apply suggestions from code review

Co-authored-by: Julien Gacon <gaconju@gmail.com>

---------

Co-authored-by: Julien Gacon <gaconju@gmail.com>

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

12 existing lines in 3 files now uncovered.

80813 of 91977 relevant lines covered (87.86%)

359097.21 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
75.35
0.0% crates/circuit/src/symbol_expr.rs
4
91.48
-0.5% crates/qasm2/src/lex.rs
6
97.61
0.0% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 15415328831.1 03 Jun 2025 11:15AM UTC 820
87.86
GitHub Action Run
Source Files on build 15415328831
  • Tree
  • List 820
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15415328831
  • 681a69e0 on github
  • Prev Build on gh-readonly-queue/main/pr-12825-6455e8bdf8da8e84a342819630a87fe0900ee885 (#15411538166)
  • Next Build on main (#15415448813)
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