-
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
🐛 Fix strip idle qubits #394
Conversation
…ne and does not exist in the other circuit
* Test qubit idle in both circuits * Test qubit idle in one circuit only * Test that qubits are not removed individually anymore
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #394 +/- ##
=======================================
- Coverage 96.5% 96.4% -0.2%
=======================================
Files 35 35
Lines 1761 1818 +57
Branches 219 224 +5
=======================================
+ Hits 1701 1754 +53
- Misses 60 64 +4
|
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.
Hey 👋
Many thanks for working on this! The current PR is already a great start. Thanks for the thorough tests as well as the detailed description of the changes! The two inline comments below just contain a couple of suggestions on how to further improve the overall contribution.
I also took the liberty of implementing a couple of changes myself, which I am going to push right after this review. I mostly refactored the logic of the idle qubit removal a little bit to need fewer levels of indentation. The major change is to how you implemented the functionality is that an idle qubit is now also removed if it is not contained in one of the output permutations, but contained yet identical to the initial layout in the other. I believe there is no need to enforce that the same removal condition holds in both circuits. That should give a little more flexibility.
I will also push a fix in the ZX Checker that was revealed by the idle qubit stripping changes. Turns out the permutation handling there wasn't ideal yet which led to an exception being thrown in the BV verification tests. Should be fixed now.
With these changes, the CI will hopefully be all green 🚀
…on that is not exposed Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
also adds `const` where appropriate to silence clang-tidy Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
previously, this would not work properly if the set of physical qubits in the permutation (the keys) would not be identical to the set of logical qubits (the keys). Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
…hing Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
…la and measured qubits
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.
Hi,
thanks for the structural improvements, LGTM 👍
And I implemented the remaining changes!
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.
This LGTM overall. Many thanks for the additional changes. I'll try to quickly resolve the remaining failing CI check tomorrow. It's just a coincidence that those profile files are identical when produced by the new Qiskit release. This might change in the future and might require a small workaround that adds an identifier in the files themselves.
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Description
This PR fixes the issue of incorrectly removing idle qubits that are not idle in both circuits.
The following changes have been made:
stripIdleQubits
has been created in QCEC. This method considers both circuits in conjunctionstripIdleQubits
method:initialLayout
of the larger circuitFixes #372
Checklist: