toqito -- Theory of quantum information toolkit
toqito -- Theory of quantum information toolkit: A Python package for studying quantum information - Published in JOSS (2021)
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
Keywords from Contributors
Scientific Fields
Repository
|toqito> (Theory of Quantum Information Toolkit) is a Python library for research in quantum information theory.
Basic Info
- Host: GitHub
- Owner: vprusso
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://toqito.readthedocs.io
- Size: 5.52 MB
Statistics
- Stars: 254
- Watchers: 11
- Forks: 114
- Open Issues: 69
- Releases: 12
Topics
Metadata Files
README.md
|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:
Johnston, Nathaniel and Russo, Vincent and Sikora, Jamie "Tight bounds for antidistinguishability and circulant sets of pure quantum states", Quantum 9, 1622, (2025).
Philip, Aby "On Multipartite Entanglement and Its Use", (2024).
Gupta, Tathagata and Mushid, Shayeef and Russo, Vincent and Bandyopadhyay, Somshubhro "Optimal discrimination of quantum sequences", Physical Review A, 110, 062426, (2024).
Bandyopadhyay, Somshubhro and Russo, Vincent "Distinguishing a maximally entangled basis using LOCC and shared entanglement", Physical Review A 110, 042406, (2024).
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).
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).
Philip, Aby and Rethinasamy, Soorya and Russo, Vincent and Wilde, Mark. "Quantum Steering Algorithm for Estimating Fidelity of Separability", Quantum 8, 1366, (2023).
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).
Casalé, Balthazar and Di Molfetta, Giuseppe and Anthoine, Sandrine and Kadri, Hachem. "Large-Scale Quantum Separability Through a Reproducible Machine Learning Lens", (2023).
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
Owner
- Name: Vincent Russo
- Login: vprusso
- Kind: user
- Location: Waterloo, ON
- Company: Modellicity
- Website: http://vprusso.github.io/
- Repositories: 67
- Profile: https://github.com/vprusso
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
Authors
ISARA Corporation, Modellicity Inc.
Tags
quantum information quantum computing entanglement nonlocal games matrix analysisCitation (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
Top Committers
| Name | 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... | ||
Committer Domains (Top 20 + Academic)
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
Pull Request Labels
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
- Documentation: https://pkg.go.dev/github.com/vprusso/toqito#section-documentation
- License: mit
-
Latest release: v1.1.2
published 8 months ago
Rankings
pypi.org: toqito
Python tools for the study of quantum information.
- Homepage: https://github.com/vprusso/toqito
- Documentation: https://toqito.readthedocs.io/
- License: BSD License
-
Latest release: 1.1.2
published 8 months ago
Rankings
Maintainers (1)
pypi.org: qustop
Python toolkit for studying quantum state optimization problems
- Homepage: https://github.com/vprusso/toqito
- Documentation: https://qustop.readthedocs.io/
- License: BSD License
-
Latest release: 0.0.3
published over 3 years ago
Rankings
Maintainers (1)
Dependencies
- 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
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- sphinx-rtd-theme ==2.0.0rc4
- sphinxcontrib-bibtex ==2.6.1
- sympy ==1.12
