Skip to content

Change LGST Circuit Storage with FPR (Color Boxplot Fix) #561

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

Merged
merged 3 commits into from
Apr 1, 2025

Conversation

coreyostrove
Copy link
Contributor

This changes the way the LGST circuits are stored when using FPR. Previously these were stripped from the plaquettes and any needed circuits were added back in in _additional_circuits. Now we just don't remove those for L=1 if we shouldn't. This addresses a bug reported by @pcwysoc that was present in the color box plots where the result of the old behavior was that these LGST circuits weren't rendered with the plaquettes as expected.

Change the way the LGST circuits are stored when using FPR. Previously these were stripped from the plaquettes and any needed circuits were added back in in _additional_circuits. Now  we just don't remove those for L=1 if we shouldn't. This addresses a bug that was present in the color box plots where the result of the old behavior was that these circuits weren't rendered with the plaquettes.
@coreyostrove coreyostrove self-assigned this Mar 26, 2025
@coreyostrove coreyostrove requested review from a team as code owners March 26, 2025 02:08
@coreyostrove coreyostrove requested a review from sserita March 26, 2025 02:08
@coreyostrove coreyostrove added this to the 0.9.14 milestone Mar 26, 2025
Copy link
Contributor

@sserita sserita left a comment

Choose a reason for hiding this comment

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

One point of discussion.

@@ -528,7 +527,7 @@ def add_to_plaquettes(pkey_dict, plaquette_dict, base_circuit, maxlen, germ, pow
if nest:
#keep track of running quantities used to build circuit structures
running_plaquette_keys = {} # base-circuit => (maxlength, germ) key for final plaquette dict
running_plaquettes = _collections.OrderedDict() # keep consistent ordering in produced circuit list.
running_plaquettes = dict() # keep consistent ordering in produced circuit list.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a general note that I've noticed several of these OrderedDict -> dict changes in recent PRs. It's not a problem, but just wanted to link it back to our discussion in #427 where we wanted to annotate dicts where order is explicitly important (e.g. where keys/values are iterated over with an expected order later).
I only bring this up here since "keeping consistent ordering" is part of the comment for this dict instantiation - is this one such place where order matters, and we should finalize our decision from #427?

@coreyostrove
Copy link
Contributor Author

coreyostrove commented Mar 31, 2025 via email

Corey Ostrove and others added 2 commits April 1, 2025 10:44
Add flags indicating the need for ordering information in a couple refactored formerly OrderedDicts.
@sserita sserita merged commit b4b3451 into develop Apr 1, 2025
4 checks passed
@sserita sserita deleted the bugfix-fpr-plaquettes branch April 1, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants