From 68dab1657ed3d358c12874f3c663db880f86acba Mon Sep 17 00:00:00 2001 From: Thierry Martinez Date: Mon, 3 Aug 2026 18:20:07 +0200 Subject: [PATCH 1/6] Prepare release 0.4 --- CHANGELOG.md | 2 +- COMPATIBILITY.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e70e46ad9..07df59652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## [0.4] - 2026-08-03 ### Added diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 899a7eb3b..3b3be27f2 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -2,7 +2,7 @@ Graphix does not guarantee backwards compatibility between 0.x version releases. Here we list API changes which may break existing code using Graphix. -## Unreleased +## [0.4] - 2026-08-03 - #571: Method `Pattern.graph` (formely `Pattern.extract_graph`) is removed. Use instead `Pattern.to_opengraph().graph` which standardizes the pattern and fails gracefully if there are non-commutative Cliffords. From db4c7b0216f7c3cb07436beaff9364ff654ac582 Mon Sep 17 00:00:00 2001 From: Thierry Martinez Date: Wed, 12 Aug 2026 12:35:37 +0200 Subject: [PATCH 2/6] Update CHANGELOG and COMPATIBILITY --- CHANGELOG.md | 4 +--- COMPATIBILITY.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07df59652..640ae1314 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #526: Added new method `XZCorrections.to_pauli_flow`, which reconstructs a Pauli flow directly from XZ-corrections by solving the per-node correction sets over GF(2). Added `FlowGenericErrorReason.NoPauliFlow`, raised when the XZ-corrections admit no compatible Pauli flow. -- #545: Added an amplitude damping noise model. Introduces `amplitude_damping_channel` / `two_qubit_amplitude_damping_channel`, the `AmplitudeDampingNoise` / `TwoQubitAmplitudeDampingNoise` noise elements, and `AmplitudeDampingNoiseModel`. +- #497, #540: Added an amplitude damping noise model. Introduces `amplitude_damping_channel` / `two_qubit_amplitude_damping_channel`, the `AmplitudeDampingNoise` / `TwoQubitAmplitudeDampingNoise` noise elements, and `AmplitudeDampingNoiseModel`. - #556, #563: Added a context variable `default_output_format` to unify the default output format for displaying `PauliFlow`, `XZCorrections`, `Pattern`, and `StateVec`. @@ -60,8 +60,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #454, #481: Ensure `Pattern.minimize_space` only reduces max-space and does not increase it. -- #235, #489: Correct sign for `YZ` measurements in `from_pyzx_graph`. ZX diagrams are now correctly converted into open graphs, even if they are reduced. - - #510 - `Pattern.extract_opengraph` returns the same open graph before and after standardization. - The round trip `Pattern` -> `OpenGraph` -> `Flow` -> `XZCorrections` -> `Pattern` is guaranteed for deterministic patterns in the LC fragment. diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 3b3be27f2..014ec9e42 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -4,6 +4,14 @@ Graphix does not guarantee backwards compatibility between 0.x version releases. ## [0.4] - 2026-08-03 +- #484: J & CZ transpilation. + - Replaced `Circuit.transpile()` with a new approach based decomposing circuits into J & CZ gates. + - The transpiler now returns `TranspiledPattern` or `TranspiledFlow`, instead of `TranspileResult`. + +- #168, #498: `Pattern.remove_pauli_measurements` replaces `Pattern.perform_pauli_measurements`. + +- #468, #511: The `pyzx` module has been moved to a separate plugin: https://github.com/thierry-martinez/graphix-pyzx/ + - #571: Method `Pattern.graph` (formely `Pattern.extract_graph`) is removed. Use instead `Pattern.to_opengraph().graph` which standardizes the pattern and fails gracefully if there are non-commutative Cliffords. - #518: Numba-jit statevector backend. @@ -55,4 +63,10 @@ Graphix does not guarantee backwards compatibility between 0.x version releases. | `MatGF2.compute_rank` | `MatGF2.rank` | | `Statevec` | `Statevector` | +- #567: + - Method `Circuit.simulate_statevector` has been renamed `Circuit.simulate`. + - Method `Pattern.simulate_pattern` has been renamed `Pattern.simulate`. + + - Field `SimulateResult.statevec` has been renamed `SimulateResult.state`. + - #568: Method `Pattern.infer_pauli_measurements` and function `transpile_swaps` now operate in place by default, with an optional `copy` parameter. If `copy=True`, a modified copy is returned instead. From 1b65f27f09bd0bda2e00aba6985845232f8a16a8 Mon Sep 17 00:00:00 2001 From: Thierry Martinez Date: Thu, 13 Aug 2026 11:07:21 +0200 Subject: [PATCH 3/6] Constraint `numpy>=2,<2.5` Work around issue #583: numpy>=2.5 causes the build to fail: - https://github.com/TeamGraphix/graphix/actions/runs/31588265715/job/94087035559?pr=579 - https://github.com/TeamGraphix/graphix/actions/runs/31666880725/job/94343296433?pr=581 - https://github.com/TeamGraphix/graphix/actions/runs/31667056049/job/94343799834?pr=582 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3825bf6cf..7e503dc45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "matplotlib", "networkx", "numba>=0.65.1", - "numpy>=2", + "numpy>=2,<2.5", "quimb", "scipy", "sympy", diff --git a/uv.lock b/uv.lock index 47323f804..89f1b045b 100644 --- a/uv.lock +++ b/uv.lock @@ -936,7 +936,7 @@ requires-dist = [ { name = "nox", marker = "extra == 'dev'", specifier = "==2026.7.11" }, { name = "numba", specifier = ">=0.65.1" }, { name = "numba", marker = "python_full_version >= '3.11' and extra == 'typing'", specifier = "==0.66.0" }, - { name = "numpy", specifier = ">=2" }, + { name = "numpy", specifier = ">=2,<2.5" }, { name = "numpy", marker = "python_full_version == '3.10.*' and extra == 'typing'", specifier = "<2.4.2" }, { name = "numpy", marker = "python_full_version >= '3.11' and extra == 'typing'", specifier = "==2.4.2" }, { name = "pre-commit", marker = "extra == 'dev'" }, From 9a6fab5563e6d1ebbb1bfccbe56e0cb654965f58 Mon Sep 17 00:00:00 2001 From: thierry-martinez Date: Thu, 13 Aug 2026 16:18:05 +0200 Subject: [PATCH 4/6] Update CHANGELOG.md Co-authored-by: matulni --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 640ae1314..4a980257b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.4] - 2026-08-03 +## [0.4] - 2026-08-13 ### Added From b519ebaca4727f639ea29b50c519fd7b42019a6f Mon Sep 17 00:00:00 2001 From: thierry-martinez Date: Thu, 13 Aug 2026 16:18:28 +0200 Subject: [PATCH 5/6] Update COMPATIBILITY.md Co-authored-by: matulni --- COMPATIBILITY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index 014ec9e42..6bae9e0ef 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -2,7 +2,7 @@ Graphix does not guarantee backwards compatibility between 0.x version releases. Here we list API changes which may break existing code using Graphix. -## [0.4] - 2026-08-03 +## [0.4] - 2026-08-13 - #484: J & CZ transpilation. - Replaced `Circuit.transpile()` with a new approach based decomposing circuits into J & CZ gates. From 4166c619f94a675f98259a2bce9d92fdb30a800d Mon Sep 17 00:00:00 2001 From: thierry-martinez Date: Thu, 13 Aug 2026 16:19:02 +0200 Subject: [PATCH 6/6] Update CHANGELOG.md Co-authored-by: matulni --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a980257b..ba3a620fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - #454, #481: Ensure `Pattern.minimize_space` only reduces max-space and does not increase it. +- #482, #483: Ensure that `to_space_optimal_pattern` reorders output nodes + - #510 - `Pattern.extract_opengraph` returns the same open graph before and after standardization. - The round trip `Pattern` -> `OpenGraph` -> `Flow` -> `XZCorrections` -> `Pattern` is guaranteed for deterministic patterns in the LC fragment.