Skip to content

Demonstration notebook for RCS and XEB analysis#469

Merged
dstrain115 merged 24 commits intoquantumlib:mainfrom
shashwatk1998:rcs_v0
Apr 22, 2026
Merged

Demonstration notebook for RCS and XEB analysis#469
dstrain115 merged 24 commits intoquantumlib:mainfrom
shashwatk1998:rcs_v0

Conversation

@shashwatk1998
Copy link
Copy Markdown
Contributor

@shashwatk1998 shashwatk1998 commented Mar 30, 2026

This PR introduces a new Jupyter notebook that serves as an end-to-end tutorial for running a Random Circuit Sampling (RCS) experiment within the ReCirq framework. The notebook includes the complete workflow: setting up random quantum circuits, generating ideal and noisy simulation data, and calculating XEB fidelities. I am adding this to provide users with a clear, executable example that makes it easy to understand the RCS pipeline.

Shashwat Kumar and others added 14 commits February 27, 2026 22:58
This configures Gemini Code Assist to be a little bit less noisy and
verbose. Based on experiences with other repos, I find this makes Gemini
more useful.
And make it bit more apparent how is `RCSResults._fidelities_lin` set.

Fixes  mypy recirq/random_circuit_sampling | grep random_circuit
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Copy Markdown

@deltorobarba deltorobarba left a comment

Choose a reason for hiding this comment

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

Moved comments directly to code positions

Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
mhucka added 4 commits April 15, 2026 15:39
…#467)

Replaced the "TODO" docstring with a detailed description of the
parameters and return value for the _get_phases method, clarifying
its role in the CZLayerGate's decomposition.
This updates the workflow to the latest version used in our other
projects. It fixes a number of flaws, such as the use of a merge group
trigger (which causes errors when Scorecard is run on a branch).
Copy link
Copy Markdown
Contributor

@eliottrosenberg eliottrosenberg left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks, @shashwatk1998!

Copy link
Copy Markdown
Contributor

@eliottrosenberg eliottrosenberg left a comment

Choose a reason for hiding this comment

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

@dstrain115 @pavoljuhas would you mind taking a look? I am not an owner of this repo. Thanks!

@mhucka
Copy link
Copy Markdown
Collaborator

mhucka commented Apr 22, 2026

@shashwatk1998 Some requests:

  • Please provide a description for this PR. What does this PR do? What does it include? Why are you doing it? (Yes, the notebook contains a brief description of its purpose, but people and software tools looking at the git history will not necessarily look inside the files.)

  • Please use the GitHub interface for review comments to resolve those that have been done. This will make it easier for reviewers to understand what's happened so far and what's left (if anything).

image

@mhucka mhucka requested a review from dstrain115 April 22, 2026 04:54
@mhucka
Copy link
Copy Markdown
Collaborator

mhucka commented Apr 22, 2026

@shashwatk1998 Thank you for the PR description, marking the resolved comments as resolved, and for your work on this PR overall!

@mhucka mhucka added the area/xeb Concerns the cross-entropy benchmarks module label Apr 22, 2026
@shashwatk1998
Copy link
Copy Markdown
Contributor Author

@shashwatk1998 Thank you for the PR description, marking the resolved comments as resolved, and for your work on this PR overall!

Thank you so much for all your help with this PR!

Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb Outdated
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb
Comment thread recirq/random_circuit_sampling/rcs_experiment_demonstration.ipynb
@dstrain115 dstrain115 added this pull request to the merge queue Apr 22, 2026
Merged via the queue into quantumlib:main with commit cb3bcb7 Apr 22, 2026
11 checks passed
@shashwatk1998 shashwatk1998 deleted the rcs_v0 branch April 22, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/xeb Concerns the cross-entropy benchmarks module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants