Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pennylane_oqcqcaas-0.2.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

pennylane_oqcqcaas-0.2.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

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

Hashes for pennylane_oqcqcaas-0.2.1.tar.gz
Algorithm Hash digest
SHA256 518243269beae962b9cd38590a4774cb3d392f0f1e6cd02dc6ec8d52d76b05ea
MD5 d406a4a57e0cc94d821426ae8a979133
BLAKE2b-256 a65391130adc0c627b9395832f90ec74f26a5ee86b9817bcba1d2d0b4cfe7791

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pennylane_oqcqcaas-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pennylane_oqcqcaas-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac87d48736ae1e47f66b1d6b6afc0decf8eade63e0e73dee62af26dde82f0b84
MD5 37f2a64ba58cc99c7933575fb526f41d
BLAKE2b-256 a3c16b0296cfc0e4b77554436031e67924630535edd58e85ecaa0354dee5c743

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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