Skip to main content

qcs_api_client_grpc/gen/
models.controller.rs

1// Copyright 2026 Rigetti Computing
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// This file is @generated by prost-build.
16/// Complex64 is a 64-bit complex value with float32 real and imaginary parts
17#[derive(Clone, Copy, PartialEq, ::qcs_dependencies_client::prost::Message)]
18#[prost(prost_path = "::qcs_dependencies_client::prost")]
19pub struct Complex64 {
20    #[prost(float, tag = "1")]
21    pub real: f32,
22    #[prost(float, tag = "2")]
23    pub imaginary: f32,
24}
25/// ReadoutValues are data readout values that have been read out from the quantum processor
26/// and optionally processed by a readout transformation pipeline.
27#[derive(Clone, PartialEq, ::qcs_dependencies_client::prost::Message)]
28#[prost(prost_path = "::qcs_dependencies_client::prost")]
29pub struct ReadoutValues {
30    #[prost(oneof = "readout_values::Values", tags = "1, 2")]
31    pub values: ::core::option::Option<readout_values::Values>,
32}
33/// Nested message and enum types in `ReadoutValues`.
34pub mod readout_values {
35    #[derive(Clone, PartialEq, ::qcs_dependencies_client::prost::Oneof)]
36    #[prost(prost_path = "::qcs_dependencies_client::prost")]
37    pub enum Values {
38        #[prost(message, tag = "1")]
39        IntegerValues(super::IntegerReadoutValues),
40        #[prost(message, tag = "2")]
41        ComplexValues(super::Complex64ReadoutValues),
42    }
43}
44/// IntegerReadoutValues are integer arrays emitted by a readout receiver or transformation pipeline.
45/// These may include (but are not limited to) qudit values or raw ADC capture data.
46#[derive(Clone, PartialEq, Eq, Hash, ::qcs_dependencies_client::prost::Message)]
47#[prost(prost_path = "::qcs_dependencies_client::prost")]
48pub struct IntegerReadoutValues {
49    #[prost(int32, repeated, tag = "1")]
50    pub values: ::qcs_dependencies_client::prost::alloc::vec::Vec<i32>,
51}
52/// Complex64ReadoutValues are arrays of complex numbers emitted by a readout receiver or transformation pipeline.
53#[derive(Clone, PartialEq, ::qcs_dependencies_client::prost::Message)]
54#[prost(prost_path = "::qcs_dependencies_client::prost")]
55pub struct Complex64ReadoutValues {
56    #[prost(message, repeated, tag = "1")]
57    pub values: ::qcs_dependencies_client::prost::alloc::vec::Vec<Complex64>,
58}
59/// An EncryptedControllerJob includes the configuration necessary to execute an instance of
60/// the contained job data on control hardware in encrypted format.
61#[derive(Clone, PartialEq, Eq, Hash, ::qcs_dependencies_client::prost::Message)]
62#[prost(prost_path = "::qcs_dependencies_client::prost")]
63pub struct EncryptedControllerJob {
64    /// Encrypted form of ControllerJob.
65    #[prost(bytes = "vec", tag = "1")]
66    pub job: ::qcs_dependencies_client::prost::alloc::vec::Vec<u8>,
67    /// Information about the means by which `inner` was encrypted.
68    #[prost(message, optional, tag = "2")]
69    pub encryption: ::core::option::Option<JobEncryption>,
70}
71/// Information about the means by which a ControllerJob was encrypted.
72#[derive(Clone, PartialEq, Eq, Hash, ::qcs_dependencies_client::prost::Message)]
73#[prost(prost_path = "::qcs_dependencies_client::prost")]
74pub struct JobEncryption {
75    /// Opaque identifier for the key to use in decryption
76    #[prost(string, tag = "1")]
77    pub key_id: ::qcs_dependencies_client::prost::alloc::string::String,
78    /// If relevant, the nonce to use in decryption
79    #[prost(bytes = "vec", tag = "2")]
80    pub nonce: ::qcs_dependencies_client::prost::alloc::vec::Vec<u8>,
81}
82#[derive(Clone, PartialEq, ::qcs_dependencies_client::prost::Message)]
83#[prost(prost_path = "::qcs_dependencies_client::prost")]
84pub struct JobExecutionConfiguration {
85    /// Memory values to be patched into the program by the Controller Service prior to execution.
86    /// The string key is used to match the name of the memory region as defined in the
87    /// InstrumentProgram. The type of the DataValue must match the defined type of the region.
88    #[prost(map = "string, message", tag = "3")]
89    pub memory_values: ::std::collections::HashMap<
90        ::qcs_dependencies_client::prost::alloc::string::String,
91        DataValue,
92    >,
93}
94/// The value of the data to insert into memory corresponding to a MemoryRegion.
95#[derive(Clone, PartialEq, ::qcs_dependencies_client::prost::Message)]
96#[prost(prost_path = "::qcs_dependencies_client::prost")]
97pub struct DataValue {
98    #[prost(oneof = "data_value::Value", tags = "101, 102, 103")]
99    pub value: ::core::option::Option<data_value::Value>,
100}
101/// Nested message and enum types in `DataValue`.
102pub mod data_value {
103    #[derive(Clone, PartialEq, ::qcs_dependencies_client::prost::Oneof)]
104    #[prost(prost_path = "::qcs_dependencies_client::prost")]
105    pub enum Value {
106        /// Binary value, corresponding to both BIT and OCTET data types in Quil.
107        #[prost(message, tag = "101")]
108        Binary(super::BinaryDataValue),
109        /// Signed integer value, corresponding to INTEGER in Quil.
110        #[prost(message, tag = "102")]
111        Integer(super::IntegerDataValue),
112        /// Real number value, corresponding to REAL in Quil.
113        #[prost(message, tag = "103")]
114        Real(super::RealDataValue),
115    }
116}
117/// Binary value, corresponding to both BIT and OCTET data types in Quil.
118#[derive(Clone, PartialEq, Eq, Hash, ::qcs_dependencies_client::prost::Message)]
119#[prost(prost_path = "::qcs_dependencies_client::prost")]
120pub struct BinaryDataValue {
121    #[prost(bytes = "vec", tag = "1")]
122    pub data: ::qcs_dependencies_client::prost::alloc::vec::Vec<u8>,
123}
124/// Signed integer value, corresponding to INTEGER in Quil.
125#[derive(Clone, PartialEq, Eq, Hash, ::qcs_dependencies_client::prost::Message)]
126#[prost(prost_path = "::qcs_dependencies_client::prost")]
127pub struct IntegerDataValue {
128    #[prost(int64, repeated, tag = "1")]
129    pub data: ::qcs_dependencies_client::prost::alloc::vec::Vec<i64>,
130}
131/// Real number value, corresponding to REAL in Quil.
132#[derive(Clone, PartialEq, ::qcs_dependencies_client::prost::Message)]
133#[prost(prost_path = "::qcs_dependencies_client::prost")]
134pub struct RealDataValue {
135    #[prost(double, repeated, tag = "1")]
136    pub data: ::qcs_dependencies_client::prost::alloc::vec::Vec<f64>,
137}
138/// A ControllerJobExecutionResult includes the result data from a single
139/// execution of a ControllerJob.
140#[derive(Clone, PartialEq, ::qcs_dependencies_client::prost::Message)]
141#[prost(prost_path = "::qcs_dependencies_client::prost")]
142pub struct ControllerJobExecutionResult {
143    /// The contents of each memory region, keyed on region name
144    #[prost(map = "string, message", tag = "1")]
145    pub memory_values: ::std::collections::HashMap<
146        ::qcs_dependencies_client::prost::alloc::string::String,
147        DataValue,
148    >,
149    /// The contents of readout data published by the readout transformation
150    /// pipeline, keyed on the node ID of the publishing readout transformation
151    /// node.
152    #[prost(map = "string, message", tag = "2")]
153    pub readout_values: ::std::collections::HashMap<
154        ::qcs_dependencies_client::prost::alloc::string::String,
155        ReadoutValues,
156    >,
157    #[prost(enumeration = "controller_job_execution_result::Status", tag = "3")]
158    pub status: i32,
159    /// Optional message providing context to the result's status.
160    #[prost(string, optional, tag = "4")]
161    pub status_message: ::core::option::Option<
162        ::qcs_dependencies_client::prost::alloc::string::String,
163    >,
164    /// Duration (µs) job held exclusive access to control hardware.
165    #[prost(uint64, tag = "5")]
166    pub execution_duration_microseconds: u64,
167}
168/// Nested message and enum types in `ControllerJobExecutionResult`.
169pub mod controller_job_execution_result {
170    #[derive(
171        Clone,
172        Copy,
173        Debug,
174        PartialEq,
175        Eq,
176        Hash,
177        PartialOrd,
178        Ord,
179        ::qcs_dependencies_client::prost::Enumeration
180    )]
181    #[prost(prost_path = "::qcs_dependencies_client::prost")]
182    #[repr(i32)]
183    pub enum Status {
184        Unknown = 0,
185        Success = 1,
186        /// Failure state caused by an error in the service.
187        ServiceFailure = 2,
188        /// Failure state caused by user.
189        UserFailure = 3,
190        /// Job was canceled by user before execution completed.
191        UserCancellation = 4,
192    }
193    impl Status {
194        /// String value of the enum field names used in the ProtoBuf definition.
195        ///
196        /// The values are not transformed in any way and thus are considered stable
197        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
198        pub fn as_str_name(&self) -> &'static str {
199            match self {
200                Self::Unknown => "UNKNOWN",
201                Self::Success => "SUCCESS",
202                Self::ServiceFailure => "SERVICE_FAILURE",
203                Self::UserFailure => "USER_FAILURE",
204                Self::UserCancellation => "USER_CANCELLATION",
205            }
206        }
207        /// Creates an enum from field names used in the ProtoBuf definition.
208        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
209            match value {
210                "UNKNOWN" => Some(Self::Unknown),
211                "SUCCESS" => Some(Self::Success),
212                "SERVICE_FAILURE" => Some(Self::ServiceFailure),
213                "USER_FAILURE" => Some(Self::UserFailure),
214                "USER_CANCELLATION" => Some(Self::UserCancellation),
215                _ => None,
216            }
217        }
218    }
219}
220