Skip to content

QIR Profiles Selection via Project Field or EntryPoint argument #2591

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 36 commits into from
Jul 22, 2025

Conversation

ScottCarda-MS
Copy link
Contributor

@ScottCarda-MS ScottCarda-MS commented Jul 14, 2025

This removes the workspace setting for the QIR profile and adds a setting for this for Q# project files instead, i.e. "targetProfile": "base". Single-file Q# files are supported by adding an argument to the @entrypoint attribute where a user will specify what profile the file is meant to compile with, i.e. @EntryPoint(Adaptive_RI), or uses Unrestricted as a default.

@ScottCarda-MS ScottCarda-MS marked this pull request as ready for review July 14, 2025 22:33
Copy link
Member

@minestarks minestarks left a comment

Choose a reason for hiding this comment

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

Looks great overall. The excessive isSingleFile plumbing is the only real issue I see which should just go away if you stick it inside the appropriate struct

@ScottCarda-MS ScottCarda-MS added this pull request to the merge queue Jul 22, 2025
Merged via the queue into main with commit 5207d89 Jul 22, 2025
18 checks passed
@ScottCarda-MS ScottCarda-MS deleted the sccarda/SingleFileProfiles branch July 22, 2025 19:02
github-merge-queue bot pushed a commit that referenced this pull request Jul 24, 2025
Adds the `#pragma qdk.qir.profile` pragma to our QASM compiler. This
pragma is used to specify the profile to compile the QASM file with,
i.e. `#pragma qdk.qir.profile Base` to have the file compile with the
`Base` profile. QASM files are always compiled with the profile
specified by their source with this pragma. If no pragma is provided,
the compilation will default to `Unrestricted`.

The PR is built on top of and relies on #2591
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants