Skip to content

Conversation

@khalatepradnya
Copy link
Collaborator

@khalatepradnya khalatepradnya commented Oct 28, 2025

This PR introduces a new module pass, QirInsertArrayRecord, that analyzes instruction patterns and inserts array recording instruction required for proper measurement result handling in QIR pipelines. The pass identifies measurement storage patterns and ensures the QIR output declares the correct array size and type label for measurement results.

This PR also enables the pass in compilation workflow.

inset an array recording output call pripr to any record result calls.
This pass should be used in `sample` workflow.

Signed-off-by: Pradnya Khalate <[email protected]>
@khalatepradnya khalatepradnya self-assigned this Oct 28, 2025
github-actions bot pushed a commit that referenced this pull request Oct 29, 2025
@github-actions
Copy link

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

github-actions bot pushed a commit that referenced this pull request Nov 13, 2025
@github-actions
Copy link

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


LLVM_DEBUG(llvm::dbgs() << "Before adding array recording call:\n"
<< *funcOp);
if (failed(insertArrayRecordingCalls(funcOp, analysis.arraySize,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should use the intrinsic loading instead of rolling your own. Aren't these already loaded by the QIR API Prep pass, though?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wanted to make this pass self-contained, since we cannot guarantee that the prep pass has run before this one.
Should I move the loadIntrinsic call from line#176 here?

github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
@github-actions
Copy link

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

* Update label to be of type `i1` instead of `i8` since we interpret the
  results as Booleans.
* Test for parser.

Signed-off-by: Pradnya Khalate <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
@github-actions
Copy link

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

github-actions bot pushed a commit that referenced this pull request Nov 19, 2025
@github-actions
Copy link

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

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.

2 participants