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.2.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.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file pennylane_oqcqcaas-0.2.2.tar.gz.

File metadata

  • Download URL: pennylane_oqcqcaas-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 72fa5f68fb3864b6dda88714e489d4ba65bdfd22527db93451675def1b9e6d10
MD5 d7503c9c544c66582efd7b4f20f27e96
BLAKE2b-256 b600a66853d8e99b650abfdd4f5cb6ee47ab0150148f3497c441efcc7cccbfcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pennylane_oqcqcaas-0.2.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pennylane_oqcqcaas-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9fdf3e949280aeafa3d74bee0dcd6611636ead76d9f6970459cd02ca0f13ac07
MD5 face3d2bc1638324c1065b4aaf5d72de
BLAKE2b-256 6ed754fe5c921108967a10e3320135792dc649e9660befb8be8482f1e04eb8ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for pennylane_oqcqcaas-0.2.2-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