Skip to content
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

[POC] Testing qibolab 0.2 #809

Closed
wants to merge 38 commits into from
Closed

[POC] Testing qibolab 0.2 #809

wants to merge 38 commits into from

Conversation

stavros11
Copy link
Member

Updated the single shot classification routine to test with qibolab 0.2 (using qiboteam/qibolab#874).

I may try some other routines, but only few, as the pulse API for 0.2 is not finalized yet so it would be a waste of time to start updating routines now.

@stavros11 stavros11 added do not merge Soft warning to avoid merging a PR for reason provided in the PR qibolab release required PR requires qibolab feature not available in the current poetry.lock labels Apr 20, 2024
@stavros11 stavros11 mentioned this pull request Apr 20, 2024
5 tasks
waits,
[RX90_pulses2[qubit] for qubit in targets],
[qd_delays[q] for q in targets] + [ro_delays[q] for q in targets],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alecandido @hay-k this is how former start sweepers will look after replacing with delay duration. Also, see lines 66-78 above for the creation of the corresponding sequence, in this case for the T2 (Ramsey) experiment and

[qd_pulses[qubit] for qubit in targets] + [delays[qubit] for qubit in targets],

[delays[qubit] for qubit in targets],

for Rabi length and T1, which also involve time sweepers. In contrast to before, now it is clear that readout always plays after drive, as we are sweeping the delays in both channels. Let me know if you agree with this interface or have any other suggestions.

The challenge is how this is translated to each driver. In most cases, this is straightforward since Delay is mapped to a wait instruction and if we are sweeping real time the argument of wait will just be a variable that is swept in the instrument. I believe this is supported by most instruments and is already implemented for QM in qiboteam/qibolab#874 in a relatively clean way. However, for QM wait only accepts integers of clock cycles (4ns) that are >4, which is translated to multiples of 4ns > 16ns, therefore special handling (baking, padding with 0s?) is required to support other cases. This is true even when we are not sweeping, however sweepers make it slightly more complicated because a pulse or delay may be defined with a duration that satisfies the wait constraints but some values in the array we are sweeping over do not satisfy the constraints and therefore the special handling is required.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface seems perfect to me.

For the duration discretization, I see it as a separate problem. Either we implicitly support padding and baking in the driver, or just raise an error when it is not possible to realize.

Copy link
Member

@alecandido alecandido Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stavros11 maybe we should close this comment, and open an issue in Qibolab for 0.2 for the drivers. What do you think?

In particular, for QM there is already qiboteam/qibolab#935

@stavros11
Copy link
Member Author

@alecandido @hay-k I rebased this to latest qibocal main and updated some routines (resonator spectroscopy, Rabi, single shot classification and T1, T2 signal) for the new qibolab API, including the new channels, so that we can test and check how it looks from the user perspective. Here are some working examples with QM: qiboteam/qibolab#933 (comment)

@alecandido
Copy link
Member

Thanks @stavros11!

We don't need to have the full Qibocal working as soon as Qibolab 0.2 will be out, but being able to test a few common protocols (with different combination of features used) is definitely helpful.

@stavros11 stavros11 mentioned this pull request Oct 1, 2024
76 tasks
@stavros11
Copy link
Member Author

Closing in favor of #990.

@stavros11 stavros11 closed this Oct 1, 2024
@stavros11 stavros11 deleted the qibolab0.2 branch October 1, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Soft warning to avoid merging a PR for reason provided in the PR qibolab release required PR requires qibolab feature not available in the current poetry.lock
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants