-
Notifications
You must be signed in to change notification settings - Fork 17
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
Two qubit alignment #992
Two qubit alignment #992
Conversation
The sequence is trimmed of delays at the end of the compilation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 0.2 #992 +/- ##
==========================================
+ Coverage 42.67% 42.83% +0.15%
==========================================
Files 80 80
Lines 5537 5552 +15
==========================================
+ Hits 2363 2378 +15
Misses 3174 3174
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Thanks @alecandido for looking into this. I tried the usual example and I still get a failure, which you can easily reproduce this by changing
qibolab/tests/test_compilers_default.py
Line 201 in 53c5296
circuit.add(gates.M(main, coupled)) |
to
circuit.add(gates.M(main))
circuit.add(gates.M(coupled))
The original test is fine, after the change the delay on qubit 0 is 40ns instead of 70ns. I have not investigated why.
Ok, the compiler is always a mess, every time I touch it. I'm not fully happy even with the current one, but it is much better than before (at least is readable, and it should be a bit simpler to understand what's going on). I'm keeping the PR draft because I want a test to make sure the split measurement is actually working well. However, notice that a split measurement won't be the same as a single one, because as a single gate it will always make sure that all the pulses are starting at the same time, while as individual separate measurements they will all start as soon as possible, independently of each other. In particular, the current test is adding a |
Thanks for this effort and the comments. It certainly seems much more readable to me.
You could even use the same test with a parametrized switch for one or two measurements. It won’t cover all the cases but could be a start.
That should be fine, as long as the final sequence does not have overlapping gates. In the example I quoted above, the issue was that one of the measurements was playing at the same time with the CZ gate and this would lead to wrong results in practice. I have not retested after the last commit, so it may not be the case anymore. |
Ok, this should be enough to be confident is doing the correct thing. The compiler is doing something non-trivial, and I didn't manage to simplify any further for the time being. We should test in more details (more atomically) and on a greater variety of scenarios (in which we can easily compute the expected result). However, for the time being it should be enough. |
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 @alecandido, looks good to me know. I guess we can merge this, #994 and #998.
Perfect, I'll do it |
Closes #976
I implemented the automated padding on the drive channel. Currently, it's undocumented.
However, we should maybe dedicate some more efforts to the compiler, and my proposal is (for the time being) to not even make it part of the public API (cf. #790).
So, this should correspond to the expected behavior, and the former one was classifiable as a bug. Thus, we could say the compiler knows what to do, but (for the time being) how it is doing that is an internal detail.
As soon as we'll take the time to review it (with no rush), we could decide to publicly expose, and properly document what is doing.