graphiq


Namegraphiq JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryGraphiQ is a Python library for the simulation, design, and optimization of quantum photonic circuits.
upload_time2024-02-17 16:20:07
maintainer
docs_urlNone
author
requires_python<4,>3.8
licenseApache 2.0
keywords quantum photonic circuit design
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# ![GraphiQ](https://raw.githubusercontent.com/graphiq-dev/graphiq/main/docs/img/logos/logo.png)

[![PyPI Version](https://img.shields.io/pypi/v/graphiq)](https://pypi.org/project/graphiq)
[![Python Versions](https://img.shields.io/pypi/pyversions/graphiq)](https://pypi.org/project/graphiq)
[![GitHub Workflow Status](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/ki3-qbt/graph-compiler/actions)
[![Documentation Status](https://readthedocs.org/projects/graphiq/badge/?version=latest)](https://graphiq.readthedocs.io/en/latest/?badge=latest)
[![arXiv Paper](https://img.shields.io/badge/arXiv-2402.09285-red)](https://arxiv.org/abs/2402.09285)
[![arXiv Paper](https://img.shields.io/badge/arXiv-2401.00635-red)](https://arxiv.org/abs/2401.00635)
[![codecov](https://codecov.io/gh/graphiq-dev/graphiq/branch/main/graph/badge.svg)](https://codecov.io/gh/graphiq-dev/graphiq)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

</div>

<p align="center" style="font-size:20px">
  GraphiQ is a Python library for the simulation, design, and optimization of quantum photonic circuits.
</p>

**GraphiQ** is an open-source framework for designing photonic graph state generation schemes. 
Photonic graph states are an important resource for many quantum information processing tasks including quantum computing 
and quantum communication.

## Features

<img src="https://user-images.githubusercontent.com/87783633/198037273-06ec89cf-233d-4c08-9f7a-96313bfcb435.gif" width="225px" align="right">

* Diverse [backends](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/backends) for the simulation of noisy
  quantum circuits comprised of hundreds of qubits.

* Algorithms for the inverse design and optimization of circuits that output a desired quantum state.

* Circuits support emitter and photonic qubits, as a basis for simulations of realistic near-term quantum photonic
  devices.

* Library of models for the study of [noise](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/noise) and
  optical loss.

## Installation
GraphiQ can be installed from PyPI,
```
pip install graphiq 
```
This package is built on top of the standard Python scientific computing ecosystem, including
`networkx`, `numpy`, `matplotlib`, and `scipy`.

## Getting started
GraphiQ can simulate quantum circuits using the density matrix and stabilizer formalisms, 
and can identify circuits which generate a target quantum state. 
In this example, we simulate a Bell state circuit and find a generating circuit for a 3-qubit linear cluster state.
``` py
import graphiq as gq
from graphiq.benchmarks.circuits import bell_state_circuit
import networkx as nx

#%%
circuit, _ = bell_state_circuit()
backend = gq.StabilizerCompiler()
state = backend.compile(circuit)
print(state)

#%%
target = gq.QuantumState(data=nx.Graph([(1, 2), (2, 3)]), rep_type="g")
metric = gq.Infidelity(target=target)
solver = gq.TimeReversedSolver(compiler=backend, metric=metric, target=target)

#%%
solver.solve()
score, circuit = solver.result
circuit.draw_circuit()
```


## Overview

* [`backends`](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/backends) - simulate a quantum circuit using
  different state representations, including, the density matrix, stabilizer, and graph formalisms.
* [`noise`](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/noise) - models for the study of noise and
  optical loss in realistic quantum devices.
* [`solvers`](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/solvers) - design and optimization algorithms that identifying
  circuits satisfying which generate target quantum states.
* [`benchmarks`](https://github.com/ki3-qbt/graph-compiler/tree/main/benchmarks) - a suite of automated tools for
  benchmarking solvers and compilers, scaled to run on high-performance computing clusters.
* [`visualizers`](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/visualizers) - functions for plotting
  backends and quantum circuits.
* [`tests`](https://github.com/ki3-qbt/graph-compiler/tree/main/tests) - automated code testing framework


## Documentation
Documentation can be found [here](https://graphiq.readthedocs.io/en/latest/?badge=latest).
See also "GraphiQ: Quantum circuit design for photonic graph states" (https://arxiv.org/abs/2402.09285),
and 
"Optimization of deterministic photonic graph state generation via local operations" (https://arxiv.org/abs/2401.00635)

## Acknowledgement
Version 0.1.0 was jointly developed by [Quantum Bridge Technologies, Inc. ("Quantum Bridge") ](https://qubridge.io/)
and [Ki3 Photonics Technologies](https://www.ki3photonics.com/) 
under the US Air Force Office of Scientific Research (AFOSR) Grant FA9550-22-1-0062.

## Contributing
Quantum Bridge continues to maintain and develop new versions of GraphiQ. Collaborations from the community are encouraged and welcomed.

## License
GraphiQ is licensed under an Apache License Version 2.0.

## Citation
```
@article{
  title={GraphiQ: Quantum circuit design for photonic graph states}, 
  author={Jie Lin and Benjamin MacLellan and Sobhan Ghanbari and Julie Belleville and Khuong Tran and Luc Robichaud and Roger G. Melko and Hoi-Kwong Lo and Piotr Roztocki},
  year={2024},
  eprint={2402.09285},
  archivePrefix={arXiv},
  primaryClass={quant-ph}
}
```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "graphiq",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<4,>3.8",
    "maintainer_email": "",
    "keywords": "quantum,photonic,circuit,design",
    "author": "",
    "author_email": "Benjamin MacLellan <benjamin@ki3photonics.com>, Jie Lin <jie.lin@quantumbridgetech.com>, Sohban Ghanbari <sobhan.ghanbari@quantumbridgetech.com>, Luc Robichaud <luc.robichaud@qubridge.io>, Piotr Roztocki <piotr@ki3photonics.com>",
    "download_url": "",
    "platform": null,
    "description": "<div align=\"center\">\n\n# ![GraphiQ](https://raw.githubusercontent.com/graphiq-dev/graphiq/main/docs/img/logos/logo.png)\n\n[![PyPI Version](https://img.shields.io/pypi/v/graphiq)](https://pypi.org/project/graphiq)\n[![Python Versions](https://img.shields.io/pypi/pyversions/graphiq)](https://pypi.org/project/graphiq)\n[![GitHub Workflow Status](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/ki3-qbt/graph-compiler/actions)\n[![Documentation Status](https://readthedocs.org/projects/graphiq/badge/?version=latest)](https://graphiq.readthedocs.io/en/latest/?badge=latest)\n[![arXiv Paper](https://img.shields.io/badge/arXiv-2402.09285-red)](https://arxiv.org/abs/2402.09285)\n[![arXiv Paper](https://img.shields.io/badge/arXiv-2401.00635-red)](https://arxiv.org/abs/2401.00635)\n[![codecov](https://codecov.io/gh/graphiq-dev/graphiq/branch/main/graph/badge.svg)](https://codecov.io/gh/graphiq-dev/graphiq)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n</div>\n\n<p align=\"center\" style=\"font-size:20px\">\n  GraphiQ is a Python library for the simulation, design, and optimization of quantum photonic circuits.\n</p>\n\n**GraphiQ** is an open-source framework for designing photonic graph state generation schemes. \nPhotonic graph states are an important resource for many quantum information processing tasks including quantum computing \nand quantum communication.\n\n## Features\n\n<img src=\"https://user-images.githubusercontent.com/87783633/198037273-06ec89cf-233d-4c08-9f7a-96313bfcb435.gif\" width=\"225px\" align=\"right\">\n\n* Diverse [backends](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/backends) for the simulation of noisy\n  quantum circuits comprised of hundreds of qubits.\n\n* Algorithms for the inverse design and optimization of circuits that output a desired quantum state.\n\n* Circuits support emitter and photonic qubits, as a basis for simulations of realistic near-term quantum photonic\n  devices.\n\n* Library of models for the study of [noise](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/noise) and\n  optical loss.\n\n## Installation\nGraphiQ can be installed from PyPI,\n```\npip install graphiq \n```\nThis package is built on top of the standard Python scientific computing ecosystem, including\n`networkx`, `numpy`, `matplotlib`, and `scipy`.\n\n## Getting started\nGraphiQ can simulate quantum circuits using the density matrix and stabilizer formalisms, \nand can identify circuits which generate a target quantum state. \nIn this example, we simulate a Bell state circuit and find a generating circuit for a 3-qubit linear cluster state.\n``` py\nimport graphiq as gq\nfrom graphiq.benchmarks.circuits import bell_state_circuit\nimport networkx as nx\n\n#%%\ncircuit, _ = bell_state_circuit()\nbackend = gq.StabilizerCompiler()\nstate = backend.compile(circuit)\nprint(state)\n\n#%%\ntarget = gq.QuantumState(data=nx.Graph([(1, 2), (2, 3)]), rep_type=\"g\")\nmetric = gq.Infidelity(target=target)\nsolver = gq.TimeReversedSolver(compiler=backend, metric=metric, target=target)\n\n#%%\nsolver.solve()\nscore, circuit = solver.result\ncircuit.draw_circuit()\n```\n\n\n## Overview\n\n* [`backends`](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/backends) - simulate a quantum circuit using\n  different state representations, including, the density matrix, stabilizer, and graph formalisms.\n* [`noise`](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/noise) - models for the study of noise and\n  optical loss in realistic quantum devices.\n* [`solvers`](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/solvers) - design and optimization algorithms that identifying\n  circuits satisfying which generate target quantum states.\n* [`benchmarks`](https://github.com/ki3-qbt/graph-compiler/tree/main/benchmarks) - a suite of automated tools for\n  benchmarking solvers and compilers, scaled to run on high-performance computing clusters.\n* [`visualizers`](https://github.com/ki3-qbt/graph-compiler/tree/main/graphiq/visualizers) - functions for plotting\n  backends and quantum circuits.\n* [`tests`](https://github.com/ki3-qbt/graph-compiler/tree/main/tests) - automated code testing framework\n\n\n## Documentation\nDocumentation can be found [here](https://graphiq.readthedocs.io/en/latest/?badge=latest).\nSee also \"GraphiQ: Quantum circuit design for photonic graph states\" (https://arxiv.org/abs/2402.09285),\nand \n\"Optimization of deterministic photonic graph state generation via local operations\" (https://arxiv.org/abs/2401.00635)\n\n## Acknowledgement\nVersion 0.1.0 was jointly developed by [Quantum Bridge Technologies, Inc. (\"Quantum Bridge\") ](https://qubridge.io/)\nand [Ki3 Photonics Technologies](https://www.ki3photonics.com/) \nunder the US Air Force Office of Scientific Research (AFOSR) Grant FA9550-22-1-0062.\n\n## Contributing\nQuantum Bridge continues to maintain and develop new versions of GraphiQ. Collaborations from the community are encouraged and welcomed.\n\n## License\nGraphiQ is licensed under an Apache License Version 2.0.\n\n## Citation\n```\n@article{\n  title={GraphiQ: Quantum circuit design for photonic graph states}, \n  author={Jie Lin and Benjamin MacLellan and Sobhan Ghanbari and Julie Belleville and Khuong Tran and Luc Robichaud and Roger G. Melko and Hoi-Kwong Lo and Piotr Roztocki},\n  year={2024},\n  eprint={2402.09285},\n  archivePrefix={arXiv},\n  primaryClass={quant-ph}\n}\n```\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "GraphiQ is a Python library for the simulation, design, and optimization of quantum photonic circuits.",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://graphiq.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/graphiq-dev/graphiq",
        "Issues": "https://github.com/graphiq-dev/graphiq/issues",
        "Repository": "https://github.com/graphiq-dev/graphiq.git"
    },
    "split_keywords": [
        "quantum",
        "photonic",
        "circuit",
        "design"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "839237156da8d53688d133f0a8d40b6f9dece6742bd2654dce2bf85491ab4fe9",
                "md5": "67b7c31ca7263e9e9ffa7cc22a05b489",
                "sha256": "8db6c6418a99d6229e040bc54cdf437d87970ce7c5534d8ade811565c7a0a422"
            },
            "downloads": -1,
            "filename": "graphiq-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "67b7c31ca7263e9e9ffa7cc22a05b489",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>3.8",
            "size": 7858,
            "upload_time": "2024-02-17T16:20:07",
            "upload_time_iso_8601": "2024-02-17T16:20:07.756684Z",
            "url": "https://files.pythonhosted.org/packages/83/92/37156da8d53688d133f0a8d40b6f9dece6742bd2654dce2bf85491ab4fe9/graphiq-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-17 16:20:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "graphiq-dev",
    "github_project": "graphiq",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "graphiq"
}
        
Elapsed time: 0.19125s