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.
Install graphix with pip:
pip install graphixAs 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 devThis creates a virtual environment and installs all development dependencies from the pyproject.toml and uv lockfile.
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.
pattern.infer_pauli_measurements()
pattern.remove_pauli_measurements()
pattern.draw(flow_from_pattern=False)(here, the visualization is based on generalized flow).
state_out = pattern.simulate()Check graphix.readthedocs.io !
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.
- 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.
If you use Graphix in your research, please consider citing the associated papers and the accompanying software release.
@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{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},
}
We use GitHub issues for tracking feature requests and bug reports.
-
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.
- Maxime Garnier (Inria Paris)
- Thierry Martinez (Inria Paris)
- Pranav Nair (Inria Paris)
- Mateo Uldemolins (Inria Paris)
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.

