Skip to content

Commit 255b6e2

Browse files
committed
feat: add qeci read-delay option
1 parent 8838992 commit 255b6e2

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

crates/python/src/qpu/translation.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ 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+
2023
create_init_submodule! {
2124
classes: [
2225
PyTranslationOptions,
@@ -207,10 +210,17 @@ pub struct PyRiverlane(Riverlane);
207210
#[pymethods]
208211
impl PyRiverlane {
209212
#[new]
210-
#[pyo3(signature = (/, qeci_configuration_data = None))]
211-
fn __new__(qeci_configuration_data: Option<HashMap<String, Vec<u8>>>) -> PyResult<Self> {
213+
#[pyo3(
214+
signature = (/, qeci_configuration_data = None, qeci_max_nanoseconds_until_read_available = None)
215+
)]
216+
fn __new__(
217+
qeci_configuration_data: Option<HashMap<String, Vec<u8>>>,
218+
qeci_max_nanoseconds_until_read_available: Option<u64>,
219+
) -> PyResult<Self> {
212220
Ok(Self(Riverlane {
213221
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),
214224
}))
215225
}
216226
}

0 commit comments

Comments
 (0)