Skip to content

Add cz instruction#11

Closed
thierry-martinez wants to merge 18 commits intomasterfrom
add_cz_instruction
Closed

Add cz instruction#11
thierry-martinez wants to merge 18 commits intomasterfrom
add_cz_instruction

Conversation

@thierry-martinez
Copy link
Owner

Before submitting, please check the following:

  • Make sure you have tests for the new code and that test passes (run nox)
  • If applicable, add a line to the [unreleased] part of CHANGELOG.md, following keep-a-changelog.
  • Format added code by ruff
    • See CONTRIBUTING.md for more details
  • Make sure the checks (github actions) pass.

Then, please fill in below:

Context (if applicable):

Description of the change:

Related issue:

Emlyn Graham and others added 18 commits November 28, 2025 15:37
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.
@thierry-martinez
Copy link
Owner Author

I just pushed the commit 4b4c959 in TeamGraphix#379.

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.

3 participants