remove Measurement.to_graph_ground and unused ground parameter - #433
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the “ground-symbol” graph representation for measurements and standardizes measurement graph conversion to always use the symbolic-boolean (symbolic phase) representation, to avoid confusion/conflicts with ground vertices.
Changes:
- Removed
Measurement.to_graph_groundand thegroundparameter path fromMeasurement.to_graph. - Deleted tests that specifically asserted the removed ground-mode measurement behavior.
- Added a changelog entry documenting the removal.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
pyzx/circuit/gates.py |
Deletes Measurement.to_graph_ground and makes Measurement.to_graph always emit the symbolic-boolean representation. |
tests/test_qasm.py |
Removes tests that depended on the now-removed ground-mode measurement behavior. |
CHANGELOG.md |
Notes the removal of Measurement.to_graph_ground in the Unreleased section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dlyongemallo
force-pushed
the
remove_to_graph_ground
branch
from
April 4, 2026 04:47
382f4ce to
4d03fb1
Compare
dlyongemallo
marked this pull request as ready for review
April 7, 2026 13:35
4 tasks
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.
Description
Remove the representation of measurement as a node with a ground symbol, as this causes confusion and conflicts with the representation of ground using symbolic boolean values.
This is a breaking change.
Related issue
Follow-up to #402 (comment).
Checklist
pyzx.extract.extract_circuit).