graphix
measurement-based quantum computing (MBQC) compiler and simulator
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: aps.org, iop.org, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.6%) to scientific vocabulary
Keywords
Repository
measurement-based quantum computing (MBQC) compiler and simulator
Basic Info
- Host: GitHub
- Owner: TeamGraphix
- License: apache-2.0
- Language: Python
- Default Branch: master
- Homepage: https://graphix.readthedocs.io
- Size: 1.72 MB
Statistics
- Stars: 83
- Watchers: 4
- Forks: 36
- Open Issues: 44
- Releases: 23
Topics
Metadata Files
README.md

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:
bash
pip install graphix
Install together with device interface:
bash
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
```python from graphix import Circuit
circuit = Circuit(4) circuit.h(0) ... pattern = circuit.transpile().pattern pattern.standardize() pattern.shiftsignals() pattern.drawgraph(flowfrompattern=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)
python
pattern.perform_pauli_measurements()
pattern.draw_graph()
(here, the visualization is based on generalized flow).
simulating the pattern
python
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) - Zenodo: https://doi.org/10.5281/zenodo.7861382 - arXiv: https://doi.org/10.48550/arXiv.2212.11975
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
Owner
- Name: TeamGraphix
- Login: TeamGraphix
- Kind: organization
- Repositories: 4
- Profile: https://github.com/TeamGraphix
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Sunami
given-names: Shinichi
orcid: https://orcid.org/0000-0002-0969-9909
- family-names: Fukushima
given-names: Masato
title: Graphix
version: v0.2.1
doi: 10.5281/zenodo.7861382
date-released: 2023-04-25
url: https://github.com/TeamGraphix/graphix
GitHub Events
Total
- Create event: 46
- Release event: 3
- Issues event: 35
- Watch event: 20
- Delete event: 33
- Issue comment event: 203
- Push event: 163
- Pull request event: 116
- Pull request review event: 380
- Pull request review comment event: 368
- Fork event: 6
Last Year
- Create event: 46
- Release event: 3
- Issues event: 35
- Watch event: 20
- Delete event: 33
- Issue comment event: 203
- Push event: 163
- Pull request event: 116
- Pull request review event: 380
- Pull request review comment event: 368
- Fork event: 6
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 114
- Total pull requests: 238
- Average time to close issues: 4 months
- Average time to close pull requests: about 1 month
- Total issue authors: 17
- Total pull request authors: 23
- Average comments per issue: 1.82
- Average comments per pull request: 3.36
- Merged pull requests: 164
- Bot issues: 0
- Bot pull requests: 46
Past Year
- Issues: 33
- Pull requests: 137
- Average time to close issues: about 2 months
- Average time to close pull requests: 21 days
- Issue authors: 7
- Pull request authors: 13
- Average comments per issue: 0.55
- Average comments per pull request: 2.15
- Merged pull requests: 85
- Bot issues: 0
- Bot pull requests: 45
Top Authors
Issue Authors
- shinich1 (33)
- thierry-martinez (21)
- EarlMilktea (19)
- masa10-f (11)
- king-p3nguin (6)
- benjvmin93 (4)
- mgarnier59 (4)
- masato-fuk (3)
- AbdullahKazi500 (3)
- wlcsm (1)
- juxingzhe (1)
- zilkf92 (1)
- nabe98 (1)
- pafloxy (1)
- FlorianFuerrutter (1)
Pull Request Authors
- EarlMilktea (86)
- thierry-martinez (64)
- dependabot[bot] (45)
- shinich1 (16)
- mgarnier59 (12)
- king-p3nguin (11)
- d1ssk (11)
- nabe98 (8)
- benjvmin93 (6)
- matulni (4)
- AbdullahKazi500 (4)
- masa10-f (3)
- pafloxy (3)
- idriss-hamadi (2)
- Roshan-Thomas (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 1,009 last-month
-
Total dependent packages: 2
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 68
- Total maintainers: 1
proxy.golang.org: github.com/TeamGraphix/graphix
- Documentation: https://pkg.go.dev/github.com/TeamGraphix/graphix#section-documentation
- License: apache-2.0
-
Latest release: v0.3.2
published 6 months ago
Rankings
proxy.golang.org: github.com/teamgraphix/graphix
- Documentation: https://pkg.go.dev/github.com/teamgraphix/graphix#section-documentation
- License: apache-2.0
-
Latest release: v0.3.2
published 6 months ago
Rankings
pypi.org: graphix
Optimize and simulate measurement-based quantum computation
- Documentation: https://graphix.readthedocs.io
- License: apache-2.0
-
Latest release: 0.3.2
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- alabaster ==0.7.12
- babel ==2.10.1
- certifi ==2023.7.22
- charset-normalizer ==2.0.12
- docutils ==0.17.1
- graphix *
- idna ==3.3
- imagesize ==1.3.0
- importlib-metadata ==4.11.3
- ipython *
- jinja2 ==3.1.1
- markupsafe ==2.1.1
- matplotlib *
- packaging ==21.3
- pbr ==5.8.1
- pygments >=2.15.0
- pyparsing ==3.0.8
- pytz ==2022.1
- requests >=2.31.0
- scikit-learn *
- seaborn *
- snowballstemmer ==2.2.0
- sphinx ==4.5.0
- sphinx-gallery ==0.11.1
- sphinx-rtd-theme ==1.0.0
- sphinxcontrib-apidoc ==0.3.0
- sphinxcontrib-applehelp ==1.0.2
- sphinxcontrib-devhelp ==1.0.2
- sphinxcontrib-htmlhelp ==2.0.0
- sphinxcontrib-jsmath ==1.0.1
- sphinxcontrib-qthelp ==1.0.3
- sphinxcontrib-serializinghtml ==1.1.5
- urllib3 ==1.26.9
- zipp ==3.8.0
- autoray >=0.6.0
- networkx >3.0
- numpy >=1.22
- opt_einsum >=3.2
- quimb >=1.4.0
- z3-solver *