Skip to main content
logo

PyPI License PyPI - Python Version Downloads Unitary Foundation DOI CI codecov Documentation Status Ruff

Graphix is a measurement-based quantum computing (MBQC) software package, featuring

  • the measurement calculus framework with integrated graphical rewrite rules for Pauli measurement preprocessing
  • circuit-to-pattern transpiler, graph-based deterministic pattern generator and manual pattern generation
  • flow, gflow and pauliflow finding tools and graph visualization based on flows (see below)
  • statevector, density matrix and tensornetwork pattern simulation backends
  • QPU interface and fusion network extraction tool
  • new: efficient implementation of fast O(N^3) pauli-flow finding algorithm

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 pattern from a circuit

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)
graph_flow

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.

preprocessing Pauli measurements (Clifford gates)

pattern.remove_pauli_measurements()
pattern.draw_graph()
graph_gflow

(here, the visualization is based on generalized flow).

simulating the pattern

state_out = pattern.simulate(backend="statevector")

and more..

  • See demos showing other features of graphix.
  • Read the tutorial for more usage guides.
  • For theoretical background, read our quick introduction into MBQC and LC-MBQC.
  • Full API docs is here.

Graphix plugins

Related packages

  • swiflow: rust-based implementation of flow-finding algorithms.
  • graphqomb: modular graph state compiler for fault-tolerant MBQC and more.

Projects using graphix

  • veriphix: verified blind quantum computation and benchmarking.
  • optyx: ZX-based software for networked quantum computing.

Citing

Please 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},
}

Contributing

We use GitHub issues for tracking feature requests and bug reports.

Discussion channels

Maintainers (alphabetical order)

  • Masato Fukushima (University of Tokyo, Fixstars Amplify)
  • Maxime Garnier (Inria Paris)
  • Emlyn Graham (Inria Paris)
  • Thierry Martinez (Inria Paris)
  • Pranav Nair (Inria Paris)
  • Sora Shiratani (University of Tokyo, Fixstars Amplify)
  • Shinichi Sunami (University of Oxford)
  • Mateo Uldemolins (Inria Paris)

Acknowledgements

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).

Unitary Foundation logo Fixstars Amplify logo

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.

Inria logo   ENS PSL logo   QAT logo

Special thanks also to HQI.

HQI logo

License

Apache License 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphix-0.4.tar.gz (393.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphix-0.4-py3-none-any.whl (219.5 kB view details)

Uploaded Python 3

File details

Details for the file graphix-0.4.tar.gz.

File metadata

  • Download URL: graphix-0.4.tar.gz
  • Upload date:
  • Size: 393.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for graphix-0.4.tar.gz
Algorithm Hash digest
SHA256 8d4c61d64446c36a8e76689afdbc9910a17f598036ec9b119f7b90cae38469fe
MD5 5abb664b9f7803c082f44b6cdd854a8e
BLAKE2b-256 f7db052f921993ff8ae6b118df8b2ef28dde0ef5fec2a94ac850f097151053ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphix-0.4.tar.gz:

Publisher: release.yml on TeamGraphix/graphix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphix-0.4-py3-none-any.whl.

File metadata

  • Download URL: graphix-0.4-py3-none-any.whl
  • Upload date:
  • Size: 219.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for graphix-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b2d25443f6650ac1aac6728d7d9703782747765dba5861a3e1e59db0fa8869c3
MD5 782b0bb6d9df687485f7841ed0815168
BLAKE2b-256 06fde5049c5d37e01f7d38cf4c4ab4d8e9276ff58166c833b29007f594648d2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphix-0.4-py3-none-any.whl:

Publisher: release.yml on TeamGraphix/graphix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4 This release

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page