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.1

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.1
File Size Uploaded
qcs_sdk_python-0.31.1.tar.gz 888.0 kB Details

Built distributions (wheels)

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

Download URL qcs_sdk_python-0.31.1.tar.gz
Size 888.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9d18f9e1b572f99740a8cd4d14d69f44af3529344a02341e1dfae3112caf2ba1
BLAKE2b-256 checksum
How to use checksums
85362653b9ac25cdb71e12b22a7f0d9edfa0fb4071084077a4e2e2664175e551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.1-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
ddf60b10c89e85a8d9c4b88d35c843a85d23fc4a08b17f4d84643abd99910897
BLAKE2b-256 checksum
How to use checksums
8f75baa2c89939ebc35ae531591ef922e1d6fdf9a898ab9942d45331022f84af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.1-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
eec90cf5374fd6586c84082eeadd84ded56d86c1be6eb5e3deccb42762a3445e
BLAKE2b-256 checksum
How to use checksums
725dcb0a0255fb09664d627569314e76d9cdc032ec757e28f32274d47e61bf12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.1-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
27d990bd6f3a81356c15b02474d7d7ee21e582aa426bd4c28fd2dce09af3f1a3
BLAKE2b-256 checksum
How to use checksums
a7fa3c4035d511ec099a86dd594303accedb100c5d867d7ed5ce0dc7660f3cc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.1-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
d246503b257b03e5cf15324b6ae417a3add05c0e3617285912743f92c60836a1
BLAKE2b-256 checksum
How to use checksums
5453e74da2ce1755c8313f11410a5f80c027572c340b7138489cc1c101ad2201
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.1-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
85864a1854a1d72c7a414db5395a9a7efaf3645cee28d7fb57482d41dca0f26d
BLAKE2b-256 checksum
How to use checksums
1bd7b9ba53b522a80992feb8ecebfe84bb731e03ccd01f34420ccedaa3025027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.1-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
1d262f2f245eb2dd09a67776e82152a7e7a8bd12ea010f274dd6d501b0f4f7e1
BLAKE2b-256 checksum
How to use checksums
eca056b27a735e1a225b77afd4e7f864e2093d8a77401f83a794ade8a89fb3ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

Download URL qcs_sdk_python-0.31.1-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
e85b8211526d8363513b782994f8cfdef92364181b3bb7e0d283e2dc2d43f723
BLAKE2b-256 checksum
How to use checksums
fdea2676326f250878751417a27822c80c9934ad779b3dcf339240656241a648
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.1-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
365b99db832de7595c1a04a540fc94500cd69761eb1eb26b607433ef2e6f4cca
BLAKE2b-256 checksum
How to use checksums
025118df5b88a3bb316102fe073dc36faa1de9e9020b931b8f281cade44be196
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.1-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
7d5d3c662b2ee66cce737f094666aaf5e63eeb67ae47442fcfbab2b97c72fcf6
BLAKE2b-256 checksum
How to use checksums
7ec5176659a4a2b4091f55cb479b1281b84a165c555c6c4e22f5cf4a02eb0871
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

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

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

Download URL qcs_sdk_python-0.31.1-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
9b2967220d8f24e5f92fcae042612236ce58093fce1a704437a6c59c163ab8cc
BLAKE2b-256 checksum
How to use checksums
5d0e01c2a2840b61cbb570d739873e7ceb8a15795030bacdd8c41a8abda8028f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.1-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
7b75ab6375d1cb1c28cbc9bb00a2f642321bcfa2a7b205d5c7e7ad7fcde7c5fa
BLAKE2b-256 checksum
How to use checksums
7e52bfb99ee1d9d4a68680baa42b927870efa4259baf983348f474ecd13dcceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.1-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
98a6611b66697d443c144e697e67d171a4140f4d5fdcbc57c37c3bfbc91f3afb
BLAKE2b-256 checksum
How to use checksums
74940af57d4cafd131a7cdd2f618069429cedbb2062ab0be15b9eebd7818e04b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

Download URL qcs_sdk_python-0.31.1-cp310-cp310-macosx_10_12_x86_64.whl
Size 8.5 MB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
092cf2d9faf9f73a7b4fca93b9d8d84e137c704852c5df37faa9822ea08a4223
BLAKE2b-256 checksum
How to use checksums
b8e4c8d386018a1293150878599fdcb693055a4f813403eacd7b2b1821cf2471
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.1 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