Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions crates/lib/src/executable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,18 @@ impl<'execution> Executable<'_, 'execution> {
quantum_processor_id: S,
endpoint_id: S,
translation_options: Option<TranslationOptions>,
execution_options: &ExecutionOptions,
) -> ExecutionResult
where
S: Into<Cow<'execution, str>>,
{
let job_handle = self
.submit_to_qpu_with_endpoint(quantum_processor_id, endpoint_id, translation_options)
.submit_to_qpu_with_endpoint(
quantum_processor_id,
endpoint_id,
translation_options,
execution_options,
)
.await?;
self.retrieve_results(job_handle).await
}
Expand Down Expand Up @@ -575,14 +581,20 @@ impl<'execution> Executable<'_, 'execution> {
quantum_processor_id: S,
endpoint_id: S,
translation_options: Option<TranslationOptions>,
execution_options: &ExecutionOptions,
) -> Result<JobHandle<'execution>, Error>
where
S: Into<Cow<'execution, str>>,
{
let job_handle = self
.qpu_for_id(quantum_processor_id)
.await?
.submit_to_endpoint_id(&self.params, endpoint_id.into(), translation_options)
.submit_to_endpoint_id(
&self.params,
endpoint_id.into(),
translation_options,
execution_options,
)
.await?;
Ok(job_handle)
}
Expand Down
3 changes: 3 additions & 0 deletions crates/lib/src/qpu/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ impl<'a> Execution<'a> {
params: &Parameters,
endpoint_id: S,
translation_options: Option<TranslationOptions>,
execution_options: &ExecutionOptions,
) -> Result<JobHandle<'a>, Error>
where
S: Into<Cow<'a, str>>,
Expand All @@ -216,6 +217,8 @@ impl<'a> Execution<'a> {
.connection_strategy(ConnectionStrategy::EndpointId(
endpoint_id.into().to_string(),
))
.api_options(execution_options.api_options().cloned())
.timeout(execution_options.timeout())
.build()
.expect("valid execution options"),
)
Expand Down
4 changes: 4 additions & 0 deletions crates/python/src/executable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ impl PyExecutable {
quantum_processor_id,
endpoint_id,
translation_options,
execution_options.unwrap_or_default().as_inner(),
)
),
None => py_sync!(
Expand Down Expand Up @@ -200,6 +201,7 @@ impl PyExecutable {
quantum_processor_id,
endpoint_id,
translation_options,
execution_options.unwrap_or_default().as_inner(),
)
),
None => py_async!(
Expand Down Expand Up @@ -234,6 +236,7 @@ impl PyExecutable {
quantum_processor_id,
endpoint_id,
translation_options,
execution_options.unwrap_or_default().as_inner()
)
),
None => py_sync!(
Expand Down Expand Up @@ -269,6 +272,7 @@ impl PyExecutable {
quantum_processor_id,
endpoint_id,
translation_options,
execution_options.unwrap_or_default().as_inner()
)
)
}
Expand Down