Skip to main content

Online quantum machine learning package, using PyTorch.

Project description

online-qml

online-qml is a PyTorch based package for quantum extreme learning machines (QELM) simulations. It is with online shadow training readouts.

The distribution name is online-qml; the import name is online_qml.

Current focus

  • generate Haar pure states and random Naimark POVMs;
  • train OST/A-OST/prior-frame readout layers;
  • train dense pseudoinverse/ridge baselines;
  • evaluate Haar bias, variance and exact-probability MSE;
  • study state-frame and measurement-frame distances.

Minimal example

import torch
from online_qml.quantum import sample_dm, sample_povm, shots_outcome
from online_qml.estimators import ShadowReadoutEstimator

states = sample_dm(1000, d=2, dtype=torch.cdouble)
povm = sample_povm(16, d=2, dtype=torch.cdouble)
outcomes = shots_outcome(povm, states, shots=1)
obs = sample_dm(1, d=2, dtype=torch.cdouble).T

est = ShadowReadoutEstimator(n_out=16, d=2, dtype=torch.float64)
est.update_single_shot(outcomes[:, 0], states)
W_ost = est.layer(obs)
W_aost = est.layer(obs, adaptive_state=True)

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

online_qml-0.1.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

online_qml-0.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file online_qml-0.1.0.tar.gz.

File metadata

  • Download URL: online_qml-0.1.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for online_qml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eb902ea81a5a17024fe78589d6dfa08aef8ce7845c783446dbc2d6d953f4ea1a
MD5 e7664b2cfab9badff959d2bbe216ff40
BLAKE2b-256 df7138a833a5cd9c97abd7615990b174d4811c26f9c6fbae92e490ccf391bd4a

See more details on using hashes here.

File details

Details for the file online_qml-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: online_qml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for online_qml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 865ecd56930f664036b0b5b25c9c49841df1278c011b8b9632a7a1a9319f693d
MD5 a376643dfd9e0d1222e4a35931fb88aa
BLAKE2b-256 0e28cad12d918055175950e10e108465dfbf5dadf0b38797f3d8b5ca4b6ac244

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