measurement-based quantum computing (MBQC) library
See the code
Graphix is a measurement-based quantum computing (MBQC) software package, featuring
Install graphix with pip:
pip install graphix
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.
from graphix import Circuit
circuit = Circuit(4)
circuit.h(0)
...
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 'l:n' below indicate the execution layers or the order in the graph (measurements should happen from left to right, and nodes in the same layer can be measured simultaneously), based on the partial order associated with the (maximally-delayed) flow.
pattern.remove_pauli_measurements()
pattern.draw_graph()
(here, the visualization is based on generalized flow).
state_out = pattern.simulate(backend="statevector")
graphix.graphix-ibmq: pattern transpiler for IBMQ / qiskitgraphix-perceval: pattern transpiler for Quandela's perceval simulator and QPUgraphix-pyzx: conversion between open graphs and PyZX diagramsgraphix-qasm-parser: a plugin for parsing OpenQASM circuit.graphix-stim-backend: stim backend for efficient Clifford pattern simulationgraphix-stim-compiler: stim backend 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.graphixPlease cite as
@software{uldemolins2026grpahix034,
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},
month = feb,
year = 2026,
publisher = {Zenodo},
version = {v0.3.4},
doi = {10.5281/zenodo.18503266},
url = {https://doi.org/10.5281/zenodo.18503266},
}
@misc{sunami2022graphix,
title={Graphix: optimizing and simulating measurement-based quantum computation on local-Clifford decorated graph},
author={Shinichi Sunami and Masato Fukushima},
year={2022},
eprint={2212.11975},
archivePrefix={arXiv},
primaryClass={quant-ph},
url={https://arxiv.org/abs/2212.11975},
}
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.
Graphix was founded in 2022 by Shinichi Sunami (University of Oxford) with assistance from Masato Fukushima (University of Tokyo, Fixstars Amplify), supported by Fixstars Amplify and Unitary Foundation, and later joined by Daichi Sasaki, Yuki Watanabe and Sora Shiratani (University of Tokyo, Fixstars Amplify).
Since 2023, Graphix team is joined by the Qode group of the QAT team, co-hosted by Inria and ENS, who develops and maintains the library.
Special thanks also to HQI.
Python
100.0%
measurement-based quantum computing (MBQC) library
See the code
Graphix is a measurement-based quantum computing (MBQC) software package, featuring
Install graphix with pip:
pip install graphix
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.
from graphix import Circuit
circuit = Circuit(4)
circuit.h(0)
...
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 'l:n' below indicate the execution layers or the order in the graph (measurements should happen from left to right, and nodes in the same layer can be measured simultaneously), based on the partial order associated with the (maximally-delayed) flow.
pattern.remove_pauli_measurements()
pattern.draw_graph()
(here, the visualization is based on generalized flow).
state_out = pattern.simulate(backend="statevector")
graphix.graphix-ibmq: pattern transpiler for IBMQ / qiskitgraphix-perceval: pattern transpiler for Quandela's perceval simulator and QPUgraphix-pyzx: conversion between open graphs and PyZX diagramsgraphix-qasm-parser: a plugin for parsing OpenQASM circuit.graphix-stim-backend: stim backend for efficient Clifford pattern simulationgraphix-stim-compiler: stim backend 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.graphixPlease cite as
@software{uldemolins2026grpahix034,
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},
month = feb,
year = 2026,
publisher = {Zenodo},
version = {v0.3.4},
doi = {10.5281/zenodo.18503266},
url = {https://doi.org/10.5281/zenodo.18503266},
}
@misc{sunami2022graphix,
title={Graphix: optimizing and simulating measurement-based quantum computation on local-Clifford decorated graph},
author={Shinichi Sunami and Masato Fukushima},
year={2022},
eprint={2212.11975},
archivePrefix={arXiv},
primaryClass={quant-ph},
url={https://arxiv.org/abs/2212.11975},
}
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.
Graphix was founded in 2022 by Shinichi Sunami (University of Oxford) with assistance from Masato Fukushima (University of Tokyo, Fixstars Amplify), supported by Fixstars Amplify and Unitary Foundation, and later joined by Daichi Sasaki, Yuki Watanabe and Sora Shiratani (University of Tokyo, Fixstars Amplify).
Since 2023, Graphix team is joined by the Qode group of the QAT team, co-hosted by Inria and ENS, who develops and maintains the library.
Special thanks also to HQI.
Python
100.0%