This repo provides two crates:
qcs
which is the Rust SDK for executing quantum programs on Rigetti QPUs; andqcs-sdk-python
which defines, generates, and publishes the Python bindgins to make use of the Rust SDK.
This crate is documented primarily via rustdoc comments and examples, which are available on docs.rs.
Most development tasks are automated with cargo-make (like make, but you can have dependencies on other Rust tools and a ton of useful tasks are built in). Install cargo-make by doing cargo install cargo-make
. Then you can invoke it with either cargo make <task>
or makers <task>
. Tasks are defined in files called Makefile.toml
.
In order to run all checks exactly the same way that CI does, use makers ci-flow
from the project root (workspace).
Commits should follow the conventional commit syntax, with one of the following scopes:
lib
orrust
: changes to the rust SDKpython
: changes to the Python bindings- No scope: changes to both crates
Because this library relies on [ØMQ], [cmake
] is required:
- macOS [Homebrew] :
brew install cmake
- Windows [Chocolatey]:
choco install cmake
- Debian:
apt install cmake
The best way to go about this is via makers
or cargo make
with no task. This will default to dev-test-flow
which formats all code, builds, and tests everything.
Any tests which cannot be run in CI should be run with makers manual
. These tests require configured QCS credentials with access to internal functions, as well as a connection to the Rigetti VPN.
libquil
provides quilc and QVM as a shared library, which can be used by qcs-sdk-rust
as an alternative client for those tools.
To use libquil
:
- install the library (see installation instructions)
- enable the feature with
--features libquil
makers lint
will lint run all static checks.
To build the docs.rs-style docs, run makers docs
. You can also do makers serve-docs
to launch a local webserver for viewing immediately.
To release, manually run the Prepare Release
workflow in GitHub Actions.
Pre-releases for both the library crate and Python package happen automatically on merge to main.
This repository uses GitHub actions for its CI. If you are making changes to a workflow, consider using our test events to help validate the changes.