mqt.ddsim.job¶
Job module for DDSIM backend.
Module Contents¶
- Parameters¶
- requires_submit(func: Callable[..., Any]) Callable[..., Any][source]¶
Decorator to ensure that a submit has been performed before calling the method.
- Parameters:
func (callable) – test function to be decorated.
- Returns:
the decorated function.
- Return type:
callable
- class DDSIMJob(backend: BackendV2, job_id: str, fn: Callable[..., Result], experiments: Sequence[qiskit.QuantumCircuit], parameter_values: Sequence[Parameters] | None, **args: dict[str, Any])[source]¶
Bases:
qiskit.providers.JobV1DDSIMJob class.
- _executor¶
executor to handle asynchronous jobs
- Type:
futures.Executor
- submit() None[source]¶
Submit the job to the backend for execution.
- Raises:
JobError – if trying to re-submit the job.
- result(timeout: float | None = None) Result[source]¶
Get job result.
The behavior is the same as the underlying concurrent Future objects, https://docs.python.org/3/library/concurrent.futures.html#future-objects.
- Parameters:
timeout – number of seconds to wait for results.
- Returns:
Result object
- Raises:
TimeoutError – if timeout occurred.
CancelledError – if job cancelled before completed.
- status() JobStatus[source]¶
Gets the status of the job by querying the Python’s future.
- Returns:
The current JobStatus
- Return type:
JobStatus
- Raises:
JobError – If the future is in unexpected state
TimeoutError – if timeout occurred.