8000 Add C API function to add a delay by kt474 · Pull Request #14347 · Qiskit/qiskit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add C API function to add a delay #14347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 13, 2025
Merged

Add C API function to add a delay #14347

merged 9 commits into from
May 13, 2025

Conversation

kt474
Copy link
Member
@kt474 kt474 commented May 11, 2025

Summary

fixes #14237

Details and comments

@kt474 kt474 requested a review from a team as a code owner May 11, 2025 22:45
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@coveralls
Copy link
coveralls commented May 11, 2025

Pull Request Test Coverage Report for Build 14981318567

Details

  • 23 of 27 (85.19%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.001%) to 88.736%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/cext/src/circuit.rs 23 27 85.19%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 1 92.98%
crates/qasm2/src/parse.rs 6 97.61%
Totals Coverage Status
Change from base Build 14980695016: 0.001%
Covered Lines: 76094
Relevant Lines: 85753

💛 - Coveralls

Copy link
Contributor
@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this! I left some comments below, mainly about making unit an enum 🙂

let circuit = unsafe { mut_ptr_as_ref(circuit) };

let delay_unit_variant = match unit {
QkDelayUnit::S => DelayUnit::S,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We typically don't add the Qk prefix to the structs manually (see e.g. SparseTerm or OpCounts in the cext crate), and have cbindgen add this prefix. It would be more consistent to do the same here, but I'm not super set on this 🙂

kt474 and others added 4 commits May 12, 2025 11:51
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Copy link
Contributor
@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for the quick updates!

@Cryoris Cryoris added this pull request to the merge queue May 13, 2025
Merged via the queue into Qiskit:main with commit 23f3059 May 13, 2025
24 checks passed
@eliarbel eliarbel added this to the 2.1.0 milestone Jun 3, 2025
@eliarbel eliarbel added the Changelog: New Feature Include in the "Added" section of the changelog label Jun 3, 2025
rahaman-quantum pushed a commit to rahaman-quantum/qiskit that referenced this pull request Jun 20, 2025
* add delay c api function

* add test

* update test

* lint

* address comments

* Update crates/cext/src/circuit.rs

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

* Update crates/cext/src/circuit.rs

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

* add return doc

---------

Co-authored-by: Julien Gacon <gaconju@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add C API function to add a delay to a circuit
5 participants
0