Skip to main content

Quantum Advantage Seeker with Kernels (QuASK): a software framework to speed up the research in quantum machine learning

Project description

Quantum Advantage Seeker with Kernels (QuASK)

QuASK is an actively maintained library for constructing, studying, and benchmarking quantum kernel methods.

It is designed to simplify the process of choosing a quantum kernel, automate the machine learning pipeline at all its stages, and provide pedagogical guidance for early-stage researchers to utilize these tools to their full potential.

QuASK promotes the use of reusable code and is available as a library that can be seamlessly integrated into existing code bases. It is written in Python 3, can be easily installed using pip, and is accessible on PyPI.

Homepage: quask.web.cern.ch

Documentation: quask.readthedocs.io

Installation

The easiest way to use quask is by installing it in your Python3 environment (version >= 3.10) via the pip packet manager,

python3 -m pip install -U quask==2.0.0-alpha1

You also need any quantum SDK installed on your system. For example, we can install Qiskit (but we can also work with Pennylane, Braket, Qibo, and the modular nature of the software allows the creation of your own custom backends).

python3 -m pip install qiskit qiskit_ibm_runtime
python3 -m pip install qiskit_ibm_runtime --upgrade
python3 -m pip install qiskit-aer

See the Installation section of our documentation page for more information.

Examples

The fastest way to start developing using quask is via our Getting started guide.

If you are not familiar with the concept of kernel methods in classical machine learning, we have developed a series of introductory tutorials on the topic.

If you are not familiar with the concept of quantum kernels, we have developed a series of introductory tutorials on the topic, which is also used to showcase the basic functionalities of quask.

Then advanced features of quask are shown, including the use of different backends, the criteria to evaluate a quantum kernel, and the automatic optimization approach.

Finally, look here for some applications.

Source

Deployment to PyPI

The software is uploaded to PyPI.

Test

The suite of test for quask is currently under development.To run the available tests, type

pytest

You can also specify specific test scripts.

pytest tests/test_example.py

quask has been developed and tested with the following versions of the quantum frameworks:

  • PennyLane==0.32.0
  • PennyLane-Lightning==0.32.0
  • qiskit==0.44.1
  • qiskit-aer==0.12.2
  • qiskit-ibm-runtime==0.14.0

Documentation

The documentation is available at our Read the Docs domain.

Generate the documentation

The documentation has been generated with Sphinx (v7.2.6) and uses the Furo theme. To install it, run

python3 -m pip install -U sphinx
python3 -m pip install furo

To generate the documentation, run

cd docs
make clean && make html

The Sphinx configuration file (conf.py) has the following, non-standard options:

html_theme = 'furo'
html_theme_options = {
    "sidebar_hide_name": True
}
autodoc_mock_imports = ["skopt", "skopt.space", "django", "mushroom_rl", "opytimizer", "pennylane", "qiskit", "qiskit_ibm_runtime", "qiskit_aer"]

Generate the UML diagrams

Currently, the pages generated from the Python notebooks has to be compiled to RST format manually. We could use in the future the nbsphinx extension to automatize this process. This has the advantage that the documentation is always up to date, the disadvantage is that the process is much slower.

Generate the UML diagrams

The UML diagrams in the Platform overview page of the documentation are generated using pyreverse and Graphviz. They can be installed via:

sudo apt-get install graphviz
python3 -m pip install pylint

The UML diagrams are created via:

cd src/quask
pyreverse -o png -p QUASK .

Acknowledgements

The platform has been developed with the contribution of Massimiliano Incudini, Francesco Di Marcantonio, Davide Tezza, Roman Wixinger, Sofia Vallecorsa, and Michele Grossi.

If you have used quask for your project, please consider citing us.

@article{dimarcantonio2023quask,
    title={Quantum Advantage Seeker with Kernels (QuASK): a software framework to accelerate research in quantum machine learning},
    author={Di Marcantonio, Francesco and Incudini, Massimiliano and Tezza, Davide and Grossi, Michele},
    journal={Quantum Machine Intelligence},
    volume={5},
    number={1},
    pages={20},
    year={2023},
    publisher={Springer}
}

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

quask-2.0.2a2.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

quask-2.0.2a2-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file quask-2.0.2a2.tar.gz.

File metadata

  • Download URL: quask-2.0.2a2.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for quask-2.0.2a2.tar.gz
Algorithm Hash digest
SHA256 bf8e165e0fea9ca9198dc9d1b8d5e201d440d5f884f6687ec9c8ddf86fde9f69
MD5 9185b35cbafbb15381ccd1be23bd1dcf
BLAKE2b-256 846c2bfb8696bcb733eae5c434a79a6b0e138997e816d68a310fafa88eb4a487

See more details on using hashes here.

File details

Details for the file quask-2.0.2a2-py3-none-any.whl.

File metadata

  • Download URL: quask-2.0.2a2-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for quask-2.0.2a2-py3-none-any.whl
Algorithm Hash digest
SHA256 efbd15ba6be14d80742be41ad6187d3ad47f17b6bb5e9e7e309043333d13b3d4
MD5 e513a3277fbd3cad6905936efce94f04
BLAKE2b-256 258d9efacd5b0ce465862de93d7f44777b346ccd0881c85098946d53b4d3bba1

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