Skip to main content

QCS SDK Python

⚠️ In Development

qcs-sdk-python provides an interface to Rigetti Quantum Cloud Services (QCS), allowing users to compile and run Quil programs on Rigetti quantum processors. Internally, it is powered by the QCS Rust SDK.

While this package can be used directly, pyQuil offers more functionality and a higher-level interface for building and executing Quil programs. This package is still in early development and breaking changes should be expected between minor versions.

Documentation

Documentation for the current release of qcs_sdk is published here. Every version of qcs_sdk ships with type stubs that can provide type hints and documentation to Python tooling and editors.

Troubleshooting

Enabling Debug logging

This package integrates with Python's logging facility through a Rust crate called pyo3_log. The quickest way to get started is to just enable debug logging:

import logging
logging.basicConfig(level=logging.DEBUG)

Because this is implemented with Rust, there are some important differences in regards to log levels and filtering.

The TRACE log level

Rust has a TRACE log level that doesn't exist in Python. It is less severe than DEBUG and is set to a value of 5. While the DEBUG level is recommended for troubleshooting, you can choose to target TRACE level logs and below like so:

import logging
logging.basicConfig(level=5)

Runtime Configuration and Caching

pyo3_log caches loggers and their level filters to improve performance. This means that logger re-configuration done at runtime may cause unexpected logging behavior in certain situations. If this is a concern, this section of the pyo3_log documentation goes into more detail.

These caches can be reset using the following:

qcs_sdk.reset_logging()

This will allow the logging handlers to pick up the most recently-applied configuration from the Python side.

Filtering Logs

Because the logs are emitted from a Rust library, the logger names will correspond to the fully qualified path of the Rust module in the library where the log occurred. These fully qualified paths all have their own logger, and have to be configured individually.

For example, say you wanted to disable the following log:

DEBUG:hyper.proto.h1.io:flushed 124 bytes

You could get the logger for hyper.proto.h1.io and disable it like so:

logging.getLogger("hyper.proto.h1.io").disabled = True

This can become cumbersome, since there are a handful of libraries all logging from a handful of modules that you may not be concerned with. A less cumbersome, but more heavy handed approach is to apply a filter to all logging handlers at runtime. For example, if you only cared about logs from a qcs library, you could setup a log filter like so:

class QCSLogFilter(logging.Filter):
    def filter(self, record) -> bool:
        return "qcs" in record.name

for handler in logging.root.handlers:
    handler.addFilter(QCSLogFilter())

This applies to all logs, so you may want to tune the filter method to include other logs you care about. See the caching section above for important information about the application of these filters.

OpenTelemetry Integration

This package supports collection of OpenTelemetry trace data. Clients may configure any OpenTelemetry collector that supports the OTLP Specification. Rigetti will not have access to the OpenTelemetry data you collect.

To enable the integration, you should install the qcs-sdk[tracing-opentelemetry] extra; this installs opentelemetry-api. By default, no tracing data is collected at runtime. Because the QCS-SDK is built as a pyo3 Rust extension-module, you will need to use pyo3-tracing-subscriber to configure collection of your client network requests. See qcs_sdk._tracing_subscriber module level documentation for more detail.

import my_module
from qcs_sdk._tracing_subscriber import (
    GlobalTracingConfig,
    SimpleConfig,
    Tracing,
    subscriber,
)
from qcs_sdk._tracing_subscriber.layers import otel_otlp


def main():
    tracing_configuration = GlobalTracingConfig(
        export_process=SimpleConfig(
            subscriber=subscriber.Config(
                # By default this supports the standard OTLP environment variables.
                # See https://opentelemetry.io/docs/specs/otel/protocol/exporter/
                layer=otel_otlp.Config()
            )
        )
    )
    with Tracing(config=config):
        result = my_module.example_function()
        my_module.other_example_function(result)

if __name__ == '__main__':
    main()

Metadata

Release files for qcs-sdk-python 0.29.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qcs-sdk-python 0.29.0
File Size Uploaded
qcs_sdk_python-0.29.0.tar.gz 889.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for qcs-sdk-python 0.29.0
File
qcs_sdk_python-0.29.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
qcs_sdk_python-0.29.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
qcs_sdk_python-0.29.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
qcs_sdk_python-0.29.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
qcs_sdk_python-0.29.0-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
qcs_sdk_python-0.29.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
qcs_sdk_python-0.29.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
qcs_sdk_python-0.29.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
qcs_sdk_python-0.29.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
qcs_sdk_python-0.29.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
qcs_sdk_python-0.29.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
qcs_sdk_python-0.29.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
qcs_sdk_python-0.29.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
qcs_sdk_python-0.29.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
qcs_sdk_python-0.29.0-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
qcs_sdk_python-0.29.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
qcs_sdk_python-0.29.0-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
qcs_sdk_python-0.29.0-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details
qcs_sdk_python-0.29.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
qcs_sdk_python-0.29.0-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details

Total release size: 189.1 MB

Release files / qcs_sdk_python-0.29.0.tar.gz

Download URL qcs_sdk_python-0.29.0.tar.gz
Size 889.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fe6ef261c0923b822e89b6c49ccc3aa152054f61c6ebdadffc1a72b63ee76a01
BLAKE2b-256 checksum
How to use checksums
fcd88f6553dbaec7e718de554275e0f53d8637a072d674b152dd1d302b0a1e56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp313-cp313-win_amd64.whl

Download URL qcs_sdk_python-0.29.0-cp313-cp313-win_amd64.whl
Size 10.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
6278cef4a0939622343c0aea60e127f84e5b8343db60ba76642d120818e87766
BLAKE2b-256 checksum
How to use checksums
a1eeab29642b4a8e50335d8fe8208a2977388f725a10b45b0e4c380ce25d3f45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL qcs_sdk_python-0.29.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 9.7 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3ff79bc830cc082bd7a87062e673a3bebba8364a46e357ba954c418d6e06048e
BLAKE2b-256 checksum
How to use checksums
4b516c37a06d8f868bcb0a72bf167eb272ea9502916f2ec99912c6a9e8b988a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL qcs_sdk_python-0.29.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 9.1 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
20c32014b95bf5f5923d49f663265f0d832f33542023d49636bee494c669d1bc
BLAKE2b-256 checksum
How to use checksums
628e453750b10228084e04edb769c6d5a0d7395b6bc6d0fb987b8617d81cef6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL qcs_sdk_python-0.29.0-cp313-cp313-macosx_11_0_arm64.whl
Size 8.8 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0d23559d587f468d704bc94bf059b736747dd310480e108a3962e746e31d9d26
BLAKE2b-256 checksum
How to use checksums
fca267a4dbfc01f8601f0a7aac8600bf6cc5e4a60cae2de9f039939372fe9d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp313-cp313-macosx_10_12_x86_64.whl

Download URL qcs_sdk_python-0.29.0-cp313-cp313-macosx_10_12_x86_64.whl
Size 9.4 MB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
545c881fade0b5317b79ecf37a33ab787195b628718705b42215974dd23e478e
BLAKE2b-256 checksum
How to use checksums
9984d6c9e0702cfeb336dcaf05332944b65e15c3ac2cf2bc369311d030defe17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp312-cp312-win_amd64.whl

Download URL qcs_sdk_python-0.29.0-cp312-cp312-win_amd64.whl
Size 10.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
bd7edeb3e9d698704bb4a0b7e11a4f760e5850d937a3db31488cde13f777d0ba
BLAKE2b-256 checksum
How to use checksums
10b04e936bbe74607f06b464f9e467bb4c0f0e3e8f0572653aeeba3c2c044df6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL qcs_sdk_python-0.29.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 9.7 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dd69590940a0f8e1a56206a529ce07a1851d304a040d66d28336d045baca5463
BLAKE2b-256 checksum
How to use checksums
b5839d509b141954c9fadd3757c3547b6e36c801f334548852cc34ed9aa702aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL qcs_sdk_python-0.29.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 9.1 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
2e58c767577194b44d29533a47c23fc3d6398cb10eee35315b2717aec48f6e70
BLAKE2b-256 checksum
How to use checksums
54738c06a7646c9606bd2a5d11e8098d85c02b3392d5387ec9eaa4c95351ae94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL qcs_sdk_python-0.29.0-cp312-cp312-macosx_11_0_arm64.whl
Size 8.8 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
93045f21e413d5625150a73d34f55b1b35b3e03431ef735a9a3c827297f74f5b
BLAKE2b-256 checksum
How to use checksums
8f4a64f66a9232f74d2de3b378a8084313a9e19af0fd7601a0cee55e4f5b38dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL qcs_sdk_python-0.29.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 9.4 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e645721178d58913daec607b9f9ff5c3073dd9dc8353ee129bdfe12540dab871
BLAKE2b-256 checksum
How to use checksums
1e3e7c1e98d4bc0cf35161802555bd2ca430e4d3787b0699d6efb6f318893690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp311-cp311-win_amd64.whl

Download URL qcs_sdk_python-0.29.0-cp311-cp311-win_amd64.whl
Size 10.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
db62cd365232f1b7b098b298dd67bf415a94427affa030794f13c5e063c570c0
BLAKE2b-256 checksum
How to use checksums
47eddb502a87a97d574691c2348cefc18f35d8b329138fc5f3da1933b632851b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL qcs_sdk_python-0.29.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 9.7 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
885a870083ccf591a93df42f3a4377027aaff17797a78b1069265bd1a185f7e1
BLAKE2b-256 checksum
How to use checksums
03dd3cd1693376b511394c984477b01b2ee1b2439632a10167b7a52b2c452936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL qcs_sdk_python-0.29.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 9.2 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
ab876e20f5f9d1b37ece7a10165608df32ac4c7a842ee9cd8033b0024ea94e0a
BLAKE2b-256 checksum
How to use checksums
3bd2b1b8a607251517ed625d1cafb34853cc2c3d913de2e6ced78808db8859a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL qcs_sdk_python-0.29.0-cp311-cp311-macosx_11_0_arm64.whl
Size 8.8 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
06c0b74c8c1cd2873210dc3657a2156396458777a73ffcb6a16229535802a51b
BLAKE2b-256 checksum
How to use checksums
464a5f86eb8ead644c00bd6d52eed65f24bf5cbbbc5dcc3acadb87faa48ecbca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp311-cp311-macosx_10_12_x86_64.whl

Download URL qcs_sdk_python-0.29.0-cp311-cp311-macosx_10_12_x86_64.whl
Size 9.3 MB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
cd6eb6f0a1620f8e899bcda349c7079ab574ef4ad1ac4684ca8aa88098bd1f01
BLAKE2b-256 checksum
How to use checksums
593fbe04484504b721defafe30fab99a03c42c804040cf788d65e5a2f1cbef82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp310-cp310-win_amd64.whl

Download URL qcs_sdk_python-0.29.0-cp310-cp310-win_amd64.whl
Size 10.1 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
525391e5585b30ad331aaacb443644e40fdf456c7ffa3e062d2e9977f545012c
BLAKE2b-256 checksum
How to use checksums
84f0e6ebcd95fdcc8a8871ea34c664c7ebf03e218a0f3db8537e79d7ef7a8baa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL qcs_sdk_python-0.29.0-cp310-cp310-manylinux_2_28_x86_64.whl
Size 9.7 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b19e738b0055d834f22327f529c03d01dbba3f0ba6d33cd87e9add39d8a2de20
BLAKE2b-256 checksum
How to use checksums
de527faf77bb761a315228e3bcda48d740a30c691183d41014676a4a6a3a1c2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp310-cp310-manylinux_2_28_aarch64.whl

Download URL qcs_sdk_python-0.29.0-cp310-cp310-manylinux_2_28_aarch64.whl
Size 9.2 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
7493188eb8b38ac53f058b4a892ce3bb0df3616eadad33fcc50e3f4200785e12
BLAKE2b-256 checksum
How to use checksums
67cd750994eb522432c4054d52610a9882cff1d36e99f664a608ba56c52dae97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL qcs_sdk_python-0.29.0-cp310-cp310-macosx_11_0_arm64.whl
Size 8.8 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2183aaf13297e1e043dc5cb972f02e781d2af93a8495f68b3801679eb33bcb26
BLAKE2b-256 checksum
How to use checksums
23a3fa15205035a88761a683463713fac03592f52098e1e3e2395d10401c1587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release files / qcs_sdk_python-0.29.0-cp310-cp310-macosx_10_12_x86_64.whl

Download URL qcs_sdk_python-0.29.0-cp310-cp310-macosx_10_12_x86_64.whl
Size 9.3 MB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bb1bd0dca206c94773cdc1d0516d211013745ae8f1c452b6e9dd5bd1b394289c
BLAKE2b-256 checksum
How to use checksums
2a6d27f347ebcf33e032bc4c3ac0229c214d034c589d89552098eddaf159e22d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

Release history Release notifications | RSS feed

This release

0.29.0 This release

21 release files

0.27.0

7 release files

0.21.7

6 release files

0.21.4

8 release files

0.9.1

12 release files

0.7.0

12 release files

0.6.0

12 release files

0.6.0rc4

0.6.0rc3

0.6.0rc2

0.6.0rc0

0.3.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page