Skip to content
Merged
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
9 changes: 8 additions & 1 deletion qiskit/providers/aer/aerjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

"""This module implements the job class used for AerBackend objects."""

import warnings
from concurrent import futures
import logging
import functools
Expand Down Expand Up @@ -55,6 +56,10 @@ def __init__(self, backend, job_id, fn, qobj, *args):
super().__init__(backend, job_id)
self._fn = fn
self._qobj = qobj
if args:
warnings.warn('Using *args for AerJob is deprecated. All backend'
' options should be contained in the assembled Qobj.',
DeprecationWarning)
self._args = args
self._future = None

Expand All @@ -70,7 +75,9 @@ def submit(self):
if self._future is not None:
raise JobError("We have already submitted the job!")

self._future = self._executor.submit(self._fn, self._job_id, self._qobj,
self._future = self._executor.submit(self._fn,
self._qobj,
self._job_id,
*self._args)

@requires_submit
Expand Down
Loading