Skip to main content

GraphiQ

PyPI Version Python Versions GitHub Workflow Status Documentation Status arXiv Paper arXiv Paper codecov Code style: black

GraphiQ is a Python library for the simulation, design, and optimization of quantum photonic circuits.

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

  • Diverse 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 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.

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 - simulate a quantum circuit using different state representations, including, the density matrix, stabilizer, and graph formalisms.
  • noise - models for the study of noise and optical loss in realistic quantum devices.
  • solvers - design and optimization algorithms that identifying circuits satisfying which generate target quantum states.
  • benchmarks - a suite of automated tools for benchmarking solvers and compilers, scaled to run on high-performance computing clusters.
  • visualizers - functions for plotting backends and quantum circuits.
  • tests - automated code testing framework

Documentation

Documentation can be found here. 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") and Ki3 Photonics Technologies 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}
}

Metadata

Release files for graphiq 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for graphiq 0.1.1
File Interpreter ABI Platform
graphiq-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / graphiq-0.1.1-py3-none-any.whl

Download URL graphiq-0.1.1-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
55826fab0fedb07d1ed74a8190195424dea56b7ddafaf74ca7e81d5e105f739a
BLAKE2b-256 checksum
How to use checksums
5e5d49660f4d32ff224534dbdfd2aca19440059b9e1827ecdcd947dd79557e41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.6

Security for graphiq 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page