Source code for qiskit.providers.basicaer.basicaerjob
# This code is part of Qiskit.
# (C) Copyright IBM 2017.
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
"""This module implements the job class used by Basic Aer Provider."""
from qiskit.providers import JobStatus
from qiskit.providers.job import JobV1
_async = False
def __init__(self, backend, job_id, result):
self._result = result
[docs] def submit(self):
"""Submit the job to the backend for execution.
JobError: if trying to re-submit the job.
[docs] def result(self, timeout=None):
"""Get job result .
qiskit.Result: Result object
if timeout is not None:
"The timeout kwarg doesn't have any meaning with "
"BasicAer because execution is synchronous and the "
"result already exists when run() returns.",
[docs] def status(self):
"""Gets the status of the job by querying the Python's future
qiskit.providers.JobStatus: The current JobStatus
[docs] def backend(self):
"""Return the instance of the backend used for this job."""