-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fast single-qubit RB for QM #959
base: main
Are you sure you want to change the base?
Conversation
with for_( | ||
depth, 1, depth <= max_circuit_depth, depth + 1 | ||
): # Loop over the depths |
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.
@stavros11 @ingoroth in particular I mean here we could iterate with a for_each_
over a list, provided by the user as an input, in place of the max_circuit_depth
parameter.
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.
I think this loop needs to have step 1 in every cases, because a few lines below we are saving sequence_list[depth]
to the stream that is then used to return the sequence indices to the user if save_sequences=True
. And we need to save the indices at all depths, even when we are not running on every depth (regardless of logarithmic or no). Therefore, for_each_
wouldn't be useful here.
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.
Couldn't you use another variable to index it?
The equivalent of for i, depth in enumerate(depths)
and then save in sequence_list[i]
.
(of course QUA doesn't have enumerate()
on hardware, but you could realize just by initializing a counter to 0 outside, and increment it by 1 at every loop)
@ingoroth in a74c0ee I added the possibility to increase depths logarithmically. It can be enabled using - id: RB QUA
operation: rb_ondevice
parameters:
num_of_sequences: 10000 # Number of random sequences.
max_circuit_depth: 1024 # Maximum circuit depth.
delta_clifford: 1
logarithmic: True
n_avg: 1 # Number of repetitions of the same circuit (for averaging).
save_sequences: True # Download the Clifford gate indices used from the device.
apply_inverse: True # Apply inverse gate at the end of every circuit. If `False` it will apply "filtered" post-processing. I did a quick test and it seems to work (and is quite faster) up to depth 1024, but failed for 2048. If that is not sufficient for you application we could try to push it. |
7d22c7b
to
7bf47ae
Compare
This was not compatible with the OPX1000 due to some bugs related to the latest qm-qua prerelease or its firmware, in particular:
The workarounds for these were done in 7d22c7b and now this should work also for the OPX1000, see for example a report with the qw5q_platinum: http://login.qrccluster.com:9000/KjIpqUWCQw6-ehT9HlgvTw== @biankawolo @igres26 you may be interested in this. If you attempt to pull, please use |
Following the discussion in #951 (comment), I am opening a draft PR for this as others may be interested.
As described in that comment, it provides a faster (close to ideal time) implementation of single qubit RB for QM, following the example from https://github.com/qua-platform/qua-libs/blob/main/Quantum-Control-Applications/Superconducting/Single-Fixed-Transmon/16a_randomized_benchmarking.py with the sampling of random sequences happenning on the device. It also provides the possibility to disable the last inverse gate and apply filtered post-processing, or reduce the relaxation time to execute restless.
Example runcard:
Example report: http://login.qrccluster.com:9000/jKoOT3NjREyjnnb1m-R_0A==/. More examples here: qiboteam/qibolab_platforms_qrc#154 (comment).
The are no plans to merge this soon as the code quality is not very good, so I would not spend time on reviews at this stage. Any suggestions for improvements are welcome though, for example for the data saving that is a bit messy.