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

Qiskit / qiskit / 14618237876
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: substitute_pi4_rotations
DEFAULT BRANCH: main
Ran 23 Apr 2025 12:57PM UTC
Jobs 1
Files 802
Run time 2min
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 Apr 2025 12:33PM UTC coverage: 87.925% (-0.3%) from 88.192%
14618237876

push

github

web-flow
Add initial C API for circuit construction (#14006)

* Add initial C API for circuit construction

Building off the infrastructure for the sparse observable added in
PR #13445 this commit adds a C FFI for building Quantum Circuits. Right
now there is a function to create an empty circuit with n qubits and m
clbits and then a function to add standard gates to a circuit and then
also get the op counts out of a circuit. This is a start of the
functionality for a C API around interacting with circuits, later PRs
will expand this so we can have a more fully featured C API in the
future.

Part of #13276

* Add functions for standard instructions (except delay)

* Apply suggestions from code review

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

* Rename qk_circuit_free_count_ops() to qk_opcounts_free()

This also updates the test logic to make sure we always free even in
case of a failure.

* Add release note

* Add function to get instruction details

* Rename QkStandardGate -> QkGate

* Apply suggestions from code review

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

* Add safety comments

* Add methods to lookup num qubits and num params for gates

* Update docs around null pointers for qubits and params on gate append function

* Fix clang-format-14 error

Locally I was using clang-format-19 while in CI we run with
clang-format-14. Version 14 was flagging this difference while version
19 was happy. This commit makes the change to make version 14 happy in
CI.

* Add missing if to docstrings

* Fix merge

* Fix macOS tests

* Fix cformat

* Update test/c/CMakeLists.txt

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

* Try static lib for common

* Fix windows build warnings

* Try adding the parent path to the path on windows

* Use const pointers for strings in structs

* Improve docstrings for C API

* Improve equality check failures in sanity check tests

* Fix rustfmt

* Simplify cmake config for tests

* Apply naming suggestions

---------

... (continued)

14 of 267 new or added lines in 5 files covered. (5.24%)

28 existing lines in 2 files now uncovered.

74222 of 84415 relevant lines covered (87.93%)

435922.88 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
19
0.0
crates/cext/src/pointers.rs
234
0.0
crates/cext/src/circuit.rs

Uncovered Existing Lines

Lines Coverage ∆ File
4
92.23
-0.25% crates/qasm2/src/lex.rs
24
96.22
-1.39% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 14618237876.1 23 Apr 2025 12:57PM UTC 802
87.93
GitHub Action Run
Source Files on build 14618237876
  • Tree
  • List 802
  • Changed 6
  • Source Changed 4
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14618237876
  • d2db2784 on github
  • Prev Build on gh-readonly-queue/main/pr-14068-20a02659b5825aded47b00cf64339efb4e67d6a9 (#14602663696)
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