Closed bmhowe23 closed 2 months ago
Specifically, For certain unrolled-loop test cases (like the one in the title), the compiler is injecting quantumrt__result_record_output calls even if if checks prevent measurements from occurring.
That tracks. QIR lowering assumed straight-line code.
@bmhowe23 Seems like you have already fixed this issue with PR. Is this issue safe to close now?
Yes, I agree that it seems to be fixed now. Closing now. Thanks!
Required prerequisites
Describe the bug
This issue was captured in #783, but #783 was closed because the local emulation was no longer failing. However, the underlying invalid QIR generation issue still exists.
Specifically, For certain unrolled-loop test cases (like the one in the title), the compiler is injecting
__quantum__rt__result_record_output
calls even ifif
checks prevent measurements from occurring.The compiler should not inject those calls for cases like this.
Steps to reproduce the bug
See this gist for the resulting QIR coming from the compiler at the time of this issue creation (freshly regenerated at the time of the creation of this new issue).
The QIR can also be generated like this in the dev image like this:
You can also run it on the provider hardware in order to see a test actually fail:
Expected behavior
When run on
H1-1E
, the unit test should pass.Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
No response