Expand description

This crate provides an autogenerated gRPC client for the QCS API, along with helper utilities for automatically loading credentials from a user’s QCS config and keeping authentication tokens refreshed.

Quick Start

use qcs_api_client_grpc::get_channel;
use qcs_api_client_grpc::services::controller::controller_client::ControllerClient;
use qcs_api_client_grpc::services::translation::translation_client::TranslationClient;

async fn controller_request() {
    let uri = "example.per-qpu.rigetti.com:50000".parse().unwrap();
    let channel = get_channel(uri);
    let mut client = ControllerClient::new(channel);
    // Use the client
}

fn translation_request() {
    let uri = "example.translation.rigetti.com:50000".parse().unwrap();
    let channel = get_channel(uri);
    let mut client = TranslationClient::new(channel);
    // Use the client
}

Crate features

  • server: include the generated server code for both Controller Service and Translation Service
  • regen: regenerate the protobuf code and store it in ./src/gen

By default, both features are disabled.

Re-exports

pub use channel::get_channel;
pub use channel::get_wrapped_channel;
pub use channel::wrap_channel;

Modules

This module contains helper code for wrapping a Channel so that QCS credentials are automatically used and refreshed as necessary.
This module is used for loading configuration that will be used to connect either to real QPUs (and supporting services) or the QVM.