Skip to content

Update generated QIR to match the QIR adaptive spec #2990

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

annagrin
Copy link
Collaborator

@annagrin annagrin commented Jun 3, 2025

Description

Update generated QIR to match the QIR adaptive spec

Spec: https://github.com/qir-alliance/qir-spec/blob/main/specification/under_development/profiles/Adaptive_Profile.md

Updates included:

annagrin added 8 commits May 28, 2025 16:11
Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
…r-updates

Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
…r-updates

Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
github-actions bot pushed a commit that referenced this pull request Jun 4, 2025
Copy link

github-actions bot commented Jun 4, 2025

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

if (auto *call = dyn_cast<llvm::CallBase>(&I)) {
auto name = call->getCalledFunction()->getName().str();
if (name == "__quantum__rt__int_record_output" ||
name == "__quantum__float__int_record_output")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it a typo (__quantum__float__int_record_output)?

Copy link
Collaborator

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

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

We can't just get rid of necessary information like the target triple on our end.

switch (op) {
case llvm::Instruction::Select:
case llvm::Instruction::PHI:
case llvm::Instruction::Switch:
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about Br and CondBr?

cudaq::opt::QIRMultipleReturnPointsFlagName,
trueValue);
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does any of this duplicate the functionality in the QIR verifier?

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.

3 participants