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
Installation
Install graphix with pip:
pip install graphix
Install together with device interface:
pip install graphix[extra]
this will install graphix and interface for IBMQ and Perceval to run MBQC patterns on superconducting and optical QPUs and their simulators.
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.
Projects using graphix
- Verphix: verified blind quantum computation and benchmarking.
Citing
Shinichi Sunami and Masato Fukushima, Graphix. (2023)
Contributing
We use GitHub issues for tracking feature requests and bug reports.
Discord Server
Please visit Unitary Fund's Discord server, where you can find a channel for graphix to ask questions.
Core Contributors (alphabetical order)
- Masato Fukushima (University of Tokyo, Fixstars Amplify)
- Maxime Garnier (Inria Paris)
- Thierry Martinez (Inria Paris)
- Sora Shiratani (University of Tokyo, Fixstars Amplify)
- Shinichi Sunami (University of Oxford)
Acknowledgements
We are proud to be supported by unitary fund microgrant program.
Special thanks to Fixstars Amplify:
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.2.tar.gz.
File metadata
- Download URL: graphix-0.3.2.tar.gz
- Upload date:
- Size: 116.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86c9c981ff58043f8aec4e9a5449c11accd1319911244bf99467d742add81cd9
|
|
| MD5 |
1eaf47fdb9968b53528b9fb9b243b5b3
|
|
| BLAKE2b-256 |
57add71e21e906202dfb70e4c5116bbb3ca52247e5dac6d9392e9b6b85c8ae1a
|
Provenance
The following attestation bundles were made for graphix-0.3.2.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.2.tar.gz -
Subject digest:
86c9c981ff58043f8aec4e9a5449c11accd1319911244bf99467d742add81cd9 - Sigstore transparency entry: 406256153
- Sigstore integration time:
-
Permalink:
TeamGraphix/graphix@19dfbc56794d9f2bf6cc05094ea5fa6de502f7f3 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/TeamGraphix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@19dfbc56794d9f2bf6cc05094ea5fa6de502f7f3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file graphix-0.3.2-py3-none-any.whl.
File metadata
- Download URL: graphix-0.3.2-py3-none-any.whl
- Upload date:
- Size: 130.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
486d7414ccf2f2f6458f8554453af8a58e76bbb3a72de118693dfdbc12752d15
|
|
| MD5 |
2307a5fd056fd196236212b5f86e3888
|
|
| BLAKE2b-256 |
74f8a713a1964d42e7d0af897f11c842a64fba3f27db6a4fb8150f268911ddda
|
Provenance
The following attestation bundles were made for graphix-0.3.2-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.2-py3-none-any.whl -
Subject digest:
486d7414ccf2f2f6458f8554453af8a58e76bbb3a72de118693dfdbc12752d15 - Sigstore transparency entry: 406256172
- Sigstore integration time:
-
Permalink:
TeamGraphix/graphix@19dfbc56794d9f2bf6cc05094ea5fa6de502f7f3 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/TeamGraphix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@19dfbc56794d9f2bf6cc05094ea5fa6de502f7f3 -
Trigger Event:
release
-
Statement type: