Coupler Ramsey - #1510
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1510 +/- ##
==========================================
- Coverage 91.84% 91.39% -0.46%
==========================================
Files 147 148 +1
Lines 11635 11735 +100
==========================================
+ Hits 10686 10725 +39
- Misses 949 1010 +61
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Thanks @sorewachigauyo for the clean PR and explanation On the one side it is great to have this contribution, as we are also moving in the same direction. The unfortunate part is that also @lballerio was working on something similar, and he implemented essentially the same protocol in April, taking it from https://arxiv.org/abs/2005.08863 You could not know it, nor make any use of it, since it was never published (yet). In a sense, it is still good that you worked on it, since one of the main blocking issues on our side was the lack of a testing platform (which we'll soon be solved, hopefully - but we're still waiting for it). You may have saved the implementation, but it is just an iteration of the Ramsey ZZ experiment. So, fine as it is. In this sense, @lballerio is accumulating some experience in optimizing these protocols. Both in terms of code reuse and fitting. Instead, fitting is always the complex part. Your approach is not terrible, since it is already locating the area of interest. But, at first sight, it does not seem necessarily the most accurate (since sometimes is locating the position on a side of the band), and possibly is not consuming the physics insight associated to the Ramsey experiment. Data queryDo you have any understanding regarding why, in some cases, the images seem to be "broken"? Since they "resume" after a certain duration (which would make no sense for a single experiment - i.e. a unique evolution), it seems like something is happening to your qubits while performing that portion of the sweep. But it looks like a coherent effect (e.g. as if it shifted in frequency for some time, before getting back to the original state) |
| for amp in amplitudes: | ||
| mask = pair_data["amplitude"] == amp | ||
| probs = pair_data["prob"][mask] | ||
| variances.append(float(np.var(probs))) | ||
|
|
||
| best_idx = int(np.argmin(variances)) | ||
| best_amp = float(amplitudes[best_idx]) |
There was a problem hiding this comment.
I would say that there is no need to go through each line separately, masking the 2D array in this way.
Instead, you could just use the axis= argument of np.var(), to compute the variance along the relevant axis.
In principle, this vectorization could be applied also to the pairs loop, since your array is regular over all the dimensions (pair, amplitude, duration). And you could just apply the np.var() along the last axis, to obtain a 2D array of variances, with shape (pairs, amplitude). To which applying the np.argmin() along the amplitude axis, and then access the values on the amplitudes array.
But it would require stacking the pairs arrays (which right now are shipped separately).
In any case, you could try yourself, or I will make a code proposal testing on the data you uploaded.
In general, we have plans to incrementally improve the data handling as regular arrays soon, gradually reviewing al protocols.
My guess would be some uncorrelated hysteresis in the flux lines. For the current keysight driver, the offset is not exactly a true offset but only held on during the pulse sequence. Its kept high during the hardware sweepers, but between software sweepers it goes off and back on. Here, the coupler amplitude sweep (x-axis) is hardware swept but the duration (y-axis) is software swept, so the discontinuity mainly between software sweeps supports that. This will be fixed with qiboteam/qibolab#1462. By uncorrelated I mean that we did all 30 couplers with next-next nearest neighbouring pairs in 8-ish batches and we didn't observe correlation in the flux jumps between pairs. We'll repeat it when the offset gets patched and see if it reappears. |
|
Thanks for the explanation @sorewachigauyo. However, I'm not fully convinced: if it is software swept, this is potentially happening for each line. So, this is explaining why the patches are horizontal, and not vertical. But not entirely why there are patches. I'm not saying that it is fully unrelated, and it may actually disappear with the fix you mention. In any case, I'm just curious, and speculating about the system. It is perfectly fine not to have a full explanation. But it is an interesting phenomenon, so it just triggered my interest :) |
lballerio
left a comment
There was a problem hiding this comment.
for me is quite good, my plans are to test it on our qpus, I'll keep you updated on that
9640105 to
69b5b74
Compare
|
Hi @sorewachigauyo! We are now closer and closer to be able to properly test this one. Then, we decided that this is more fundamental than the protocols in #1160, and we'd like to merge it first. Thus, I rebased on Thank you again for the contribution :) |



For a generic two qubit coupled system, under the JC model, there should also be a cross-Kerr shift$\chi \propto \frac{g_\text{eff}^2}{\Delta}$ , where the effective coupling is dependent on both the static and coupler-mediated coupling. This shift affects the simultaneous use of both qubits due to the frequency shift incurred when conducting parallel single qubit pulses.
After tuning the coupler to the sweetspot, there may be later drifts of the coupler bias resulting in$\chi$ becoming more prominent in simultaneous qubit usage. Hence, we want a quick routine to move the coupler back to the idling spot.
The goal of this experiment is to simply tune the coupler around its current offset to minimize such effects. By performing a ZZ Ramsey experiment, we are able to measure$\chi$ . Here, we modify the ZZ Ramsey experiment by inserting a coupler pulse to temporarily adjust $\chi$ during the free evolution time. The amplitude of the coupler pulse and duration of both the coupler pulse and free evolution time are swept to find the point at which $\chi \approx 0$
We initially tried to adjust the offset of the channel itself in our coupler tuning. However, this also affected the dressed frequency of the qubits and led to inaccurate idling positions, which then required single qubit calibration for each offset. Hopefully, this procedure removes the need for that.
Results
and corresponding Ramsey-ZZ
Though, if the qubit frequency is not properly calibrated prior to this experiment,$\chi$ will just compensate for the detuning of the $\pi/2$ pulse and lead to an incorrect result.
Design
We came up with this protocol earlier after the aforementioned problems of calibrating the single qubit parameters for each coupler offset, but were not sure of how to structure the fitting/plotting for Qibocal, so we took it from PR #1504, which operates on the same principle essentially.
We tried to use the mean instead of the variance, but both led to similar results generally

QPU Data
coupler_ramsey.tar.gz
TODO: