Optimize and simulate measurement-based quantum computation
Project description
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
Install together with extra packages:
pip install graphix[extra]
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)
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.perform_pauli_measurements()
pattern.draw_graph()
(here, the visualization is based on generalized flow).
simulating the pattern
state_out = pattern.simulate_pattern(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.
Related packages
- graphix-stim-backend:
stimbackend for efficient Clifford pattern simulation - graphix-symbolic: parameterized patterns with symbolic simulation
- graphix-ibmq: pattern transpiler for IBMQ /
qiskit - graphix-perceval: pattern transpiler for Quandela's
percevalsimulator and QPU - graphix-qasm-parser: a plugin for parsing OpenQASM circuit.
- 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
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.
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) and Masato Fukushima (University of Tokyo, Fixstars Amplify) with support from 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 Qode group of the QAT team, co-hosted by Inria and ENS, who develops and maintains the library.
Special thanks also to HQI.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphix-0.3.4.tar.gz.
File metadata
- Download URL: graphix-0.3.4.tar.gz
- Upload date:
- Size: 144.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32ac209447a4bfd5d45ad0dd00a191630b5e4cb09886d059cedcc76a5d75e895
|
|
| MD5 |
9f55e1c39dd40913a3133ead2aec2ab0
|
|
| BLAKE2b-256 |
855c572a523f7abd7e6bbf6f0d54f6c671e98b7bb2a45ed0420b406eeb2d7522
|
Provenance
The following attestation bundles were made for graphix-0.3.4.tar.gz:
Publisher:
release.yml on TeamGraphix/graphix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
graphix-0.3.4.tar.gz -
Subject digest:
32ac209447a4bfd5d45ad0dd00a191630b5e4cb09886d059cedcc76a5d75e895 - Sigstore transparency entry: 923445546
- Sigstore integration time:
-
Permalink:
TeamGraphix/graphix@6d2b0f687f8c68a11d22f98dae8c20eb1c655e58 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/TeamGraphix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6d2b0f687f8c68a11d22f98dae8c20eb1c655e58 -
Trigger Event:
release
-
Statement type:
File details
Details for the file graphix-0.3.4-py3-none-any.whl.
File metadata
- Download URL: graphix-0.3.4-py3-none-any.whl
- Upload date:
- Size: 161.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4ba9d1816c9c8a31ce44f581db893705737591b5a86adb8d4e7891e2110463f
|
|
| MD5 |
02396468254aed307b53ee98e3406040
|
|
| BLAKE2b-256 |
b1f86f418156926011aee0c6d8628f724d1352b742fc360d19dbe54b86828617
|
Provenance
The following attestation bundles were made for graphix-0.3.4-py3-none-any.whl:
Publisher:
release.yml on TeamGraphix/graphix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
graphix-0.3.4-py3-none-any.whl -
Subject digest:
b4ba9d1816c9c8a31ce44f581db893705737591b5a86adb8d4e7891e2110463f - Sigstore transparency entry: 923445552
- Sigstore integration time:
-
Permalink:
TeamGraphix/graphix@6d2b0f687f8c68a11d22f98dae8c20eb1c655e58 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/TeamGraphix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6d2b0f687f8c68a11d22f98dae8c20eb1c655e58 -
Trigger Event:
release
-
Statement type: