Closed
Conversation
This commit adds type annotations to `random_objects.py`, along with its corresponding tests, enabling full type-checking with mypy while preserving existing functionality. The exclusion of `device_interface.py` is removed from `pyproject.toml` since this module was removed in TeamGraphix#261. `scipy-stubs` is added to `requirements-dev.txt` since `scipy` is used in `random_objects.py`. Revealed bad type annotation for `unitary_group.rvs`: scipy/scipy-stubs#987 **Related issue:** This PR continues the work started in TeamGraphix#302, TeamGraphix#308, TeamGraphix#312 and TeamGraphix#347. --------- Co-authored-by: matulni <m.uldemolins@gmail.com>
This commit adapts the existing method `graphix.opengraph.OpenGraph.isclose` to the new API introduced in TeamGraphix#358. Additionally, it introduces the new methods `graphix.opengraph.OpenGraph.is_equal_structurally` which compares the underlying structure of two open graphs, and `graphix.fundamentals.AbstractMeasurement.isclose` which defaults to `==` comparison.
This commit adapts the existing method `:func: OpenGraph.compose` to the new API introduced in TeamGraphix#358.
…TeamGraphix#362) This commit fixes domains in the transpiler so that every pattern transpiled from a circuit has a flow. Previously, some domains were incompatible with any flow, despite the patterns being deterministic, because some measurement angles were zero, causing the measurements to ignore certain signals. This commit also adds `optimization.remove_useless_domains` to remove the domains ignored by measurements with angle zero, to recover the same "optimized" patterns as before when needed. This commit also adds `rand_state_vector` to draw a random state vector.
ce98ff5 to
4b4c959
Compare
emlynsg
approved these changes
Dec 10, 2025
Owner
Author
|
I just pushed the commit 4b4c959 in TeamGraphix#379. |
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.
Before submitting, please check the following:
nox)ruffCONTRIBUTING.mdfor more detailsThen, please fill in below:
Context (if applicable):
Description of the change:
Related issue: