Skip to content

Commit 3bf67a4

Browse files
committed
make riverlane arguments required
1 parent 255b6e2 commit 3bf67a4

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

crates/python/qcs_sdk/qpu/translation.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class Riverlane:
143143
are specially authorized and are not generally available to the client.
144144
"""
145145

146-
def __new__(cls, /, qeci_configuration_data: Optional[Dict[str, bytes]] = ...) -> Self: ...
146+
def __new__(cls, qeci_configuration_data: Dict[str, bytes] = ..., qeci_max_nanoseconds_until_read_available = int) -> Self: ...
147147

148148
@final
149149
class TranslationOptions:

crates/python/src/qpu/translation.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ use rigetti_pyo3::{create_init_submodule, py_wrap_error, py_wrap_simple_enum, To
1717

1818
use crate::client::PyQcsClient;
1919

20-
// XXX is there a reasonable default?
21-
const DEFAULT_QECI_MAX_NANOS_READ: u64 = 8787;
22-
2320
create_init_submodule! {
2421
classes: [
2522
PyTranslationOptions,
@@ -211,16 +208,15 @@ pub struct PyRiverlane(Riverlane);
211208
impl PyRiverlane {
212209
#[new]
213210
#[pyo3(
214-
signature = (/, qeci_configuration_data = None, qeci_max_nanoseconds_until_read_available = None)
211+
signature = (qeci_configuration_data, qeci_max_nanoseconds_until_read_available, /)
215212
)]
216213
fn __new__(
217-
qeci_configuration_data: Option<HashMap<String, Vec<u8>>>,
218-
qeci_max_nanoseconds_until_read_available: Option<u64>,
214+
qeci_configuration_data: HashMap<String, Vec<u8>>,
215+
qeci_max_nanoseconds_until_read_available: u64,
219216
) -> PyResult<Self> {
220217
Ok(Self(Riverlane {
221-
qeci_configuration_data: qeci_configuration_data.unwrap_or_default(),
222-
qeci_max_nanoseconds_until_read_available: qeci_max_nanoseconds_until_read_available
223-
.unwrap_or(DEFAULT_QECI_MAX_NANOS_READ),
218+
qeci_configuration_data,
219+
qeci_max_nanoseconds_until_read_available,
224220
}))
225221
}
226222
}

0 commit comments

Comments
 (0)