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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tno_quantum_ml_classifiers_vc-3.0.1.tar.gz.
File metadata
- Download URL: tno_quantum_ml_classifiers_vc-3.0.1.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cef824ffaf320778d086e6de3d6990f8e3cb28471520edfc3aa68a9bdc89a6d
|
|
| MD5 |
1b3dbadc0020654d55d4ea361afe28d5
|
|
| BLAKE2b-256 |
9e954d95ec3dc851c674050d22d39f2ea22f94fba5f2bd8eea6260ac0bf2fbf8
|
File details
Details for the file tno_quantum_ml_classifiers_vc-3.0.1-py3-none-any.whl.
File metadata
- Download URL: tno_quantum_ml_classifiers_vc-3.0.1-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26c4864654cb767037e32d1c52950dd8605afdae9804aa2a000619979ad4ce02
|
|
| MD5 |
c014595bedbd7f3b1ea62aa6b18d288a
|
|
| BLAKE2b-256 |
9dde522168c162d43dc872cc2d2b7201703eec517882e99dc14a0a2536206486
|