Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

This package provides a library to define, train and deploy Quantum Machine Learning models.

This library has been used to train a qmodel with the Iris flower dataset on IBM quantum computers: iris.entropicalabs.io

The quantum circuits can run on top of any quantum computer provider. As for now, it implements interfaces for a fast simulator, manyq, and Qiskit.

Installation

From PyPI, at the command line:

pip install polyadicqml

Installing latest stable from github:

git clone https://github.com/entropicalabs/polyadicQML.git polyadicqml
cd polyadicqml
pip install -U .

Documentation

You can find a quickstart guide, the tutorial and the module references in the docs.

Sample code

Training a model on a simulator and testing it on a real quantum computer can be done in a few lines:

# Define the circuit structure
make_circuit(bdr, x, params):
   ...

# Prepare a circuit simulator:

qc = mqCircuitML(make_circuit=make_circuit,
                 nbqbits=nbqbits, nbparams=nbparams)

# Instanciate and train the model

model = Classifier(qc, bitstr).fit(input_train, target_train)

# Prepare to run the circuit on an IBMq machine:

backend = Backends("ibmq_ourense", hub="ibm-q")

qc2 = qkCircuitML(
   make_circuit=make_circuit,
   nbqbits=nbqbits, nbparams=nbparams,
   backend=backend
)

# Change the model backend and run it
model.set_circuit(qc2)
model.nbshots = 300
model.job_size = 30

pred_test = model(input_test)

You can find out more in the documentation, where you will find tutorials and examples. A quickstart through examples can be found in the examples folder, as well as on the website. As an introduction to the algorithm you can check out this video presentation.

Metadata

Release files for polyadicqml 0.1.0b4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polyadicqml 0.1.0b4
File Size Uploaded Provenance
polyadicqml-0.1.0b4.tar.gz 19.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for polyadicqml 0.1.0b4
File Interpreter ABI Platform
polyadicqml-0.1.0b4-py3-none-any.whl Python 3 none any Details

Total release size: 46.5 kB

Release files / polyadicqml-0.1.0b4.tar.gz

Download URL polyadicqml-0.1.0b4.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
12f6e43514a13fadaa5d3c3b9454836eb70a4a2265c503c5faca8373ec6fa560
BLAKE2b-256 checksum
How to use checksums
816e1130a90e255da44fa994ba7343f48ee08e63b1510c648975d47f061c5594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Release files / polyadicqml-0.1.0b4-py3-none-any.whl

Download URL polyadicqml-0.1.0b4-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
632f03dd14dd8003f81b06fa3bb12b7487c94ae8ce9d8e59330b10f03522a62c
BLAKE2b-256 checksum
How to use checksums
a2755f19e27330a9141002277a0b5fae784b8bbe2fd03387aeb69e748d5eb2bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

Security for polyadicqml 0.1.0b4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page