Skip to main content

devqubit adapter for CUDA-Q

Project description

devqubit-cudaq

PyPI

NVIDIA CUDA-Q adapter for devqubit — automatic kernel capture, target snapshots, and result logging for CUDA-Q sample and observe workflows.

[!IMPORTANT] This is an internal adapter package. Install via pip install "devqubit[cudaq]" and use the devqubit public API.

Installation

pip install "devqubit[cudaq]"

Usage

Sampling

import cudaq
from devqubit import track

@cudaq.kernel
def bell():
    q = cudaq.qvector(2)
    h(q[0])
    x.ctrl(q[0], q[1])
    mz(q)

with track(project="cudaq-experiment") as run:
    executor = run.wrap(cudaq)
    result = executor.sample(bell, shots_count=1000)

Observe (Expectation Values)

from cudaq import spin

hamiltonian = spin.z(0)

with track(project="cudaq-vqe") as run:
    executor = run.wrap(cudaq)
    result = executor.observe(bell, hamiltonian)
    print(result.expectation())

What's Captured

Artifact Kind Role
Kernel JSON cudaq.kernel.json program
Kernel diagram cudaq.kernel.diagram program
MLIR (Quake) cudaq.kernel.mlir program
QIR cudaq.kernel.qir program
Counts / expectation result.cudaq.output.json result
Execution envelope devqubit.envelope.json envelope

Documentation

See the Adapters guide for details on observe workflows, performance tuning, and spin operator capture.

License

Apache 2.0

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

devqubit_cudaq-0.1.12.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

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

devqubit_cudaq-0.1.12-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file devqubit_cudaq-0.1.12.tar.gz.

File metadata

  • Download URL: devqubit_cudaq-0.1.12.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for devqubit_cudaq-0.1.12.tar.gz
Algorithm Hash digest
SHA256 b3573adf52bcbf6ed8860666e0c86ba50c668ae17ddf272618220ca0b5569708
MD5 0df01ad1b5f891f01da65bfe2475e6e4
BLAKE2b-256 2fce6982fde7b8b4402e614001d0d1092e8e292100c3d14241c3cdcc960c17d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for devqubit_cudaq-0.1.12.tar.gz:

Publisher: release.yaml on devqubit-labs/devqubit

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

File details

Details for the file devqubit_cudaq-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for devqubit_cudaq-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 cf77f8100f440ef707be7f53c4a221e5134942920699cee68a2286d7e6ce5090
MD5 f249bce34666a46bf3e56af9a7779103
BLAKE2b-256 b7e450ed2cd1a055896c8cd5a8027fd68b348808dab424dd3d9c06b03012aa1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for devqubit_cudaq-0.1.12-py3-none-any.whl:

Publisher: release.yaml on devqubit-labs/devqubit

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