Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: ${{ env.python-version }}

- name: Run pytest
run: uv run --extra dev --extra extra pytest --cov=./graphix --cov-report=xml --cov-report=term --doctest-modules
run: uv run --extra dev pytest --cov=./graphix --cov-report=xml --cov-report=term --doctest-modules

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
enable-cache: true
python-version: ${{ env.python-version }}

- run: uv run --extra dev --extra extra --extra typing mypy
- run: uv run --extra dev --extra typing mypy

- run: uv run --extra dev --extra extra --extra typing pyright
- run: uv run --extra dev --extra typing pyright

# Check that `mypy` find installed `graphix` package (#328)
#
Expand Down Expand Up @@ -67,4 +67,4 @@ jobs:
run: |
cd ${{ runner.temp }}
echo "from graphix import Pattern" > test_graphix_type.py
uv run --project ${{ github.workspace }} --no-sync mypy test_graphix_type.py
uv run --project ${{ github.workspace }} --no-sync mypy test_graphix_type.py
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- #490: Introduced new `Instruction` and `Command` namespace classes for instruction and command instantiation.

- #505
- #505:
- Added new methods `XZCorrections.to_causal_flow` and `XZCorrections.to_gflow` which subsume `StandardizedPattern.extract_causal_flow` and `StandardizedPattern.extract_gflow`.
- Added new methods `XZCorrections.to_bloch` and `XZCorrections.downcast_bloch`.

Expand Down Expand Up @@ -51,6 +51,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- #507: Static method `PauliString.from_measured_node` is subsumed by the function `extraction_ps_from_corrected_node`.

- #468, #511: The `pyzx` module has been moved to a separate plugin: https://github.com/thierry-martinez/graphix-pyzx/
Consequently, the `pyproject.toml` no longer defines an `extra` dependency group for the `pyzx` package.

- #512: Method `Circuit.simulate_statevector` accepts a `backend: DenseStateBackend[_DenseStateT] | Literal["statevector", "densitymatrix"]` parameter.

## [0.3.5] - 2026-03-26
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Once created, you'll need to clone the repository, and you can follow below to s
git clone [email protected]:<username>/graphix.git
cd graphix
pip install uv
uv sync --extra dev --extra extra
uv sync --extra dev
```

## Local checks
Expand Down
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,17 @@ Install `graphix` with `pip`:
pip install graphix
```

Install with [extra dependencies](https://github.com/TeamGraphix/graphix/blob/master/pyproject.toml) (e.g. pyzx):

```bash
pip install graphix[extra]
```

### Editable installation using pip and uv

As well as support for editable installation using pip, Graphix also supports using `uv`:

```bash
git clone https://github.com/TeamGraphix/graphix.git
cd graphix
uv sync --extra dev --extra extra
uv sync --extra dev
```

This creates a virtual environment and installs all development and extra dependencies from the `pyproject.toml` and `uv` lockfile.
This creates a virtual environment and installs all development dependencies from the `pyproject.toml` and `uv` lockfile.

## Using graphix

Expand Down Expand Up @@ -92,12 +86,13 @@ state_out = pattern.simulate_pattern(backend="statevector")

## Graphix plugins

- [graphix-stim-backend](https://github.com/thierry-martinez/graphix-stim-backend): `stim` backend for efficient Clifford pattern simulation
- [graphix-symbolic](https://github.com/TeamGraphix/graphix-symbolic): parameterized patterns with symbolic simulation
- [graphix-ibmq](https://github.com/TeamGraphix/graphix-ibmq): pattern transpiler for IBMQ / `qiskit`
- [graphix-perceval](https://github.com/TeamGraphix/graphix-perceval): pattern transpiler for Quandela's `perceval` simulator and QPU
- [graphix-qasm-parser](https://github.com/TeamGraphix/graphix-qasm-parser): a plugin for parsing OpenQASM circuit.
- [`graphix-ibmq`](https://github.com/TeamGraphix/graphix-ibmq): pattern transpiler for IBMQ / `qiskit`
- [`graphix-perceval`](https://github.com/TeamGraphix/graphix-perceval): pattern transpiler for Quandela's `perceval` simulator and QPU
- [`graphix-pyzx`](https://github.com/thierry-martinez/graphix-pyzx): conversion between open graphs and PyZX diagrams
- [`graphix-qasm-parser`](https://github.com/TeamGraphix/graphix-qasm-parser): a plugin for parsing OpenQASM circuit.
- [`graphix-stim-backend`](https://github.com/thierry-martinez/graphix-stim-backend): `stim` backend for efficient Clifford pattern simulation
- [`graphix-stim-compiler`](https://github.com/qat-inria/graphix-stim-compiler): `stim` backend for efficient compilation of Clifford maps.
- [`graphix-symbolic`](https://github.com/TeamGraphix/graphix-symbolic): parameterized patterns with symbolic simulation

## Related packages

Expand Down
190 changes: 0 additions & 190 deletions graphix/pyzx.py

This file was deleted.

21 changes: 2 additions & 19 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,10 @@ def tests_minimal(session: Session) -> None:
run_pytest(session, mpl=True)


@nox.session(python=PYTHON_VERSIONS)
def tests_dev(session: Session) -> None:
"""Run the test suite with dev dependencies."""
session.install(".[dev]")
# We cannot run `pytest --doctest-modules` here, since some tests
# involve optional dependencies, like pyzx.
run_pytest(session, mpl=True)


@nox.session(python=PYTHON_VERSIONS)
def tests_extra(session: Session) -> None:
"""Run the test suite with extra dependencies."""
session.install(".[extra]")
install_pytest(session)
session.install("nox") # needed for `--doctest-modules`
run_pytest(session, doctest_modules=True)


@nox.session(python=PYTHON_VERSIONS)
def tests_all(session: Session) -> None:
"""Run the test suite with all dependencies."""
session.install(".[dev,extra]")
session.install(".[dev]")
# This dependency is added here to avoid circular dependencies
session.install("graphix-qasm-parser>=0.1.1")
run_pytest(session, doctest_modules=True, mpl=True)
Expand Down Expand Up @@ -123,6 +105,7 @@ class ReverseDependency:
),
ReverseDependency("https://github.com/TeamGraphix/graphix-ibmq", doctest_modules=False),
ReverseDependency("https://github.com/qat-inria/graphix-stim-compiler", branch="ps_dim"),
ReverseDependency("https://github.com/thierry-martinez/graphix-pyzx", branch="pyzx_from_graphix"),
],
)
def tests_reverse_dependencies(session: Session, package: ReverseDependency) -> None:
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ doc = [
"sphinx",
"sphinx-gallery",
]
extra = [
"pyzx>=0.10.0",
]
typing = [
"numpy==2.4.2; python_version >= '3.11'",
"numba==0.65.1; python_version >= '3.11'",
Expand Down
Loading
Loading