-
Notifications
You must be signed in to change notification settings - Fork 21
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
🚸 Ancillary and garbage handling #167
Conversation
Signed-off-by: burgholzer <burgholzer@me.com>
…ting checker Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
Codecov Report
@@ Coverage Diff @@
## main #167 +/- ##
=======================================
- Coverage 98.0% 98.0% -0.1%
=======================================
Files 35 35
Lines 1716 1736 +20
Branches 205 204 -1
=======================================
+ Hits 1683 1702 +19
- Misses 33 34 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Lukas Burgholzer <lukas.burgholzer@jku.at>
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 that this PR finally handles the long-standing question of ancillaries.
I didn't find anything major, just a discussion and a minor remark. Other than that, LGTM.
Description
This PR ensures that the way ancillary and garbage qubits are treated in QCEC is theoretically sound and removes several corresponding "TODOs" in the code.
In particular, the alternating DD checker cannot be used whenever both circuits contain ancillary qubits that are acted upon.
Up until now, this did not cause any issues since, for the predominant use case of verifying compilation results, only one of the circuits typically uses ancillary qubits.
As a solution, the default verification scheme switches to the construction checker whenever it detects that the alternating checker is not capable of handling the circuits in question.
Furthermore, the alternating checker emits an exception should it ever be configured to still run on instances it can't handle.
Last, but not least, the matrix equivalence check is slightly improved so that it does not incur an inversion and a multiplication when ancillaries are used.
Checklist: