Skip to main content

Python interface for the QCS Rust SDK

Project description

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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qcs_sdk_python-0.16.3.tar.gz (220.7 kB view details)

Uploaded Source

Built Distributions

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

qcs_sdk_python-0.16.3-cp312-none-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.12Windows x86-64

qcs_sdk_python-0.16.3-cp312-cp312-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

qcs_sdk_python-0.16.3-cp312-cp312-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

qcs_sdk_python-0.16.3-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (9.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

qcs_sdk_python-0.16.3-cp311-none-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.11Windows x86-64

qcs_sdk_python-0.16.3-cp311-cp311-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

qcs_sdk_python-0.16.3-cp311-cp311-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

qcs_sdk_python-0.16.3-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (9.6 MB view details)

Uploaded CPython 3.11macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

qcs_sdk_python-0.16.3-cp310-none-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.10Windows x86-64

qcs_sdk_python-0.16.3-cp310-cp310-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

qcs_sdk_python-0.16.3-cp310-cp310-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

qcs_sdk_python-0.16.3-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (9.6 MB view details)

Uploaded CPython 3.10macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

qcs_sdk_python-0.16.3-cp39-none-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.9Windows x86-64

qcs_sdk_python-0.16.3-cp39-cp39-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

qcs_sdk_python-0.16.3-cp39-cp39-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

qcs_sdk_python-0.16.3-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (9.6 MB view details)

Uploaded CPython 3.9macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

qcs_sdk_python-0.16.3-cp38-none-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.8Windows x86-64

qcs_sdk_python-0.16.3-cp38-cp38-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

qcs_sdk_python-0.16.3-cp38-cp38-manylinux_2_28_aarch64.whl (4.9 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

qcs_sdk_python-0.16.3-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (9.6 MB view details)

Uploaded CPython 3.8macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file qcs_sdk_python-0.16.3.tar.gz.

File metadata

  • Download URL: qcs_sdk_python-0.16.3.tar.gz
  • Upload date:
  • Size: 220.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for qcs_sdk_python-0.16.3.tar.gz
Algorithm Hash digest
SHA256 9418ea89dcbaeae49820c443eb962839a2885ec5a046a8dead6f58762d3b70bf
MD5 6c977c6ce4922e240d0cea5337cb7d8b
BLAKE2b-256 1109ab680b2c0b443d0e450a80fcf5e64fdac58aa492df6012e0e49b49daa08d

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp312-none-win_amd64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 cc00d0cbff7d5cafce882b857f97bfe5bbcd96d7674e129fdac8bfe43f33ea52
MD5 43b606ec219741980ddb9a9a075694ef
BLAKE2b-256 57b2b4ffe94564ff4083b282e910ff9adaeae7585b298d18068ef008bfdf3c1e

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f942a0157c5ae70b060a5d0beab9cee9d758a29ae6089da2ab1320af9eda3f8e
MD5 383660cc7138527c0b9fd3a535f78e35
BLAKE2b-256 2d2a71fa5773b0c71302cdd033cae1e4cd959b8259b5924f19dfd76ce9f2ed25

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 96f0d23ac935e596d7add8fbf198d91527faec3a02f355c9a4cfe8e3cc31c216
MD5 da8a60647f29b963a44b09df42d903c2
BLAKE2b-256 8d561e24f0171e319b1abe348b9add3a91f5d45d049e0e574419efe7f44435d7

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 d0d6cd959d827acf65c69c6f3e6a9d3d55b66f144ac0c2b6246f0b94c1d50002
MD5 8a8ecec667b2757a5e3fd9eeca5a30cb
BLAKE2b-256 047e08b1276b5756c704eaf2f65c5fa9c6ff422ca821dc1e27a9bed7baefd956

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 5574be1dced1894a3c2b81635beccfcec41101f6ef96ffd277b72dc8320727d4
MD5 430964796664194ad777886acb2638c8
BLAKE2b-256 d54d5ffcccd36a74e02b32692233de0431fc81db851717e4b4f3760bd09e5040

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2f87d7ecaec6cef300f0c701892e06fd25897038a2936cd06688e368121e3fde
MD5 a58691d362cb62536ca0f59c6f2d5967
BLAKE2b-256 09aa9af544eba9c1d4ba24c98e299b866a2d7d11bd152cb5d778ed39a204b3b4

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 63a74dbafe0e97ac18bd4793b77a6a9223d99a00fa530bdd54e2925197cfd5ff
MD5 386573d4516419e0544c38f6f8352e3c
BLAKE2b-256 2845bb89b8cff1fc931a5d035281719e0cc471de720bcc747e22856d49fa2b21

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 1751a5ac5d90c52cdb5a7c2ba3e16b7293218b5380302fd23c63c57a00cd35b0
MD5 a46f3ac6ef8482edb25a6d93fe5d8de6
BLAKE2b-256 b2f2f5e65f8113215dbd656c405cd63267a2a52fb4d59767d7a8d917bfb8cc92

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 ed12f27328dc082b8d96b72417028750fc3384cee3fe54484164276d6e7cb781
MD5 c62f415abb065b561a8bc0de62414071
BLAKE2b-256 0eb1a2e3423fbf245500a7d4d4d991656c0375a99a1947e0f0d22cb4911ddc81

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 20206741408974700f9fe81c91bd8aa954245e507cec04dfa90f8a0389fd79b8
MD5 6c57354fe0af9776ee600d5c948efb44
BLAKE2b-256 3edad892843bda855311d8a056e066bdc418bd87f9ba2dc759fc558686cd808e

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2c7deb0624c6fe88a7d56cf03d2971d1d9bd8f75bb7968da9018eb8bec0e4b56
MD5 3840734308cac345f1a2930dc6b00134
BLAKE2b-256 1fcc0068152ad791732dd88136b88110e1a57559df3b99456f78d1256cb153e6

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 0dffe1b083cb3e95bd6c350d2a43f572666337c8efcb83ab6460476e4b22135f
MD5 82880acfd156cc6379135a72f7b31629
BLAKE2b-256 c037031705e64af253781a4190041e653e5abf65b79cba8338b95fbd4d85ff0f

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 9904ef4fa56ad25a45af61566164924a092aa0e55a077a602417f73d6f0c9933
MD5 86d2cf579dcae76daf10de8a5b1fbcdd
BLAKE2b-256 9f0d0a2854229d5f76251c516645a1f84dd8694a0d3026f115b23a519a1f65d6

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f7ab20835fcb07eeab777c9479b56ac2932396ae5aa020958c589acd29dd84b6
MD5 dc04a2a32950277b61f036bf513f7dd7
BLAKE2b-256 5f73395c259dcab80ab848b3c543d496c345bd57e7ffa625fe33bca922cc6e5a

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 da428c085fa71c4f121f238be15d8d649bc819ace351a989f472610fb7035cef
MD5 cc789a82f6438bf113d9aee5cb989534
BLAKE2b-256 5fa3c46c7365ad8005f38e0e149a9d78de9c443a19374af57eb57b36e6f5d4b6

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 b5482893f829b6f1149af3d3c679727f80bc61dd07ad477e43b627674938374f
MD5 4567aa4ccbc9719b59174e968ae5ab6f
BLAKE2b-256 ebb111494cefbeb2662cc69b1ca12b9bb65ee8ebde5fcc107c0d982f98bfce2d

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 ac37eaa93536fb0c03385a7349bd47da0578cef0c2bed0a6e8208a4d0585ca3e
MD5 1a2a700cd60bdce10dd6ffbfe2414770
BLAKE2b-256 99296ae35a4800a1eab71029cdd4149bbf74901207bf99263c42f09717bcfb31

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ac8e13b400ce6804f22ec85a3528d5b122309e3d2dd6b87b37787492b4670fd8
MD5 fe8249410cfbd7aa8bdf3d78cd3db7f8
BLAKE2b-256 f4bd17a0c9d039f54ff9b28e8b616c0d212fafc7f7fcf17155c46f1e865e80b2

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 267bd2ef5147cf9cc90f0311aad8dea87ea846aed8a718e66522c50fbd44ac45
MD5 c55e5c2a49e6b08a7ce1a5fb3d1d41c2
BLAKE2b-256 76d7fd486148dabe7b5f403fe80cfed5d762264e86bd0f54f206a8d9914de48b

See more details on using hashes here.

File details

Details for the file qcs_sdk_python-0.16.3-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for qcs_sdk_python-0.16.3-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 58e93b140c991ad001883cd1053afacc2550f0922e8b8b936598e5601d7f66b7
MD5 b5faa08b70d0cb0154f08f7a484bd760
BLAKE2b-256 e53cbf09c6fa945e3ea12e559d7691d4bd8f62af7a8973911141d03f28a19f6e

See more details on using hashes here.

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