Skip to content
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

Make QCOR QIR Compatible with QIR Alliance QAT Tool #246

Open
amccaskey opened this issue Dec 6, 2021 · 2 comments
Open

Make QCOR QIR Compatible with QIR Alliance QAT Tool #246

amccaskey opened this issue Dec 6, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@amccaskey
Copy link
Collaborator

I just tried to take a QIR file output from qcor and translate to the base profile with the QAT tool from the QIR Alliance. It did not work out of the box. Turns out, QAT will look for a function attribute and perform the transformation from there.

From Stefan

QAT looks for a specific LLVM attribute to know which function to start it’s processing from. 
This can be either “InteropFriendly” (the default) or “EntryPoint” (selectable with “—entry-point-attr EntryPoint”). 
Then the IR needs to be updated to have that attribute on exactly one function.
In this case, if I update main to include that attribute, the transformation succeeds.

Also there is a discrepancy with our measurement call

One other thing to note: transformation of measurement into the form described in the base profile, 
which uses static result identifiers, is dependent on seeing the intrinsic “__quantum__qis__m__body” 
as the measurement function. That’s why the “__quantum__qis__mz” in the above did not get transformed.
@amccaskey amccaskey added the bug Something isn't working label Dec 6, 2021
@amccaskey
Copy link
Collaborator Author

QSharp outputs QIR with measure instructions __quantum__qis__m__body. Suggest we do the same since this is what QAT apply base profile looks for.

@stevescia
Copy link

I'd like to investigate this bug; can you assign to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants