Rename pecos.guppy module to pecos.guppy_gen - #413
Draft
ciaranra wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the
pecos.guppymodule (QEC circuit generators that emit Guppy source:make_surface_code, color-code and transversal-gate generators,variant_scoped) topecos.guppy_gen.Motivation:
from pecos import guppyandfrom guppylang import guppycould silently shadow each other in a file using both, since PECOS programs commonly import theguppydecorator.pecos.Guppyprogram wrapper used bysim().Changes
git mv python/quantum-pecos/src/pecos/guppy->pecos/guppy_gen(history preserved)ruff.tomlper-file ignores, docs, and example notebookspecos/__init__.pyimport and__all__updatedNot touched: the SLR codegen target string
"guppy"(generate(prog, "guppy")),pecos.slr.ast.codegen.guppy,pecos._compilation.guppy, and thetests/guppy/directory name (its contents cover Guppy/HUGR compilation broadly, not just this module).A deprecated
pecos.guppyalias package keeps the old path working with aDeprecationWarning(mirroring thepecos.tools->pecos.analysisprecedent), since the old path shipped in the published 0.9.0.dev2 release. Submodule aliases are registered insys.modulessoimport pecos.guppy.surfaceand unpickling of objects serialized before the rename both resolve; a lazy__getattr__hook coverspecos.guppyattribute access. Regression tests cover all three paths and were mutation-tested against each guard.Testing
pytest tests/guppy tests/qec tests/pecos/test_selene_sim_parity.py: 1635 passed, 13 skipped (pre-existing optional-dependency skips), 1 xfailedjust lintover the full repository: cleanpecos.guppy_genimports and oldpecos.guppyis gone