strangeworks_qiskit.jobs package¶
Submodules¶
strangeworks_qiskit.jobs.ibm module¶
ibm.py.
- result(sdk_client: SWClient, job_slug: str) Result | None ¶
Return job results.
Job must be in COMPLETED state before results can be retrieved.
- Parameters:
- sdk_client: SDKClient
client to make requests to the Strangeworks platform.
- job_slug: str
used to identify a job record.
- Returns:
- : Result | None
result object populated with job result or None if result file cannot be found or job status is not COMPLETED
- status(sdk_client: SWClient, job_slug: str) Job ¶
Retrieve job status.
- Parameters:
- sdk_client: SDKClient
client to make requests to the Strangeworks platform.
- job_slug: str
used to identify a job record.
- Returns:
- : Job
Job object corresponding to the job slug with updated status info.
- submit(sdk_client: SWClient, circuit, backend: BackendV1, **kwargs) Job ¶
Submit job requests to the ibm service.
- Parameters:
- sdk_client: SDKClient
client to make requests to the Strangeworks platform.
- circuit:
circuit which will be run
- backend: Backend
the backend which will run the circuit
- Returns:
- : Job
Job object with information about the request.
strangeworks_qiskit.jobs.job module¶
job.py.
- class StrangeworksJob(backend, circuit, remote, sdk_client: SWClient | None = None, **kwargs)¶
Bases:
JobV1
Strangeworks implementation of a Qiskit Job.
- cancel()¶
Cancel job.
Only jobs that are running remotely can be cancelled.
- result() Result ¶
Obtain job result.
Jobs run on local simulators will already have a terminal status and a result if they terminated with a status of DONE.
If a job is running remotely, this method will block until it reaches a terminal state. If the job finishes with a status of DONE, its results will be retrieved.
Job results stored as a part of the object once they are available.
- status()¶
Return job status.
Jobs run on local simulators will have a status in terminal state once they return from submit.
Jobs running remotely will make a remote call to retrieve job status until it reaches a terminal state.
- submit(**kwargs)¶
Submit a job.
The method will wait for a result for jobs running on local simulators. For jobs running remotely, the method will return once the job request has been accepted successfully.
strangeworks_qiskit.jobs.status module¶
status.py.
- qiskit_status(status: str)¶