graphix

measurement-based quantum computing (MBQC) compiler and simulator

https://github.com/teamgraphix/graphix

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

graph-states mbqc quantum quantum-computing quantum-programming-language unitaryhack
Last synced: 6 months ago · JSON representation ·

Repository

measurement-based quantum computing (MBQC) compiler and simulator

Basic Info
Statistics
  • Stars: 83
  • Watchers: 4
  • Forks: 36
  • Open Issues: 44
  • Releases: 23
Topics
graph-states mbqc quantum quantum-computing quantum-programming-language unitaryhack
Created about 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

logo

PyPI License PyPI - Python Version Downloads Unitary Fund 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

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

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)

python pattern.perform_pauli_measurements() pattern.draw_graph()

graph_gflow

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

unitary-fund

Special thanks to Fixstars Amplify:

amplify

License

Apache License 2.0

Owner

  • Name: TeamGraphix
  • Login: TeamGraphix
  • Kind: organization

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
new feature (62) bug (28) good first issue (6) examples (5) performance (5) unitaryhack (5) simulation backend (4) coding (1) quantum algorithm (1)
Pull Request Labels
dependencies (45) python (28) documentation (2) bugfix (2) coding (1) examples (1) performance (1)

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
  • Versions: 23
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 6 months ago
proxy.golang.org: github.com/teamgraphix/graphix
  • Versions: 23
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 6 months ago
pypi.org: graphix

Optimize and simulate measurement-based quantum computation

  • Versions: 22
  • Dependent Packages: 2
  • Dependent Repositories: 1
  • Downloads: 1,009 Last month
Rankings
Dependent packages count: 3.1%
Downloads: 8.7%
Average: 11.2%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
docs/requirements.txt pypi
  • 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
pyproject.toml pypi
requirements.txt pypi
  • autoray >=0.6.0
  • networkx >3.0
  • numpy >=1.22
  • opt_einsum >=3.2
  • quimb >=1.4.0
  • z3-solver *
setup.py pypi