Skip to main content

A software framework to speed up the research in quantum machine learning

Project description

QuASK Made at CERN! Made at CERN! Made at CERN!

Quantum Advantage Seeker with Kernel

QuASK is a quantum machine learning software written in Python that supports researchers in designing, experimenting, and assessing different quantum and classic kernels performance. This software is package agnostic and can be integrated with all major quantum software packages (e.g. IBM Qiskit, Xanadu’s Pennylane, Amazon Braket).

QuASK guides the user through a simple preprocessing of input data, definition and calculation of quantum and classic kernels, either custom or pre-defined ones. From this evaluation the package provide an assessment about potential quantum advantage and prediction bounds on generalization error.

Beyond theoretical framing, it allows for the generation of parametric quantum kernels that can be trained using gradient-descent-based optimization, grid search, or genetic algorithms. Projected quantum kernels, an effective solution to mitigate the curse of dimensionality induced by the exponential scaling dimension of large Hilbert spaces, is also calculated. QuASK can also generate the observable values of a quantum model and use them to study the prediction capabilities of the quantum and classical kernels.

The initial release is accompanied by the journal article "QuASK - Quantum Advantage Seeker with Kernels" available on arxiv.org.

Documentation

The documentation for QuASK can be accessed on the website Read The Docs.

Installation

The software has been tested on Python 3.9.10. We recommend using this version or a newer one.

The library is available on the Python Package Index (PyPI) with pip install quask.

Usage

Use quask as a library of software components

QuASK can be used as a library to extend your own software. Check if everything's working with:

import numpy as np
import quask.metrics
A = np.array([[1,2], [3,4]])
B = np.array([[5,6], [7,8]])
print(quask.metrics.calculate_frobenius_inner_product(A, B))  # 70

Use quask as a command-line interface tool

QuASK can be used as a command-line interface to analyze the dataset with the kernel methods. These are the commands implemented so far.

To retrieve the datasets available:

$ python3.9 -m quask get-dataset

To preprocess a dataset:

$ python3.9 -m quask preprocess-dataset

To analyze a dataset using quantum and classical kernels:

$ python3.9 -m quask apply-kernel

To create some plot of the property related to the generated Gram matrices:

$ python3.9 -m quask plot-metric --metric accuracy --train-gram training_linear_kernel.npy --train-y Y_train.npy --test-gram testing_linear_kernel.npy --test-y Y_test.npy --label linear

Credits

Please cite the work using the following Bibtex entry:

@article{https://doi.org/10.48550/arxiv.2206.15284,
  doi = {10.48550/ARXIV.2206.15284},
  url = {https://arxiv.org/abs/2206.15284},
  author = {Di Marcantonio, Francesco and Incudini, Massimiliano and Tezza, Davide and Grossi, Michele},
  keywords = {Quantum Physics (quant-ph), Machine Learning (cs.LG), FOS: Physical sciences, FOS: Physical sciences, FOS: Computer and information sciences, FOS: Computer and information sciences},
  title = {QuASK -- Quantum Advantage Seeker with Kernels},
  publisher = {arXiv},
  year = {2022},
  copyright = {Creative Commons Attribution 4.0 International}
}

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-1.0.2.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

quask-1.0.2-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file quask-1.0.2.tar.gz.

File metadata

  • Download URL: quask-1.0.2.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for quask-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b7139ad6237f061c6325bb44f200cafd6a97ec8a2453662065d14ae775951fd4
MD5 99f583f70ee9bec597ff9e03521dfc64
BLAKE2b-256 4db1a31b498da09c209bbd2f0df6380e402260e6f45aaa8b241573b93e09e6da

See more details on using hashes here.

File details

Details for the file quask-1.0.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for quask-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 112686e4afbf4ca59589123ea780f488a81e366df9ad9d944752750c812df877
MD5 ec6f36edd96ec0bd4371bdea042370f0
BLAKE2b-256 6fac327c494232ad738169954fa14445238609c7bca9937a7749eb5f830b7d79

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