Skip to main content

Python tools for the study of quantum information.

Project description

build status doc status codecov DOI Downloads Unitary Fund

toqito: Theory of Quantum Information Toolkit

The toqito package is an open-source Python library for studying various objects in quantum information, namely, states, channels, and measurements.

Documentation

Specifically, 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.

Getting Started

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

(venv) $ pip install toqito

The following code gives an example on the usage:

# Calculate the classical and quantum value of the CHSH game.
import numpy as np
from toqito.nonlocal_games.xor_game 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(prob_mat, pred_mat)

chsh.classical_value()
# 0.75
chsh.quantum_value()
# 0.8535533

Detailed documentation on all available methods, options, and input formats is available at ReadTheDocs.

Using

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

More information can also be found on the following toqito homepage.

Chat with us in our toqito channel on Discord.

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:

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

References

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

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

  • a Tavakoli, Armin and Pozas-Kerstjens, Alejandro and Brown, Peter and Araújo, Mateus "Semidefinite programming relaxations for quantum correlations", (2023).

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

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

  • 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.", (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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toqito-1.1.0.tar.gz (211.4 kB view details)

Uploaded Source

Built Distribution

toqito-1.1.0-py3-none-any.whl (367.8 kB view details)

Uploaded Python 3

File details

Details for the file toqito-1.1.0.tar.gz.

File metadata

  • Download URL: toqito-1.1.0.tar.gz
  • Upload date:
  • Size: 211.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for toqito-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6a1121f1d086ed45b62ee96328f5af03d4ceae04028e73f4164dbb6f29540787
MD5 27cb374fe9f50ef92584c1f70c862bb0
BLAKE2b-256 6ce3a82d1c401b840e99594bd2143adb68d7edbba7e1581da143f11f5a598905

See more details on using hashes here.

File details

Details for the file toqito-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: toqito-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 367.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for toqito-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bece714022fb47095aa9e970faf10dc34de0d041e086edf05f77462d45b69360
MD5 c626ed2b9ca2b29b78220f46118a4a59
BLAKE2b-256 9e8fa9af2690679ef5254112aafbb4f521568f955985036573c323f08b7076d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page