Graphix is an open-source Python library for building, optimizing, and simulating measurement-based quantum computations (MBQC). It features:
- The measurement calculus framework with integrated graphical rewrite rules for pre-processing Pauli measurements.
- Circuit-to-pattern transpiler, automatic pattern generation from graph states and manual pattern generation.
- State-of-the-art causal flow, gflow and Pauli flow finding algorithms and visualization tools.
- Statevector and density matrix simulation backends.
- Circuit extraction.
- Parametric MBQC computations.
- Export to OpenQASM for external simulation and QPU integration.
- An extensible plugin ecosystem.
For usage examples drawn from recent research on MBQC and further details on the architecture, design and algorithm implementations, check our latest preprint!
Full documentation, including detailed Graphix tutorials and an introduction to measurement-based quantum computation (MBQC), is available at graphix.readthedocs.io.
Installation
Install graphix with pip:
pip install graphix
Editable installation using pip and uv
As well as support for editable installation using pip, Graphix also supports using uv:
git clone https://github.com/TeamGraphix/graphix.git
cd graphix
uv sync --extra dev
This creates a virtual environment and installs all development dependencies from the pyproject.toml and uv lockfile.
Using Graphix
Generating a pattern from a circuit
from graphix import Circuit
circuit = Circuit(4)
...
pattern = circuit.transpile().pattern
pattern.standardize()
pattern.shift_signals()
pattern.draw_graph(flow_from_pattern=False)
See our example code to generate this pattern. Arrows indicate the causal flow of MBQC and dashed lines are the other edges of the graph. The vertical dashed partitions and the labels below indicate the execution layers based on the partial order associated with the (maximally-delayed) flow of the graph. Measurements happen from left to right, and nodes in the same layer can be measured simultaneously.
Pre-processing Pauli measurements (Clifford gates)
pattern.infer_pauli_measurements()
pattern.remove_pauli_measurements()
pattern.draw(flow_from_pattern=False)
(here, the visualization is based on generalized flow).
Simulating the pattern
state_out = pattern.simulate()
And more...
Check graphix.readthedocs.io !
Graphix plugins
graphix-ibmq: pattern transpiler for IBMQ /qiskitgraphix-perceval: pattern transpiler for Quandela'spercevalsimulator and QPUgraphix-pyzx: conversion between open graphs and PyZX diagramsgraphix-qasm-parser: a plugin for parsing OpenQASM circuit.graphix-stim-backend:stimbackend for efficient Clifford pattern simulationgraphix-stim-compiler:stimbackend for efficient compilation of Clifford maps.graphix-symbolic: parameterized patterns with symbolic simulationgraphix-mqtbench: an interface between Graphix and the MQT Bench suite for benchmarking purposes.
Projects using Graphix
- veriphix: verified blind quantum computation and benchmarking.
- optyx: ZX-based software for networked quantum computing.
- QPatLib: a community repository for MBQC patterns and supporting tooling.
Citing
If you use Graphix in your research, please consider citing the associated papers and the accompanying software release.
Papers
@article{uldemolins2026_graphix,
title={Graphix: A software framework for Measurement-Based Quantum Computation},
author={Uldemolins, Mateo and Nair, Pranav and Graham, Emlyn and Sunami, Shinichi and Martinez, Thierry and Garnier, Maxime},
journal={arXiv preprint arXiv:2608.24781},
year={2026}
}
@article{sunami2022_graphix,
title={Graphix: Optimizing and simulating measurement-based quantum computation on local-Clifford decorated graph},
author={Sunami, Shinichi and Fukushima, Masato},
journal={arXiv preprint arXiv:2212.11975},
year={2022}
}
Software
@software{graphix_v04,
author = {Uldemolins, Mateo and Fukushima, Masato and
Graham, Emlyn and Nair, Pranav and Sasaki, Daichi and
Shiratani, Sora and Watanabe, Yuki and
Martinez, Thierry and Garnier, Maxime and Sunami, Shinichi},
title = {Graphix},
version = {0.4},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.21997813},
}
Contributing
We use GitHub issues for tracking feature requests and bug reports.
Discussion channels
-
Our Slack channel, for regular discussions and questions: https://graphix-org.slack.com
-
Please visit Unitary Foundation's Discord server, where you can find a channel for
graphix.
Current maintainers (alphabetical order)
- Maxime Garnier (Inria Paris)
- Thierry Martinez (Inria Paris)
- Pranav Nair (Inria Paris)
- Mateo Uldemolins (Inria Paris)
Acknowledgements
Graphix was started in 2022 by Shinichi Sunami (University of Oxford) and Masato Fukushima (University of Tokyo, Fixstars Amplify). Daichi Sasaki, Yuki Watanabe, and Sora Shiratani (University of Tokyo, Fixstars Amplify) later joined the team.
In 2023, the QAT team joined the effort and now maintains the library. We thank Emlyn Graham (Inria Paris) for his contributions to Graphix from 2025 to 2026.
The project has been supported by Fixstars Amplify and the Unitary Foundation, and currently participates in the French Hybrid Quantum Initiative.
License
Metadata
Release files for graphix 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| graphix-0.4.1.tar.gz | 681.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| graphix-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 907.1 kB
Release files / graphix-0.4.1.tar.gz
| Download URL | graphix-0.4.1.tar.gz |
|---|---|
| Size | 681.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a51e186e5151cac2459c709768b221f1868c73493880a4f2630c7cca67fd168f
|
|
BLAKE2b-256 checksum How to use checksums |
73a00b1bad96da4a90b19a9e6c719688df53b751a45b50923a5e1e9feb282d3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / graphix-0.4.1-py3-none-any.whl
| Download URL | graphix-0.4.1-py3-none-any.whl |
|---|---|
| Size | 226.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccc9495c69d5e5fb8a6f69e27c6f48fac22f615dc66411de025074c3d3a63dcb
|
|
BLAKE2b-256 checksum How to use checksums |
f9e29831ae92d18ba2d71d4124a0c280e9b0358443a174fdacc6215aec7534aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency log