Crate qcs_api_client_grpc

Source
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).unwrap();
    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).unwrap();
    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§

Modules§

  • By default, all settings are loaded from files located under your home directory in the .qcs folder. Within that folder:
  • Utilities for creating and working with [Channel]s.