Skip to content

Commit

Permalink
Make submission compatible with qiskit <=0.45
Browse files Browse the repository at this point in the history
  • Loading branch information
ihincks committed Feb 2, 2024
1 parent d9ab072 commit b0903f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion qiskit_aer/primitives/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def _run(
parameter_values,
**run_options,
)
job._submit()
# The public submit method was removed in Qiskit 0.46
(job.submit if hasattr(job, "submit") else job._submit)()
return job

def _compute(self, circuits, observables, parameter_values, run_options):
Expand Down
3 changes: 2 additions & 1 deletion qiskit_aer/primitives/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def _run(
self._circuits.append(circuit)
self._parameters.append(circuit.parameters)
job = PrimitiveJob(self._call, circuit_indices, parameter_values, **run_options)
job._submit()
# The public submit method was removed in Qiskit 0.46
(job.submit if hasattr(job, "submit") else job._submit)()
return job

@staticmethod
Expand Down

0 comments on commit b0903f9

Please sign in to comment.