-
Notifications
You must be signed in to change notification settings - Fork 34
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
Implementation of post-selection for mid-circuit measurements #491
Conversation
ca19450
to
a15e879
Compare
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.
Nice work @rauletorresc! 🎸
a15e879
to
3e3cf85
Compare
3e3cf85
to
fd7543f
Compare
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.
Nice job! Some suggestions and could you add a end to end integration test?
4de4388
to
f9d6292
Compare
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.
Nice job, some comments left. I think there are still some issues in the runtime to be solved, let me know if you need some help
runtime/lib/backend/lightning/lightning_dynamic/LightningSimulator.cpp
Outdated
Show resolved
Hide resolved
Still pending: Implement the post-selection logic at the runtime side. |
b1f66e3
to
54d6d1b
Compare
My only concern here is: all the shots are set up at the postselect value, e,g.: applying a Hadamard and having |
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.
Great work! 💯
runtime/lib/backend/lightning/lightning_dynamic/LightningSimulator.cpp
Outdated
Show resolved
Hide resolved
runtime/lib/backend/lightning/lightning_dynamic/LightningSimulator.cpp
Outdated
Show resolved
Hide resolved
runtime/lib/backend/lightning/lightning_dynamic/LightningSimulator.cpp
Outdated
Show resolved
Hide resolved
54d6d1b
to
d3519f8
Compare
d3519f8
to
466489e
Compare
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.
Looks great 💯
e87962c
to
648f03e
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #491 +/- ##
==========================================
- Coverage 99.57% 99.54% -0.03%
==========================================
Files 43 43
Lines 7740 7775 +35
Branches 533 536 +3
==========================================
+ Hits 7707 7740 +33
- Misses 17 18 +1
- Partials 16 17 +1 ☔ View full report in Codecov by Sentry. |
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.
🚀
runtime/lib/backend/lightning/lightning_dynamic/LightningSimulator.hpp
Outdated
Show resolved
Hide resolved
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.
Thanks for the PR it looks great!
a05fad7
to
c51cef7
Compare
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.
Thanks @rauletorresc! 💯
Context: At the python level the postselect argument is optional and defaults to
None
. When given, it can only be1
or0
. At the Quantum dialect level postselect is also optional, but when lowered to the LLVM dialect, the call to the measure function expect a mandatory postselect argument that can contain one of the following values:postselect = 0
postselect = 1
Related GitHub Issues: #448
TODO:
ConversionTests.mlir
[sc-46409]