Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TeamGraphix/graphix
measurement-based quantum computing (MBQC) compiler and simulator
https://github.com/TeamGraphix/graphix
graph-states mbqc quantum quantum-computing quantum-programming-language unitaryhack
Last synced: about 1 month ago
JSON representation
measurement-based quantum computing (MBQC) compiler and simulator
- Host: GitHub
- URL: https://github.com/TeamGraphix/graphix
- Owner: TeamGraphix
- License: apache-2.0
- Created: 2022-12-02T14:29:12.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-20T20:57:12.000Z (8 months ago)
- Last Synced: 2024-04-22T10:12:23.114Z (8 months ago)
- Topics: graph-states, mbqc, quantum, quantum-computing, quantum-programming-language, unitaryhack
- Language: Python
- Homepage: https://graphix.readthedocs.io
- Size: 1.02 MB
- Stars: 46
- Watchers: 4
- Forks: 16
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
Awesome Lists containing this project
- awesome-quantum-software - Graphix - Measurement-Based Quantum Computing (MBQC) compiler, simulator and QPU interface. (Quantum simulators)
README
![PyPI](https://img.shields.io/pypi/v/graphix)
![License](https://img.shields.io/github/license/TeamGraphix/graphix)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/graphix)
[![Downloads](https://static.pepy.tech/badge/graphix)](https://pepy.tech/project/graphix)
[![Unitary Fund](https://img.shields.io/badge/Supported%20By-UNITARY%20FUND-brightgreen.svg)](https://unitary.fund/)
[![DOI](https://zenodo.org/badge/573466585.svg)](https://zenodo.org/badge/latestdoi/573466585)
[![CI](https://github.com/TeamGraphix/graphix/actions/workflows/ci.yml/badge.svg)](https://github.com/TeamGraphix/graphix/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/TeamGraphix/graphix/graph/badge.svg?token=E41MLUTYXU)](https://codecov.io/gh/TeamGraphix/graphix)
[![Documentation Status](https://readthedocs.org/projects/graphix/badge/?version=latest)](https://graphix.readthedocs.io/en/latest/?badge=latest)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/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 inteface for [IBMQ](https://github.com/TeamGraphix/graphix-ibmq) and [Perceval](https://github.com/TeamGraphix/graphix-perceval) to run MBQC patterns on superconducting and optical QPUs and their simulators.
## Using graphix
### generating pattern from a circuit
```python
from graphix import Circuitcircuit = Circuit(4)
circuit.h(0)
...
pattern = circuit.transpile().pattern
pattern.draw_graph()
```note: this graph is generated from QAOA circuit, see [our example code](examples/qaoa.py). Arrows indicate the [_causal flow_](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.74.052310) 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
```python
pattern.perform_pauli_measurements()
pattern.draw_graph()
```(here, the graph is visualized based on [_generalized flow_](https://iopscience.iop.org/article/10.1088/1367-2630/9/8/250).)
### simulating the pattern
```python
state_out = pattern.simulate_pattern(backend="statevector")
```### and more..
- See [demos](https://graphix.readthedocs.io/en/latest/gallery/index.html) showing other features of `graphix`.
- You can try demos on browser with mybinder.org: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TeamGraphix/graphix-examples/HEAD)- Read the [tutorial](https://graphix.readthedocs.io/en/latest/tutorial.html) for more usage guides.
- For theoretical background, read our quick introduction into [MBQC](https://graphix.readthedocs.io/en/latest/intro.html) and [LC-MBQC](https://graphix.readthedocs.io/en/latest/lc-mbqc.html).
- Full API docs is [here](https://graphix.readthedocs.io/en/latest/references.html).
## Citing
> Shinichi Sunami and Masato Fukushima, Graphix. (2023)
## Contributing
We use [GitHub issues](https://github.com/TeamGraphix/graphix/issues) for tracking feature requests and bug reports.
## Discord Server
Please visit [Unitary Fund's Discord server](https://discord.com/servers/unitary-fund-764231928676089909), where you can find a channel for `graphix` to ask questions.
## Core Contributors
Dr. Shinichi Sunami (University of Oxford)
Masato Fukushima (University of Tokyo, Fixstars Amplify)
## Acknowledgements
We are proud to be supported by [unitary fund microgrant program](https://unitary.fund/grants.html).
Special thanks to Fixstars Amplify:
## License
[Apache License 2.0](LICENSE)