Git Product home page Git Product logo

qcs-sdk-rust's Introduction

qcs-sdk-rust

A work in progress implementation of pyQuil-like features in Rust.

For the C-bindings to this library, check out qcs-sdk-c

Crates

Public

These are the top level crates intended for use by third parties.

  • qcs: For running programs on a QPU or QVM from Rust.

Internal

These are auxiliary crates not intended for use outside of development.

  • qcs-api: A generated OpenAPI client for QCS.
  • cli: A toy CLI for testing QCS things during development.

Development

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. If a task is defined in the top level (workspace) file with workspace = False then it will only be run once. Otherwise, cargo-make will attempt to run that command for each crate.

In order to run all checks exactly the same way that CI does, use makers workspace-ci-flow from the project root (workspace).

Dependencies

Because this library relies on [ØMQ], [cmake] is required:

  • macOS [Homebrew] : brew install cmake
  • Windows [Chocolatey]: choco install cmake
  • Debian: apt install cmake

Running Tests

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.

Linting

makers lint from the workspace level will lint all crates except generated ones (where #![allow(clippy::all)] should be included).

For new crates, the following code block should be added to the top of the main.rs or lib.rs:

#![deny(clippy::all)]
#![deny(clippy::pedantic)]
#![forbid(unsafe_code)]

Documentation

To build the docs.rs-style docs, run makers docs. Only the qcs crate will have published docs in this format, so it's usually not worth running this at the workspace level. From within the qcs crate you can also do makers serve-docs to launch a local webserver for viewing immediately.

Release

Before release, makers manual must be run in order to run tests against live QCS/QPUs.

qcs-sdk-rust's People

Contributors

dbanty avatar hall avatar mend-for-github-com[bot] avatar renovate[bot] avatar semantic-release-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.