Skip to main content

Quantum VC module

Project description

TNO Quantum: Variational classifier

TNO Quantum provides generic software components aimed at facilitating the development of quantum applications.

The tno.quantum.ml.classifiers.vc package provides a VariationalClassifier class, which has been implemented in accordance with the scikit-learn estimator API. This means that the classifier can be used as any other (binary and multiclass) scikit-learn classifier and combined with transforms through Pipelines. In addition, the VariationalClassifier makes use of PyTorch tensors, optimizers, and loss functions.

Limitations in (end-)use: the content of this software package may solely be used for applications that comply with international export control laws.

Documentation

Documentation of the tno.quantum.ml.classifiers.vc package can be found here.

Install

Easily install the tno.quantum.ml.classifiers.vc package using pip:

$ python -m pip install tno.quantum.ml.classifiers.vc

If you wish to run the tests you can use:

$ python -m pip install 'tno.quantum.ml.classifiers.vc[tests]'

Example

Here's an example of how the VariationalClassifier class can be used for classification based on the Iris dataset: Note that tno.quantum.ml.datasets is required for this example.

from tno.quantum.ml.classifiers.vc import VariationalClassifier
from tno.quantum.ml.datasets import get_iris_dataset

X_training, y_training, X_validation, y_validation = get_iris_dataset()
vc = VariationalClassifier().fit(X_training, y_training, n_iter=5)
predictions = vc.predict(X_validation)

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

tno_quantum_ml_classifiers_vc-3.0.1.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tno_quantum_ml_classifiers_vc-3.0.1-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file tno_quantum_ml_classifiers_vc-3.0.1.tar.gz.

File metadata

File hashes

Hashes for tno_quantum_ml_classifiers_vc-3.0.1.tar.gz
Algorithm Hash digest
SHA256 0cef824ffaf320778d086e6de3d6990f8e3cb28471520edfc3aa68a9bdc89a6d
MD5 1b3dbadc0020654d55d4ea361afe28d5
BLAKE2b-256 9e954d95ec3dc851c674050d22d39f2ea22f94fba5f2bd8eea6260ac0bf2fbf8

See more details on using hashes here.

File details

Details for the file tno_quantum_ml_classifiers_vc-3.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tno_quantum_ml_classifiers_vc-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26c4864654cb767037e32d1c52950dd8605afdae9804aa2a000619979ad4ce02
MD5 c014595bedbd7f3b1ea62aa6b18d288a
BLAKE2b-256 9dde522168c162d43dc872cc2d2b7201703eec517882e99dc14a0a2536206486

See more details on using hashes here.

Supported by

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