Skip to content

Conversation

mtreinish
Copy link
Member

@mtreinish mtreinish commented Aug 6, 2025

Summary

This commit expands the QkTarget API to support taking parameterized
gates that accept any angle value. Previously, this was not possible
because representing these gates internally in the target depended on
Python. That restriction has been removed with #14799 and we can now
expose this functionality to C. This is a necessary component for being
able to build targets for current devices since they all typically
expose at least one gate that takes an arbitrary angle.

Details and comments

Fixes #14704

This commit is based on #14799 and will need to be rebased when that merges. In the meantime you can look at the HEAD commit on the PR branch to see the contents of just this PR: 00d71df #14799 has merged and this has been rebased now.

@mtreinish mtreinish added this to the 2.2.0 milestone Aug 6, 2025
@mtreinish mtreinish requested a review from a team as a code owner August 6, 2025 15:29
@mtreinish mtreinish added priority: high Changelog: New Feature Include in the "Added" section of the changelog C API Related to the C API labels Aug 6, 2025
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core
  • @levbishop
  • @mtreinish
  • @nkanazawa1989

@mtreinish mtreinish added the on hold Can not fix yet label Aug 6, 2025
@coveralls
Copy link

coveralls commented Aug 6, 2025

Pull Request Test Coverage Report for Build 16809769056

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 1 file are covered.
  • 24 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.01%) to 87.654%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 3 92.78%
crates/circuit/src/parameter/symbol_expr.rs 9 74.42%
crates/qasm2/src/parse.rs 12 96.62%
Totals Coverage Status
Change from base Build 16809071341: -0.01%
Covered Lines: 82202
Relevant Lines: 93780

💛 - Coveralls

Copy link
Contributor

@raynelfss raynelfss left a comment

Choose a reason for hiding this comment

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

This looks like a straightforward addition, I just have one minor comment.

@mtreinish mtreinish force-pushed the target-parameterized-c branch from 00d71df to 68480dc Compare August 6, 2025 21:36
@mtreinish mtreinish removed the on hold Can not fix yet label Aug 6, 2025
This commit expands the QkTarget API to support taking parameterized
gates that accept any angle value. Previously, this was not possible
because representing these gates internally in the target depended on
Python. That restriction has been removed with Qiskit#14799 and we can now
expose this functionality to C. This is a necessary component for being
able to build targets for current devices since they all typically
expose at least one gate that takes an arbitrary angle.

Fixes Qiskit#14704
Copy link
Contributor

@raynelfss raynelfss left a comment

Choose a reason for hiding this comment

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

Some more docs comments and we're good to go.

mtreinish and others added 2 commits August 7, 2025 12:07
Co-authored-by: Raynel Sanchez <87539502+raynelfss@users.noreply.github.com>
@mtreinish mtreinish requested a review from raynelfss August 7, 2025 16:08
@raynelfss raynelfss added this pull request to the merge queue Aug 7, 2025
Merged via the queue into Qiskit:main with commit 44ad19f Aug 7, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C API Related to the C API Changelog: New Feature Include in the "Added" section of the changelog priority: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for parameterized gates to Target C API
4 participants