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()
vc = vc.fit(X_training, y_training)
predictions_validation = 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-2.0.2.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file tno.quantum.ml.classifiers.vc-2.0.2.tar.gz.

File metadata

File hashes

Hashes for tno.quantum.ml.classifiers.vc-2.0.2.tar.gz
Algorithm Hash digest
SHA256 b478d02e5fcdba87cb60cddd307100bbe05e32a12903931664abf1978d5cdbb9
MD5 f2edda4cfb5f82711b444e8611237533
BLAKE2b-256 29f5b2afb8b3ebe18975fd170bdc17f222a149f69c1facfc6fbac0485acbed78

See more details on using hashes here.

File details

Details for the file tno.quantum.ml.classifiers.vc-2.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for tno.quantum.ml.classifiers.vc-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7b8b021a6bb640ec06d2ac04d58acfda7b0f00c639780fe5648384f16e077e62
MD5 9f3363e0f6f1267349a92b235014d7d6
BLAKE2b-256 22799f294f49a640cd6254d43e41dc330719ff16fb488eecc9a58d99feb71ec3

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