toqito -- Theory of quantum information toolkit

toqito -- Theory of quantum information toolkit: A Python package for studying quantum information - Published in JOSS (2021)

https://github.com/vprusso/toqito

Science Score: 100.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 and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Committers with academic emails
    8 of 63 committers (12.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

convex-optimization linear linear-algebra matrix-analysis nonlocal-game physics python python-3 python3 quantum quantum-computing quantum-information quantum-information-science quantum-information-theory quantum-physics quantum-programming quantum-programming-language research semidefinite-programming unitaryhack

Keywords from Contributors

meshing standardization pde graph-theory correlation wavelets gravitational-lenses blackhole interpretability hydrology

Scientific Fields

Mathematics Computer Science - 37% confidence
Last synced: 4 months ago · JSON representation ·

Repository

|toqito> (Theory of Quantum Information Toolkit) is a Python library for research in quantum information theory.

Basic Info
Statistics
  • Stars: 254
  • Watchers: 11
  • Forks: 114
  • Open Issues: 69
  • Releases: 12
Topics
convex-optimization linear linear-algebra matrix-analysis nonlocal-game physics python python-3 python3 quantum quantum-computing quantum-information quantum-information-science quantum-information-theory quantum-physics quantum-programming quantum-programming-language research semidefinite-programming unitaryhack
Created almost 6 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Citation

README.md

# |toqito⟩: Theory of Quantum Information Toolkit [![build status](https://github.com/vprusso/toqito/actions/workflows/build-test-actions.yml/badge.svg)](https://github.com/vprusso/toqito/actions/workflows/build-test-actions.yml) [![doc status](https://readthedocs.org/projects/toqito/badge/?version=latest)](https://toqito.readthedocs.io/en/latest/) [![codecov](https://codecov.io/gh/vprusso/toqito/branch/master/graph/badge.svg)](https://codecov.io/gh/vprusso/toqito) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4743211.svg)](https://doi.org/10.5281/zenodo.4743211) [![Downloads](https://static.pepy.tech/personalized-badge/toqito?style=platic&period=total&units=none&left_color=black&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/toqito) [![Unitary Foundation](https://img.shields.io/badge/Supported%20By-Unitary%20Foundation-FFFF00.svg)](https://unitary.foundation) The |toqito⟩ package is an open-source Python library for studying various objects in quantum information, namely, states, channels, and measurements.

Documentation

|toqito⟩ focuses on providing numerical tools to study problems about entanglement theory, nonlocal games, matrix analysis, and other aspects of quantum information that are often associated with computer science.

|toqito⟩ aims to fill the needs of quantum information researchers who want numerical and computational tools for manipulating quantum states, measurements, and channels. It can also be used as a tool to enhance the experience of students and instructors in classes about quantum information.

Installing

|toqito⟩ is available via PyPi for Linux, and macOS, with support for Python 3.10 to 3.12.

sh pip install toqito

Examples

Full documentation, along with specific examples and tutorials, is provided here: https://toqito.readthedocs.io/.

Chat with us in our |toqito⟩ channel on Discord.

Example: Nonlocal games

Nonlocal games are a mathematical framework that abstractly models a physical system. The CHSH game is a subtype of nonlocal game referred to as an XOR game that characterizes the seminal CHSH inequality.

For XOR games, there exist optimization problems (that are provided via |toqito⟩) that one can compute to attain the optimal values of such games when the players use either a classical or quantum strategy.

```python

Calculate the classical and quantum value of the CHSH game.

import numpy as np from toqito.nonlocalgames.xorgame import XORGame

The probability matrix.

prob_mat = np.array([[1/4, 1/4], [1/4, 1/4]])

The predicate matrix.

pred_mat = np.array([[0, 0], [0, 1]])

Define CHSH game from matrices.

chsh = XORGame(probmat, predmat)

chsh.classical_value()

0.75

chsh.quantum_value()

0.8535533

``` Indeed, using a quantum strategy for the CHSH game gives the known optimal result of $\frac{1}{4}\left(2 + \sqrt{2}\right) \approx 0.8535...$

Example: Quantum state distinguishability

Quantum state distinguishability is a fundamental task in quantum information theory. Consider the set of four Bell states:

$$ \begin{equation} \begin{aligned} |\psi0\rangle = \frac{1}{\sqrt{2}} \left(|00\rangle + |11\rangle\right), \quad |\psi1\rangle = \frac{1}{\sqrt{2}} \left(|00\rangle - |11\rangle\right), \ |\psi2\rangle = \frac{1}{\sqrt{2}} \left(|01\rangle + |10\rangle\right), \quad |\psi3\rangle = \frac{1}{\sqrt{2}} \left(|01\rangle - |10\rangle\right). \end{aligned} \end{equation} $$

The optimal probability of globally distinguishing the four Bell states (assuming an equal weighting of probability) is 1 (i.e., it can be performed perfectly). However, under a more restrictive set of measurements (such as PPT measurement operators), the optimal probability of distinguishing the four Bell states using PPT operators is 1/2.

|toqito⟩ offers a wide suite of functionality for computing the distinguishability of quantum states:

```python from toqito.states import bell from toqito.stateopt import statedistinguishability, ppt_distinguishability

Define the set of states as the four Bell states:

states = [bell(0), bell(1), bell(2), bell(3)]

Distinguishing four Bell states (global measurements): 0.9999999999767388

posres, _ = statedistinguishability(states) print(f"Distinguishing four Bell states (global measurements): {pos_res}")

Distinguishing four Bell states (PPT measurements): 0.5000000000098367

pptres, _ = pptdistinguishability(states, subsystems=[0], dimensions=[2, 2]) print(f"Distinguishing four Bell states (PPT measurements): {ppt_res}") ```

Consult the tutorials for additional examples and information.

Testing

The pytest module is used for testing. To run the suite of tests for |toqito⟩, run the following command in the root directory of this project.

pytest --cov-report term-missing --cov=toqito

Citing

You can cite |toqito⟩ using the following DOI: 10.5281/zenodo.4743211

If you are using the |toqito⟩ software package in research work, please include an explicit mention of |toqito⟩ in your publication. Something along the lines of:

To solve problem "X", we used |toqito⟩; a package for studying certain aspects of quantum information.

A BibTeX entry that you can use to cite |toqito⟩ is provided here:

bib @misc{toqito, author = {Vincent Russo}, title = {toqito: A {P}ython toolkit for quantum information}, howpublished = {\url{https://github.com/vprusso/toqito}}, month = May, year = 2021, doi = {10.5281/zenodo.4743211} }

Research

The |toqito⟩ project is, first and foremost, a quantum information theory research tool. Consult the following open problems wiki page for a list of certain solved and unsolved problems in quantum information theory in which |toqito⟩ could be potentially helpful in probing. Feel free to add to this list and/or contribute solutions!

The |toqito⟩ project has been used or referenced in the following works:

  • a Johnston, Nathaniel and Russo, Vincent and Sikora, Jamie "Tight bounds for antidistinguishability and circulant sets of pure quantum states", Quantum 9, 1622, (2025).

  • a Philip, Aby "On Multipartite Entanglement and Its Use", (2024).

  • a Almasi, Ali "Quantum Guessing Games", (2024).

  • a Gupta, Tathagata and Mushid, Shayeef and Russo, Vincent and Bandyopadhyay, Somshubhro "Optimal discrimination of quantum sequences", Physical Review A, 110, 062426, (2024).

  • a Bandyopadhyay, Somshubhro and Russo, Vincent "Distinguishing a maximally entangled basis using LOCC and shared entanglement", Physical Review A 110, 042406, (2024).

  • a Tavakoli, Armin and Pozas-Kerstjens, Alejandro and Brown, Peter and Araújo, Mateus "Semidefinite programming relaxations for quantum correlations", Reviews of Modern Physics, Volume 96, (2024).

  • a Pelofske, Elijah and Bartschi, Andreas and Eidenbenz, Stephan and Garcia, Bryan and Kiefer, Boris "Probing Quantum Telecloning on Superconducting Quantum Processors", IEEE Transactions on Quantum Engineering, (2024).

  • a Philip, Aby and Rethinasamy, Soorya and Russo, Vincent and Wilde, Mark. "Quantum Steering Algorithm for Estimating Fidelity of Separability", Quantum 8, 1366, (2023).

  • a Miszczak, Jarosław Adam. "Symbolic quantum programming for supporting applications of quantum computing technologies", Companion Proceedings of the 7th International Conference on the Art, Science, and Engineering of Programming, (2023).

  • a Casalé, Balthazar and Di Molfetta, Giuseppe and Anthoine, Sandrine and Kadri, Hachem. "Large-Scale Quantum Separability Through a Reproducible Machine Learning Lens", (2023).

  • a Russo, Vincent and Sikora, Jamie "Inner products of pure states and their antidistinguishability", Physical Review A, Vol. 107, No. 3, (2023).

Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

A detailed overview of how to contribute can be found in the contributing guide.

License

MIT License

Owner

  • Name: Vincent Russo
  • Login: vprusso
  • Kind: user
  • Location: Waterloo, ON
  • Company: Modellicity

BS, MS, and PhD in computer science. Software engineer focused on quantum computing. Metalhead guitar player.

JOSS Publication

toqito -- Theory of quantum information toolkit: A Python package for studying quantum information
Published
May 09, 2021
Volume 6, Issue 61, Page 3082
Authors
Vincent Russo
ISARA Corporation, Modellicity Inc.
Editor
Jack Poulson ORCID
Tags
quantum information quantum computing entanglement nonlocal games matrix analysis

Citation (CITATION.bib)

@article{russo2021toqito,
  title={toqito--Theory of quantum information toolkit: A Python package for studying quantum information},
  author={Russo, Vincent},
  journal={Journal of Open Source Software},
  volume={6},
  number={61},
  pages={3082},
  year={2021}
}

GitHub Events

Total
  • Create event: 150
  • Commit comment event: 7
  • Release event: 2
  • Delete event: 150
  • Member event: 1
  • Pull request event: 550
  • Fork event: 66
  • Issues event: 241
  • Watch event: 119
  • Issue comment event: 1,628
  • Push event: 563
  • Gollum event: 49
  • Pull request review comment event: 1,568
  • Pull request review event: 1,117
Last Year
  • Create event: 150
  • Commit comment event: 7
  • Release event: 2
  • Delete event: 150
  • Member event: 1
  • Pull request event: 550
  • Fork event: 66
  • Issues event: 241
  • Watch event: 119
  • Issue comment event: 1,628
  • Push event: 563
  • Gollum event: 49
  • Pull request review comment event: 1,568
  • Pull request review event: 1,117

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 1,903
  • Total Committers: 63
  • Avg Commits per committer: 30.206
  • Development Distribution Score (DDS): 0.528
Past Year
  • Commits: 671
  • Committers: 31
  • Avg Commits per committer: 21.645
  • Development Distribution Score (DDS): 0.675
Top Committers
Name Email Commits
Vincent Russo v****1@g****m 898
dependabot[bot] 4****] 393
Purva Thakre 6****e 136
Shivansh Mittal s****8@i****n 65
victor-onofre v****8@g****m 46
poig l****g@g****m 45
Vanzilar p****1@c****u 34
georgios-ts t****s@y****r 27
ankit-pn m****h@g****m 22
Davide Facoetti d****t@g****m 21
Julius W j****r@w****k 19
oxana o****a@r****e 17
Bchass 3****s 14
Elad e****j@c****l 12
dvdllrch d****h@g****m 12
Tristan NEMOZ 3****z 11
Rajdeep Aher 7****r 9
Wilson y****u@u****a 9
Ryan Bijoy r****y@R****l 8
raphael r****h@g****m 7
Nafisa Shamim Rafa 1****g 6
sebgrijalva s****a@g****m 6
Clinch Leatherwood 7****0 5
Ashish Panigrahi a****i@p****m 5
RohitP2005 r****3@g****m 4
Aleksandr Berezutskii a****i@s****u 4
ErikQQY 2****3@q****m 4
Ryan Prior r****r@h****m 4
Vincent Russo v****o@m****n 4
Karthik Nandigama 1****k 3
and 33 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 390
  • Total pull requests: 1,422
  • Average time to close issues: 4 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 22
  • Total pull request authors: 73
  • Average comments per issue: 2.52
  • Average comments per pull request: 2.52
  • Merged pull requests: 1,147
  • Bot issues: 6
  • Bot pull requests: 730
Past Year
  • Issues: 156
  • Pull requests: 711
  • Average time to close issues: 9 days
  • Average time to close pull requests: 5 days
  • Issue authors: 17
  • Pull request authors: 44
  • Average comments per issue: 2.46
  • Average comments per pull request: 3.21
  • Merged pull requests: 513
  • Bot issues: 4
  • Bot pull requests: 344
Top Authors
Issue Authors
  • purva-thakre (174)
  • vprusso (163)
  • poig (8)
  • tnemoz (7)
  • AbdullahKazi500 (7)
  • dependabot[bot] (6)
  • dding7293 (3)
  • CreativeBinBag (3)
  • Shivansh20128 (3)
  • Bchass (2)
  • RajdeepAher (2)
  • dvdllrch (2)
  • Kritika75 (1)
  • jyotiraj-code (1)
  • gharib85 (1)
Pull Request Authors
  • dependabot[bot] (729)
  • purva-thakre (190)
  • vprusso (163)
  • RajdeepAher (31)
  • CreativeBinBag (30)
  • ryanbijoy (18)
  • Shivansh20128 (18)
  • Bchass (17)
  • georgios-ts (13)
  • jyotiraj-code (12)
  • tnemoz (12)
  • Wilson123d (11)
  • jajapuramshivasai (10)
  • RohitP2005 (10)
  • Abhishek2634 (10)
Top Labels
Issue Labels
good first issue (146) feature request (66) enhancement (56) documentation (56) non-quantum (43) bug (28) help wanted (23) devops (23) dependencies (13) examples gallery (13) refactor (12) unitaryhack (6) python (6) github_actions (4) unitaryHACK 2024 (4) macOS (2) external-solution (2) unitaryhack-bounty (2) pytest (1)
Pull Request Labels
dependencies (729) python (719) github_actions (11) enhancement (6) feature request (4) documentation (3) examples gallery (1) devops (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 124 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 33
  • Total maintainers: 1
proxy.golang.org: github.com/vprusso/toqito
  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 4 months ago
pypi.org: toqito

Python tools for the study of quantum information.

  • Versions: 20
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 120 Last month
Rankings
Forks count: 6.2%
Stargazers count: 6.5%
Dependent packages count: 10.1%
Average: 12.6%
Downloads: 18.6%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 4 months ago
pypi.org: qustop

Python toolkit for studying quantum state optimization problems

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 4 Last month
Rankings
Forks count: 6.2%
Stargazers count: 6.6%
Dependent packages count: 10.1%
Dependent repos count: 21.6%
Average: 22.3%
Downloads: 66.9%
Maintainers (1)
Last synced: 4 months ago

Dependencies

pyproject.toml pypi
  • black ^21.10b0 develop
  • coverage ^4.5 develop
  • coveralls ^1.9 develop
  • distlib ^0.3.4 develop
  • flake8 ^3.7 develop
  • flake8-docstrings ^1.5 develop
  • ipython * develop
  • isort ^5.9.3 develop
  • mypy ^0.750.0 develop
  • myst-parser * develop
  • pep8 ^1.7 develop
  • pydocstyle ^6.1.1 develop
  • pylint ^2.4 develop
  • pytest * develop
  • pytest-cov * develop
  • setuptools <=57.5.0 develop
  • sphinx 3.1.2 develop
  • sphinx_rtd_theme * develop
  • cvxopt ^1.2.5
  • cvxpy ^1.2.1
  • numpy ^1.19.4
  • picos ^2.0.30
  • python >=3.9,<3.11
  • scipy ^1.8.0
.github/workflows/build-test-actions.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
setup.py pypi
docs/requirements.txt pypi
  • sphinx-rtd-theme ==2.0.0rc4
  • sphinxcontrib-bibtex ==2.6.1
  • sympy ==1.12