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.31.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.31.0
File Size Uploaded
qcs_sdk_python-0.31.0.tar.gz 887.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for qcs-sdk-python 0.31.0
File
qcs_sdk_python-0.31.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
qcs_sdk_python-0.31.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.31.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
qcs_sdk_python-0.31.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
qcs_sdk_python-0.31.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.31.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
qcs_sdk_python-0.31.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.31.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
qcs_sdk_python-0.31.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
qcs_sdk_python-0.31.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.31.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
qcs_sdk_python-0.31.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.31.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details
qcs_sdk_python-0.31.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
qcs_sdk_python-0.31.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.31.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
qcs_sdk_python-0.31.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.31.0-cp310-cp310-manylinux_2_28_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ ARM64 Details
qcs_sdk_python-0.31.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
qcs_sdk_python-0.31.0-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details

Total release size: 172.2 MB

Release files / qcs_sdk_python-0.31.0.tar.gz

Download URL qcs_sdk_python-0.31.0.tar.gz
Size 887.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3f5c1f58c9f24f0a5d2dc240faea0fa2ec3877906e024ea27dfc2a79e6a07e93
BLAKE2b-256 checksum
How to use checksums
29836ded154cfafc56cecf1a2e848b92d794bfb26a88baaed32205daf2e38066
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 8.9 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
517b072d5cd3d75c5f81c17bcd120f597af70a64333a246a1a0c55409472a31e
BLAKE2b-256 checksum
How to use checksums
0d8d650ebb8d5d3bab0ebb55acd45afae5cdba7bf7d9abe76075df5f2d400f06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 8.4 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
069a5777c7f4c7793e16b36e8f355e20e2b6ac47ce463f0d4acde5e4632f2ae7
BLAKE2b-256 checksum
How to use checksums
f16984f565187144b3fef7b7183633418fcd9d8555de7dc2b12b9375d7506dd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.0-cp313-cp313-macosx_10_12_x86_64.whl
Size 8.5 MB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e78121fde521dfdefdac909f9dc06f6374b415e8f3805078d87bbf4e09b6783d
BLAKE2b-256 checksum
How to use checksums
1e51da07bd84a0222635112f99d99f2670a85d2491e34ead4d2cf9c77282852f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

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

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

Download URL qcs_sdk_python-0.31.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 8.4 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
1a7b2c5a79c16767648a945741d188a57d02cc95eb31a0db6f3fb872ee82d419
BLAKE2b-256 checksum
How to use checksums
c8da7980c924b64a5e33e9a3dfff569ff9f7add9b4ec9f4a1c3cd97f399adc84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.0-cp312-cp312-macosx_11_0_arm64.whl
Size 8.0 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
44527855b3d5c1d104e3851545db2e49741ae8f9446b197e238fa14cf65911cc
BLAKE2b-256 checksum
How to use checksums
2ce75e32d58c94205eab6ee790cd51d70eef03a6496128995f77bdd6cdd760e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

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

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

Download URL qcs_sdk_python-0.31.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 8.9 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
11ce15045f66845bb0e5b5a43b0c27239bcc8b7703c6f2f9ffb18f45e40e033b
BLAKE2b-256 checksum
How to use checksums
4d513fd7d251c4ec316bf89b63f496210f3ad37f4b724d06060bf8482e1c90af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.0-cp311-cp311-macosx_11_0_arm64.whl
Size 8.0 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
642db30b8f23c7c0ac19f8c28ae8140d6a9393263544683b94d0b02c6e64f346
BLAKE2b-256 checksum
How to use checksums
ab9f3f55cc413aee360c32ec3ec63893d1ea9eab756da8b2afa18ce90e6d4a64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.0-cp310-cp310-win_amd64.whl
Size 9.1 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
a388247cbe51c60fea1afd373be8b3fab918e4a7f5800348bfdce0e1ee4a38ac
BLAKE2b-256 checksum
How to use checksums
0182b683f16f01a02438ed53105c6fccf91225c4cd8a4a2b3a97e2df531ea5a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.0-cp310-cp310-manylinux_2_28_aarch64.whl
Size 8.4 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
721376d29bd62fcc22b6cb5fab2506071336dd927e68a54c6dad593dae3da542
BLAKE2b-256 checksum
How to use checksums
3bc808c6a0b2cd7d56cbde0cef56bf89162d68cfa11f7cbd9d8fa268edb8dcd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.0-cp310-cp310-macosx_11_0_arm64.whl
Size 8.0 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cfaa8cc72152db8b525177cd29e6845337f3ea5ee675f691a77ea980c078bddb
BLAKE2b-256 checksum
How to use checksums
0aecfe4803b08a1dc8f94d162b77b6614f432916ea7b32fb3722878237c78a6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.0-cp310-cp310-macosx_10_12_x86_64.whl
Size 8.4 MB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6b22577221258d7afb0596c0eb177a357d01a7eab7c553c8a51f0077df554060
BLAKE2b-256 checksum
How to use checksums
00cbbcd6a202d92ea8cec8314bd0b4019d7219875e3c8b1b7da2c409c6cb4f66
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.31.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