Skip to content

Add C API constructors for classical expressions - #16671

Closed
DennisWayo wants to merge 2 commits into
Qiskit:mainfrom
DennisWayo:add-capi-classical-expr-creation
Closed

Add C API constructors for classical expressions#16671
DennisWayo wants to merge 2 commits into
Qiskit:mainfrom
DennisWayo:add-capi-classical-expr-creation

Conversation

@DennisWayo

@DennisWayo DennisWayo commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #16667.

Summary

  • add public C API constructors for standalone classical-expression variables, stretches, values, and expression nodes
  • add ownership/free functions for created QkVar, QkStretch, QkValue, and QkExprNode objects
  • register the new exports in the C API ABI slot table and vtable
  • add C tests that build expression trees with the new public API and inspect the resulting metadata

This ports the useful API shape from the older WIP #16180 onto current main, while leaving big-integer value construction for follow-up after #16666 lands.

Verification

  • cargo check -p qiskit-cext
  • make ctest
  • cargo run --quiet -p qiskit-bindgen-cli -- check-abi capi_slots.txt
  • cargo check -p qiskit-cext-vtable --features addr
  • cargo fmt --check --package qiskit-cext --package qiskit-cext-vtable
  • git diff --check

@DennisWayo
DennisWayo requested a review from a team as a code owner July 28, 2026 00:42
@DennisWayo
DennisWayo requested a review from raynelfss July 28, 2026 00:42
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Jul 28, 2026
@qiskit-bot

Copy link
Copy Markdown
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

@jakelishman

Copy link
Copy Markdown
Member

I believe this, and the 4 others opened concurrently, to be an entirely LLM-generated PR with little human oversight, which is against the contribution guide. Given past experience, it is unlikely to be worth maintainer time to review.

If you wish to meaningfully contribute, slow down, keep one or two PRs open max, and engage as a human, even if you use LLM assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Extend the C API to support creation of classical expressions

3 participants