quantum_launcher.workflow.pilotjob_scheduler#
Summary#
Classes:
Reference#
- class quantum_launcher.workflow.pilotjob_scheduler.JobManager(manager: Manager | None = None)[source]#
Bases:
object
- submit(problem: Problem, algorithm: Algorithm, backend: Backend, output_path: str, cores: int | None = None) str [source]#
Submits Quantum Launcher job to the scheduler
- Parameters:
- Returns:
Job Id.
- Return type:
str
- submit_many(problem: Problem, algorithm: Algorithm, backend: Backend, output_path: str, cores_per_job: int = 1) List[str] [source]#
Submits as many jobs as there are currently available cores.
- wait_for_a_job(job_id: str | None = None, timeout: int | float | None = None) tuple[str, str] [source]#
Waits for a job to finish and returns it’s id and status.
- Parameters:
job_id (Optional[str], optional) – Id of selected job, if None waiting for any job. Defaults to None.
timeout (Optional[int | float], optional) – Timeout in seconds. Defaults to None.
- Raises:
ValueError – Raises if job_id not found or there are no jobs left.
- Returns:
job_id, job’s status
- Return type:
tuple[str, str]
- read_results(job_id: str) Result [source]#
Reads the result of given job_id.
- Parameters:
job_id (str) – Job Id.
- Returns:
Result of selected Job.
- Return type: