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.30.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.30.0
File Size Uploaded
qcs_sdk_python-0.30.0.tar.gz 887.7 kB Details

Built distributions (wheels)

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

Total release size: 171.8 MB

Release files / qcs_sdk_python-0.30.0.tar.gz

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Download URL qcs_sdk_python-0.30.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
3f1510fe231df8e94e9b169b5cde2f0252d30ad8b0b9a32347c2bbda55be5df6
BLAKE2b-256 checksum
How to use checksums
411ab85e3db9cb2ad2ed8e68b2fda37e6aaa389dd7f3890627528a179899fa47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.9.4

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

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

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

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

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

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

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

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

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

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

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

Download URL qcs_sdk_python-0.30.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
849bc9e3acdd82b656361d9ed8cce2ea748a728cb4a2a1a357ef2b395de83e7a
BLAKE2b-256 checksum
How to use checksums
492cd64498e69a93a537b0de8653fc89f8a2b78beb74be35996c607b2ea38ea5
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.30.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