Closed Morcu closed 8 months ago
Hey @Morcu, thanks very much for starting this contribution! Random circuit functionality will be a great addition to this library.
According to the contribution guidelines for this repo, the algorithm code should contain:
run_<name_of_algo>()
functionget_<name_of_algo>_results()
functionFor example, see the implementation of the Bernstein-Vazirani algorithm here. (Please read the rest of the contribution guidelines as well to get an idea for what is expected.)
In order to do this, I would suggest we structure this implementation around a particular algorithm which uses random circuits. Open to your ideas here, but I think the simplest example would be single-qubit Clifford randomized benchmarking (RB) - a good explanation of this is available here. Then the algorithm code can be focused on defining the RB circuit ensembles, running them, and collecting the results. (The random_circuit
function you have written would be part of this, of course! It will probably need a way to specify a limited gate set, rather than always using all available Braket gates.) The example notebook could demonstrate constructing several single-qubit RB circuits of varying length, running them on a simulator with noise (and/or on hardware), and analyzing the results.
I know that's a bit beyond the scope of what you've done in this first iteration, but please let us know if you're interested in taking this on, and/or if you have any questions after you've thought about it a bit!
Hi @Morcu, thanks for the contribution! Adding to the previous comment, besides adhering to the guideline about the code location and the function name, we suggest you to choose one of the two categories for your contribution:
notebooks/auxiliary_functions
. Since you would be the first one to contribute into this category, you would need to create this folder under notebooks
. Thanks again for the contribution!
Hi @rmshaffer and @yitchen-tim,
Thanks for your feedback! I'm on board with implementing it as suggested. I'll align my work with the contribution guidelines, focusing on the necessary functions and structure. Excited to contribute and will keep you updated on my progress. 😄
Thank you @Morcu for the start on this contribution! @ykharkov picked up part of this in #139, and we have merged that into the repo now under a new auxiliary_functions
folder. Closing this PR since it is stale and has some overlap with #139.
If you'd like to continue your contributions on top of this, along the lines of what is discussed in the comments here (for example - adding a Randomized Benchmarking algorithm which uses this random circuit generator), please feel free to open a new PR to this repo!
Issue #, if available: Add random_circuit function for testing #495
Description of changes:
Added random_circuit function to create random circuits.
Testing done:
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.