-
Notifications
You must be signed in to change notification settings - Fork 251
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
base: main
Are you sure you want to change the base?
Conversation
…r-updates Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
…r-updates Signed-off-by: Anna Gringauze <agringauze@nvidia.com>
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") |
There was a problem hiding this comment.
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
)?
There was a problem hiding this 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: |
There was a problem hiding this comment.
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); | ||
} | ||
|
There was a problem hiding this comment.
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?
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:
Replace use of
requiredQubits
andrequiredResults
byrequired_num_qubits
andrequired_num_results
Update module flags
Replace use of
__quantum__qis__read_result__body
by__quantum__rt__read_result
(TODO) do not add "target datalayout" and "target triple" to the module (needs investigation)