PennyLane Plugin for OQC QCaaS
Project description
pennylane-oqc
PennyLane plugin for OQC QCaaS devices
Build and Install
poetry build
Developer Setup
poetry install
ExperimentalConfig
ExperimentalConfig is a drop-in replacement for CompilerConfig that lets you attach backend-specific (Toshiko-fermioniq simulator) settings—like enabling noise, supplying a noise model, or setting a tensor-network bond dimension—without changing the rest of your workflow.
It forwards standard compiler fields (e.g., repeats, results_format, optimizations) and adds noise, bond_dimension, and noise_model.
Install the extra dependencies with: pip install 'oqc-qcaas-client[experimental]'. This will install extra qcshared package which is necessary for the noise-model definition
from qcaas_client.client import OQCClient, QPUTask, ExperimentalConfig
from compiler_config.config import QuantumResultsFormat, Tket, TketOptimizations
client = OQCClient(url=OQC_URL, authentication_token=OQC_AUTH_TOKEN)
opts = Tket(); opts.tket_optimizations = TketOptimizations.Two
config = ExperimentalConfig(
repeats=1000,
results_format=QuantumResultsFormat().binary_count(),
optimizations=opts, # same as CompilerConfig
noise=True, # enable noisy execution
bond_dimension=64, # TN simulator control (if supported)
noise_model=None, # or a NoiseModel/dict
)
task = QPUTask(program=openqasm_str, config=config, qpu_id=os.environ["OQC_DEVICE"])
result = client.schedule_tasks([task], qpu_id=os.environ["OQC_DEVICE"])
Test Runs
Note tests look for .env file from which to source these env variables that are required for the plugin.
Suggest placing this file in the root of the test directory.
- "OQC_URL"
- "OQC_DEVICE"
- "OQC_AUTH_TOKEN"
poetry run python -m pytest
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 pennylane_oqcqcaas-0.2.1.tar.gz.
File metadata
- Download URL: pennylane_oqcqcaas-0.2.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
518243269beae962b9cd38590a4774cb3d392f0f1e6cd02dc6ec8d52d76b05ea
|
|
| MD5 |
d406a4a57e0cc94d821426ae8a979133
|
|
| BLAKE2b-256 |
a65391130adc0c627b9395832f90ec74f26a5ee86b9817bcba1d2d0b4cfe7791
|
Provenance
The following attestation bundles were made for pennylane_oqcqcaas-0.2.1.tar.gz:
Publisher:
build-and-publish-package.yaml on oqc-community/pennylane-oqc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pennylane_oqcqcaas-0.2.1.tar.gz -
Subject digest:
518243269beae962b9cd38590a4774cb3d392f0f1e6cd02dc6ec8d52d76b05ea - Sigstore transparency entry: 1029826140
- Sigstore integration time:
-
Permalink:
oqc-community/pennylane-oqc@eba61c5c1b6206fa0ae98ab953acbcf33f766281 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/oqc-community
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish-package.yaml@eba61c5c1b6206fa0ae98ab953acbcf33f766281 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pennylane_oqcqcaas-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pennylane_oqcqcaas-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac87d48736ae1e47f66b1d6b6afc0decf8eade63e0e73dee62af26dde82f0b84
|
|
| MD5 |
37f2a64ba58cc99c7933575fb526f41d
|
|
| BLAKE2b-256 |
a3c16b0296cfc0e4b77554436031e67924630535edd58e85ecaa0354dee5c743
|
Provenance
The following attestation bundles were made for pennylane_oqcqcaas-0.2.1-py3-none-any.whl:
Publisher:
build-and-publish-package.yaml on oqc-community/pennylane-oqc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pennylane_oqcqcaas-0.2.1-py3-none-any.whl -
Subject digest:
ac87d48736ae1e47f66b1d6b6afc0decf8eade63e0e73dee62af26dde82f0b84 - Sigstore transparency entry: 1029826193
- Sigstore integration time:
-
Permalink:
oqc-community/pennylane-oqc@eba61c5c1b6206fa0ae98ab953acbcf33f766281 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/oqc-community
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish-package.yaml@eba61c5c1b6206fa0ae98ab953acbcf33f766281 -
Trigger Event:
workflow_dispatch
-
Statement type: