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§

  • Utilities for creating and working with [Channel]s.
  • This module is used for loading configuration that will be used to connect either to real QPUs (and supporting services) or the QVM.